aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/ISSUE_TEMPLATE.md2
-rw-r--r--.gitignore3
-rw-r--r--.travis.yml5
-rw-r--r--.tx/config2
-rw-r--r--Makefile.am16
-rw-r--r--configure.ac50
-rw-r--r--contrib/README.md2
-rw-r--r--contrib/debian/copyright3
-rw-r--r--contrib/debian/examples/bitcoin.conf23
-rwxr-xr-xcontrib/devtools/check-doc.py2
-rwxr-xr-xcontrib/devtools/github-merge.py4
-rwxr-xr-xcontrib/devtools/optimize-pngs.py2
-rwxr-xr-xcontrib/devtools/test-security-check.py1
-rw-r--r--contrib/linearize/README.md45
-rw-r--r--contrib/linearize/example-linearize.cfg4
-rwxr-xr-xcontrib/linearize/linearize-data.py43
-rwxr-xr-xcontrib/linearize/linearize-hashes.py45
-rwxr-xr-xcontrib/macdeploy/custom_dsstore.py2
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus6
-rw-r--r--contrib/qos/README.md4
-rw-r--r--contrib/qos/tc.sh30
-rwxr-xr-xcontrib/seeds/makeseeds.py2
-rw-r--r--contrib/testgen/base58.py2
-rwxr-xr-xcontrib/testgen/gen_base58_test_vectors.py2
-rwxr-xr-xcontrib/zmq/zmq_sub.py1
-rwxr-xr-xdepends/config.guess12
-rw-r--r--depends/config.site.in1
-rwxr-xr-xdepends/config.sub31
-rw-r--r--depends/hosts/darwin.mk2
-rw-r--r--depends/packages/boost.mk6
-rw-r--r--depends/packages/dbus.mk4
-rw-r--r--depends/packages/freetype.mk4
-rw-r--r--depends/packages/libevent.mk12
-rw-r--r--depends/packages/native_ccache.mk4
-rw-r--r--depends/packages/native_ds_store.mk6
-rw-r--r--depends/packages/qt.mk19
-rw-r--r--depends/patches/libevent/libevent-2-fixes.patch18
-rw-r--r--depends/patches/libevent/reuseaddr.patch21
-rw-r--r--depends/patches/qt/configure-xcoderun.patch25
-rw-r--r--depends/patches/qt/fix-xcb-include-order.patch18
-rw-r--r--depends/patches/qt/fix_qt_pkgconfig.patch6
-rw-r--r--depends/patches/qt/mac-qmake.conf6
-rw-r--r--depends/patches/qt/mingw-uuidof.patch18
-rw-r--r--depends/patches/qt/pidlist_absolute.patch12
-rw-r--r--doc/Doxyfile2
-rw-r--r--doc/README.md1
-rw-r--r--doc/build-osx.md6
-rw-r--r--doc/build-unix.md8
-rw-r--r--doc/build-windows.md73
-rw-r--r--doc/developer-notes.md75
-rw-r--r--doc/fuzzing.md66
-rw-r--r--doc/man/bitcoin-qt.112
-rw-r--r--doc/man/bitcoind.112
-rw-r--r--doc/release-notes.md81
-rw-r--r--doc/release-notes/release-notes-0.13.2.md178
-rw-r--r--doc/release-process.md9
-rwxr-xr-xqa/pull-tester/rpc-tests.py63
-rw-r--r--qa/pull-tester/run-bitcoind-for-test.sh.in36
-rwxr-xr-xqa/rpc-tests/assumevalid.py191
-rwxr-xr-xqa/rpc-tests/bip68-112-113-p2p.py3
-rwxr-xr-xqa/rpc-tests/bip9-softforks.py2
-rwxr-xr-xqa/rpc-tests/fundrawtransaction.py89
-rwxr-xr-xqa/rpc-tests/import-rescan.py155
-rwxr-xr-xqa/rpc-tests/maxuploadtarget.py39
-rwxr-xr-xqa/rpc-tests/mempool_limit.py6
-rwxr-xr-xqa/rpc-tests/mempool_packages.py4
-rwxr-xr-xqa/rpc-tests/mempool_reorg.py2
-rwxr-xr-xqa/rpc-tests/multi_rpc.py2
-rwxr-xr-xqa/rpc-tests/nodehandling.py1
-rwxr-xr-xqa/rpc-tests/p2p-compactblocks.py149
-rwxr-xr-xqa/rpc-tests/p2p-fullblocktest.py26
-rwxr-xr-xqa/rpc-tests/p2p-mempool.py1
-rwxr-xr-xqa/rpc-tests/p2p-segwit.py98
-rwxr-xr-xqa/rpc-tests/preciousblock.py69
-rwxr-xr-xqa/rpc-tests/prioritise_transaction.py8
-rwxr-xr-xqa/rpc-tests/proxy_test.py16
-rwxr-xr-xqa/rpc-tests/pruning.py185
-rwxr-xr-xqa/rpc-tests/rawtransactions.py39
-rwxr-xr-xqa/rpc-tests/replace-by-fee.py2
-rwxr-xr-xqa/rpc-tests/rpcnamedargs.py52
-rwxr-xr-xqa/rpc-tests/segwit.py19
-rwxr-xr-xqa/rpc-tests/sendheaders.py11
-rwxr-xr-xqa/rpc-tests/smartfees.py12
-rw-r--r--qa/rpc-tests/test_framework/authproxy.py19
-rwxr-xr-xqa/rpc-tests/test_framework/comptool.py19
-rwxr-xr-xqa/rpc-tests/test_framework/mininode.py28
-rwxr-xr-xqa/rpc-tests/test_framework/test_framework.py18
-rw-r--r--qa/rpc-tests/test_framework/util.py117
-rwxr-xr-xqa/rpc-tests/wallet-dump.py6
-rwxr-xr-xqa/rpc-tests/wallet.py58
-rwxr-xr-xqa/rpc-tests/zmq_test.py3
-rwxr-xr-xshare/qt/extract_strings_qt.py1
-rwxr-xr-xshare/rpcuser/rpcuser.py2
-rw-r--r--src/Makefile.am14
-rw-r--r--src/Makefile.bench.include23
-rw-r--r--src/Makefile.qt.include12
-rw-r--r--src/Makefile.qttest.include3
-rw-r--r--src/Makefile.test.include89
-rw-r--r--src/addrdb.cpp4
-rw-r--r--src/addrdb.h4
-rw-r--r--src/addrman.cpp2
-rw-r--r--src/addrman.h66
-rw-r--r--src/amount.cpp2
-rw-r--r--src/amount.h4
-rw-r--r--src/arith_uint256.cpp2
-rw-r--r--src/arith_uint256.h2
-rw-r--r--src/base58.cpp12
-rw-r--r--src/bench/Examples.cpp4
-rw-r--r--src/bench/base58.cpp4
-rw-r--r--src/bench/bench.cpp45
-rw-r--r--src/bench/bench.h12
-rw-r--r--src/bench/bench_bitcoin.cpp4
-rw-r--r--src/bench/checkblock.cpp56
-rw-r--r--src/bench/coin_selection.cpp14
-rw-r--r--src/bench/crypto_hash.cpp10
-rw-r--r--src/bench/data/block413567.rawbin0 -> 999887 bytes
-rw-r--r--src/bench/mempool_eviction.cpp4
-rw-r--r--src/bench/perf.cpp53
-rw-r--r--src/bench/perf.h37
-rw-r--r--src/bench/verify_script.cpp9
-rw-r--r--src/bitcoin-cli.cpp114
-rw-r--r--src/bitcoin-tx.cpp399
-rw-r--r--src/bitcoind.cpp40
-rw-r--r--src/blockencodings.cpp65
-rw-r--r--src/blockencodings.h29
-rw-r--r--src/bloom.cpp2
-rw-r--r--src/bloom.h4
-rw-r--r--src/chain.cpp6
-rw-r--r--src/chain.h24
-rw-r--r--src/chainparams.cpp41
-rw-r--r--src/chainparams.h13
-rw-r--r--src/checkpoints.cpp44
-rw-r--r--src/checkpoints.h4
-rw-r--r--src/clientversion.cpp2
-rw-r--r--src/clientversion.h2
-rw-r--r--src/coins.cpp46
-rw-r--r--src/coins.h55
-rw-r--r--src/compat.h3
-rw-r--r--src/compat/byteswap.h21
-rw-r--r--src/compat/endian.h2
-rw-r--r--src/compressor.h16
-rw-r--r--src/consensus/consensus.h2
-rw-r--r--src/consensus/merkle.cpp8
-rw-r--r--src/consensus/params.h3
-rw-r--r--src/consensus/validation.h2
-rw-r--r--src/core_io.h25
-rw-r--r--src/core_memusage.h36
-rw-r--r--src/core_read.cpp4
-rw-r--r--src/core_write.cpp10
-rw-r--r--src/crypto/aes.h2
-rw-r--r--src/crypto/common.h36
-rw-r--r--src/crypto/ctaes/ctaes.c8
-rw-r--r--src/crypto/ctaes/test.c2
-rw-r--r--src/crypto/ripemd160.h2
-rw-r--r--src/crypto/sha1.h2
-rw-r--r--src/crypto/sha256.h2
-rw-r--r--src/crypto/sha512.h2
-rw-r--r--src/cuckoocache.h457
-rw-r--r--src/dbwrapper.cpp2
-rw-r--r--src/dbwrapper.h40
-rw-r--r--src/hash.cpp2
-rw-r--r--src/hash.h14
-rw-r--r--src/httprpc.cpp12
-rw-r--r--src/httpserver.cpp12
-rw-r--r--src/httpserver.h2
-rw-r--r--src/init.cpp299
-rw-r--r--src/init.h27
-rw-r--r--src/key.cpp2
-rw-r--r--src/key.h6
-rw-r--r--src/keystore.cpp2
-rw-r--r--src/leveldb/.travis.yml13
-rw-r--r--src/leveldb/Makefile467
-rw-r--r--src/leveldb/README51
-rw-r--r--src/leveldb/README.md39
-rwxr-xr-xsrc/leveldb/build_detect_platform2
-rw-r--r--src/leveldb/db/corruption_test.cc2
-rw-r--r--src/leveldb/db/db_bench.cc24
-rw-r--r--src/leveldb/db/db_impl.cc194
-rw-r--r--src/leveldb/db/db_impl.h8
-rw-r--r--src/leveldb/db/db_test.cc32
-rw-r--r--src/leveldb/db/fault_injection_test.cc554
-rw-r--r--src/leveldb/db/leveldbutil.cc (renamed from src/leveldb/db/leveldb_main.cc)0
-rw-r--r--src/leveldb/db/log_reader.cc22
-rw-r--r--src/leveldb/db/log_reader.h5
-rw-r--r--src/leveldb/db/log_test.cc101
-rw-r--r--src/leveldb/db/log_writer.cc17
-rw-r--r--src/leveldb/db/log_writer.h6
-rw-r--r--src/leveldb/db/memtable.h5
-rw-r--r--src/leveldb/db/recovery_test.cc324
-rw-r--r--src/leveldb/db/skiplist.h8
-rw-r--r--src/leveldb/db/skiplist_test.cc2
-rw-r--r--src/leveldb/db/snapshot.h1
-rw-r--r--src/leveldb/db/version_set.cc40
-rw-r--r--src/leveldb/db/version_set.h4
-rw-r--r--src/leveldb/db/write_batch_internal.h1
-rw-r--r--src/leveldb/doc/index.html2
-rw-r--r--src/leveldb/helpers/memenv/memenv.cc13
-rw-r--r--src/leveldb/helpers/memenv/memenv_test.cc13
-rw-r--r--src/leveldb/include/leveldb/cache.h11
-rw-r--r--src/leveldb/include/leveldb/db.h4
-rw-r--r--src/leveldb/include/leveldb/env.h18
-rw-r--r--src/leveldb/include/leveldb/iterator.h2
-rw-r--r--src/leveldb/include/leveldb/options.h6
-rw-r--r--src/leveldb/include/leveldb/status.h6
-rw-r--r--src/leveldb/port/atomic_pointer.h19
-rw-r--r--src/leveldb/port/port_posix.cc1
-rw-r--r--src/leveldb/table/filter_block.cc4
-rw-r--r--src/leveldb/table/format.cc3
-rw-r--r--src/leveldb/table/iterator_wrapper.h3
-rw-r--r--src/leveldb/table/table.cc2
-rw-r--r--src/leveldb/table/table_test.cc20
-rw-r--r--src/leveldb/util/arena.cc6
-rw-r--r--src/leveldb/util/arena.h10
-rw-r--r--src/leveldb/util/bloom.cc2
-rw-r--r--src/leveldb/util/bloom_test.cc3
-rw-r--r--src/leveldb/util/cache.cc136
-rw-r--r--src/leveldb/util/cache_test.cc42
-rw-r--r--src/leveldb/util/env.cc4
-rw-r--r--src/leveldb/util/env_posix.cc13
-rw-r--r--src/leveldb/util/env_win.cc37
-rw-r--r--src/leveldb/util/options.cc2
-rw-r--r--src/leveldb/util/testutil.h10
-rw-r--r--src/limitedmap.h2
-rw-r--r--src/memusage.h2
-rw-r--r--src/merkleblock.cpp8
-rw-r--r--src/merkleblock.h6
-rw-r--r--src/miner.cpp38
-rw-r--r--src/miner.h3
-rw-r--r--src/net.cpp509
-rw-r--r--src/net.h322
-rw-r--r--src/net_processing.cpp3236
-rw-r--r--src/net_processing.h63
-rw-r--r--src/netaddress.cpp2
-rw-r--r--src/netaddress.h8
-rw-r--r--src/netbase.cpp75
-rw-r--r--src/netbase.h3
-rw-r--r--src/netmessagemaker.h36
-rw-r--r--src/noui.cpp2
-rw-r--r--src/policy/fees.cpp260
-rw-r--r--src/policy/fees.h129
-rw-r--r--src/policy/policy.cpp18
-rw-r--r--src/policy/policy.h14
-rw-r--r--src/policy/rbf.cpp2
-rw-r--r--src/policy/rbf.h2
-rw-r--r--src/pow.cpp2
-rw-r--r--src/pow.h2
-rw-r--r--src/prevector.h11
-rw-r--r--src/primitives/block.cpp4
-rw-r--r--src/primitives/block.h13
-rw-r--r--src/primitives/transaction.cpp36
-rw-r--r--src/primitives/transaction.h254
-rw-r--r--src/protocol.cpp8
-rw-r--r--src/protocol.h17
-rw-r--r--src/pubkey.cpp2
-rw-r--r--src/pubkey.h19
-rw-r--r--src/qt/addressbookpage.cpp4
-rw-r--r--src/qt/addresstablemodel.cpp2
-rw-r--r--src/qt/askpassphrasedialog.cpp2
-rw-r--r--src/qt/bantablemodel.cpp9
-rw-r--r--src/qt/bantablemodel.h5
-rw-r--r--src/qt/bitcoin.cpp64
-rw-r--r--src/qt/bitcoin.qrc1
-rw-r--r--src/qt/bitcoin_locale.qrc5
-rw-r--r--src/qt/bitcoingui.cpp72
-rw-r--r--src/qt/bitcoingui.h12
-rw-r--r--src/qt/bitcoinstrings.cpp77
-rw-r--r--src/qt/bitcoinunits.cpp2
-rw-r--r--src/qt/bitcoinunits.h2
-rw-r--r--src/qt/clientmodel.cpp36
-rw-r--r--src/qt/clientmodel.h8
-rw-r--r--src/qt/coincontroldialog.cpp70
-rw-r--r--src/qt/coincontroldialog.h40
-rw-r--r--src/qt/csvmodelwriter.cpp2
-rw-r--r--src/qt/editaddressdialog.cpp2
-rw-r--r--src/qt/forms/modaloverlay.ui6
-rw-r--r--src/qt/forms/sendcoinsdialog.ui4
-rw-r--r--src/qt/guiconstants.h2
-rw-r--r--src/qt/guiutil.cpp41
-rw-r--r--src/qt/guiutil.h40
-rw-r--r--src/qt/intro.cpp2
-rw-r--r--src/qt/intro.h2
-rw-r--r--src/qt/locale/bitcoin_af.ts697
-rw-r--r--src/qt/locale/bitcoin_af_ZA.ts409
-rw-r--r--src/qt/locale/bitcoin_ar.ts883
-rw-r--r--src/qt/locale/bitcoin_be_BY.ts659
-rw-r--r--src/qt/locale/bitcoin_bg.ts1055
-rw-r--r--src/qt/locale/bitcoin_bg_BG.ts195
-rw-r--r--src/qt/locale/bitcoin_ca.ts1345
-rw-r--r--src/qt/locale/bitcoin_ca@valencia.ts1193
-rw-r--r--src/qt/locale/bitcoin_ca_ES.ts1343
-rw-r--r--src/qt/locale/bitcoin_cs.ts1803
-rw-r--r--src/qt/locale/bitcoin_cs_CZ.ts300
-rw-r--r--src/qt/locale/bitcoin_cy.ts75
-rw-r--r--src/qt/locale/bitcoin_da.ts1571
-rw-r--r--src/qt/locale/bitcoin_de.ts1483
-rw-r--r--src/qt/locale/bitcoin_el.ts45
-rw-r--r--src/qt/locale/bitcoin_el_GR.ts123
-rw-r--r--src/qt/locale/bitcoin_en.ts2205
-rw-r--r--src/qt/locale/bitcoin_en_GB.ts307
-rw-r--r--src/qt/locale/bitcoin_eo.ts131
-rw-r--r--src/qt/locale/bitcoin_es.ts1443
-rw-r--r--src/qt/locale/bitcoin_es_AR.ts43
-rw-r--r--src/qt/locale/bitcoin_es_CL.ts84
-rw-r--r--src/qt/locale/bitcoin_es_CO.ts47
-rw-r--r--src/qt/locale/bitcoin_es_DO.ts107
-rw-r--r--src/qt/locale/bitcoin_es_ES.ts3478
-rw-r--r--src/qt/locale/bitcoin_es_MX.ts71
-rw-r--r--src/qt/locale/bitcoin_es_UY.ts65
-rw-r--r--src/qt/locale/bitcoin_es_VE.ts87
-rw-r--r--src/qt/locale/bitcoin_et.ts883
-rw-r--r--src/qt/locale/bitcoin_et_EE.ts747
-rw-r--r--src/qt/locale/bitcoin_eu_ES.ts481
-rw-r--r--src/qt/locale/bitcoin_fa.ts467
-rw-r--r--src/qt/locale/bitcoin_fa_IR.ts61
-rw-r--r--src/qt/locale/bitcoin_fi.ts385
-rw-r--r--src/qt/locale/bitcoin_fr.ts1727
-rw-r--r--src/qt/locale/bitcoin_fr_CA.ts45
-rw-r--r--src/qt/locale/bitcoin_fr_FR.ts123
-rw-r--r--src/qt/locale/bitcoin_gl.ts105
-rw-r--r--src/qt/locale/bitcoin_he.ts235
-rw-r--r--src/qt/locale/bitcoin_hi_IN.ts53
-rw-r--r--src/qt/locale/bitcoin_hr.ts133
-rw-r--r--src/qt/locale/bitcoin_hu.ts167
-rw-r--r--src/qt/locale/bitcoin_id_ID.ts139
-rw-r--r--src/qt/locale/bitcoin_it.ts587
-rw-r--r--src/qt/locale/bitcoin_it_IT.ts49
-rw-r--r--src/qt/locale/bitcoin_ja.ts1491
-rw-r--r--src/qt/locale/bitcoin_ka.ts115
-rw-r--r--src/qt/locale/bitcoin_kk_KZ.ts83
-rw-r--r--src/qt/locale/bitcoin_ko_KR.ts881
-rw-r--r--src/qt/locale/bitcoin_ku_IQ.ts149
-rw-r--r--src/qt/locale/bitcoin_ky.ts105
-rw-r--r--src/qt/locale/bitcoin_la.ts77
-rw-r--r--src/qt/locale/bitcoin_lt.ts77
-rw-r--r--src/qt/locale/bitcoin_lv_LV.ts99
-rw-r--r--src/qt/locale/bitcoin_mk_MK.ts87
-rw-r--r--src/qt/locale/bitcoin_mn.ts57
-rw-r--r--src/qt/locale/bitcoin_ms_MY.ts48
-rw-r--r--src/qt/locale/bitcoin_nb.ts235
-rw-r--r--src/qt/locale/bitcoin_ne.ts555
-rw-r--r--src/qt/locale/bitcoin_nl.ts1277
-rw-r--r--src/qt/locale/bitcoin_pam.ts69
-rw-r--r--src/qt/locale/bitcoin_pl.ts709
-rw-r--r--src/qt/locale/bitcoin_pt_BR.ts1597
-rw-r--r--src/qt/locale/bitcoin_pt_PT.ts703
-rw-r--r--src/qt/locale/bitcoin_ro.ts641
-rw-r--r--src/qt/locale/bitcoin_ro_RO.ts175
-rw-r--r--src/qt/locale/bitcoin_ru.ts1547
-rw-r--r--src/qt/locale/bitcoin_ru_RU.ts61
-rw-r--r--src/qt/locale/bitcoin_sk.ts393
-rw-r--r--src/qt/locale/bitcoin_sl_SI.ts201
-rw-r--r--src/qt/locale/bitcoin_sq.ts395
-rw-r--r--src/qt/locale/bitcoin_sr.ts67
-rw-r--r--src/qt/locale/bitcoin_sr@latin.ts257
-rw-r--r--src/qt/locale/bitcoin_sv.ts436
-rw-r--r--src/qt/locale/bitcoin_ta.ts109
-rw-r--r--src/qt/locale/bitcoin_th_TH.ts95
-rw-r--r--src/qt/locale/bitcoin_tr.ts369
-rw-r--r--src/qt/locale/bitcoin_tr_TR.ts43
-rw-r--r--src/qt/locale/bitcoin_uk.ts187
-rw-r--r--src/qt/locale/bitcoin_ur_PK.ts45
-rw-r--r--src/qt/locale/bitcoin_uz@Cyrl.ts115
-rw-r--r--src/qt/locale/bitcoin_vi.ts43
-rw-r--r--src/qt/locale/bitcoin_vi_VN.ts623
-rw-r--r--src/qt/locale/bitcoin_zh.ts71
-rw-r--r--src/qt/locale/bitcoin_zh_CN.ts1531
-rw-r--r--src/qt/locale/bitcoin_zh_HK.ts43
-rw-r--r--src/qt/locale/bitcoin_zh_TW.ts1489
-rw-r--r--src/qt/modaloverlay.cpp9
-rw-r--r--src/qt/modaloverlay.h2
-rw-r--r--src/qt/networkstyle.cpp2
-rw-r--r--src/qt/notificator.cpp2
-rw-r--r--src/qt/optionsdialog.cpp4
-rw-r--r--src/qt/optionsdialog.h2
-rw-r--r--src/qt/optionsmodel.cpp8
-rw-r--r--src/qt/optionsmodel.h4
-rw-r--r--src/qt/overviewpage.cpp13
-rw-r--r--src/qt/overviewpage.h5
-rw-r--r--src/qt/paymentrequestplus.cpp22
-rw-r--r--src/qt/paymentrequestplus.h2
-rw-r--r--src/qt/paymentserver.cpp51
-rw-r--r--src/qt/paymentserver.h7
-rw-r--r--src/qt/peertablemodel.cpp12
-rw-r--r--src/qt/peertablemodel.h7
-rw-r--r--src/qt/platformstyle.cpp2
-rw-r--r--src/qt/qvalidatedlineedit.cpp2
-rw-r--r--src/qt/qvaluecombobox.cpp2
-rw-r--r--src/qt/receivecoinsdialog.cpp7
-rw-r--r--src/qt/receivecoinsdialog.h2
-rw-r--r--src/qt/receiverequestdialog.cpp4
-rw-r--r--src/qt/receiverequestdialog.h2
-rw-r--r--src/qt/recentrequeststablemodel.cpp4
-rw-r--r--src/qt/recentrequeststablemodel.h4
-rw-r--r--src/qt/res/icons/network_disabled.pngbin0 -> 2438 bytes
-rw-r--r--src/qt/res/src/connect-0.svg4
-rw-r--r--src/qt/res/src/connect-1.svg4
-rw-r--r--src/qt/res/src/connect-2.svg4
-rw-r--r--src/qt/res/src/connect-3.svg4
-rw-r--r--src/qt/res/src/connect-4.svg4
-rw-r--r--src/qt/res/src/network_disabled.svg49
-rw-r--r--src/qt/rpcconsole.cpp322
-rw-r--r--src/qt/rpcconsole.h19
-rw-r--r--src/qt/sendcoinsdialog.cpp25
-rw-r--r--src/qt/sendcoinsdialog.h2
-rw-r--r--src/qt/sendcoinsentry.cpp2
-rw-r--r--src/qt/signverifymessagedialog.cpp4
-rw-r--r--src/qt/splashscreen.cpp3
-rw-r--r--src/qt/splashscreen.h2
-rw-r--r--src/qt/test/compattests.cpp23
-rw-r--r--src/qt/test/compattests.h19
-rw-r--r--src/qt/test/rpcnestedtests.cpp91
-rw-r--r--src/qt/test/test_main.cpp4
-rw-r--r--src/qt/transactiondesc.cpp34
-rw-r--r--src/qt/transactiondescdialog.cpp2
-rw-r--r--src/qt/transactionfilterproxy.cpp2
-rw-r--r--src/qt/transactionrecord.cpp22
-rw-r--r--src/qt/transactionrecord.h2
-rw-r--r--src/qt/transactiontablemodel.cpp4
-rw-r--r--src/qt/transactiontablemodel.h2
-rw-r--r--src/qt/transactionview.cpp8
-rw-r--r--src/qt/transactionview.h2
-rw-r--r--src/qt/utilitydialog.cpp10
-rw-r--r--src/qt/utilitydialog.h4
-rw-r--r--src/qt/walletframe.cpp2
-rw-r--r--src/qt/walletframe.h2
-rw-r--r--src/qt/walletmodel.cpp21
-rw-r--r--src/qt/walletmodel.h4
-rw-r--r--src/qt/walletmodeltransaction.cpp6
-rw-r--r--src/qt/walletview.cpp2
-rw-r--r--src/qt/walletview.h2
-rw-r--r--src/qt/winshutdownmonitor.cpp2
-rw-r--r--src/random.cpp9
-rw-r--r--src/random.h2
-rw-r--r--src/rest.cpp26
-rw-r--r--src/reverselock.h2
-rw-r--r--src/rpc/blockchain.cpp218
-rw-r--r--src/rpc/client.cpp227
-rw-r--r--src/rpc/client.h7
-rw-r--r--src/rpc/mining.cpp111
-rw-r--r--src/rpc/misc.cpp43
-rw-r--r--src/rpc/net.cpp73
-rw-r--r--src/rpc/protocol.cpp2
-rw-r--r--src/rpc/protocol.h2
-rw-r--r--src/rpc/rawtransaction.cpp138
-rw-r--r--src/rpc/server.cpp75
-rw-r--r--src/rpc/server.h8
-rw-r--r--src/scheduler.cpp9
-rw-r--r--src/script/bitcoinconsensus.cpp26
-rw-r--r--src/script/bitcoinconsensus.h4
-rw-r--r--src/script/interpreter.cpp42
-rw-r--r--src/script/ismine.cpp2
-rw-r--r--src/script/ismine.h2
-rw-r--r--src/script/script.cpp2
-rw-r--r--src/script/script.h5
-rw-r--r--src/script/script_error.cpp2
-rw-r--r--src/script/script_error.h2
-rw-r--r--src/script/sigcache.cpp79
-rw-r--r--src/script/sigcache.h11
-rw-r--r--src/script/sign.cpp9
-rw-r--r--src/script/sign.h2
-rw-r--r--src/script/standard.cpp2
-rw-r--r--src/script/standard.h2
-rw-r--r--src/secp256k1/.gitignore1
-rw-r--r--src/secp256k1/.travis.yml9
-rw-r--r--src/secp256k1/Makefile.am18
-rw-r--r--src/secp256k1/build-aux/m4/bitcoin_secp.m44
-rw-r--r--src/secp256k1/configure.ac30
-rw-r--r--src/secp256k1/include/secp256k1.h14
-rw-r--r--src/secp256k1/include/secp256k1_schnorr.h173
-rw-r--r--src/secp256k1/src/ecdsa_impl.h18
-rw-r--r--src/secp256k1/src/ecmult_const_impl.h2
-rw-r--r--src/secp256k1/src/ecmult_gen_impl.h2
-rw-r--r--src/secp256k1/src/ecmult_impl.h23
-rw-r--r--src/secp256k1/src/field.h7
-rw-r--r--src/secp256k1/src/field_impl.h2
-rw-r--r--src/secp256k1/src/group.h4
-rw-r--r--src/secp256k1/src/group_impl.h78
-rw-r--r--src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java34
-rw-r--r--src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java21
-rw-r--r--src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c34
-rw-r--r--src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h8
-rwxr-xr-x[-rw-r--r--]src/secp256k1/src/modules/recovery/main_impl.h4
-rw-r--r--src/secp256k1/src/modules/schnorr/Makefile.am.include10
-rw-r--r--src/secp256k1/src/modules/schnorr/main_impl.h164
-rw-r--r--src/secp256k1/src/modules/schnorr/schnorr.h20
-rw-r--r--src/secp256k1/src/modules/schnorr/schnorr_impl.h207
-rw-r--r--src/secp256k1/src/modules/schnorr/tests_impl.h175
-rw-r--r--src/secp256k1/src/scalar.h4
-rw-r--r--src/secp256k1/src/scalar_4x64_impl.h26
-rw-r--r--src/secp256k1/src/scalar_impl.h39
-rw-r--r--src/secp256k1/src/scalar_low.h15
-rw-r--r--src/secp256k1/src/scalar_low_impl.h114
-rwxr-xr-x[-rw-r--r--]src/secp256k1/src/secp256k1.c4
-rw-r--r--src/secp256k1/src/tests.c20
-rw-r--r--src/secp256k1/src/tests_exhaustive.c329
-rw-r--r--src/serialize.h560
-rw-r--r--src/streams.h193
-rw-r--r--src/support/allocators/secure.h2
-rw-r--r--src/support/events.h56
-rw-r--r--src/support/lockedpool.cpp127
-rw-r--r--src/support/lockedpool.h26
-rw-r--r--src/sync.cpp2
-rw-r--r--src/sync.h3
-rw-r--r--src/test/DoS_tests.cpp68
-rw-r--r--src/test/addrman_tests.cpp14
-rw-r--r--src/test/allocator_tests.cpp16
-rw-r--r--src/test/arith_uint256_tests.cpp2
-rw-r--r--src/test/base58_tests.cpp4
-rw-r--r--src/test/bctest.py2
-rwxr-xr-xsrc/test/bitcoin-util-test.py5
-rw-r--r--src/test/blockencodings_tests.cpp114
-rw-r--r--src/test/bloom_tests.cpp90
-rw-r--r--src/test/bswap_tests.cpp26
-rw-r--r--src/test/coins_tests.cpp550
-rw-r--r--src/test/crypto_tests.cpp4
-rw-r--r--src/test/cuckoocache_tests.cpp394
-rw-r--r--src/test/data/bitcoin-util-test.json178
-rw-r--r--src/test/data/blanktxv1.hex (renamed from src/test/data/blanktx.hex)0
-rw-r--r--src/test/data/blanktxv1.json (renamed from src/test/data/blanktx.json)0
-rw-r--r--src/test/data/blanktxv2.hex1
-rw-r--r--src/test/data/blanktxv2.json11
-rw-r--r--src/test/data/tx_valid.json20
-rw-r--r--src/test/data/txcreate1.hex2
-rw-r--r--src/test/data/txcreate1.json8
-rw-r--r--src/test/data/txcreate2.hex2
-rw-r--r--src/test/data/txcreate2.json8
-rw-r--r--src/test/data/txcreatedata1.hex2
-rw-r--r--src/test/data/txcreatedata2.hex2
-rw-r--r--src/test/data/txcreatedata2.json8
-rw-r--r--src/test/data/txcreatedata_seq0.hex2
-rw-r--r--src/test/data/txcreatedata_seq0.json8
-rw-r--r--src/test/data/txcreatemultisig1.hex1
-rw-r--r--src/test/data/txcreatemultisig1.json26
-rw-r--r--src/test/data/txcreatemultisig2.hex1
-rw-r--r--src/test/data/txcreatemultisig2.json24
-rw-r--r--src/test/data/txcreatemultisig3.hex1
-rw-r--r--src/test/data/txcreatemultisig3.json20
-rw-r--r--src/test/data/txcreatemultisig4.hex1
-rw-r--r--src/test/data/txcreatemultisig4.json24
-rw-r--r--src/test/data/txcreateoutpubkey1.hex1
-rw-r--r--src/test/data/txcreateoutpubkey1.json24
-rw-r--r--src/test/data/txcreateoutpubkey2.hex1
-rw-r--r--src/test/data/txcreateoutpubkey2.json20
-rw-r--r--src/test/data/txcreateoutpubkey3.hex1
-rw-r--r--src/test/data/txcreateoutpubkey3.json24
-rw-r--r--src/test/data/txcreatescript1.hex1
-rw-r--r--src/test/data/txcreatescript1.json20
-rw-r--r--src/test/data/txcreatescript2.hex1
-rw-r--r--src/test/data/txcreatescript2.json24
-rw-r--r--src/test/data/txcreatescript3.hex1
-rw-r--r--src/test/data/txcreatescript3.json20
-rw-r--r--src/test/data/txcreatescript4.hex1
-rw-r--r--src/test/data/txcreatescript4.json24
-rw-r--r--src/test/data/txcreatesignv1.hex (renamed from src/test/data/txcreatesign.hex)0
-rw-r--r--src/test/data/txcreatesignv1.json (renamed from src/test/data/txcreatesign.json)0
-rw-r--r--src/test/data/txcreatesignv2.hex1
-rw-r--r--src/test/dbwrapper_tests.cpp38
-rw-r--r--src/test/hash_tests.cpp10
-rw-r--r--src/test/key_tests.cpp24
-rw-r--r--src/test/limitedmap_tests.cpp4
-rw-r--r--src/test/main_tests.cpp5
-rw-r--r--src/test/mempool_tests.cpp65
-rw-r--r--src/test/merkle_tests.cpp12
-rw-r--r--src/test/miner_tests.cpp43
-rw-r--r--src/test/multisig_tests.cpp24
-rw-r--r--src/test/net_tests.cpp16
-rw-r--r--src/test/netbase_tests.cpp10
-rw-r--r--src/test/pmt_tests.cpp10
-rw-r--r--src/test/policyestimator_tests.cpp98
-rw-r--r--src/test/pow_tests.cpp2
-rw-r--r--src/test/prevector_tests.cpp25
-rw-r--r--src/test/raii_event_tests.cpp88
-rw-r--r--src/test/reverselock_tests.cpp2
-rw-r--r--src/test/rpc_tests.cpp162
-rw-r--r--src/test/scheduler_tests.cpp2
-rw-r--r--src/test/script_P2SH_tests.cpp20
-rw-r--r--src/test/script_tests.cpp70
-rw-r--r--src/test/scriptnum_tests.cpp6
-rw-r--r--src/test/serialize_tests.cpp78
-rw-r--r--src/test/sighash_tests.cpp12
-rw-r--r--src/test/sigopcount_tests.cpp58
-rw-r--r--src/test/skiplist_tests.cpp47
-rw-r--r--src/test/streams_tests.cpp63
-rw-r--r--src/test/test_bitcoin.cpp28
-rw-r--r--src/test/test_bitcoin.h10
-rw-r--r--src/test/test_bitcoin_fuzzy.cpp256
-rw-r--r--src/test/test_random.h2
-rw-r--r--src/test/timedata_tests.cpp2
-rw-r--r--src/test/transaction_tests.cpp151
-rw-r--r--src/test/txvalidationcache_tests.cpp7
-rw-r--r--src/test/uint256_tests.cpp48
-rw-r--r--src/test/univalue_tests.cpp41
-rw-r--r--src/test/util_tests.cpp12
-rw-r--r--src/test/versionbits_tests.cpp4
-rw-r--r--src/threadinterrupt.cpp41
-rw-r--r--src/threadinterrupt.h34
-rw-r--r--src/timedata.cpp7
-rw-r--r--src/timedata.h2
-rw-r--r--src/torcontrol.cpp12
-rw-r--r--src/txdb.cpp2
-rw-r--r--src/txdb.h4
-rw-r--r--src/txmempool.cpp83
-rw-r--r--src/txmempool.h42
-rw-r--r--src/ui_interface.h5
-rw-r--r--src/uint256.cpp2
-rw-r--r--src/uint256.h11
-rw-r--r--src/undo.h28
-rw-r--r--src/util.cpp84
-rw-r--r--src/util.h36
-rw-r--r--src/utilstrencodings.cpp2
-rw-r--r--src/utilstrencodings.h2
-rw-r--r--src/utiltime.cpp5
-rw-r--r--src/validation.cpp (renamed from src/main.cpp)3407
-rw-r--r--src/validation.h (renamed from src/main.h)126
-rw-r--r--src/validationinterface.cpp5
-rw-r--r--src/validationinterface.h8
-rw-r--r--src/version.h7
-rw-r--r--src/wallet/coincontrol.h2
-rw-r--r--src/wallet/crypter.cpp2
-rw-r--r--src/wallet/crypter.h4
-rw-r--r--src/wallet/db.cpp10
-rw-r--r--src/wallet/db.h14
-rw-r--r--src/wallet/rpcdump.cpp34
-rw-r--r--src/wallet/rpcwallet.cpp319
-rw-r--r--src/wallet/test/accounting_tests.cpp6
-rw-r--r--src/wallet/test/crypto_tests.cpp34
-rw-r--r--src/wallet/test/wallet_tests.cpp90
-rw-r--r--src/wallet/wallet.cpp454
-rw-r--r--src/wallet/wallet.h86
-rw-r--r--src/wallet/walletdb.cpp7
-rw-r--r--src/wallet/walletdb.h8
-rw-r--r--src/warnings.cpp89
-rw-r--r--src/warnings.h21
-rw-r--r--src/zmq/zmqnotificationinterface.cpp12
-rw-r--r--src/zmq/zmqnotificationinterface.h4
-rw-r--r--src/zmq/zmqpublishnotifier.cpp10
-rw-r--r--src/zmq/zmqpublishnotifier.h2
637 files changed, 56567 insertions, 14543 deletions
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index acb54dd354..28c1814998 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -4,6 +4,8 @@ This issue tracker is only for technical issues related to bitcoin-core.
General bitcoin questions and/or support requests and are best directed to the [Bitcoin StackExchange](https://bitcoin.stackexchange.com).
+For reporting security issues, please read instructions at [https://bitcoincore.org/en/contact/](https://bitcoincore.org/en/contact/).
+
### Describe the issue
### Can you reliably reproduce the issue?
diff --git a/.gitignore b/.gitignore
index b9db7cbd39..8ace3c7123 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,7 @@ src/bitcoind
src/bitcoin-cli
src/bitcoin-tx
src/test/test_bitcoin
+src/test/test_bitcoin_fuzzy
src/qt/test/test_bitcoin-qt
# autoreconf
@@ -55,7 +56,6 @@ src/qt/test/moc*.cpp
*.o
*.o-*
*.patch
-.bitcoin
*.a
*.pb.cc
*.pb.h
@@ -101,7 +101,6 @@ coverage_percent.txt
linux-coverage-build
linux-build
win32-build
-qa/pull-tester/run-bitcoind-for-test.sh
qa/pull-tester/tests_config.py
qa/cache/*
diff --git a/.travis.yml b/.travis.yml
index d201cea732..4087a854b4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,7 +58,10 @@ script:
- depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
- mkdir build && cd build
- - ../configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+ - ../configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
+ - make distdir VERSION=$HOST
+ - cd bitcoin-$HOST
+ - ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi
diff --git a/.tx/config b/.tx/config
index 3ce2ae71d0..c4eb6d831f 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
-[bitcoin.qt-translation-013x]
+[bitcoin.qt-translation-014x]
file_filter = src/qt/locale/bitcoin_<lang>.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en
diff --git a/Makefile.am b/Makefile.am
index 44fdf9c9fb..6a8c1b761b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,6 +39,11 @@ OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
+DIST_CONTRIB = $(top_srcdir)/contrib/bitcoin-cli.bash-completion \
+ $(top_srcdir)/contrib/bitcoin-tx.bash-completion \
+ $(top_srcdir)/contrib/bitcoind.bash-completion \
+ $(top_srcdir)/contrib/init \
+ $(top_srcdir)/contrib/rpm
BIN_CHECKS=$(top_srcdir)/contrib/devtools/symbol-check.py \
$(top_srcdir)/contrib/devtools/security-check.py
@@ -106,9 +111,16 @@ osx_volname:
echo $(OSX_VOLNAME) >$@
if BUILD_DARWIN
-$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
+$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING) $(OSX_BACKGROUND_IMAGE)
$(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2 -volname $(OSX_VOLNAME)
+$(OSX_BACKGROUND_IMAGE).png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
+ sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 36 -p 36 -o $@
+$(OSX_BACKGROUND_IMAGE)@2x.png: contrib/macdeploy/$(OSX_BACKGROUND_SVG)
+ sed 's/PACKAGE_NAME/$(PACKAGE_NAME)/' < "$<" | $(RSVG_CONVERT) -f png -d 72 -p 72 -o $@
+$(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.png
+ tiffutil -cathidpicheck $^ -out $@
+
deploydir: $(OSX_DMG)
else
APP_DIST_DIR=$(top_builddir)/dist
@@ -211,7 +223,7 @@ endif
dist_noinst_SCRIPTS = autogen.sh
-EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
+EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-tests $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
diff --git a/configure.ac b/configure.ac
index 705327e816..4723c69d5d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ define(_COPYRIGHT_YEAR, 2016)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
AC_INIT([Bitcoin Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/bitcoin/bitcoin/issues],[bitcoin],[https://bitcoincore.org/])
-AC_CONFIG_SRCDIR([src/main.cpp])
+AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])
@@ -45,7 +45,6 @@ else
CXXFLAGS_overridden=no
fi
AC_PROG_CXX
-m4_ifdef([AC_PROG_OBJCXX],[AC_PROG_OBJCXX])
dnl By default, libtool for mingw refuses to link static libs into a dll for
dnl fear of mixing pic/non-pic objects, and import/export complications. Since
@@ -60,6 +59,15 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory])
dnl Check if -latomic is required for <std::atomic>
CHECK_ATOMIC
+dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
+dnl that we get the same -std flags for both.
+m4_ifdef([AC_PROG_OBJCXX],[
+if test "x${OBJCXX+set}" = "x"; then
+ OBJCXX="${CXX}"
+fi
+AC_PROG_OBJCXX
+])
+
dnl Libtool init checks.
LT_INIT([pic-only])
@@ -311,6 +319,7 @@ case $host in
fi
fi
+ AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
dnl These Homebrew packages may be keg-only, meaning that they won't be found
@@ -406,6 +415,8 @@ if test x$use_lcov = xyes; then
AC_MSG_ERROR("lcov testing requested but genhtml not found")
fi
LCOV="$LCOV --gcov-tool=$GCOV"
+ AX_CHECK_LINK_FLAG([[--coverage]], [LDFLAGS="$LDFLAGS --coverage"],
+ [AC_MSG_ERROR("lcov testing requested but --coverage linker flag does not work")])
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
[AC_MSG_ERROR("lcov testing requested but --coverage flag does not work")])
fi
@@ -504,8 +515,6 @@ if test x$TARGET_OS = xdarwin; then
fi
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
-AC_SEARCH_LIBS([getaddrinfo_a], [anl], [AC_DEFINE(HAVE_GETADDRINFO_A, 1, [Define this symbol if you have getaddrinfo_a])])
-AC_SEARCH_LIBS([inet_pton], [nsl resolv], [AC_DEFINE(HAVE_INET_PTON, 1, [Define this symbol if you have inet_pton])])
AC_CHECK_DECLS([strnlen])
@@ -826,6 +835,13 @@ else
fi
fi
+save_CXXFLAGS="${CXXFLAGS}"
+CXXFLAGS="${CXXFLAGS} ${CRYPTO_CFLAGS} ${SSL_CFLAGS}"
+AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
+#include <openssl/x509_vfy.h>
+])
+CXXFLAGS="${save_CXXFLAGS}"
+
dnl univalue check
need_bundled_univalue=yes
@@ -1071,7 +1087,6 @@ AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
-AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])
@@ -1126,3 +1141,28 @@ case ${OS} in
mv qa/pull-tester/tests_config-2.py qa/pull-tester/tests_config.py
;;
esac
+
+echo
+echo "Options used to compile and link:"
+echo " with wallet = $enable_wallet"
+echo " with gui / qt = $bitcoin_enable_qt"
+if test x$bitcoin_enable_qt != xno; then
+ echo " qt version = $bitcoin_qt_got_major_vers"
+ echo " with qr = $use_qr"
+fi
+echo " with zmq = $use_zmq"
+echo " with test = $use_tests"
+echo " with bench = $use_bench"
+echo " with upnp = $use_upnp"
+echo " debug enabled = $enable_debug"
+echo
+echo " target os = $TARGET_OS"
+echo " build os = $BUILD_OS"
+echo
+echo " CC = $CC"
+echo " CFLAGS = $CFLAGS"
+echo " CPPFLAGS = $CPPFLAGS"
+echo " CXX = $CXX"
+echo " CXXFLAGS = $CXXFLAGS"
+echo " LDFLAGS = $LDFLAGS"
+echo
diff --git a/contrib/README.md b/contrib/README.md
index ab5f57587e..4ea9700f59 100644
--- a/contrib/README.md
+++ b/contrib/README.md
@@ -38,7 +38,7 @@ Scripts and notes for Mac builds.
RPM spec file for building bitcoin-core on RPM based distributions
### [Gitian-build](/contrib/gitian-build.sh) ###
-Script for running full gitian builds.
+Script for running full Gitian builds.
Test and Verify Tools
---------------------
diff --git a/contrib/debian/copyright b/contrib/debian/copyright
index 5cac6e533c..0fa06f1aa9 100644
--- a/contrib/debian/copyright
+++ b/contrib/debian/copyright
@@ -47,7 +47,10 @@ Comment: Site: https://github.com/stephenhutchings/typicons.font
Files: src/qt/res/icons/connect*.png
src/qt/res/src/connect-*.svg
+ src/qt/res/icons/network_disabled.png
+ src/qt/res/src/network_disabled.svg
Copyright: Marco Falke
+ Luke Dashjr
License: Expat
Comment: Inspired by Stephan Hutchings Typicons
diff --git a/contrib/debian/examples/bitcoin.conf b/contrib/debian/examples/bitcoin.conf
index 2831c07292..afbc7882e0 100644
--- a/contrib/debian/examples/bitcoin.conf
+++ b/contrib/debian/examples/bitcoin.conf
@@ -67,9 +67,30 @@
# This option can be specified multiple times (default: bind to all interfaces)
#rpcbind=<addr>
-# You must set rpcuser and rpcpassword to secure the JSON-RPC api
+# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
+# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
+# when the server and client are run as the same user.
+#
+# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
+# method(DEPRECATED) is to set this pair for the server and client:
#rpcuser=Ulysseys
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
+#
+# The second method `rpcauth` can be added to server startup argument. It is set at intialization time
+# using the output from the script in share/rpcuser/rpcuser.py after providing a username:
+#
+# ./share/rpcuser/rpcuser.py alice
+# String to be appended to bitcoin.conf:
+# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
+# Your password:
+# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
+#
+# On client-side, you add the normal user/password pair to send commands:
+#rpcuser=alice
+#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
+#
+# You can even add multiple entries of these to the server conf file, and client can use any of them:
+# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
# How many seconds bitcoin will wait for a complete RPC HTTP request.
# after the HTTP connection is established.
diff --git a/contrib/devtools/check-doc.py b/contrib/devtools/check-doc.py
index 9ea0131ac3..249214e931 100755
--- a/contrib/devtools/check-doc.py
+++ b/contrib/devtools/check-doc.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2015 The Bitcoin Core developers
+# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index f82362fe41..0cee0921b1 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2016 Bitcoin Core Developers
+# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,7 @@
# In case of a clean merge that is accepted by the user, the local branch with
# name $BRANCH is overwritten with the merged result, and optionally pushed.
from __future__ import division,print_function,unicode_literals
-import os,sys
+import os
from sys import stdin,stdout,stderr
import argparse
import subprocess
diff --git a/contrib/devtools/optimize-pngs.py b/contrib/devtools/optimize-pngs.py
index b7b8dc0082..0f653e010b 100755
--- a/contrib/devtools/optimize-pngs.py
+++ b/contrib/devtools/optimize-pngs.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2014-2015 The Bitcoin Core developers
+# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
diff --git a/contrib/devtools/test-security-check.py b/contrib/devtools/test-security-check.py
index c0f120392e..18f9835faa 100755
--- a/contrib/devtools/test-security-check.py
+++ b/contrib/devtools/test-security-check.py
@@ -7,7 +7,6 @@ Test script for security-check.py
'''
from __future__ import division,print_function
import subprocess
-import sys
import unittest
def write_testcode(filename):
diff --git a/contrib/linearize/README.md b/contrib/linearize/README.md
index 06f278f3b3..adc9a559cc 100644
--- a/contrib/linearize/README.md
+++ b/contrib/linearize/README.md
@@ -1,33 +1,48 @@
# Linearize
-Construct a linear, no-fork, best version of the blockchain.
+Construct a linear, no-fork, best version of the Bitcoin blockchain. The scripts
+run using Python 3 but are compatible with Python 2.
## Step 1: Download hash list
$ ./linearize-hashes.py linearize.cfg > hashlist.txt
Required configuration file settings for linearize-hashes:
-* RPC: rpcuser, rpcpassword
+* RPC: `rpcuser`, `rpcpassword`
Optional config file setting for linearize-hashes:
-* RPC: host, port
-* Block chain: min_height, max_height
+* RPC: `host` (Default: `127.0.0.1`)
+* RPC: `port` (Default: `8332`)
+* Blockchain: `min_height`, `max_height`
+* `rev_hash_bytes`: If true, the written block hash list will be
+byte-reversed. (In other words, the hash returned by getblockhash will have its
+bytes reversed.) False by default. Intended for generation of
+standalone hash lists but safe to use with linearize-data.py, which will output
+the same data no matter which byte format is chosen.
+
+The `linearize-hashes` script requires a connection, local or remote, to a
+JSON-RPC server. Running `bitcoind` or `bitcoin-qt -server` will be sufficient.
## Step 2: Copy local block data
$ ./linearize-data.py linearize.cfg
Required configuration file settings:
-* "input": bitcoind blocks/ directory containing blkNNNNN.dat
-* "hashlist": text file containing list of block hashes, linearized-hashes.py
-output.
-* "output_file": bootstrap.dat
+* `output_file`: The file that will contain the final blockchain.
or
-* "output": output directory for linearized blocks/blkNNNNN.dat output
+* `output`: Output directory for linearized `blocks/blkNNNNN.dat` output.
Optional config file setting for linearize-data:
-* "netmagic": network magic number
-* "max_out_sz": maximum output file size (default `1000*1000*1000`)
-* "split_timestamp": Split files when a new month is first seen, in addition to
-reaching a maximum file size.
-* "file_timestamp": Set each file's last-modified time to that of the
-most recent block in that file.
+* `file_timestamp`: Set each file's last-modified time to that of the most
+recent block in that file.
+* `genesis`: The hash of the genesis block in the blockchain.
+* `input`: bitcoind blocks/ directory containing blkNNNNN.dat
+* `hashlist`: text file containing list of block hashes created by
+linearize-hashes.py.
+* `max_out_sz`: Maximum size for files created by the `output_file` option.
+(Default: `1000*1000*1000 bytes`)
+* `netmagic`: Network magic number.
+* `rev_hash_bytes`: If true, the block hash list written by linearize-hashes.py
+will be byte-reversed when read by linearize-data.py. See the linearize-hashes
+entry for more information.
+* `split_timestamp`: Split blockchain files when a new month is first seen, in
+addition to reaching a maximum file size (`max_out_sz`).
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index 38da02e66c..cccdd79213 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -23,7 +23,9 @@ input=/home/example/.bitcoin/blocks
output_file=/home/example/Downloads/bootstrap.dat
hashlist=hashlist.txt
-split_year=1
# Maxmimum size in bytes of out-of-order blocks cache in memory
out_of_order_cache_sz = 100000000
+
+# Do we want the reverse the hash bytes coming from getblockhash?
+rev_hash_bytes = False
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index 8badb4b318..3fdec134b8 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -1,30 +1,34 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# linearize-data.py: Construct a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2014 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_function, division
-import json
import struct
import re
import os
import os.path
-import base64
-import httplib
import sys
import hashlib
import datetime
import time
from collections import namedtuple
+from binascii import hexlify, unhexlify
settings = {}
+##### Switch endian-ness #####
+def hex_switchEndian(s):
+ """ Switches the endianness of a hex string (in pairs of hex chars) """
+ pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
+ return b''.join(pairList[::-1]).decode()
+
def uint32(x):
- return x & 0xffffffffL
+ return x & 0xffffffff
def bytereverse(x):
return uint32(( ((x) << 24) | (((x) << 8) & 0x00ff0000) |
@@ -35,14 +39,14 @@ def bufreverse(in_buf):
for i in range(0, len(in_buf), 4):
word = struct.unpack('@I', in_buf[i:i+4])[0]
out_words.append(struct.pack('@I', bytereverse(word)))
- return ''.join(out_words)
+ return b''.join(out_words)
def wordreverse(in_buf):
out_words = []
for i in range(0, len(in_buf), 4):
out_words.append(in_buf[i:i+4])
out_words.reverse()
- return ''.join(out_words)
+ return b''.join(out_words)
def calc_hdr_hash(blk_hdr):
hash1 = hashlib.sha256()
@@ -59,7 +63,7 @@ def calc_hash_str(blk_hdr):
hash = calc_hdr_hash(blk_hdr)
hash = bufreverse(hash)
hash = wordreverse(hash)
- hash_str = hash.encode('hex')
+ hash_str = hexlify(hash).decode('utf-8')
return hash_str
def get_blk_dt(blk_hdr):
@@ -69,17 +73,21 @@ def get_blk_dt(blk_hdr):
dt_ym = datetime.datetime(dt.year, dt.month, 1)
return (dt_ym, nTime)
+# When getting the list of block hashes, undo any byte reversals.
def get_block_hashes(settings):
blkindex = []
f = open(settings['hashlist'], "r")
for line in f:
line = line.rstrip()
+ if settings['rev_hash_bytes'] == 'true':
+ line = hex_switchEndian(line)
blkindex.append(line)
print("Read " + str(len(blkindex)) + " hashes")
return blkindex
+# The block map shouldn't give or receive byte-reversed hashes.
def mkblockmap(blkindex):
blkmap = {}
for height,hash in enumerate(blkindex):
@@ -207,7 +215,7 @@ class BlockDataCopier:
inMagic = inhdr[:4]
if (inMagic != self.settings['netmagic']):
- print("Invalid magic: " + inMagic.encode('hex'))
+ print("Invalid magic: " + hexlify(inMagic).decode('utf-8'))
return
inLenLE = inhdr[4:]
su = struct.unpack("<I", inLenLE)
@@ -265,6 +273,12 @@ if __name__ == '__main__':
settings[m.group(1)] = m.group(2)
f.close()
+ # Force hash byte format setting to be lowercase to make comparisons easier.
+ # Also place upfront in case any settings need to know about it.
+ if 'rev_hash_bytes' not in settings:
+ settings['rev_hash_bytes'] = 'false'
+ settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower()
+
if 'netmagic' not in settings:
settings['netmagic'] = 'f9beb4d9'
if 'genesis' not in settings:
@@ -278,14 +292,14 @@ if __name__ == '__main__':
if 'split_timestamp' not in settings:
settings['split_timestamp'] = 0
if 'max_out_sz' not in settings:
- settings['max_out_sz'] = 1000L * 1000 * 1000
+ settings['max_out_sz'] = 1000 * 1000 * 1000
if 'out_of_order_cache_sz' not in settings:
settings['out_of_order_cache_sz'] = 100 * 1000 * 1000
- settings['max_out_sz'] = long(settings['max_out_sz'])
+ settings['max_out_sz'] = int(settings['max_out_sz'])
settings['split_timestamp'] = int(settings['split_timestamp'])
settings['file_timestamp'] = int(settings['file_timestamp'])
- settings['netmagic'] = settings['netmagic'].decode('hex')
+ settings['netmagic'] = unhexlify(settings['netmagic'].encode('utf-8'))
settings['out_of_order_cache_sz'] = int(settings['out_of_order_cache_sz'])
if 'output_file' not in settings and 'output' not in settings:
@@ -295,9 +309,8 @@ if __name__ == '__main__':
blkindex = get_block_hashes(settings)
blkmap = mkblockmap(blkindex)
+ # Block hash map won't be byte-reversed. Neither should the genesis hash.
if not settings['genesis'] in blkmap:
print("Genesis block not found in hashlist")
else:
BlockDataCopier(settings, blkindex, blkmap).run()
-
-
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index cb40c664fa..00a54d0820 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -1,39 +1,53 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
-# Copyright (c) 2013-2014 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ import print_function
+try: # Python 3
+ import http.client as httplib
+except ImportError: # Python 2
+ import httplib
import json
-import struct
import re
import base64
-import httplib
import sys
settings = {}
+##### Switch endian-ness #####
+def hex_switchEndian(s):
+ """ Switches the endianness of a hex string (in pairs of hex chars) """
+ pairList = [s[i:i+2].encode() for i in range(0, len(s), 2)]
+ return b''.join(pairList[::-1]).decode()
+
class BitcoinRPC:
def __init__(self, host, port, username, password):
authpair = "%s:%s" % (username, password)
- self.authhdr = "Basic %s" % (base64.b64encode(authpair))
- self.conn = httplib.HTTPConnection(host, port, False, 30)
+ authpair = authpair.encode('utf-8')
+ self.authhdr = b"Basic " + base64.b64encode(authpair)
+ self.conn = httplib.HTTPConnection(host, port=port, timeout=30)
def execute(self, obj):
- self.conn.request('POST', '/', json.dumps(obj),
- { 'Authorization' : self.authhdr,
- 'Content-type' : 'application/json' })
+ try:
+ self.conn.request('POST', '/', json.dumps(obj),
+ { 'Authorization' : self.authhdr,
+ 'Content-type' : 'application/json' })
+ except ConnectionRefusedError:
+ print('RPC connection refused. Check RPC settings and the server status.',
+ file=sys.stderr)
+ return None
resp = self.conn.getresponse()
if resp is None:
print("JSON-RPC: no response", file=sys.stderr)
return None
- body = resp.read()
+ body = resp.read().decode('utf-8')
resp_obj = json.loads(body)
return resp_obj
@@ -64,12 +78,17 @@ def get_block_hashes(settings, max_blocks_per_call=10000):
batch.append(rpc.build_request(x, 'getblockhash', [height + x]))
reply = rpc.execute(batch)
+ if reply is None:
+ print('Cannot continue. Program will halt.')
+ return None
for x,resp_obj in enumerate(reply):
if rpc.response_is_error(resp_obj):
print('JSON-RPC: error at height', height+x, ': ', resp_obj['error'], file=sys.stderr)
exit(1)
assert(resp_obj['id'] == x) # assume replies are in-sequence
+ if settings['rev_hash_bytes'] == 'true':
+ resp_obj['result'] = hex_switchEndian(resp_obj['result'])
print(resp_obj['result'])
height += num_blocks
@@ -101,6 +120,8 @@ if __name__ == '__main__':
settings['min_height'] = 0
if 'max_height' not in settings:
settings['max_height'] = 313000
+ if 'rev_hash_bytes' not in settings:
+ settings['rev_hash_bytes'] = 'false'
if 'rpcuser' not in settings or 'rpcpassword' not in settings:
print("Missing username and/or password in cfg file", file=stderr)
sys.exit(1)
@@ -109,5 +130,7 @@ if __name__ == '__main__':
settings['min_height'] = int(settings['min_height'])
settings['max_height'] = int(settings['max_height'])
- get_block_hashes(settings)
+ # Force hash byte format setting to be lowercase to make comparisons easier.
+ settings['rev_hash_bytes'] = settings['rev_hash_bytes'].lower()
+ get_block_hashes(settings)
diff --git a/contrib/macdeploy/custom_dsstore.py b/contrib/macdeploy/custom_dsstore.py
index 03e2325fc0..e6ecabace1 100755
--- a/contrib/macdeploy/custom_dsstore.py
+++ b/contrib/macdeploy/custom_dsstore.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2013-2015 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index f8201e72c6..73d4f159d8 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -791,7 +791,7 @@ if config.dmg is not None:
except subprocess.CalledProcessError as e:
sys.exit(e.returncode)
- m = re.search("/Volumes/(.+$)", output)
+ m = re.search("/Volumes/(.+$)", output.decode())
disk_root = m.group(0)
disk_name = m.group(1)
@@ -852,7 +852,7 @@ if config.dmg is not None:
"items_positions" : "\n ".join(items_positions)
}
if "window_bounds" in fancy:
- params["window.bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
+ params["window_bounds"] = ",".join([str(p) for p in fancy["window_bounds"]])
if "icon_size" in fancy:
params["icon_size"] = str(fancy["icon_size"])
if bg_path is not None:
@@ -868,7 +868,7 @@ if config.dmg is not None:
print(s)
p = subprocess.Popen(['osascript', '-'], stdin=subprocess.PIPE)
- p.communicate(input=s)
+ p.communicate(input=s.encode('utf-8'))
if p.returncode:
print("Error running osascript.")
diff --git a/contrib/qos/README.md b/contrib/qos/README.md
index 5e0a975fc6..0ded87c58f 100644
--- a/contrib/qos/README.md
+++ b/contrib/qos/README.md
@@ -1,5 +1,5 @@
-### Qos ###
+### QoS (Quality of service) ###
-This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN (defined as 192.168.x.x).
+This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 8333, but not if the destination IP is within a LAN.
This means one can have an always-on bitcoind instance running, and another local bitcoind/bitcoin-qt instance which connects to this node and receives blocks from it.
diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh
index aaf5e1fa11..0d1dd65b4f 100644
--- a/contrib/qos/tc.sh
+++ b/contrib/qos/tc.sh
@@ -1,4 +1,4 @@
-# Copyright (c) 2013 The Bitcoin Core developers
+# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,8 +8,10 @@ IF="eth0"
LINKCEIL="1gbit"
#limit outbound Bitcoin protocol traffic to this rate
LIMIT="160kbit"
-#defines the address space for which you wish to disable rate limiting
-LOCALNET="192.168.0.0/16"
+#defines the IPv4 address space for which you wish to disable rate limiting
+LOCALNET_V4="192.168.0.0/16"
+#defines the IPv6 address space for which you wish to disable rate limiting
+LOCALNET_V6="fe80::/10"
#delete existing rules
tc qdisc del dev ${IF} root
@@ -28,6 +30,12 @@ tc class add dev ${IF} parent 1:1 classid 1:11 htb rate ${LIMIT} ceil ${LIMIT} p
tc filter add dev ${IF} parent 1: protocol ip prio 1 handle 1 fw classid 1:10
tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
+if [ ! -z "${LOCALNET_V6}" ] ; then
+ # v6 cannot have the same priority value as v4
+ tc filter add dev ${IF} parent 1: protocol ipv6 prio 3 handle 1 fw classid 1:10
+ tc filter add dev ${IF} parent 1: protocol ipv6 prio 4 handle 2 fw classid 1:11
+fi
+
#delete any existing rules
#disable for now
#ret=0
@@ -37,9 +45,15 @@ tc filter add dev ${IF} parent 1: protocol ip prio 2 handle 2 fw classid 1:11
#done
#limit outgoing traffic to and from port 8333. but not when dealing with a host on the local network
-# (defined by $LOCALNET)
-# --set-mark marks packages matching these criteria with the number "2"
-# these packages are filtered by the tc filter with "handle 2"
+# (defined by $LOCALNET_V4 and $LOCALNET_V6)
+# --set-mark marks packages matching these criteria with the number "2" (v4)
+# --set-mark marks packages matching these criteria with the number "4" (v6)
+# these packets are filtered by the tc filter with "handle 2"
# this filter sends the packages into the 1:11 class, and this class is limited to ${LIMIT}
-iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
-iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET} -j MARK --set-mark 0x2
+iptables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
+iptables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V4} -j MARK --set-mark 0x2
+
+if [ ! -z "${LOCALNET_V6}" ] ; then
+ ip6tables -t mangle -A OUTPUT -p tcp -m tcp --dport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
+ ip6tables -t mangle -A OUTPUT -p tcp -m tcp --sport 8333 ! -d ${LOCALNET_V6} -j MARK --set-mark 0x4
+fi
diff --git a/contrib/seeds/makeseeds.py b/contrib/seeds/makeseeds.py
index 041f224f40..95498d20e2 100755
--- a/contrib/seeds/makeseeds.py
+++ b/contrib/seeds/makeseeds.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2013-2015 The Bitcoin Core developers
+# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
diff --git a/contrib/testgen/base58.py b/contrib/testgen/base58.py
index 72b288b2dc..bb0aeaff05 100644
--- a/contrib/testgen/base58.py
+++ b/contrib/testgen/base58.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2012 The Bitcoin Core developers
+# Copyright (c) 2012-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
diff --git a/contrib/testgen/gen_base58_test_vectors.py b/contrib/testgen/gen_base58_test_vectors.py
index 8518774db3..7e475b7a36 100755
--- a/contrib/testgen/gen_base58_test_vectors.py
+++ b/contrib/testgen/gen_base58_test_vectors.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-# Copyright (c) 2012 The Bitcoin Core developers
+# Copyright (c) 2012-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
index 3dea5e3c14..6f57aa47e9 100755
--- a/contrib/zmq/zmq_sub.py
+++ b/contrib/zmq/zmq_sub.py
@@ -3,7 +3,6 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-import array
import binascii
import zmq
import struct
diff --git a/depends/config.guess b/depends/config.guess
index c4bd827a7b..bbd48b60e8 100755
--- a/depends/config.guess
+++ b/depends/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2016-05-15'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -1000,6 +1000,9 @@ EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ mips64el:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-${LIBC}
exit ;;
@@ -1032,6 +1035,9 @@ EOF
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-${LIBC}
exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
diff --git a/depends/config.site.in b/depends/config.site.in
index 27e3aedd8e..3d7c9fd43c 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -63,7 +63,6 @@ LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
CC="@CC@"
CXX="@CXX@"
OBJC="${CC}"
-OBJCXX="${CXX}"
CCACHE=$depends_prefix/native/bin/ccache
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
diff --git a/depends/config.sub b/depends/config.sub
index 6d86a1e2f7..7e792b4ae1 100755
--- a/depends/config.sub
+++ b/depends/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2016 Free Software Foundation, Inc.
+# Copyright 1992-2017 Free Software Foundation, Inc.
-timestamp='2016-05-10'
+timestamp='2017-01-01'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -117,7 +117,7 @@ case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
- kopensolaris*-gnu* | \
+ kopensolaris*-gnu* | cloudabi*-eabi* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -301,6 +301,7 @@ case $basic_machine in
| open8 | or1k | or1knd | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
@@ -428,6 +429,7 @@ case $basic_machine in
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
@@ -643,6 +645,14 @@ case $basic_machine in
basic_machine=m68k-bull
os=-sysv3
;;
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
+ ;;
+ e500v[12]-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=$os"spe"
+ ;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
@@ -1022,7 +1032,7 @@ case $basic_machine in
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
@@ -1032,7 +1042,7 @@ case $basic_machine in
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
@@ -1387,9 +1397,9 @@ case $os in
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
+ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
@@ -1399,7 +1409,7 @@ case $os in
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
- | -onefs* | -tirtos* | -phoenix*)
+ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1628,6 +1638,9 @@ case $basic_machine in
sparc-* | *-sun)
os=-sunos4.1.1
;;
+ pru-*)
+ os=-elf
+ ;;
*-be)
os=-beos
;;
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index 985649619f..4e58bec74e 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -1,4 +1,4 @@
-OSX_MIN_VERSION=10.7
+OSX_MIN_VERSION=10.8
OSX_SDK_VERSION=10.11
OSX_SDK=$(SDK_PATH)/MacOSX$(OSX_SDK_VERSION).sdk
LD64_VERSION=253.9
diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk
index 4173c0d168..57d96e4821 100644
--- a/depends/packages/boost.mk
+++ b/depends/packages/boost.mk
@@ -1,8 +1,8 @@
package=boost
-$(package)_version=1_61_0
-$(package)_download_path=https://sourceforge.net/projects/boost/files/boost/1.61.0
+$(package)_version=1_63_0
+$(package)_download_path=https://sourceforge.net/projects/boost/files/boost/1.63.0
$(package)_file_name=$(package)_$($(package)_version).tar.bz2
-$(package)_sha256_hash=a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640
+$(package)_sha256_hash=beae2529f759f6b3bf3f4969a19c2e9d6f0c503edcb2de4a61d1428519fcb3b0
define $(package)_set_vars
$(package)_config_opts_release=variant=release
diff --git a/depends/packages/dbus.mk b/depends/packages/dbus.mk
index 8ac9ab742b..90ddcb923f 100644
--- a/depends/packages/dbus.mk
+++ b/depends/packages/dbus.mk
@@ -1,8 +1,8 @@
package=dbus
-$(package)_version=1.8.6
+$(package)_version=1.10.14
$(package)_download_path=http://dbus.freedesktop.org/releases/dbus
$(package)_file_name=$(package)-$($(package)_version).tar.gz
-$(package)_sha256_hash=eded83ca007b719f32761e60fd8b9ffd0f5796a4caf455b01b5a5ef740ebd23f
+$(package)_sha256_hash=23238f70353e38ce5ca183ebc9525c0d97ac00ef640ad29cf794782af6e6a083
$(package)_dependencies=expat
define $(package)_set_vars
diff --git a/depends/packages/freetype.mk b/depends/packages/freetype.mk
index 7cea28ff0b..76b025c463 100644
--- a/depends/packages/freetype.mk
+++ b/depends/packages/freetype.mk
@@ -1,8 +1,8 @@
package=freetype
-$(package)_version=2.6.3
+$(package)_version=2.7.1
$(package)_download_path=http://download.savannah.gnu.org/releases/$(package)
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=371e707aa522acf5b15ce93f11183c725b8ed1ee8546d7b3af549863045863a2
+$(package)_sha256_hash=3a3bb2c4e15ffb433f2032f50a5b5a92558206822e22bfe8cbe339af4aa82f88
define $(package)_set_vars
$(package)_config_opts=--without-zlib --without-png --disable-static
diff --git a/depends/packages/libevent.mk b/depends/packages/libevent.mk
index 4b02b2eff9..70f345e71d 100644
--- a/depends/packages/libevent.mk
+++ b/depends/packages/libevent.mk
@@ -1,13 +1,11 @@
package=libevent
-$(package)_version=2.0.22
-$(package)_download_path=https://github.com/libevent/libevent/releases/download/release-2.0.22-stable
-$(package)_file_name=$(package)-$($(package)_version)-stable.tar.gz
-$(package)_sha256_hash=71c2c49f0adadacfdbe6332a372c38cf9c8b7895bb73dabeaa53cdcc1d4e1fa3
-$(package)_patches=reuseaddr.patch libevent-2-fixes.patch
+$(package)_version=2.1.7
+$(package)_download_path=https://github.com/libevent/libevent/archive/
+$(package)_file_name=release-$($(package)_version)-rc.tar.gz
+$(package)_sha256_hash=548362d202e22fe24d4c3fad38287b4f6d683e6c21503341373b89785fa6f991
define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/reuseaddr.patch && \
- patch -p1 < $($(package)_patch_dir)/libevent-2-fixes.patch
+ ./autogen.sh
endef
define $(package)_set_vars
diff --git a/depends/packages/native_ccache.mk b/depends/packages/native_ccache.mk
index a3a58604e5..4ed61a49e9 100644
--- a/depends/packages/native_ccache.mk
+++ b/depends/packages/native_ccache.mk
@@ -1,8 +1,8 @@
package=native_ccache
-$(package)_version=3.3.1
+$(package)_version=3.3.3
$(package)_download_path=https://samba.org/ftp/ccache
$(package)_file_name=ccache-$($(package)_version).tar.bz2
-$(package)_sha256_hash=cb6e4bafbb19ba0a2ec43386b123a5f92a20e1e3384c071d5d13e0cb3c84bf73
+$(package)_sha256_hash=2985bc5e32ebe38d2958d508eb54ddcad39eed909489c0c2988035214597ca54
define $(package)_set_vars
$(package)_config_opts=
diff --git a/depends/packages/native_ds_store.mk b/depends/packages/native_ds_store.mk
index 8e902af1b6..49f5829ac1 100644
--- a/depends/packages/native_ds_store.mk
+++ b/depends/packages/native_ds_store.mk
@@ -1,9 +1,9 @@
package=native_ds_store
-$(package)_version=c80c23706eae
+$(package)_version=1.1.0
$(package)_download_path=https://bitbucket.org/al45tair/ds_store/get
-$(package)_download_file=$($(package)_version).tar.bz2
+$(package)_download_file=v$($(package)_version).tar.bz2
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=ce1aa412211610c63d567bbe3e06213006a2d5ba5d76d89399c151b5472cb0da
+$(package)_sha256_hash=921596764d71d1bbd3297a90ef6d286f718794d667e4f81d91d14053525d64c1
$(package)_install_libdir=$(build_prefix)/lib/python/dist-packages
$(package)_dependencies=native_biplist
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index bdde15aa17..383ef2dae6 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -1,30 +1,30 @@
PACKAGE=qt
-$(package)_version=5.6.1
-$(package)_download_path=http://download.qt.io/official_releases/qt/5.6/$($(package)_version)/submodules
+$(package)_version=5.7.1
+$(package)_download_path=http://download.qt.io/official_releases/qt/5.7/$($(package)_version)/submodules
$(package)_suffix=opensource-src-$($(package)_version).tar.gz
$(package)_file_name=qtbase-$($(package)_suffix)
-$(package)_sha256_hash=0ac67cf8d66d52b995f96c31c4b48117a1afb3db99eaa93e20ccd8f7f55f7fde
+$(package)_sha256_hash=95f83e532d23b3ddbde7973f380ecae1bac13230340557276f75f2e37984e410
$(package)_dependencies=openssl
$(package)_linux_dependencies=freetype fontconfig libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
-$(package)_patches=mac-qmake.conf configure-xcoderun.patch mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
+$(package)_patches=mac-qmake.conf mingw-uuidof.patch pidlist_absolute.patch fix-xcb-include-order.patch fix_qt_pkgconfig.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
-$(package)_qttranslations_sha256_hash=dcc1534d247babca1840cb6d0a000671801a341ea352d0535474f86adadaf028
+$(package)_qttranslations_sha256_hash=3a15aebd523c6d89fb97b2d3df866c94149653a26d27a00aac9b6d3020bc5a1d
$(package)_qttools_file_name=qttools-$($(package)_suffix)
-$(package)_qttools_sha256_hash=e0f845de28c31230dfa428f0190ccb3b91d1fc02481b1f064698ae4ef8376aa1
+$(package)_qttools_sha256_hash=22d67de915cb8cd93e16fdd38fa006224ad9170bd217c2be1e53045a8dd02f0f
$(package)_extra_sources = $($(package)_qttranslations_file_name)
$(package)_extra_sources += $($(package)_qttools_file_name)
define $(package)_set_vars
$(package)_config_opts_release = -release
-$(package)_config_opts_debug = -debug
+$(package)_config_opts_debug = -debug
$(package)_config_opts += -bindir $(build_prefix)/bin
-$(package)_config_opts += -c++11
+$(package)_config_opts += -c++std c++11
$(package)_config_opts += -confirm-license
$(package)_config_opts += -dbus-runtime
$(package)_config_opts += -hostprefix $(build_prefix)
@@ -46,7 +46,6 @@ $(package)_config_opts += -no-linuxfb
$(package)_config_opts += -no-libudev
$(package)_config_opts += -no-mitshm
$(package)_config_opts += -no-mtdev
-$(package)_config_opts += -no-nis
$(package)_config_opts += -no-pulseaudio
$(package)_config_opts += -no-openvg
$(package)_config_opts += -no-reduce-relocations
@@ -125,6 +124,7 @@ endef
define $(package)_preprocess_cmds
sed -i.old "s|updateqm.commands = \$$$$\$$$$LRELEASE|updateqm.commands = $($(package)_extract_dir)/qttools/bin/lrelease|" qttranslations/translations/translations.pro && \
+ sed -i.old "/updateqm.depends =/d" qttranslations/translations/translations.pro && \
sed -i.old "s/src_plugins.depends = src_sql src_xml src_network/src_plugins.depends = src_xml src_network/" qtbase/src/src.pro && \
sed -i.old "s|X11/extensions/XIproto.h|X11/X.h|" qtbase/src/plugins/platforms/xcb/qxcbxsettings.cpp && \
sed -i.old 's/if \[ "$$$$XPLATFORM_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/if \[ "$$$$BUILD_ON_MAC" = "yes" \]; then xspecvals=$$$$(macSDKify/' qtbase/configure && \
@@ -134,7 +134,6 @@ define $(package)_preprocess_cmds
cp -f qtbase/mkspecs/macx-clang/Info.plist.app qtbase/mkspecs/macx-clang-linux/ &&\
cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
- patch -p1 < $($(package)_patch_dir)/configure-xcoderun.patch && \
patch -p1 < $($(package)_patch_dir)/mingw-uuidof.patch && \
patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
diff --git a/depends/patches/libevent/libevent-2-fixes.patch b/depends/patches/libevent/libevent-2-fixes.patch
deleted file mode 100644
index 79fec8a488..0000000000
--- a/depends/patches/libevent/libevent-2-fixes.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/util-internal.h 2013-11-01 12:18:57.000000000 -0600
-+++ b/util-internal.h 2015-07-20 20:19:43.199560900 -0500
-@@ -299,8 +299,13 @@ HANDLE evutil_load_windows_system_librar
-
- #if defined(__STDC__) && defined(__STDC_VERSION__)
- #if (__STDC_VERSION__ >= 199901L)
--#define EV_SIZE_FMT "%zu"
--#define EV_SSIZE_FMT "%zd"
-+ #if defined(_MSC_VER) || defined(__MINGW32__) || defined(__MINGW64__)
-+ #define EV_SIZE_FMT "%Iu"
-+ #define EV_SSIZE_FMT "%Id"
-+ #else
-+ #define EV_SIZE_FMT "%zu"
-+ #define EV_SSIZE_FMT "%zd"
-+ #endif
- #define EV_SIZE_ARG(x) (x)
- #define EV_SSIZE_ARG(x) (x)
- #endif
diff --git a/depends/patches/libevent/reuseaddr.patch b/depends/patches/libevent/reuseaddr.patch
deleted file mode 100644
index 58695c11f5..0000000000
--- a/depends/patches/libevent/reuseaddr.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- old/evutil.c 2015-08-28 19:26:23.488765923 -0400
-+++ new/evutil.c 2015-08-28 19:27:41.392767019 -0400
-@@ -321,15 +321,16 @@
- int
- evutil_make_listen_socket_reuseable(evutil_socket_t sock)
- {
--#ifndef WIN32
- int one = 1;
-+#ifndef WIN32
- /* REUSEADDR on Unix means, "don't hang on to this address after the
- * listener is closed." On Windows, though, it means "don't keep other
- * processes from binding to this address while we're using it. */
- return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &one,
- (ev_socklen_t)sizeof(one));
- #else
-- return 0;
-+ return setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*) &one,
-+ (ev_socklen_t)sizeof(one));
- #endif
- }
-
diff --git a/depends/patches/qt/configure-xcoderun.patch b/depends/patches/qt/configure-xcoderun.patch
deleted file mode 100644
index 08286d8420..0000000000
--- a/depends/patches/qt/configure-xcoderun.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- old/qtbase/configure
-+++ new/qtbase/configure
-@@ -543,7 +543,7 @@ if [ "$BUILD_ON_MAC" = "yes" ]; then
- exit 2
- fi
-
-- if ! /usr/bin/xcrun -find xcrun >/dev/null 2>&1; then
-+ if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
- echo >&2
- echo " Xcode not set up properly. You may need to confirm the license" >&2
- echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
-diff --git a/mkspecs/features/mac/default_pre.prf b/mkspecs/features/mac/default_pre.prf
-index 0cc8cd6..5df99d1 100644
---- old/qtbase/mkspecs/features/mac/default_pre.prf
-+++ new/qtbase/mkspecs/features/mac/default_pre.prf
-@@ -12,7 +12,7 @@ isEmpty(QMAKE_XCODE_DEVELOPER_PATH) {
- error("Xcode is not installed in $${QMAKE_XCODE_DEVELOPER_PATH}. Please use xcode-select to choose Xcode installation path.")
-
- # Make sure Xcode is set up properly
-- isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null"))): \
-+ isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
- error("Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.")
- }
-
---
diff --git a/depends/patches/qt/fix-xcb-include-order.patch b/depends/patches/qt/fix-xcb-include-order.patch
index c7dbebedce..ec2bc17d9b 100644
--- a/depends/patches/qt/fix-xcb-include-order.patch
+++ b/depends/patches/qt/fix-xcb-include-order.patch
@@ -1,6 +1,6 @@
---- old/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:06:42.705930685 +0000
-+++ new/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17 02:08:41.281926351 +0000
-@@ -74,8 +74,6 @@
+--- old/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17
++++ new/qtbase/src/plugins/platforms/xcb/xcb_qpa_lib.pro 2015-03-17
+@@ -76,8 +76,6 @@
DEFINES += $$QMAKE_DEFINES_XCB
LIBS += $$QMAKE_LIBS_XCB
@@ -9,18 +9,18 @@
CONFIG += qpa/genericunixfontdatabase
-@@ -87,7 +85,8 @@
+@@ -89,7 +87,8 @@
contains(QT_CONFIG, xcb-qt) {
DEFINES += XCB_USE_RENDER
XCB_DIR = ../../../3rdparty/xcb
- INCLUDEPATH += $$XCB_DIR/include $$XCB_DIR/sysinclude
+ QMAKE_CFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
+ QMAKE_CXXFLAGS += -I$$XCB_DIR/include -I$$XCB_DIR/sysinclude $$QMAKE_CFLAGS_XCB
- LIBS += -lxcb -L$$OUT_PWD/xcb-static -lxcb-static
+ LIBS += -lxcb -L$$MODULE_BASE_OUTDIR/lib -lxcb-static$$qtPlatformTargetSuffix()
} else {
LIBS += -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape -lxcb-keysyms -lxcb-xinerama
---- old/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:07:04.641929383 +0000
-+++ new/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro 2015-03-17 02:10:15.485922059 +0000
+--- old/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
++++ new/qtbase/src/plugins/platforms/xcb/xcb-static/xcb-static.pro
@@ -9,7 +9,8 @@
XCB_DIR = ../../../../3rdparty/xcb
@@ -31,8 +31,8 @@
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB
QMAKE_CFLAGS += $$QMAKE_CFLAGS_XCB
---- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:02:59.530038830 -0400
-+++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro 2015-07-24 16:01:22.106037459 -0400
+--- old/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
++++ new/qtbase/src/plugins/platforms/xcb/xcb-plugin.pro
@@ -6,6 +6,13 @@
qxcbmain.cpp
OTHER_FILES += xcb.json README
diff --git a/depends/patches/qt/fix_qt_pkgconfig.patch b/depends/patches/qt/fix_qt_pkgconfig.patch
index 3772db4f8b..34302a9f2d 100644
--- a/depends/patches/qt/fix_qt_pkgconfig.patch
+++ b/depends/patches/qt/fix_qt_pkgconfig.patch
@@ -1,6 +1,6 @@
---- old/qtbase/mkspecs/features/qt_module.prf 2016-03-17 02:06:42.705930685 +0000
-+++ new/qtbase/mkspecs/features/qt_module.prf 2016-03-17 02:06:42.705930685 +0000
-@@ -244,7 +244,7 @@
+--- old/qtbase/mkspecs/features/qt_module.prf
++++ new/qtbase/mkspecs/features/qt_module.prf
+@@ -245,7 +245,7 @@
load(qt_targets)
# this builds on top of qt_common
diff --git a/depends/patches/qt/mac-qmake.conf b/depends/patches/qt/mac-qmake.conf
index a6d0070cca..402e0555b0 100644
--- a/depends/patches/qt/mac-qmake.conf
+++ b/depends/patches/qt/mac-qmake.conf
@@ -11,10 +11,10 @@ QMAKE_XCODE_VERSION=4.3
QMAKE_XCODE_DEVELOPER_PATH=/Developer
QMAKE_MACOSX_DEPLOYMENT_TARGET = $${MAC_MIN_VERSION}
QMAKE_MAC_SDK=macosx
-QMAKE_MAC_SDK.macosx.path = $${MAC_SDK_PATH}
+QMAKE_MAC_SDK.macosx.Path = $${MAC_SDK_PATH}
QMAKE_MAC_SDK.macosx.platform_name = macosx
-QMAKE_MAC_SDK.macosx.version = $${MAC_SDK_VERSION}
-QMAKE_MAC_SDK.macosx.platform_path = /phony
+QMAKE_MAC_SDK.macosx.SDKVersion = $${MAC_SDK_VERSION}
+QMAKE_MAC_SDK.macosx.PlatformPath = /phony
QMAKE_CFLAGS += -target $${MAC_TARGET}
QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_CFLAGS
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS
diff --git a/depends/patches/qt/mingw-uuidof.patch b/depends/patches/qt/mingw-uuidof.patch
index 975366e612..fb21923c8c 100644
--- a/depends/patches/qt/mingw-uuidof.patch
+++ b/depends/patches/qt/mingw-uuidof.patch
@@ -1,6 +1,6 @@
---- old/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:40:20.956781548 -0400
-+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp 2015-06-20 17:29:32.052772416 -0400
-@@ -69,7 +69,7 @@
+--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
++++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.cpp
+@@ -77,7 +77,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <windowsx.h>
@@ -9,8 +9,8 @@
# include <comdef.h>
#endif
-@@ -762,7 +762,7 @@
- HWND_MESSAGE, NULL, (HINSTANCE)GetModuleHandle(0), NULL);
+@@ -814,7 +814,7 @@
+ HWND_MESSAGE, NULL, static_cast<HINSTANCE>(GetModuleHandle(0)), NULL);
}
-#ifndef Q_OS_WINCE
@@ -18,16 +18,16 @@
// Re-engineered from the inline function _com_error::ErrorMessage().
// We cannot use it directly since it uses swprintf_s(), which is not
// present in the MSVCRT.DLL found on Windows XP (QTBUG-35617).
-@@ -781,7 +781,7 @@
- return QStringLiteral("IDispatch error #") + QString::number(wCode);
- return QStringLiteral("Unknown error 0x0") + QString::number(comError.Error(), 16);
+@@ -833,7 +833,7 @@
+ return QString::asprintf("IDispatch error #%u", uint(wCode));
+ return QString::asprintf("Unknown error 0x0%x", uint(comError.Error()));
}
-#endif // !Q_OS_WINCE
+#endif // !defined(Q_OS_WINCE) && (!defined(USE___UUIDOF) || (defined(USE___UUIDOF) && USE___UUIDOF == 1))
/*!
\brief Common COM error strings.
-@@ -846,12 +846,12 @@
+@@ -901,12 +901,12 @@
default:
break;
}
diff --git a/depends/patches/qt/pidlist_absolute.patch b/depends/patches/qt/pidlist_absolute.patch
index 0b49c050dc..c792824179 100644
--- a/depends/patches/qt/pidlist_absolute.patch
+++ b/depends/patches/qt/pidlist_absolute.patch
@@ -1,7 +1,7 @@
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
---- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h 2015-06-29 22:04:40.000000000 +0200
-+++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h 2015-11-01 12:55:59.751234846 +0100
-@@ -124,10 +124,18 @@
+--- old/qtbase/src/plugins/platforms/windows/qwindowscontext.h
++++ new/qtbase/src/plugins/platforms/windows/qwindowscontext.h
+@@ -136,10 +136,18 @@
inline void init();
typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
@@ -21,9 +21,9 @@ diff -dur old/qtbase/src/plugins/platforms/windows/qwindowscontext.h new/qtbase/
SHCreateItemFromParsingName sHCreateItemFromParsingName;
SHGetKnownFolderIDList sHGetKnownFolderIDList;
diff -dur old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
---- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp 2015-06-29 22:04:40.000000000 +0200
-+++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp 2015-11-01 13:41:09.503149772 +0100
-@@ -1008,7 +1008,11 @@
+--- old/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
++++ new/qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
+@@ -1016,7 +1016,11 @@
qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
return Q_NULLPTR;
}
diff --git a/doc/Doxyfile b/doc/Doxyfile
index a0cbf7139a..ef55acdbc3 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.
-PROJECT_NAME = Bitcoin
+PROJECT_NAME = "Bitcoin Core"
# 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
diff --git a/doc/README.md b/doc/README.md
index 8b9c0ea262..36684e5401 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -68,6 +68,7 @@ The Bitcoin repo's [root README](/README.md) contains relevant information on th
### Miscellaneous
- [Assets Attribution](assets-attribution.md)
- [Files](files.md)
+- [Fuzz-testing](fuzzing.md)
- [Reduce Traffic](reduce-traffic.md)
- [Tor Support](tor.md)
- [Init Scripts (systemd/upstart/openrc)](init.md)
diff --git a/doc/build-osx.md b/doc/build-osx.md
index 63a7ee28ca..a15bcd012c 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -16,7 +16,11 @@ Then install [Homebrew](http://brew.sh).
Dependencies
----------------------
- brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config homebrew/versions/protobuf260 --c++11 qt5 libevent
+ brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent
+
+In case you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
+
+ brew install librsvg
NOTE: Building with Qt4 is still supported, however, could result in a broken UI. Building with Qt5 is recommended.
diff --git a/doc/build-unix.md b/doc/build-unix.md
index ba7b9cd18d..5b0a38457e 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -96,13 +96,13 @@ pass `--with-incompatible-bdb` to configure.
See the section "Disable-wallet mode" to build Bitcoin Core without wallet.
-Optional:
+Optional (see --with-miniupnpc and --enable-upnp-default):
- sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
+ sudo apt-get install libminiupnpc-dev
-ZMQ dependencies:
+ZMQ dependencies (provides ZMQ API 4.x):
- sudo apt-get install libzmq3-dev (provides ZMQ API 4.x)
+ sudo apt-get install libzmq3-dev
Dependencies for the GUI: Ubuntu & Debian
-----------------------------------------
diff --git a/doc/build-windows.md b/doc/build-windows.md
index 044356830a..9549a4b9da 100644
--- a/doc/build-windows.md
+++ b/doc/build-windows.md
@@ -7,18 +7,22 @@ Most developers use cross-compilation from Ubuntu to build executables for
Windows. This is also used to build the release binaries.
While there are potentially a number of ways to build on Windows (for example using msys / mingw-w64),
-using the Windows Subsystem For Linux is the most straight forward. If you are building with
-an alternative method, please contribute the instructions here for others who are running versions
+using the Windows Subsystem For Linux is the most straightforward. If you are building with
+another method, please contribute the instructions here for others who are running versions
of Windows that are not compatible with the Windows Subsystem for Linux.
-Compiling with the Windows Subsystem For Linux
--------------------
+Compiling with Windows Subsystem For Linux
+-------------------------------------------
-With Windows 10, Microsoft has released a new feature named the
-[Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about). This feature allows you to run a bash shell directly on Windows in an Ubuntu based
-environment. Within this environment you can cross compile for Windows without the need for a separate Linux VM or Server.
+With Windows 10, Microsoft has released a new feature named the [Windows
+Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/about). This
+feature allows you to run a bash shell directly on Windows in an Ubuntu-based
+environment. Within this environment you can cross compile for Windows without
+the need for a separate Linux VM or server.
-This feature is not supported in versions of Windows prior to Windows 10 or on Windows Server SKUs.
+This feature is not supported in versions of Windows prior to Windows 10 or on
+Windows Server SKUs. In addition, it is available [only for 64-bit versions of
+Windows](https://msdn.microsoft.com/en-us/commandline/wsl/install_guide).
To get the bash shell, you must first activate the feature in Windows.
@@ -36,10 +40,9 @@ To get the bash shell, you must first activate the feature in Windows.
* Accept the license
* Create a new UNIX user account (this is a separate account from your Windows account)
-After the bash shell is active, you can follow the instructions below for Windows 64-bit Cross-compilation.
-When building dependencies within the 'depends' folder, you may encounter an error building
-the protobuf dependency. If this occurs, re-run the command with sudo. This is likely
-a bug with the Windows Subsystem for Linux feature and may be fixed with a future update.
+After the bash shell is active, you can follow the instructions below, starting
+with the "Cross-compilation" section. Compiling the 64-bit version is
+recommended but it is possible to compile the 32-bit version.
Cross-compilation
-------------------
@@ -48,28 +51,54 @@ These steps can be performed on, for example, an Ubuntu VM. The depends system
will also work on other Linux distributions, however the commands for
installing the toolchain will be different.
-Make sure you install the build requirements mentioned in
-[build-unix.md](/doc/build-unix.md).
-Then, install the toolchains and curl:
+First, install the general dependencies:
+
+ sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils curl
+
+A host toolchain (`build-essential`) is necessary because some dependency
+packages (such as `protobuf`) need to build host utilities that are used in the
+build process.
- sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev g++-mingw-w64-x86-64 mingw-w64-x86-64-dev curl
+## Building for 64-bit Windows
-To build executables for Windows 32-bit:
+To build executables for Windows 64-bit, install the following dependencies:
+
+ sudo apt-get install g++-mingw-w64-x86-64 mingw-w64-x86-64-dev
+
+Then build using:
cd depends
- make HOST=i686-w64-mingw32 -j4
+ make HOST=x86_64-w64-mingw32
cd ..
./autogen.sh # not required when building from tarball
- ./configure --prefix=`pwd`/depends/i686-w64-mingw32
+ CONFIG_SITE=$PWD/depends/x86_64-w64-mingw32/share/config.site ./configure --prefix=/
make
-To build executables for Windows 64-bit:
+## Building for 32-bit Windows
+
+To build executables for Windows 32-bit, install the following dependencies:
+
+ sudo apt-get install g++-mingw-w64-i686 mingw-w64-i686-dev
+
+Then build using:
cd depends
- make HOST=x86_64-w64-mingw32 -j4
+ make HOST=i686-w64-mingw32
cd ..
./autogen.sh # not required when building from tarball
- ./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
+ CONFIG_SITE=$PWD/depends/i686-w64-mingw32/share/config.site ./configure --prefix=/
make
+## Depends system
+
For further documentation on the depends system see [README.md](../depends/README.md) in the depends directory.
+
+Installation
+-------------
+
+After building using the Windows subsystem it can be useful to copy the compiled
+executables to a directory on the windows drive in the same directory structure
+as they appear in the release `.zip` archive. This can be done in the following
+way. This will install to `c:\workspace\bitcoin`, for example:
+
+ make install DESTDIR=/mnt/c/workspace/bitcoin
diff --git a/doc/developer-notes.md b/doc/developer-notes.md
index 70c0690ba3..f8c34e060f 100644
--- a/doc/developer-notes.md
+++ b/doc/developer-notes.md
@@ -11,9 +11,13 @@ gradually.
- Braces on new lines for namespaces, classes, functions, methods.
- Braces on the same line for everything else.
- 4 space indentation (no tabs) for every block except namespaces.
- - No indentation for public/protected/private or for namespaces.
+ - No indentation for `public`/`protected`/`private` or for `namespace`.
- No extra spaces inside parenthesis; don't do ( this )
- - No space after function names; one space after if, for and while.
+ - No space after function names; one space after `if`, `for` and `while`.
+ - If an `if` only has a single-statement then-clause, it can appear
+ on the same line as the if, without braces. In every other case,
+ braces are required, and the then and else clauses must appear
+ correctly indented on a new line.
- `++i` is preferred over `i++`.
Block style example:
@@ -22,14 +26,18 @@ namespace foo
{
class Class
{
- bool Function(char* psz, int n)
+ bool Function(const std::string& s, 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;
+ if (!Something()) return false;
...
+ if (SomethingElse()) {
+ DoMore();
+ } else {
+ DoLess();
+ }
}
// Success return is usually at the end
@@ -331,6 +339,32 @@ Strings and formatting
- *Rationale*: Bitcoin Core uses tinyformat, which is type safe. Leave them out to avoid confusion
+Variable names
+--------------
+
+The shadowing warning (`-Wshadow`) is enabled by default. It prevents issues rising
+from using a different variable with the same name.
+
+Please name variables so that their names do not shadow variables defined in the source code.
+
+E.g. in member initializers, prepend `_` to the argument name shadowing the
+member name:
+
+```c++
+class AddressBookPage
+{
+ Mode mode;
+}
+
+AddressBookPage::AddressBookPage(Mode _mode) :
+ mode(_mode)
+...
+```
+
+When using nested cycles, do not name the inner cycle variable the same as in
+upper cycle etc.
+
+
Threads and synchronization
----------------------------
@@ -382,6 +416,37 @@ GUI
should not interact with the user. That's where View classes come in. The converse also
holds: try to not directly access core data structures from Views.
+Subtrees
+----------
+
+Several parts of the repository are subtrees of software maintained elsewhere.
+
+Some of these are maintained by active developers of Bitcoin Core, in which case changes should probably go
+directly upstream without being PRed directly against the project. They will be merged back in the next
+subtree merge.
+
+Others are external projects without a tight relationship with our project. Changes to these should also
+be sent upstream but bugfixes may also be prudent to PR against Bitcoin Core so that they can be integrated
+quickly. Cosmetic changes should be purely taken upstream.
+
+There is a tool in contrib/devtools/git-subtree-check.sh to check a subtree directory for consistency with
+its upstream repository.
+
+Current subtrees include:
+
+- src/leveldb
+ - Upstream at https://github.com/google/leveldb ; Maintained by Google, but open important PRs to Core to avoid delay
+
+- src/libsecp256k1
+ - Upstream at https://github.com/bitcoin-core/secp256k1/ ; actively maintaned by Core contributors.
+
+- src/crypto/ctaes
+ - Upstream at https://github.com/bitcoin-core/ctaes ; actively maintained by Core contributors.
+
+- src/univalue
+ - Upstream at https://github.com/jgarzik/univalue ; report important PRs to Core to avoid delay.
+
+
Git and github tips
---------------------
diff --git a/doc/fuzzing.md b/doc/fuzzing.md
new file mode 100644
index 0000000000..bf3ad17861
--- /dev/null
+++ b/doc/fuzzing.md
@@ -0,0 +1,66 @@
+Fuzz-testing Bitcoin Core
+==========================
+
+A special test harness `test_bitcoin_fuzzy` is provided to provide an easy
+entry point for fuzzers and the like. In this document we'll describe how to
+use it with AFL.
+
+Building AFL
+-------------
+
+It is recommended to always use the latest version of afl:
+```
+wget http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz
+tar -zxvf afl-latest.tgz
+cd afl-<version>
+make
+export AFLPATH=$PWD
+```
+
+Instrumentation
+----------------
+
+To build Bitcoin Core using AFL instrumentation (this assumes that the
+`AFLPATH` was set as above):
+```
+./configure --disable-ccache --disable-shared --enable-tests CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++
+export AFL_HARDEN=1
+cd src/
+make test/test_bitcoin_fuzzy
+```
+We disable ccache because we don't want to pollute the ccache with instrumented
+objects, and similarly don't want to use non-instrumented cached objects linked
+in.
+
+Preparing fuzzing
+------------------
+
+AFL needs an input directory with examples, and an output directory where it
+will place examples that it found. These can be anywhere in the file system,
+we'll define environment variables to make it easy to reference them.
+
+```
+mkdir inputs
+AFLIN=$PWD/inputs
+mkdir outputs
+AFLOUT=$PWD/outputs
+```
+
+Example inputs are available from:
+
+- https://download.visucore.com/bitcoin/bitcoin_fuzzy_in.tar.xz
+- http://strateman.ninja/fuzzing.tar.xz
+
+Extract these (or other starting inputs) into the `inputs` directory before starting fuzzing.
+
+Fuzzing
+--------
+
+To start the actual fuzzing use:
+```
+$AFLPATH/afl-fuzz -i ${AFLIN} -o ${AFLOUT} -m52 -- test/test_bitcoin_fuzzy
+```
+
+You may have to change a few kernel parameters to test optimally - `afl-fuzz`
+will print an error and suggestion if so.
+
diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1
index 24b529dac1..2129a151e2 100644
--- a/doc/man/bitcoin-qt.1
+++ b/doc/man/bitcoin-qt.1
@@ -75,11 +75,13 @@ Specify pid file (default: bitcoind.pid)
.HP
\fB\-prune=\fR<n>
.IP
-Reduce storage requirements by pruning (deleting) old blocks. This mode
-is incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting
-this setting requires re\-downloading the entire blockchain.
-(default: 0 = disable pruning blocks, >550 = target size in MiB
-to use for block files)
+Reduce storage requirements by enabling pruning (deleting) of old blocks.
+This allows the pruneblockchain RPC to be called to delete specific blocks,
+and enables automatic pruning of old blocks if a target size in MiB is
+provided. This mode is incompatible with \fB\-txindex\fR and \fB\-rescan\fR.
+Warning: Reverting this setting requires re\-downloading the entire blockchain.
+(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >550 =
+automatically prune block files to stay under the specified target size in MiB)
.HP
\fB\-reindex\-chainstate\fR
.IP
diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1
index b99657a5fa..47539d8131 100644
--- a/doc/man/bitcoind.1
+++ b/doc/man/bitcoind.1
@@ -80,11 +80,13 @@ Specify pid file (default: bitcoind.pid)
.HP
\fB\-prune=\fR<n>
.IP
-Reduce storage requirements by pruning (deleting) old blocks. This mode
-is incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting
-this setting requires re\-downloading the entire blockchain.
-(default: 0 = disable pruning blocks, >550 = target size in MiB
-to use for block files)
+Reduce storage requirements by enabling pruning (deleting) of old blocks.
+This allows the pruneblockchain RPC to be called to delete specific blocks,
+and enables automatic pruning of old blocks if a target size in MiB is
+provided. This mode is incompatible with \fB\-txindex\fR and \fB\-rescan\fR.
+Warning: Reverting this setting requires re\-downloading the entire blockchain.
+(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >550 =
+automatically prune block files to stay under the specified target size in MiB)
.HP
\fB\-reindex\-chainstate\fR
.IP
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 0463cb8a61..bbda55854f 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -19,24 +19,16 @@ To receive security and update notifications, please subscribe to:
Compatibility
==============
-Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support),
-an OS initially released in 2001. This means that not even critical security
-updates will be released anymore. Without security updates, using a bitcoin
-wallet on a XP machine is irresponsible at least.
+Bitcoin Core is extensively tested on multiple operating systems using
+the Linux kernel, macOS 10.8+, and Windows Vista and later.
-In addition to that, with 0.12.x there have been varied reports of Bitcoin Core
-randomly crashing on Windows XP. It is [not clear](https://github.com/bitcoin/bitcoin/issues/7681#issuecomment-217439891)
-what the source of these crashes is, but it is likely that upstream
-libraries such as Qt are no longer being tested on XP.
+Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support).
+No attempt is made to prevent installing or running the software on Windows XP, you
+can still do so at your own risk but be aware that there are known instabilities.
+Please do not report issues about Windows XP to the issue tracker.
-We do not have time nor resources to provide support for an OS that is
-end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are
-suggested to upgrade to a newer version of Windows, or install an alternative OS
-that is supported.
-
-No attempt is made to prevent installing or running the software on Windows XP,
-you can still do so at your own risk, but do not expect it to work: do not
-report issues about Windows XP to the issue tracker.
+Bitcoin Core should also work on most other Unix-like systems but is not
+frequently tested on them.
Notable changes
===============
@@ -48,6 +40,63 @@ Low-level RPC changes
an optional third arg, which was always ignored. Make sure to never pass more
than two arguments.
+Fee Estimation Changes
+----------------------
+
+- Since 0.13.2 fee estimation for a confirmation target of 1 block has been
+ disabled. This is only a minor behavior change as there was often insufficient
+ data for this target anyway. `estimatefee 1` will now always return -1 and
+ `estimatesmartfee 1` will start searching at a target of 2.
+
+- The default target for fee estimation is changed to 6 blocks in both the GUI
+ (previously 25) and for RPC calls (previously 2).
+
+Removal of Priority Estimation
+-------------------------------
+
+- Estimation of "priority" needed for a transaction to be included within a target
+ number of blocks has been removed. The rpc calls are deprecated and will either
+ return -1 or 1e24 appropriately. The format for `fee_estimates.dat` has also
+ changed to no longer save these priority estimates. It will automatically be
+ converted to the new format which is not readable by prior versions of the
+ software.
+
+- The concept of "priority" (coin age) transactions is planned to be removed in
+ the next major version. To prepare for this, the default for the rate limit of
+ priority transactions (`-limitfreerelay`) has been set to `0` kB/minute. This
+ is not to be confused with the `prioritisetransaction` RPC which will remain
+ supported for adding fee deltas to transactions.
+
+P2P connection management
+--------------------------
+
+- Peers manually added through the addnode option or addnode RPC now have their own
+ limit of eight connections which does not compete with other inbound or outbound
+ connection usage and is not subject to the maxconnections limitation.
+
+- New connections to manually added peers are much faster.
+
+Introduction of assumed-valid blocks
+-------------------------------------
+
+- A significant portion of the initial block download time is spent verifying
+ scripts/signatures. Although the verification must pass to ensure the security
+ of the system, no other result from this verification is needed: If the node
+ knew the history of a given block were valid it could skip checking scripts
+ for its ancestors.
+
+- A new configuration option 'assumevalid' is provided to express this knowledge
+ to the software. Unlike the 'checkpoints' in the past this setting does not
+ force the use of a particular chain: chains that are consistent with it are
+ processed quicker, but other chains are still accepted if they'd otherwise
+ be chosen as best. Also unlike 'checkpoints' the user can configure which
+ block history is assumed true, this means that even outdated software can
+ sync more quickly if the setting is updated by the user.
+
+- Because the validity of a chain history is a simple objective fact it is much
+ easier to review this setting. As a result the software ships with a default
+ value adjusted to match the current chain shortly before release. The use
+ of this default value can be disabled by setting -assumevalid=0
0.14.0 Change log
=================
diff --git a/doc/release-notes/release-notes-0.13.2.md b/doc/release-notes/release-notes-0.13.2.md
new file mode 100644
index 0000000000..45fff5c8bb
--- /dev/null
+++ b/doc/release-notes/release-notes-0.13.2.md
@@ -0,0 +1,178 @@
+Bitcoin Core version 0.13.2 is now available from:
+
+ <https://bitcoin.org/bin/bitcoin-core-0.13.2/>
+
+This is a new minor version release, including various bugfixes and
+performance improvements, as well as updated translations.
+
+Please report bugs using the issue tracker at github:
+
+ <https://github.com/bitcoin/bitcoin/issues>
+
+To receive security and update notifications, please subscribe to:
+
+ <https://bitcoincore.org/en/list/announcements/join/>
+
+Compatibility
+==============
+
+Microsoft ended support for Windows XP on [April 8th, 2014](https://www.microsoft.com/en-us/WindowsForBusiness/end-of-xp-support),
+an OS initially released in 2001. This means that not even critical security
+updates will be released anymore. Without security updates, using a bitcoin
+wallet on a XP machine is irresponsible at least.
+
+In addition to that, with 0.12.x there have been varied reports of Bitcoin Core
+randomly crashing on Windows XP. It is [not clear](https://github.com/bitcoin/bitcoin/issues/7681#issuecomment-217439891)
+what the source of these crashes is, but it is likely that upstream
+libraries such as Qt are no longer being tested on XP.
+
+We do not have time nor resources to provide support for an OS that is
+end-of-life. From 0.13.0 on, Windows XP is no longer supported. Users are
+suggested to upgrade to a newer version of Windows, or install an alternative OS
+that is supported.
+
+No attempt is made to prevent installing or running the software on Windows XP,
+you can still do so at your own risk, but do not expect it to work: do not
+report issues about Windows XP to the issue tracker.
+
+From 0.13.1 onwards OS X 10.7 is no longer supported. 0.13.0 was intended to work on 10.7+,
+but severe issues with the libc++ version on 10.7.x keep it from running reliably.
+0.13.1 now requires 10.8+, and will communicate that to 10.7 users, rather than crashing unexpectedly.
+
+Notable changes
+===============
+
+Change to wallet handling of mempool rejection
+-----------------------------------------------
+
+When a newly created transaction failed to enter the mempool due to
+the limits on chains of unconfirmed transactions the sending RPC
+calls would return an error. The transaction would still be queued
+in the wallet and, once some of the parent transactions were
+confirmed, broadcast after the software was restarted.
+
+This behavior has been changed to return success and to reattempt
+mempool insertion at the same time transaction rebroadcast is
+attempted, avoiding a need for a restart.
+
+Transactions in the wallet which cannot be accepted into the mempool
+can be abandoned with the previously existing abandontransaction RPC
+(or in the GUI via a context menu on the transaction).
+
+
+0.13.2 Change log
+=================
+
+Detailed release notes follow. This overview includes changes that affect
+behavior, not code moves, refactors and string updates. For convenience in locating
+the code changes and accompanying discussion, both the pull request and
+git merge commit are mentioned.
+
+### Consensus
+- #9293 `e591c10` [0.13 Backport #9053] IBD using chainwork instead of height and not using header timestamp (gmaxwell)
+- #9053 `5b93eee` IBD using chainwork instead of height and not using header timestamps (gmaxwell)
+
+### RPC and other APIs
+- #8845 `1d048b9` Don't return the address of a P2SH of a P2SH (jnewbery)
+- #9041 `87fbced` keypoololdest denote Unix epoch, not GMT (s-matthew-english)
+- #9122 `f82c81b` fix getnettotals RPC description about timemillis (visvirial)
+- #9042 `5bcb05d` [rpc] ParseHash: Fail when length is not 64 (MarcoFalke)
+- #9194 `f26dab7` Add option to return non-segwit serialization via rpc (instagibbs)
+- #9347 `b711390` [0.13.2] wallet/rpc backports (MarcoFalke)
+- #9292 `c365556` Complain when unknown rpcserialversion is specified (sipa)
+- #9322 `49a612f` [qa] Don't set unknown rpcserialversion (MarcoFalke)
+
+### Block and transaction handling
+- #8357 `ce0d817` [mempool] Fix relaypriority calculation error (maiiz)
+- #9267 `0a4aa87` [0.13 backport #9239] Disable fee estimates for a confirm target of 1 block (morcos)
+- #9196 `0c09d9f` Send tip change notification from invalidateblock (ryanofsky)
+
+### P2P protocol and network code
+- #8995 `9ef3875` Add missing cs_main lock to ::GETBLOCKTXN processing (TheBlueMatt)
+- #9234 `94531b5` torcontrol: Explicitly request RSA1024 private key (laanwj)
+- #8637 `2cad5db` Compact Block Tweaks (rebase of #8235) (sipa)
+- #9058 `286e548` Fixes for p2p-compactblocks.py test timeouts on travis (#8842) (ryanofsky)
+- #8865 `4c71fc4` Decouple peer-processing-logic from block-connection-logic (TheBlueMatt)
+- #9117 `6fe3981` net: don't send feefilter messages before the version handshake is complete (theuni)
+- #9188 `ca1fd75` Make orphan parent fetching ask for witnesses (gmaxwell)
+- #9052 `3a3bcbf` Use RelevantServices instead of node_network in AttemptToEvict (gmaxwell)
+- #9048 `9460771` [0.13 backport #9026] Fix handling of invalid compact blocks (sdaftuar)
+- #9357 `03b6f62` [0.13 backport #9352] Attempt reconstruction from all compact block announcements (sdaftuar)
+- #9189 `b96a8f7` Always add default_witness_commitment with GBT client support (sipa)
+- #9253 `28d0f22` Fix calculation of number of bound sockets to use (TheBlueMatt)
+- #9199 `da5a16b` Always drop the least preferred HB peer when adding a new one (gmaxwell)
+
+### Build system
+- #9169 `d1b4da9` build: fix qt5.7 build under macOS (theuni)
+- #9326 `a0f7ece` Update for OpenSSL 1.1 API (gmaxwell)
+- #9224 `396c405` Prevent FD_SETSIZE error building on OpenBSD (ivdsangen)
+
+### GUI
+- #8972 `6f86b53` Make warnings label selectable (jonasschnelli) (MarcoFalke)
+- #9185 `6d70a73` Fix coincontrol sort issue (jonasschnelli)
+- #9094 `5f3a12c` Use correct conversion function for boost::path datadir (laanwj)
+- #8908 `4a974b2` Update bitcoin-qt.desktop (s-matthew-english)
+- #9190 `dc46b10` Plug many memory leaks (laanwj)
+
+### Wallet
+- #9290 `35174a0` Make RelayWalletTransaction attempt to AcceptToMemoryPool (gmaxwell)
+- #9295 `43bcfca` Bugfix: Fundrawtransaction: don't terminate when keypool is empty (jonasschnelli)
+- #9302 `f5d606e` Return txid even if ATMP fails for new transaction (sipa)
+- #9262 `fe39f26` Prefer coins that have fewer ancestors, sanity check txn before ATMP (instagibbs)
+
+### Tests and QA
+- #9159 `eca9b46` Wait for specific block announcement in p2p-compactblocks (ryanofsky)
+- #9186 `dccdc3a` Fix use-after-free in scheduler tests (laanwj)
+- #9168 `3107280` Add assert_raises_message to check specific error message (mrbandrews)
+- #9191 `29435db` 0.13.2 Backports (MarcoFalke)
+- #9077 `1d4c884` Increase wallet-dump RPC timeout (ryanofsky)
+- #9098 `ecd7db5` Handle zombies and cluttered tmpdirs (MarcoFalke)
+- #8927 `387ec9d` Add script tests for FindAndDelete in pre-segwit and segwit scripts (jl2012)
+- #9200 `eebc699` bench: Fix subtle counting issue when rescaling iteration count (laanwj)
+
+### Miscellaneous
+- #8838 `094848b` Calculate size and weight of block correctly in CreateNewBlock() (jnewbery)
+- #8920 `40169dc` Set minimum required Boost to 1.47.0 (fanquake)
+- #9251 `a710a43` Improvement of documentation of command line parameter 'whitelist' (wodry)
+- #8932 `106da69` Allow bitcoin-tx to create v2 transactions (btcdrak)
+- #8929 `12428b4` add software-properties-common (sigwo)
+- #9120 `08d1c90` bug: Missed one "return false" in recent refactoring in #9067 (UdjinM6)
+- #9067 `f85ee01` Fix exit codes (UdjinM6)
+- #9340 `fb987b3` [0.13] Update secp256k1 subtree (MarcoFalke)
+- #9229 `b172377` Remove calls to getaddrinfo_a (TheBlueMatt)
+
+Credits
+=======
+
+Thanks to everyone who directly contributed to this release:
+
+- Alex Morcos
+- BtcDrak
+- Cory Fields
+- fanquake
+- Gregory Maxwell
+- Gregory Sanders
+- instagibbs
+- Ivo van der Sangen
+- jnewbery
+- Johnson Lau
+- Jonas Schnelli
+- Luke Dashjr
+- maiiz
+- MarcoFalke
+- Masahiko Hyuga
+- Matt Corallo
+- matthias
+- mrbandrews
+- Pavel Janík
+- Pieter Wuille
+- randy-waterhouse
+- Russell Yanofsky
+- S. Matthew English
+- Steven
+- Suhas Daftuar
+- UdjinM6
+- Wladimir J. van der Laan
+- wodry
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
diff --git a/doc/release-process.md b/doc/release-process.md
index 85cf160f47..399ed25c91 100644
--- a/doc/release-process.md
+++ b/doc/release-process.md
@@ -13,6 +13,11 @@ Before every minor and major release:
* Update version in sources (see below)
* Write release notes (see below)
* Update `src/chainparams.cpp` nMinimumChainWork with information from the getblockchaininfo rpc.
+* Update `src/chainparams.cpp` defaultAssumeValid with information from the getblockhash rpc.
+ - The selected value must not be orphaned so it may be useful to set the value two blocks back from the tip.
+ - Testnet should be set some tens of thousands back from the tip due to reorgs there.
+ - This update should be reviewed with a reindex-chainstate with assumevalid=0 to catch any defect
+ that causes rejection of blocks in the past history.
Before every major release:
@@ -280,6 +285,8 @@ bitcoin.org (see below for bitcoin.org update instructions).
- Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
- - Add release notes for the new version to the directory `doc/release-notes` in git master
+ - Archive release notes for the new version to `doc/release-notes/` (branch `master` and branch of the release)
+
+ - Create a [new GitHub release](https://github.com/bitcoin/bitcoin/releases/new) with a link to the archived release notes.
- Celebrate
diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py
index 778f8d8a77..83b6bdfe48 100755
--- a/qa/pull-tester/rpc-tests.py
+++ b/qa/pull-tester/rpc-tests.py
@@ -100,78 +100,89 @@ if ENABLE_ZMQ:
testScripts = [
# longest test should go first, to favor running tests in parallel
- 'p2p-fullblocktest.py',
+ 'wallet-hd.py',
'walletbackup.py',
- 'bip68-112-113-p2p.py',
+ # vv Tests less than 5m vv
+ 'p2p-fullblocktest.py',
+ 'fundrawtransaction.py',
+ 'p2p-compactblocks.py',
+ 'segwit.py',
+ # vv Tests less than 2m vv
'wallet.py',
'wallet-accounts.py',
- 'wallet-hd.py',
+ 'p2p-segwit.py',
'wallet-dump.py',
'listtransactions.py',
+ # vv Tests less than 60s vv
+ 'sendheaders.py',
+ 'zapwallettxes.py',
+ 'importmulti.py',
+ 'mempool_limit.py',
+ 'merkle_blocks.py',
'receivedby.py',
+ 'abandonconflict.py',
+ 'bip68-112-113-p2p.py',
+ 'rawtransactions.py',
+ 'reindex.py',
+ # vv Tests less than 30s vv
'mempool_resurrect_test.py',
'txn_doublespend.py --mineblock',
- 'p2p-segwit.py',
- 'segwit.py',
'txn_clone.py',
'getchaintips.py',
- 'rawtransactions.py',
'rest.py',
'mempool_spendcoinbase.py',
'mempool_reorg.py',
- 'mempool_limit.py',
'httpbasics.py',
'multi_rpc.py',
- 'zapwallettxes.py',
'proxy_test.py',
- 'merkle_blocks.py',
- 'fundrawtransaction.py',
'signrawtransactions.py',
'nodehandling.py',
- 'reindex.py',
'decodescript.py',
'blockchain.py',
'disablewallet.py',
- 'sendheaders.py',
'keypool.py',
'p2p-mempool.py',
'prioritise_transaction.py',
'invalidblockrequest.py',
'invalidtxrequest.py',
- 'abandonconflict.py',
'p2p-versionbits-warning.py',
'preciousblock.py',
'importprunedfunds.py',
'signmessages.py',
- 'p2p-compactblocks.py',
'nulldummy.py',
- 'importmulti.py',
+ 'import-rescan.py',
+ 'rpcnamedargs.py',
]
if ENABLE_ZMQ:
testScripts.append('zmq_test.py')
testScriptsExt = [
+ 'pruning.py',
+ # vv Tests less than 20m vv
+ 'smartfees.py',
+ # vv Tests less than 5m vv
+ 'maxuploadtarget.py',
+ 'mempool_packages.py',
+ # vv Tests less than 2m vv
+ 'bip68-sequence.py',
+ 'getblocktemplate_longpoll.py',
+ # vv Tests less than 60s vv
'bip9-softforks.py',
+ 'p2p-feefilter.py',
+ 'rpcbind_test.py',
+ # vv Tests less than 30s vv
'bip65-cltv.py',
'bip65-cltv-p2p.py',
- 'bip68-sequence.py',
'bipdersig-p2p.py',
'bipdersig.py',
- 'getblocktemplate_longpoll.py',
'getblocktemplate_proposals.py',
'txn_doublespend.py',
'txn_clone.py --mineblock',
'forknotify.py',
'invalidateblock.py',
- 'rpcbind_test.py',
- 'smartfees.py',
'maxblocksinflight.py',
'p2p-acceptblock.py',
- 'mempool_packages.py',
- 'maxuploadtarget.py',
'replace-by-fee.py',
- 'p2p-feefilter.py',
- 'pruning.py', # leave pruning last as it takes a REALLY long time
]
@@ -246,6 +257,10 @@ class RPCTestHandler:
self.test_list = test_list
self.flags = flags
self.num_running = 0
+ # In case there is a graveyard of zombie bitcoinds, we can apply a
+ # pseudorandom offset to hopefully jump over them.
+ # (625 is PORT_RANGE/MAX_NODES)
+ self.portseed_offset = int(time.time() * 1000) % 625
self.jobs = []
def get_next(self):
@@ -253,7 +268,7 @@ class RPCTestHandler:
# Add tests
self.num_running += 1
t = self.test_list.pop(0)
- port_seed = ["--portseed=%s" % len(self.test_list)]
+ port_seed = ["--portseed={}".format(len(self.test_list) + self.portseed_offset)]
log_stdout = tempfile.SpooledTemporaryFile(max_size=2**16)
log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16)
self.jobs.append((t,
diff --git a/qa/pull-tester/run-bitcoind-for-test.sh.in b/qa/pull-tester/run-bitcoind-for-test.sh.in
deleted file mode 100644
index 14ae08e4e5..0000000000
--- a/qa/pull-tester/run-bitcoind-for-test.sh.in
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash
-# Copyright (c) 2013-2014 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-DATADIR="@abs_top_builddir@/.bitcoin"
-rm -rf "$DATADIR"
-mkdir -p "$DATADIR"/regtest
-touch "$DATADIR/regtest/debug.log"
-tail -q -n 1 -F "$DATADIR/regtest/debug.log" | grep -m 1 -q "Done loading" &
-WAITER=$!
-PORT=`expr 10000 + $$ % 55536`
-"@abs_top_builddir@/src/bitcoind@EXEEXT@" -connect=0.0.0.0 -datadir="$DATADIR" -rpcuser=user -rpcpassword=pass -listen -keypool=3 -debug -debug=net -logtimestamps -checkmempool=0 -relaypriority=0 -port=$PORT -whitelist=127.0.0.1 -regtest -rpcport=`expr $PORT + 1` &
-BITCOIND=$!
-
-#Install a watchdog.
-(sleep 10 && kill -0 $WAITER 2>/dev/null && kill -9 $BITCOIND $$)&
-wait $WAITER
-
-if [ -n "$TIMEOUT" ]; then
- timeout "$TIMEOUT"s "$@" $PORT
- RETURN=$?
-else
- "$@" $PORT
- RETURN=$?
-fi
-
-(sleep 15 && kill -0 $BITCOIND 2>/dev/null && kill -9 $BITCOIND $$)&
-kill $BITCOIND && wait $BITCOIND
-
-# timeout returns 124 on timeout, otherwise the return value of the child
-
-# If $RETURN is not 0, the test failed. Dump the tail of the debug log.
-if [ $RETURN -ne 0 ]; then tail -n 200 $DATADIR/regtest/debug.log; fi
-
-exit $RETURN
diff --git a/qa/rpc-tests/assumevalid.py b/qa/rpc-tests/assumevalid.py
new file mode 100755
index 0000000000..e4bc22951b
--- /dev/null
+++ b/qa/rpc-tests/assumevalid.py
@@ -0,0 +1,191 @@
+#!/usr/bin/env python3
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+assumevalid.py
+
+Test logic for skipping signature validation on blocks which we've assumed
+valid (https://github.com/bitcoin/bitcoin/pull/9484)
+
+We build a chain that includes and invalid signature for one of the
+transactions:
+
+ 0: genesis block
+ 1: block 1 with coinbase transaction output.
+ 2-101: bury that block with 100 blocks so the coinbase transaction
+ output can be spent
+ 102: a block containing a transaction spending the coinbase
+ transaction output. The transaction has an invalid signature.
+ 103-2202: bury the bad block with just over two weeks' worth of blocks
+ (2100 blocks)
+
+Start three nodes:
+
+ - node0 has no -assumevalid parameter. Try to sync to block 2202. It will
+ reject block 102 and only sync as far as block 101
+ - node1 has -assumevalid set to the hash of block 102. Try to sync to
+ block 2202. node1 will sync all the way to block 2202.
+ - node2 has -assumevalid set to the hash of block 102. Try to sync to
+ block 200. node2 will reject block 102 since it's assumed valid, but it
+ isn't buried by at least two weeks' work.
+'''
+
+from test_framework.mininode import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
+from test_framework.blocktools import create_block, create_coinbase
+from test_framework.key import CECKey
+from test_framework.script import *
+
+class BaseNode(SingleNodeConnCB):
+ def __init__(self):
+ SingleNodeConnCB.__init__(self)
+ self.last_inv = None
+ self.last_headers = None
+ self.last_block = None
+ self.last_getdata = None
+ self.block_announced = False
+ self.last_getheaders = None
+ self.disconnected = False
+ self.last_blockhash_announced = None
+
+ def on_close(self, conn):
+ self.disconnected = True
+
+ def wait_for_disconnect(self, timeout=60):
+ test_function = lambda: self.disconnected
+ assert(wait_until(test_function, timeout=timeout))
+ return
+
+ def send_header_for_blocks(self, new_blocks):
+ headers_message = msg_headers()
+ headers_message.headers = [ CBlockHeader(b) for b in new_blocks ]
+ self.send_message(headers_message)
+
+class SendHeadersTest(BitcoinTestFramework):
+ def __init__(self):
+ super().__init__()
+ self.setup_clean_chain = True
+ self.num_nodes = 3
+
+ def setup_network(self):
+ # Start node0. We don't start the other nodes yet since
+ # we need to pre-mine a block with an invalid transaction
+ # signature so we can pass in the block hash as assumevalid.
+ self.nodes = []
+ self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"]))
+
+ def run_test(self):
+
+ # Connect to node0
+ node0 = BaseNode()
+ connections = []
+ connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], node0))
+ node0.add_connection(connections[0])
+
+ NetworkThread().start() # Start up network handling in another thread
+ node0.wait_for_verack()
+
+ # Build the blockchain
+ self.tip = int(self.nodes[0].getbestblockhash(), 16)
+ self.block_time = self.nodes[0].getblock(self.nodes[0].getbestblockhash())['time'] + 1
+
+ self.blocks = []
+
+ # Get a pubkey for the coinbase TXO
+ coinbase_key = CECKey()
+ coinbase_key.set_secretbytes(b"horsebattery")
+ coinbase_pubkey = coinbase_key.get_pubkey()
+
+ # Create the first block with a coinbase output to our key
+ height = 1
+ block = create_block(self.tip, create_coinbase(height, coinbase_pubkey), self.block_time)
+ self.blocks.append(block)
+ self.block_time += 1
+ block.solve()
+ # Save the coinbase for later
+ self.block1 = block
+ self.tip = block.sha256
+ height += 1
+
+ # Bury the block 100 deep so the coinbase output is spendable
+ for i in range(100):
+ block = create_block(self.tip, create_coinbase(height), self.block_time)
+ block.solve()
+ self.blocks.append(block)
+ self.tip = block.sha256
+ self.block_time += 1
+ height += 1
+
+ # Create a transaction spending the coinbase output with an invalid (null) signature
+ tx = CTransaction()
+ tx.vin.append(CTxIn(COutPoint(self.block1.vtx[0].sha256, 0), scriptSig=b""))
+ tx.vout.append(CTxOut(49*100000000, CScript([OP_TRUE])))
+ tx.calc_sha256()
+
+ block102 = create_block(self.tip, create_coinbase(height), self.block_time)
+ self.block_time += 1
+ block102.vtx.extend([tx])
+ block102.hashMerkleRoot = block102.calc_merkle_root()
+ block102.rehash()
+ block102.solve()
+ self.blocks.append(block102)
+ self.tip = block102.sha256
+ self.block_time += 1
+ height += 1
+
+ # Bury the assumed valid block 2100 deep
+ for i in range(2100):
+ block = create_block(self.tip, create_coinbase(height), self.block_time)
+ block.nVersion = 4
+ block.solve()
+ self.blocks.append(block)
+ self.tip = block.sha256
+ self.block_time += 1
+ height += 1
+
+ # Start node1 and node2 with assumevalid so they accept a block with a bad signature.
+ self.nodes.append(start_node(1, self.options.tmpdir,
+ ["-debug", "-assumevalid=" + hex(block102.sha256)]))
+ node1 = BaseNode() # connects to node1
+ connections.append(NodeConn('127.0.0.1', p2p_port(1), self.nodes[1], node1))
+ node1.add_connection(connections[1])
+ node1.wait_for_verack()
+
+ self.nodes.append(start_node(2, self.options.tmpdir,
+ ["-debug", "-assumevalid=" + hex(block102.sha256)]))
+ node2 = BaseNode() # connects to node2
+ connections.append(NodeConn('127.0.0.1', p2p_port(2), self.nodes[2], node2))
+ node2.add_connection(connections[2])
+ node2.wait_for_verack()
+
+ # send header lists to all three nodes
+ node0.send_header_for_blocks(self.blocks[0:2000])
+ node0.send_header_for_blocks(self.blocks[2000:])
+ node1.send_header_for_blocks(self.blocks[0:2000])
+ node1.send_header_for_blocks(self.blocks[2000:])
+ node2.send_header_for_blocks(self.blocks[0:200])
+
+ # Send 102 blocks to node0. Block 102 will be rejected.
+ for i in range(101):
+ node0.send_message(msg_block(self.blocks[i]))
+ node0.sync_with_ping() # make sure the most recent block is synced
+ node0.send_message(msg_block(self.blocks[101]))
+ assert_equal(self.nodes[0].getblock(self.nodes[0].getbestblockhash())['height'], 101)
+
+ # Send 3102 blocks to node1. All blocks will be accepted.
+ for i in range(2202):
+ node1.send_message(msg_block(self.blocks[i]))
+ node1.sync_with_ping() # make sure the most recent block is synced
+ assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 2202)
+
+ # Send 102 blocks to node2. Block 102 will be rejected.
+ for i in range(101):
+ node2.send_message(msg_block(self.blocks[i]))
+ node2.sync_with_ping() # make sure the most recent block is synced
+ node2.send_message(msg_block(self.blocks[101]))
+ assert_equal(self.nodes[2].getblock(self.nodes[2].getbestblockhash())['height'], 101)
+
+if __name__ == '__main__':
+ SendHeadersTest().main()
diff --git a/qa/rpc-tests/bip68-112-113-p2p.py b/qa/rpc-tests/bip68-112-113-p2p.py
index 55b3e2a04a..c96b746c9d 100755
--- a/qa/rpc-tests/bip68-112-113-p2p.py
+++ b/qa/rpc-tests/bip68-112-113-p2p.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015 The Bitcoin Core developers
+# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -289,6 +289,7 @@ class BIP68_112_113Test(ComparisonTestFramework):
# BIP113 test transaction will be modified before each use to put in appropriate block time
bip113tx_v1 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("49.98"))
bip113tx_v1.vin[0].nSequence = 0xFFFFFFFE
+ bip113tx_v1.nVersion = 1
bip113tx_v2 = self.create_transaction(self.nodes[0], bip113input, self.nodeaddress, Decimal("49.98"))
bip113tx_v2.vin[0].nSequence = 0xFFFFFFFE
bip113tx_v2.nVersion = 2
diff --git a/qa/rpc-tests/bip9-softforks.py b/qa/rpc-tests/bip9-softforks.py
index c42ed44c25..69a10cc8b4 100755
--- a/qa/rpc-tests/bip9-softforks.py
+++ b/qa/rpc-tests/bip9-softforks.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015 The Bitcoin Core developers
+# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/qa/rpc-tests/fundrawtransaction.py b/qa/rpc-tests/fundrawtransaction.py
index 8c45578fcf..b97e9aecdf 100755
--- a/qa/rpc-tests/fundrawtransaction.py
+++ b/qa/rpc-tests/fundrawtransaction.py
@@ -484,6 +484,23 @@ class RawTransactionsTest(BitcoinTestFramework):
self.is_network_split=False
self.sync_all()
+ # drain the keypool
+ self.nodes[1].getnewaddress()
+ inputs = []
+ outputs = {self.nodes[0].getnewaddress():1.1}
+ rawTx = self.nodes[1].createrawtransaction(inputs, outputs)
+ # fund a transaction that requires a new key for the change output
+ # creating the key must be impossible because the wallet is locked
+ try:
+ fundedTx = self.nodes[1].fundrawtransaction(rawTx)
+ raise AssertionError("Wallet unlocked without passphrase")
+ except JSONRPCException as e:
+ assert('Keypool ran out' in e.error['message'])
+
+ #refill the keypool
+ self.nodes[1].walletpassphrase("test", 100)
+ self.nodes[1].walletlock()
+
try:
self.nodes[1].sendtoaddress(self.nodes[0].getnewaddress(), 1.2)
raise AssertionError("Wallet unlocked without passphrase")
@@ -498,7 +515,7 @@ class RawTransactionsTest(BitcoinTestFramework):
fundedTx = self.nodes[1].fundrawtransaction(rawTx)
#now we need to unlock
- self.nodes[1].walletpassphrase("test", 100)
+ self.nodes[1].walletpassphrase("test", 600)
signedTx = self.nodes[1].signrawtransaction(fundedTx['hex'])
txId = self.nodes[1].sendrawtransaction(signedTx['hex'])
self.nodes[1].generate(1)
@@ -643,5 +660,75 @@ class RawTransactionsTest(BitcoinTestFramework):
assert_fee_amount(result2['fee'], count_bytes(result2['hex']), 2 * result_fee_rate)
assert_fee_amount(result3['fee'], count_bytes(result3['hex']), 10 * result_fee_rate)
+ ######################################
+ # Test subtractFeeFromOutputs option #
+ ######################################
+
+ # Make sure there is exactly one input so coin selection can't skew the result
+ assert_equal(len(self.nodes[3].listunspent(1)), 1)
+
+ inputs = []
+ outputs = {self.nodes[2].getnewaddress(): 1}
+ rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
+
+ result = [self.nodes[3].fundrawtransaction(rawtx), # uses min_relay_tx_fee (set by settxfee)
+ self.nodes[3].fundrawtransaction(rawtx, {"subtractFeeFromOutputs": []}), # empty subtraction list
+ self.nodes[3].fundrawtransaction(rawtx, {"subtractFeeFromOutputs": [0]}), # uses min_relay_tx_fee (set by settxfee)
+ self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2*min_relay_tx_fee}),
+ self.nodes[3].fundrawtransaction(rawtx, {"feeRate": 2*min_relay_tx_fee, "subtractFeeFromOutputs": [0]})]
+
+ dec_tx = [self.nodes[3].decoderawtransaction(tx['hex']) for tx in result]
+ output = [d['vout'][1 - r['changepos']]['value'] for d, r in zip(dec_tx, result)]
+ change = [d['vout'][r['changepos']]['value'] for d, r in zip(dec_tx, result)]
+
+ assert_equal(result[0]['fee'], result[1]['fee'], result[2]['fee'])
+ assert_equal(result[3]['fee'], result[4]['fee'])
+ assert_equal(change[0], change[1])
+ assert_equal(output[0], output[1])
+ assert_equal(output[0], output[2] + result[2]['fee'])
+ assert_equal(change[0] + result[0]['fee'], change[2])
+ assert_equal(output[3], output[4] + result[4]['fee'])
+ assert_equal(change[3] + result[3]['fee'], change[4])
+
+ inputs = []
+ outputs = {self.nodes[2].getnewaddress(): value for value in (1.0, 1.1, 1.2, 1.3)}
+ keys = list(outputs.keys())
+ rawtx = self.nodes[3].createrawtransaction(inputs, outputs)
+
+ result = [self.nodes[3].fundrawtransaction(rawtx),
+ # split the fee between outputs 0, 2, and 3, but not output 1
+ self.nodes[3].fundrawtransaction(rawtx, {"subtractFeeFromOutputs": [0, 2, 3]})]
+
+ dec_tx = [self.nodes[3].decoderawtransaction(result[0]['hex']),
+ self.nodes[3].decoderawtransaction(result[1]['hex'])]
+
+ # Nested list of non-change output amounts for each transaction
+ output = [[out['value'] for i, out in enumerate(d['vout']) if i != r['changepos']]
+ for d, r in zip(dec_tx, result)]
+
+ # List of differences in output amounts between normal and subtractFee transactions
+ share = [o0 - o1 for o0, o1 in zip(output[0], output[1])]
+
+ # output 1 is the same in both transactions
+ assert_equal(share[1], 0)
+
+ # the other 3 outputs are smaller as a result of subtractFeeFromOutputs
+ assert_greater_than(share[0], 0)
+ assert_greater_than(share[2], 0)
+ assert_greater_than(share[3], 0)
+
+ # outputs 2 and 3 take the same share of the fee
+ assert_equal(share[2], share[3])
+
+ # output 0 takes at least as much share of the fee, and no more than 2 satoshis more, than outputs 2 and 3
+ assert_greater_than_or_equal(share[0], share[2])
+ assert_greater_than_or_equal(share[2] + Decimal(2e-8), share[0])
+
+ # the fee is the same in both transactions
+ assert_equal(result[0]['fee'], result[1]['fee'])
+
+ # the total subtracted from the outputs is equal to the fee
+ assert_equal(share[0] + share[2] + share[3], result[0]['fee'])
+
if __name__ == '__main__':
RawTransactionsTest().main()
diff --git a/qa/rpc-tests/import-rescan.py b/qa/rpc-tests/import-rescan.py
new file mode 100755
index 0000000000..e683df26db
--- /dev/null
+++ b/qa/rpc-tests/import-rescan.py
@@ -0,0 +1,155 @@
+#!/usr/bin/env python3
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import (start_nodes, connect_nodes, sync_blocks, assert_equal)
+from decimal import Decimal
+
+import collections
+import enum
+import itertools
+import functools
+
+Call = enum.Enum("Call", "single multi")
+Data = enum.Enum("Data", "address pub priv")
+ImportNode = collections.namedtuple("ImportNode", "rescan")
+
+
+def call_import_rpc(call, data, address, scriptPubKey, pubkey, key, label, node, rescan):
+ """Helper that calls a wallet import RPC on a bitcoin node."""
+ watchonly = data != Data.priv
+ if call == Call.single:
+ if data == Data.address:
+ response = node.importaddress(address, label, rescan)
+ elif data == Data.pub:
+ response = node.importpubkey(pubkey, label, rescan)
+ elif data == Data.priv:
+ response = node.importprivkey(key, label, rescan)
+ assert_equal(response, None)
+ elif call == Call.multi:
+ response = node.importmulti([{
+ "scriptPubKey": {
+ "address": address
+ },
+ "pubkeys": [pubkey] if data == Data.pub else [],
+ "keys": [key] if data == Data.priv else [],
+ "label": label,
+ "watchonly": watchonly
+ }], {"rescan": rescan})
+ assert_equal(response, [{"success": True}])
+ return watchonly
+
+
+# List of RPCs that import a wallet key or address in various ways.
+IMPORT_RPCS = [functools.partial(call_import_rpc, call, data) for call, data in itertools.product(Call, Data)]
+
+# List of bitcoind nodes that will import keys.
+IMPORT_NODES = [
+ ImportNode(rescan=True),
+ ImportNode(rescan=False),
+]
+
+
+class ImportRescanTest(BitcoinTestFramework):
+ def __init__(self):
+ super().__init__()
+ self.num_nodes = 1 + len(IMPORT_NODES)
+
+ def setup_network(self):
+ extra_args = [["-debug=1"] for _ in range(self.num_nodes)]
+ self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, extra_args)
+ for i in range(1, self.num_nodes):
+ connect_nodes(self.nodes[i], 0)
+
+ def run_test(self):
+ # Create one transaction on node 0 with a unique amount and label for
+ # each possible type of wallet import RPC.
+ import_rpc_variants = []
+ for i, import_rpc in enumerate(IMPORT_RPCS):
+ label = "label{}".format(i)
+ addr = self.nodes[0].validateaddress(self.nodes[0].getnewaddress(label))
+ key = self.nodes[0].dumpprivkey(addr["address"])
+ amount = 24.9375 - i * .0625
+ txid = self.nodes[0].sendtoaddress(addr["address"], amount)
+ import_rpc = functools.partial(import_rpc, addr["address"], addr["scriptPubKey"], addr["pubkey"], key,
+ label)
+ import_rpc_variants.append((import_rpc, label, amount, txid, addr))
+
+ self.nodes[0].generate(1)
+ assert_equal(self.nodes[0].getrawmempool(), [])
+ sync_blocks(self.nodes)
+
+ # For each importing node and variation of wallet import RPC, invoke
+ # the RPC and check the results from getbalance and listtransactions.
+ for node, import_node in zip(self.nodes[1:], IMPORT_NODES):
+ for import_rpc, label, amount, txid, addr in import_rpc_variants:
+ watchonly = import_rpc(node, import_node.rescan)
+
+ balance = node.getbalance(label, 0, True)
+ if import_node.rescan:
+ assert_equal(balance, amount)
+ else:
+ assert_equal(balance, 0)
+
+ txs = node.listtransactions(label, 10000, 0, True)
+ if import_node.rescan:
+ assert_equal(len(txs), 1)
+ assert_equal(txs[0]["account"], label)
+ assert_equal(txs[0]["address"], addr["address"])
+ assert_equal(txs[0]["amount"], amount)
+ assert_equal(txs[0]["category"], "receive")
+ assert_equal(txs[0]["label"], label)
+ assert_equal(txs[0]["txid"], txid)
+ assert_equal(txs[0]["confirmations"], 1)
+ assert_equal("trusted" not in txs[0], True)
+ if watchonly:
+ assert_equal(txs[0]["involvesWatchonly"], True)
+ else:
+ assert_equal("involvesWatchonly" not in txs[0], True)
+ else:
+ assert_equal(len(txs), 0)
+
+ # Create spends for all the imported addresses.
+ spend_txids = []
+ fee = self.nodes[0].getnetworkinfo()["relayfee"]
+ for import_rpc, label, amount, txid, addr in import_rpc_variants:
+ raw_tx = self.nodes[0].getrawtransaction(txid)
+ decoded_tx = self.nodes[0].decoderawtransaction(raw_tx)
+ input_vout = next(out["n"] for out in decoded_tx["vout"]
+ if out["scriptPubKey"]["addresses"] == [addr["address"]])
+ inputs = [{"txid": txid, "vout": input_vout}]
+ outputs = {self.nodes[0].getnewaddress(): Decimal(amount) - fee}
+ raw_spend_tx = self.nodes[0].createrawtransaction(inputs, outputs)
+ signed_spend_tx = self.nodes[0].signrawtransaction(raw_spend_tx)
+ spend_txid = self.nodes[0].sendrawtransaction(signed_spend_tx["hex"])
+ spend_txids.append(spend_txid)
+
+ self.nodes[0].generate(1)
+ assert_equal(self.nodes[0].getrawmempool(), [])
+ sync_blocks(self.nodes)
+
+ # Check the results from getbalance and listtransactions after the spends.
+ for node, import_node in zip(self.nodes[1:], IMPORT_NODES):
+ txs = node.listtransactions("*", 10000, 0, True)
+ for (import_rpc, label, amount, txid, addr), spend_txid in zip(import_rpc_variants, spend_txids):
+ balance = node.getbalance(label, 0, True)
+ spend_tx = [tx for tx in txs if tx["txid"] == spend_txid]
+ if import_node.rescan:
+ assert_equal(balance, amount)
+ assert_equal(len(spend_tx), 1)
+ assert_equal(spend_tx[0]["account"], "")
+ assert_equal(spend_tx[0]["amount"] + spend_tx[0]["fee"], -amount)
+ assert_equal(spend_tx[0]["category"], "send")
+ assert_equal("label" not in spend_tx[0], True)
+ assert_equal(spend_tx[0]["confirmations"], 1)
+ assert_equal("trusted" not in spend_tx[0], True)
+ assert_equal("involvesWatchonly" not in txs[0], True)
+ else:
+ assert_equal(balance, 0)
+ assert_equal(spend_tx, [])
+
+
+if __name__ == "__main__":
+ ImportRescanTest().main()
diff --git a/qa/rpc-tests/maxuploadtarget.py b/qa/rpc-tests/maxuploadtarget.py
index d0e9fe9a3f..9340e899eb 100755
--- a/qa/rpc-tests/maxuploadtarget.py
+++ b/qa/rpc-tests/maxuploadtarget.py
@@ -81,49 +81,19 @@ class TestNode(NodeConnCB):
class MaxUploadTest(BitcoinTestFramework):
- def add_options(self, parser):
- parser.add_option("--testbinary", dest="testbinary",
- default=os.getenv("BITCOIND", "bitcoind"),
- help="bitcoind binary to test")
-
def __init__(self):
super().__init__()
self.setup_clean_chain = True
self.num_nodes = 1
- self.utxo = []
- self.txouts = gen_return_txouts()
+ # Cache for utxos, as the listunspent may take a long time later in the test
+ self.utxo_cache = []
def setup_network(self):
# Start a node with maxuploadtarget of 200 MB (/24h)
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-maxuploadtarget=800", "-blockmaxsize=999000"]))
- def mine_full_block(self, node, address):
- # Want to create a full block
- # We'll generate a 66k transaction below, and 14 of them is close to the 1MB block limit
- for j in range(14):
- if len(self.utxo) < 14:
- self.utxo = node.listunspent()
- inputs=[]
- outputs = {}
- t = self.utxo.pop()
- inputs.append({ "txid" : t["txid"], "vout" : t["vout"]})
- remchange = t["amount"] - Decimal("0.001000")
- outputs[address]=remchange
- # Create a basic transaction that will send change back to ourself after account for a fee
- # And then insert the 128 generated transaction outs in the middle rawtx[92] is where the #
- # of txouts is stored and is the only thing we overwrite from the original transaction
- rawtx = node.createrawtransaction(inputs, outputs)
- newtx = rawtx[0:92]
- newtx = newtx + self.txouts
- newtx = newtx + rawtx[94:]
- # Appears to be ever so slightly faster to sign with SIGHASH_NONE
- signresult = node.signrawtransaction(newtx,None,None,"NONE")
- txid = node.sendrawtransaction(signresult["hex"], True)
- # Mine a full sized block which will be these transactions we just created
- node.generate(1)
-
def run_test(self):
# Before we connect anything, we first set the time on the node
# to be in the past, otherwise things break because the CNode
@@ -151,7 +121,7 @@ class MaxUploadTest(BitcoinTestFramework):
# Test logic begins here
# Now mine a big block
- self.mine_full_block(self.nodes[0], self.nodes[0].getnewaddress())
+ mine_large_block(self.nodes[0], self.utxo_cache)
# Store the hash; we'll request this later
big_old_block = self.nodes[0].getbestblockhash()
@@ -162,11 +132,10 @@ class MaxUploadTest(BitcoinTestFramework):
self.nodes[0].setmocktime(int(time.time()) - 2*60*60*24)
# Mine one more block, so that the prior block looks old
- self.mine_full_block(self.nodes[0], self.nodes[0].getnewaddress())
+ mine_large_block(self.nodes[0], self.utxo_cache)
# We'll be requesting this new block too
big_new_block = self.nodes[0].getbestblockhash()
- new_block_size = self.nodes[0].getblock(big_new_block)['size']
big_new_block = int(big_new_block, 16)
# test_nodes[0] will test what happens if we just keep requesting the
diff --git a/qa/rpc-tests/mempool_limit.py b/qa/rpc-tests/mempool_limit.py
index 4438c152df..154ae59c26 100755
--- a/qa/rpc-tests/mempool_limit.py
+++ b/qa/rpc-tests/mempool_limit.py
@@ -26,7 +26,7 @@ class MempoolLimitTest(BitcoinTestFramework):
def run_test(self):
txids = []
- utxos = create_confirmed_utxos(self.relayfee, self.nodes[0], 90)
+ utxos = create_confirmed_utxos(self.relayfee, self.nodes[0], 91)
#create a mempool tx that will be evicted
us0 = utxos.pop()
@@ -41,9 +41,9 @@ class MempoolLimitTest(BitcoinTestFramework):
relayfee = self.nodes[0].getnetworkinfo()['relayfee']
base_fee = relayfee*100
- for i in range (4):
+ for i in range (3):
txids.append([])
- txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[30*i:30*i+30], (i+1)*base_fee)
+ txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[30*i:30*i+30], 30, (i+1)*base_fee)
# by now, the tx should be evicted, check confirmation state
assert(txid not in self.nodes[0].getrawmempool())
diff --git a/qa/rpc-tests/mempool_packages.py b/qa/rpc-tests/mempool_packages.py
index 45dc0e65c4..f605e7524f 100755
--- a/qa/rpc-tests/mempool_packages.py
+++ b/qa/rpc-tests/mempool_packages.py
@@ -20,8 +20,8 @@ class MempoolPackagesTest(BitcoinTestFramework):
def setup_network(self):
self.nodes = []
- self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-relaypriority=0", "-debug"]))
- self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-relaypriority=0", "-limitancestorcount=5", "-debug"]))
+ self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug"]))
+ self.nodes.append(start_node(1, self.options.tmpdir, ["-maxorphantx=1000", "-limitancestorcount=5", "-debug"]))
connect_nodes(self.nodes[0], 1)
self.is_network_split = False
self.sync_all()
diff --git a/qa/rpc-tests/mempool_reorg.py b/qa/rpc-tests/mempool_reorg.py
index 301b094eb0..dd88aae4f2 100755
--- a/qa/rpc-tests/mempool_reorg.py
+++ b/qa/rpc-tests/mempool_reorg.py
@@ -55,7 +55,7 @@ class MempoolCoinbaseTest(BitcoinTestFramework):
# Create a block-height-locked transaction which will be invalid after reorg
timelock_tx = self.nodes[0].createrawtransaction([{"txid": coinbase_txids[0], "vout": 0}], {node0_address: 49.99})
# Set the time lock
- timelock_tx = timelock_tx.replace("ffffffff", "11111111", 1)
+ timelock_tx = timelock_tx.replace("ffffffff", "11111191", 1)
timelock_tx = timelock_tx[:-8] + hex(self.nodes[0].getblockcount() + 2)[2:] + "000000"
timelock_tx = self.nodes[0].signrawtransaction(timelock_tx)["hex"]
assert_raises(JSONRPCException, self.nodes[0].sendrawtransaction, timelock_tx)
diff --git a/qa/rpc-tests/multi_rpc.py b/qa/rpc-tests/multi_rpc.py
index cdeb94caa0..95d9090ce2 100755
--- a/qa/rpc-tests/multi_rpc.py
+++ b/qa/rpc-tests/multi_rpc.py
@@ -4,7 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-# Test mulitple rpc user config option rpcauth
+# Test multiple rpc user config option rpcauth
#
from test_framework.test_framework import BitcoinTestFramework
diff --git a/qa/rpc-tests/nodehandling.py b/qa/rpc-tests/nodehandling.py
index e9682c4908..7313c79b54 100755
--- a/qa/rpc-tests/nodehandling.py
+++ b/qa/rpc-tests/nodehandling.py
@@ -10,7 +10,6 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-import http.client
import urllib.parse
class NodeHandlingTest (BitcoinTestFramework):
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py
index 6b5d477131..9151ecf5de 100755
--- a/qa/rpc-tests/p2p-compactblocks.py
+++ b/qa/rpc-tests/p2p-compactblocks.py
@@ -27,6 +27,7 @@ class TestNode(SingleNodeConnCB):
self.last_cmpctblock = None
self.block_announced = False
self.last_getdata = None
+ self.last_getheaders = None
self.last_getblocktxn = None
self.last_block = None
self.last_blocktxn = None
@@ -64,6 +65,9 @@ class TestNode(SingleNodeConnCB):
def on_getdata(self, conn, message):
self.last_getdata = message
+ def on_getheaders(self, conn, message):
+ self.last_getheaders = message
+
def on_getblocktxn(self, conn, message):
self.last_getblocktxn = message
@@ -186,12 +190,15 @@ class CompactBlocksTest(BitcoinTestFramework):
def check_announcement_of_new_block(node, peer, predicate):
peer.clear_block_announcement()
- node.generate(1)
- got_message = wait_until(lambda: peer.block_announced, timeout=30)
+ block_hash = int(node.generate(1)[0], 16)
+ peer.wait_for_block_announcement(block_hash, timeout=30)
assert(peer.block_announced)
assert(got_message)
+
with mininode_lock:
- assert(predicate(peer))
+ assert predicate(peer), (
+ "block_hash={!r}, cmpctblock={!r}, inv={!r}".format(
+ block_hash, peer.last_cmpctblock, peer.last_inv))
# We shouldn't get any block announcements via cmpctblock yet.
check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None)
@@ -300,8 +307,11 @@ class CompactBlocksTest(BitcoinTestFramework):
assert(segwit_tx_generated) # check that our test is not broken
# Wait until we've seen the block announcement for the resulting tip
- tip = int(self.nodes[0].getbestblockhash(), 16)
- assert(self.test_node.wait_for_block_announcement(tip))
+ tip = int(node.getbestblockhash(), 16)
+ assert(test_node.wait_for_block_announcement(tip))
+
+ # Make sure we will receive a fast-announce compact block
+ self.request_cb_announcements(test_node, node, version)
# Now mine a block, and look at the resulting compact block.
test_node.clear_block_announcement()
@@ -312,27 +322,36 @@ class CompactBlocksTest(BitcoinTestFramework):
[tx.calc_sha256() for tx in block.vtx]
block.rehash()
- # Don't care which type of announcement came back for this test; just
- # request the compact block if we didn't get one yet.
+ # Wait until the block was announced (via compact blocks)
wait_until(test_node.received_block_announcement, timeout=30)
assert(test_node.received_block_announcement())
+ # Now fetch and check the compact block
+ header_and_shortids = None
+ with mininode_lock:
+ assert(test_node.last_cmpctblock is not None)
+ # Convert the on-the-wire representation to absolute indexes
+ header_and_shortids = HeaderAndShortIDs(test_node.last_cmpctblock.header_and_shortids)
+ self.check_compactblock_construction_from_block(version, header_and_shortids, block_hash, block)
+
+ # Now fetch the compact block using a normal non-announce getdata
with mininode_lock:
- if test_node.last_cmpctblock is None:
- test_node.clear_block_announcement()
- inv = CInv(4, block_hash) # 4 == "CompactBlock"
- test_node.send_message(msg_getdata([inv]))
+ test_node.clear_block_announcement()
+ inv = CInv(4, block_hash) # 4 == "CompactBlock"
+ test_node.send_message(msg_getdata([inv]))
wait_until(test_node.received_block_announcement, timeout=30)
assert(test_node.received_block_announcement())
- # Now we should have the compactblock
+ # Now fetch and check the compact block
header_and_shortids = None
with mininode_lock:
assert(test_node.last_cmpctblock is not None)
# Convert the on-the-wire representation to absolute indexes
header_and_shortids = HeaderAndShortIDs(test_node.last_cmpctblock.header_and_shortids)
+ self.check_compactblock_construction_from_block(version, header_and_shortids, block_hash, block)
+ def check_compactblock_construction_from_block(self, version, header_and_shortids, block_hash, block):
# Check that we got the right block!
header_and_shortids.header.calc_sha256()
assert_equal(header_and_shortids.header.sha256, block_hash)
@@ -393,6 +412,9 @@ class CompactBlocksTest(BitcoinTestFramework):
if announce == "inv":
test_node.send_message(msg_inv([CInv(2, block.sha256)]))
+ success = wait_until(lambda: test_node.last_getheaders is not None, timeout=30)
+ assert(success)
+ test_node.send_header_for_blocks([block])
else:
test_node.send_header_for_blocks([block])
success = wait_until(lambda: test_node.last_getdata is not None, timeout=30)
@@ -589,8 +611,8 @@ class CompactBlocksTest(BitcoinTestFramework):
assert_equal(int(node.getbestblockhash(), 16), block.sha256)
def test_getblocktxn_handler(self, node, test_node, version):
- # bitcoind won't respond for blocks whose height is more than 15 blocks
- # deep.
+ # bitcoind will not send blocktxn responses for blocks whose height is
+ # more than 10 blocks deep.
MAX_GETBLOCKTXN_DEPTH = 10
chain_height = node.getblockcount()
current_height = chain_height
@@ -623,11 +645,17 @@ class CompactBlocksTest(BitcoinTestFramework):
test_node.last_blocktxn = None
current_height -= 1
- # Next request should be ignored, as we're past the allowed depth.
+ # Next request should send a full block response, as we're past the
+ # allowed depth for a blocktxn response.
block_hash = node.getblockhash(current_height)
msg.block_txn_request = BlockTransactionsRequest(int(block_hash, 16), [0])
+ with mininode_lock:
+ test_node.last_block = None
+ test_node.last_blocktxn = None
test_node.send_and_ping(msg)
with mininode_lock:
+ test_node.last_block.block.calc_sha256()
+ assert_equal(test_node.last_block.block.sha256, int(block_hash, 16))
assert_equal(test_node.last_blocktxn, None)
def test_compactblocks_not_at_tip(self, node, test_node):
@@ -648,6 +676,8 @@ class CompactBlocksTest(BitcoinTestFramework):
node.generate(1)
wait_until(test_node.received_block_announcement, timeout=30)
test_node.clear_block_announcement()
+ with mininode_lock:
+ test_node.last_block = None
test_node.send_message(msg_getdata([CInv(4, int(new_blocks[0], 16))]))
success = wait_until(lambda: test_node.last_block is not None, timeout=30)
assert(success)
@@ -708,6 +738,33 @@ class CompactBlocksTest(BitcoinTestFramework):
l.last_cmpctblock.header_and_shortids.header.calc_sha256()
assert_equal(l.last_cmpctblock.header_and_shortids.header.sha256, block.sha256)
+ # Test that we don't get disconnected if we relay a compact block with valid header,
+ # but invalid transactions.
+ def test_invalid_tx_in_compactblock(self, node, test_node, use_segwit):
+ assert(len(self.utxos))
+ utxo = self.utxos[0]
+
+ block = self.build_block_with_transactions(node, utxo, 5)
+ del block.vtx[3]
+ block.hashMerkleRoot = block.calc_merkle_root()
+ if use_segwit:
+ # If we're testing with segwit, also drop the coinbase witness,
+ # but include the witness commitment.
+ add_witness_commitment(block)
+ block.vtx[0].wit.vtxinwit = []
+ block.solve()
+
+ # Now send the compact block with all transactions prefilled, and
+ # verify that we don't get disconnected.
+ comp_block = HeaderAndShortIDs()
+ comp_block.initialize_from_block(block, prefill_list=[0, 1, 2, 3, 4], use_witness=use_segwit)
+ msg = msg_cmpctblock(comp_block.to_p2p())
+ test_node.send_and_ping(msg)
+
+ # Check that the tip didn't advance
+ assert(int(node.getbestblockhash(), 16) is not block.sha256)
+ test_node.sync_with_ping()
+
# Helper for enabling cb announcements
# Send the sendcmpct request and sync headers
def request_cb_announcements(self, peer, node, version):
@@ -719,6 +776,54 @@ class CompactBlocksTest(BitcoinTestFramework):
msg.announce = True
peer.send_and_ping(msg)
+ def test_compactblock_reconstruction_multiple_peers(self, node, stalling_peer, delivery_peer):
+ assert(len(self.utxos))
+
+ def announce_cmpct_block(node, peer):
+ utxo = self.utxos.pop(0)
+ block = self.build_block_with_transactions(node, utxo, 5)
+
+ cmpct_block = HeaderAndShortIDs()
+ cmpct_block.initialize_from_block(block)
+ msg = msg_cmpctblock(cmpct_block.to_p2p())
+ peer.send_and_ping(msg)
+ with mininode_lock:
+ assert(peer.last_getblocktxn is not None)
+ return block, cmpct_block
+
+ block, cmpct_block = announce_cmpct_block(node, stalling_peer)
+
+ for tx in block.vtx[1:]:
+ delivery_peer.send_message(msg_tx(tx))
+ delivery_peer.sync_with_ping()
+ mempool = node.getrawmempool()
+ for tx in block.vtx[1:]:
+ assert(tx.hash in mempool)
+
+ delivery_peer.send_and_ping(msg_cmpctblock(cmpct_block.to_p2p()))
+ assert_equal(int(node.getbestblockhash(), 16), block.sha256)
+
+ self.utxos.append([block.vtx[-1].sha256, 0, block.vtx[-1].vout[0].nValue])
+
+ # Now test that delivering an invalid compact block won't break relay
+
+ block, cmpct_block = announce_cmpct_block(node, stalling_peer)
+ for tx in block.vtx[1:]:
+ delivery_peer.send_message(msg_tx(tx))
+ delivery_peer.sync_with_ping()
+
+ cmpct_block.prefilled_txn[0].tx.wit.vtxinwit = [ CTxInWitness() ]
+ cmpct_block.prefilled_txn[0].tx.wit.vtxinwit[0].scriptWitness.stack = [ser_uint256(0)]
+
+ cmpct_block.use_witness = True
+ delivery_peer.send_and_ping(msg_cmpctblock(cmpct_block.to_p2p()))
+ assert(int(node.getbestblockhash(), 16) != block.sha256)
+
+ msg = msg_blocktxn()
+ msg.block_transactions.blockhash = block.sha256
+ msg.block_transactions.transactions = block.vtx[1:]
+ stalling_peer.send_and_ping(msg)
+ assert_equal(int(node.getbestblockhash(), 16), block.sha256)
def run_test(self):
# Setup the p2p connections and start up the network thread.
@@ -798,6 +903,15 @@ class CompactBlocksTest(BitcoinTestFramework):
self.test_end_to_end_block_relay(self.nodes[0], [self.segwit_node, self.test_node, self.old_node])
self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node])
+ print("\tTesting handling of invalid compact blocks...")
+ self.test_invalid_tx_in_compactblock(self.nodes[0], self.test_node, False)
+ self.test_invalid_tx_in_compactblock(self.nodes[1], self.segwit_node, False)
+ self.test_invalid_tx_in_compactblock(self.nodes[1], self.old_node, False)
+
+ print("\tTesting reconstructing compact blocks from all peers...")
+ self.test_compactblock_reconstruction_multiple_peers(self.nodes[1], self.segwit_node, self.old_node)
+ sync_blocks(self.nodes)
+
# Advance to segwit activation
print ("\nAdvancing to segwit activation\n")
self.activate_segwit(self.nodes[1])
@@ -844,6 +958,11 @@ class CompactBlocksTest(BitcoinTestFramework):
self.request_cb_announcements(self.segwit_node, self.nodes[1], 2)
self.test_end_to_end_block_relay(self.nodes[1], [self.segwit_node, self.test_node, self.old_node])
+ print("\tTesting handling of invalid compact blocks...")
+ self.test_invalid_tx_in_compactblock(self.nodes[0], self.test_node, False)
+ self.test_invalid_tx_in_compactblock(self.nodes[1], self.segwit_node, True)
+ self.test_invalid_tx_in_compactblock(self.nodes[1], self.old_node, True)
+
print("\tTesting invalid index in cmpctblock message...")
self.test_invalid_cmpctblock_message()
diff --git a/qa/rpc-tests/p2p-fullblocktest.py b/qa/rpc-tests/p2p-fullblocktest.py
index 9aee81164f..e4b889d761 100755
--- a/qa/rpc-tests/p2p-fullblocktest.py
+++ b/qa/rpc-tests/p2p-fullblocktest.py
@@ -351,7 +351,7 @@ class FullBlockTest(ComparisonTestFramework):
block(22, spend=out[5])
yield rejected()
- # Create a block on either side of MAX_BLOCK_SIZE and make sure its accepted/rejected
+ # Create a block on either side of MAX_BLOCK_BASE_SIZE and make sure its accepted/rejected
# genesis -> b1 (0) -> b2 (1) -> b5 (2) -> b6 (3)
# \-> b12 (3) -> b13 (4) -> b15 (5) -> b23 (6)
# \-> b24 (6) -> b25 (7)
@@ -359,24 +359,24 @@ class FullBlockTest(ComparisonTestFramework):
tip(15)
b23 = block(23, spend=out[6])
tx = CTransaction()
- script_length = MAX_BLOCK_SIZE - len(b23.serialize()) - 69
+ script_length = MAX_BLOCK_BASE_SIZE - len(b23.serialize()) - 69
script_output = CScript([b'\x00' * script_length])
tx.vout.append(CTxOut(0, script_output))
tx.vin.append(CTxIn(COutPoint(b23.vtx[1].sha256, 0)))
b23 = update_block(23, [tx])
# Make sure the math above worked out to produce a max-sized block
- assert_equal(len(b23.serialize()), MAX_BLOCK_SIZE)
+ assert_equal(len(b23.serialize()), MAX_BLOCK_BASE_SIZE)
yield accepted()
save_spendable_output()
# Make the next block one byte bigger and check that it fails
tip(15)
b24 = block(24, spend=out[6])
- script_length = MAX_BLOCK_SIZE - len(b24.serialize()) - 69
+ script_length = MAX_BLOCK_BASE_SIZE - len(b24.serialize()) - 69
script_output = CScript([b'\x00' * (script_length+1)])
tx.vout = [CTxOut(0, script_output)]
b24 = update_block(24, [tx])
- assert_equal(len(b24.serialize()), MAX_BLOCK_SIZE+1)
+ assert_equal(len(b24.serialize()), MAX_BLOCK_BASE_SIZE+1)
yield rejected(RejectResult(16, b'bad-blk-length'))
block(25, spend=out[7])
@@ -523,12 +523,12 @@ class FullBlockTest(ComparisonTestFramework):
tx_new = None
tx_last = tx
total_size=len(b39.serialize())
- while(total_size < MAX_BLOCK_SIZE):
+ while(total_size < MAX_BLOCK_BASE_SIZE):
tx_new = create_tx(tx_last, 1, 1, p2sh_script)
tx_new.vout.append(CTxOut(tx_last.vout[1].nValue - 1, CScript([OP_TRUE])))
tx_new.rehash()
total_size += len(tx_new.serialize())
- if total_size >= MAX_BLOCK_SIZE:
+ if total_size >= MAX_BLOCK_BASE_SIZE:
break
b39.vtx.append(tx_new) # add tx to block
tx_last = tx_new
@@ -877,7 +877,7 @@ class FullBlockTest(ComparisonTestFramework):
# This checks that a block with a bloated VARINT between the block_header and the array of tx such that
- # the block is > MAX_BLOCK_SIZE with the bloated varint, but <= MAX_BLOCK_SIZE without the bloated varint,
+ # the block is > MAX_BLOCK_BASE_SIZE with the bloated varint, but <= MAX_BLOCK_BASE_SIZE without the bloated varint,
# does not cause a subsequent, identical block with canonical encoding to be rejected. The test does not
# care whether the bloated block is accepted or rejected; it only cares that the second block is accepted.
#
@@ -901,12 +901,12 @@ class FullBlockTest(ComparisonTestFramework):
tx = CTransaction()
# use canonical serialization to calculate size
- script_length = MAX_BLOCK_SIZE - len(b64a.normal_serialize()) - 69
+ script_length = MAX_BLOCK_BASE_SIZE - len(b64a.normal_serialize()) - 69
script_output = CScript([b'\x00' * script_length])
tx.vout.append(CTxOut(0, script_output))
tx.vin.append(CTxIn(COutPoint(b64a.vtx[1].sha256, 0)))
b64a = update_block("64a", [tx])
- assert_equal(len(b64a.serialize()), MAX_BLOCK_SIZE + 8)
+ assert_equal(len(b64a.serialize()), MAX_BLOCK_BASE_SIZE + 8)
yield TestInstance([[self.tip, None]])
# comptool workaround: to make sure b64 is delivered, manually erase b64a from blockstore
@@ -916,7 +916,7 @@ class FullBlockTest(ComparisonTestFramework):
b64 = CBlock(b64a)
b64.vtx = copy.deepcopy(b64a.vtx)
assert_equal(b64.hash, b64a.hash)
- assert_equal(len(b64.serialize()), MAX_BLOCK_SIZE)
+ assert_equal(len(b64.serialize()), MAX_BLOCK_BASE_SIZE)
self.blocks[64] = b64
update_block(64, [])
yield accepted()
@@ -1250,12 +1250,12 @@ class FullBlockTest(ComparisonTestFramework):
for i in range(89, LARGE_REORG_SIZE + 89):
b = block(i, spend)
tx = CTransaction()
- script_length = MAX_BLOCK_SIZE - len(b.serialize()) - 69
+ script_length = MAX_BLOCK_BASE_SIZE - len(b.serialize()) - 69
script_output = CScript([b'\x00' * script_length])
tx.vout.append(CTxOut(0, script_output))
tx.vin.append(CTxIn(COutPoint(b.vtx[1].sha256, 0)))
b = update_block(i, [tx])
- assert_equal(len(b.serialize()), MAX_BLOCK_SIZE)
+ assert_equal(len(b.serialize()), MAX_BLOCK_BASE_SIZE)
test1.blocks_and_transactions.append([self.tip, True])
save_spendable_output()
spend = get_spendable_output()
diff --git a/qa/rpc-tests/p2p-mempool.py b/qa/rpc-tests/p2p-mempool.py
index 382d7f1e82..1fd125fdcd 100755
--- a/qa/rpc-tests/p2p-mempool.py
+++ b/qa/rpc-tests/p2p-mempool.py
@@ -6,7 +6,6 @@
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-import time
class TestNode(NodeConnCB):
def __init__(self):
diff --git a/qa/rpc-tests/p2p-segwit.py b/qa/rpc-tests/p2p-segwit.py
index 09ab1b80fc..51adec5cae 100755
--- a/qa/rpc-tests/p2p-segwit.py
+++ b/qa/rpc-tests/p2p-segwit.py
@@ -64,6 +64,9 @@ class TestNode(NodeConnCB):
self.getdataset.add(inv.hash)
self.last_getdata = message
+ def on_getheaders(self, conn, message):
+ self.last_getheaders = message
+
def on_pong(self, conn, message):
self.last_pong = message
@@ -97,6 +100,10 @@ class TestNode(NodeConnCB):
test_function = lambda: self.last_getdata != None
self.sync(test_function, timeout)
+ def wait_for_getheaders(self, timeout=60):
+ test_function = lambda: self.last_getheaders != None
+ self.sync(test_function, timeout)
+
def wait_for_inv(self, expected_inv, timeout=60):
test_function = lambda: self.last_inv != expected_inv
self.sync(test_function, timeout)
@@ -111,12 +118,15 @@ class TestNode(NodeConnCB):
def announce_block_and_wait_for_getdata(self, block, use_header, timeout=60):
with mininode_lock:
self.last_getdata = None
+ self.last_getheaders = None
+ msg = msg_headers()
+ msg.headers = [ CBlockHeader(block) ]
if use_header:
- msg = msg_headers()
- msg.headers = [ CBlockHeader(block) ]
self.send_message(msg)
else:
self.send_message(msg_inv(inv=[CInv(2, block.sha256)]))
+ self.wait_for_getheaders()
+ self.send_message(msg)
self.wait_for_getdata()
return
@@ -185,11 +195,6 @@ class SegWitTest(BitcoinTestFramework):
self.setup_clean_chain = True
self.num_nodes = 3
- def add_options(self, parser):
- parser.add_option("--oldbinary", dest="oldbinary",
- default=None,
- help="pre-segwit bitcoind binary for upgrade testing")
-
def setup_network(self):
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1"]))
@@ -197,12 +202,9 @@ class SegWitTest(BitcoinTestFramework):
self.nodes.append(start_node(1, self.options.tmpdir, ["-debug", "-logtimemicros=1", "-whitelist=127.0.0.1", "-acceptnonstdtxn=0"]))
connect_nodes(self.nodes[0], 1)
- # If an old bitcoind is given, do the upgrade-after-activation test.
- self.test_upgrade = False
- if (self.options.oldbinary != None):
- self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1"], binary=self.options.oldbinary))
- connect_nodes(self.nodes[0], 2)
- self.test_upgrade = True
+ # Disable segwit's bip9 parameter to simulate upgrading after activation.
+ self.nodes.append(start_node(2, self.options.tmpdir, ["-debug", "-whitelist=127.0.0.1", "-bip9params=segwit:0:0"]))
+ connect_nodes(self.nodes[0], 2)
''' Helpers '''
# Build a block on top of node0's tip.
@@ -488,7 +490,7 @@ class SegWitTest(BitcoinTestFramework):
block.solve()
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.append(b'a'*5000000)
- assert(get_virtual_size(block) > MAX_BLOCK_SIZE)
+ assert(get_virtual_size(block) > MAX_BLOCK_BASE_SIZE)
# We can't send over the p2p network, because this is too big to relay
# TODO: repeat this test with a block that can be relayed
@@ -497,7 +499,7 @@ class SegWitTest(BitcoinTestFramework):
assert(self.nodes[0].getbestblockhash() != block.hash)
block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.pop()
- assert(get_virtual_size(block) < MAX_BLOCK_SIZE)
+ assert(get_virtual_size(block) < MAX_BLOCK_BASE_SIZE)
self.nodes[0].submitblock(bytes_to_hex_str(block.serialize(True)))
assert(self.nodes[0].getbestblockhash() == block.hash)
@@ -562,10 +564,10 @@ class SegWitTest(BitcoinTestFramework):
self.update_witness_block_with_transactions(block, [parent_tx, child_tx])
vsize = get_virtual_size(block)
- additional_bytes = (MAX_BLOCK_SIZE - vsize)*4
+ additional_bytes = (MAX_BLOCK_BASE_SIZE - vsize)*4
i = 0
while additional_bytes > 0:
- # Add some more bytes to each input until we hit MAX_BLOCK_SIZE+1
+ # Add some more bytes to each input until we hit MAX_BLOCK_BASE_SIZE+1
extra_bytes = min(additional_bytes+1, 55)
block.vtx[-1].wit.vtxinwit[int(i/(2*NUM_DROPS))].scriptWitness.stack[i%(2*NUM_DROPS)] = b'a'*(195+extra_bytes)
additional_bytes -= extra_bytes
@@ -575,7 +577,7 @@ class SegWitTest(BitcoinTestFramework):
add_witness_commitment(block)
block.solve()
vsize = get_virtual_size(block)
- assert_equal(vsize, MAX_BLOCK_SIZE + 1)
+ assert_equal(vsize, MAX_BLOCK_BASE_SIZE + 1)
# Make sure that our test case would exceed the old max-network-message
# limit
assert(len(block.serialize(True)) > 2*1024*1024)
@@ -588,7 +590,7 @@ class SegWitTest(BitcoinTestFramework):
block.vtx[0].vout.pop()
add_witness_commitment(block)
block.solve()
- assert(get_virtual_size(block) == MAX_BLOCK_SIZE)
+ assert(get_virtual_size(block) == MAX_BLOCK_BASE_SIZE)
self.test_node.test_witness_block(block, accepted=True)
@@ -1167,7 +1169,7 @@ class SegWitTest(BitcoinTestFramework):
if segwit_activated:
# tx and tx2 were both accepted. Don't bother trying to reclaim the
# P2PKH output; just send tx's first output back to an anyone-can-spend.
- sync_mempools(self.nodes)
+ sync_mempools([self.nodes[0], self.nodes[1]])
tx3.vin = [CTxIn(COutPoint(tx.sha256, 0), b"")]
tx3.vout = [CTxOut(tx.vout[0].nValue-1000, CScript([OP_TRUE]))]
tx3.wit.vtxinwit.append(CTxInWitness())
@@ -1423,7 +1425,7 @@ class SegWitTest(BitcoinTestFramework):
block.vtx.append(tx)
# Test the block periodically, if we're close to maxblocksize
- if (get_virtual_size(block) > MAX_BLOCK_SIZE - 1000):
+ if (get_virtual_size(block) > MAX_BLOCK_BASE_SIZE - 1000):
self.update_witness_block_with_transactions(block, [])
self.test_node.test_witness_block(block, accepted=True)
block = self.build_next_block()
@@ -1696,19 +1698,53 @@ class SegWitTest(BitcoinTestFramework):
def test_getblocktemplate_before_lockin(self):
print("\tTesting getblocktemplate setting of segwit versionbit (before lockin)")
- block_version = (self.nodes[0].getblocktemplate())['version']
- assert_equal(block_version & (1 << VB_WITNESS_BIT), 0)
+ # Node0 is segwit aware, node2 is not.
+ for node in [self.nodes[0], self.nodes[2]]:
+ gbt_results = node.getblocktemplate()
+ block_version = gbt_results['version']
+ # If we're not indicating segwit support, we should not be signalling
+ # for segwit activation, nor should we get a witness commitment.
+ assert_equal(block_version & (1 << VB_WITNESS_BIT), 0)
+ assert('default_witness_commitment' not in gbt_results)
# Workaround:
# Can either change the tip, or change the mempool and wait 5 seconds
# to trigger a recomputation of getblocktemplate.
- self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
+ txid = int(self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1), 16)
# Using mocktime lets us avoid sleep()
+ sync_mempools(self.nodes)
self.nodes[0].setmocktime(int(time.time())+10)
-
- block_version = self.nodes[0].getblocktemplate({"rules" : ["segwit"]})['version']
- assert(block_version & (1 << VB_WITNESS_BIT) != 0)
- self.nodes[0].setmocktime(0) # undo mocktime
+ self.nodes[2].setmocktime(int(time.time())+10)
+
+ for node in [self.nodes[0], self.nodes[2]]:
+ gbt_results = node.getblocktemplate({"rules" : ["segwit"]})
+ block_version = gbt_results['version']
+ if node == self.nodes[2]:
+ # If this is a non-segwit node, we should still not get a witness
+ # commitment, nor a version bit signalling segwit.
+ assert_equal(block_version & (1 << VB_WITNESS_BIT), 0)
+ assert('default_witness_commitment' not in gbt_results)
+ else:
+ # For segwit-aware nodes, check the version bit and the witness
+ # commitment are correct.
+ assert(block_version & (1 << VB_WITNESS_BIT) != 0)
+ assert('default_witness_commitment' in gbt_results)
+ witness_commitment = gbt_results['default_witness_commitment']
+
+ # TODO: this duplicates some code from blocktools.py, would be nice
+ # to refactor.
+ # Check that default_witness_commitment is present.
+ block = CBlock()
+ witness_root = block.get_merkle_root([ser_uint256(0), ser_uint256(txid)])
+ check_commitment = uint256_from_str(hash256(ser_uint256(witness_root)+ser_uint256(0)))
+ from test_framework.blocktools import WITNESS_COMMITMENT_HEADER
+ output_data = WITNESS_COMMITMENT_HEADER + ser_uint256(check_commitment)
+ script = CScript([OP_RETURN, output_data])
+ assert_equal(witness_commitment, bytes_to_hex_str(script))
+
+ # undo mocktime
+ self.nodes[0].setmocktime(0)
+ self.nodes[2].setmocktime(0)
# Uncompressed pubkeys are no longer supported in default relay policy,
# but (for now) are still valid in blocks.
@@ -1948,6 +1984,7 @@ class SegWitTest(BitcoinTestFramework):
# Advance to segwit being 'started'
self.advance_to_segwit_started()
+ sync_blocks(self.nodes)
self.test_getblocktemplate_before_lockin()
sync_blocks(self.nodes)
@@ -1990,10 +2027,7 @@ class SegWitTest(BitcoinTestFramework):
self.test_signature_version_1()
self.test_non_standard_witness()
sync_blocks(self.nodes)
- if self.test_upgrade:
- self.test_upgrade_after_activation(self.nodes[2], 2)
- else:
- print("\tSkipping upgrade-after-activation test (use --oldbinary to enable)")
+ self.test_upgrade_after_activation(self.nodes[2], 2)
self.test_witness_sigops()
diff --git a/qa/rpc-tests/preciousblock.py b/qa/rpc-tests/preciousblock.py
index 854dcc7251..a806294648 100755
--- a/qa/rpc-tests/preciousblock.py
+++ b/qa/rpc-tests/preciousblock.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
-# Copyright (c) 2015 The Bitcoin Core developers
+# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,12 @@
#
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import *
+from test_framework.util import (
+ assert_equal,
+ connect_nodes_bi,
+ sync_chain,
+ sync_blocks,
+)
def unidirectional_node_sync_via_rpc(node_src, node_dest):
blocks_to_copy = []
@@ -33,84 +38,82 @@ def node_sync_via_rpc(nodes):
unidirectional_node_sync_via_rpc(node_src, node_dest)
class PreciousTest(BitcoinTestFramework):
- def setup_chain(self):
- print("Initializing test directory "+self.options.tmpdir)
- initialize_chain_clean(self.options.tmpdir, 3)
+ def __init__(self):
+ super().__init__()
+ self.setup_clean_chain = True
+ self.num_nodes = 3
+ self.extra_args = [["-debug"]] * self.num_nodes
def setup_network(self):
- self.nodes = []
- self.is_network_split = False
- self.nodes.append(start_node(0, self.options.tmpdir, ["-debug"]))
- self.nodes.append(start_node(1, self.options.tmpdir, ["-debug"]))
- self.nodes.append(start_node(2, self.options.tmpdir, ["-debug"]))
+ self.nodes = self.setup_nodes()
def run_test(self):
print("Ensure submitblock can in principle reorg to a competing chain")
self.nodes[0].generate(1)
- assert(self.nodes[0].getblockcount() == 1)
+ assert_equal(self.nodes[0].getblockcount(), 1)
(hashY, hashZ) = self.nodes[1].generate(2)
- assert(self.nodes[1].getblockcount() == 2)
+ assert_equal(self.nodes[1].getblockcount(), 2)
node_sync_via_rpc(self.nodes[0:3])
- assert(self.nodes[0].getbestblockhash() == hashZ)
+ assert_equal(self.nodes[0].getbestblockhash(), hashZ)
print("Mine blocks A-B-C on Node 0")
(hashA, hashB, hashC) = self.nodes[0].generate(3)
- assert(self.nodes[0].getblockcount() == 5)
+ assert_equal(self.nodes[0].getblockcount(), 5)
print("Mine competing blocks E-F-G on Node 1")
(hashE, hashF, hashG) = self.nodes[1].generate(3)
- assert(self.nodes[1].getblockcount() == 5)
+ assert_equal(self.nodes[1].getblockcount(), 5)
assert(hashC != hashG)
print("Connect nodes and check no reorg occurs")
# Submit competing blocks via RPC so any reorg should occur before we proceed (no way to wait on inaction for p2p sync)
node_sync_via_rpc(self.nodes[0:2])
connect_nodes_bi(self.nodes,0,1)
- assert(self.nodes[0].getbestblockhash() == hashC)
- assert(self.nodes[1].getbestblockhash() == hashG)
+ assert_equal(self.nodes[0].getbestblockhash(), hashC)
+ assert_equal(self.nodes[1].getbestblockhash(), hashG)
print("Make Node0 prefer block G")
self.nodes[0].preciousblock(hashG)
- assert(self.nodes[0].getbestblockhash() == hashG)
+ assert_equal(self.nodes[0].getbestblockhash(), hashG)
print("Make Node0 prefer block C again")
self.nodes[0].preciousblock(hashC)
- assert(self.nodes[0].getbestblockhash() == hashC)
+ assert_equal(self.nodes[0].getbestblockhash(), hashC)
print("Make Node1 prefer block C")
self.nodes[1].preciousblock(hashC)
sync_chain(self.nodes[0:2]) # wait because node 1 may not have downloaded hashC
- assert(self.nodes[1].getbestblockhash() == hashC)
+ assert_equal(self.nodes[1].getbestblockhash(), hashC)
print("Make Node1 prefer block G again")
self.nodes[1].preciousblock(hashG)
- assert(self.nodes[1].getbestblockhash() == hashG)
+ assert_equal(self.nodes[1].getbestblockhash(), hashG)
print("Make Node0 prefer block G again")
self.nodes[0].preciousblock(hashG)
- assert(self.nodes[0].getbestblockhash() == hashG)
+ assert_equal(self.nodes[0].getbestblockhash(), hashG)
print("Make Node1 prefer block C again")
self.nodes[1].preciousblock(hashC)
- assert(self.nodes[1].getbestblockhash() == hashC)
+ assert_equal(self.nodes[1].getbestblockhash(), hashC)
print("Mine another block (E-F-G-)H on Node 0 and reorg Node 1")
self.nodes[0].generate(1)
- assert(self.nodes[0].getblockcount() == 6)
+ assert_equal(self.nodes[0].getblockcount(), 6)
sync_blocks(self.nodes[0:2])
hashH = self.nodes[0].getbestblockhash()
- assert(self.nodes[1].getbestblockhash() == hashH)
+ assert_equal(self.nodes[1].getbestblockhash(), hashH)
print("Node1 should not be able to prefer block C anymore")
self.nodes[1].preciousblock(hashC)
- assert(self.nodes[1].getbestblockhash() == hashH)
+ assert_equal(self.nodes[1].getbestblockhash(), hashH)
print("Mine competing blocks I-J-K-L on Node 2")
self.nodes[2].generate(4)
- assert(self.nodes[2].getblockcount() == 6)
+ assert_equal(self.nodes[2].getblockcount(), 6)
hashL = self.nodes[2].getbestblockhash()
print("Connect nodes and check no reorg occurs")
- node_sync_via_rpc(self.nodes[0:3])
+ node_sync_via_rpc(self.nodes[1:3])
connect_nodes_bi(self.nodes,1,2)
connect_nodes_bi(self.nodes,0,2)
- assert(self.nodes[0].getbestblockhash() == hashH)
- assert(self.nodes[1].getbestblockhash() == hashH)
- assert(self.nodes[2].getbestblockhash() == hashL)
+ assert_equal(self.nodes[0].getbestblockhash(), hashH)
+ assert_equal(self.nodes[1].getbestblockhash(), hashH)
+ assert_equal(self.nodes[2].getbestblockhash(), hashL)
print("Make Node1 prefer block L")
self.nodes[1].preciousblock(hashL)
- assert(self.nodes[1].getbestblockhash() == hashL)
+ assert_equal(self.nodes[1].getbestblockhash(), hashL)
print("Make Node2 prefer block H")
self.nodes[2].preciousblock(hashH)
- assert(self.nodes[2].getbestblockhash() == hashH)
+ assert_equal(self.nodes[2].getbestblockhash(), hashH)
if __name__ == '__main__':
PreciousTest().main()
diff --git a/qa/rpc-tests/prioritise_transaction.py b/qa/rpc-tests/prioritise_transaction.py
index e1771231c0..b7459c80cb 100755
--- a/qa/rpc-tests/prioritise_transaction.py
+++ b/qa/rpc-tests/prioritise_transaction.py
@@ -9,7 +9,7 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-from test_framework.mininode import COIN, MAX_BLOCK_SIZE
+from test_framework.mininode import COIN, MAX_BLOCK_BASE_SIZE
class PrioritiseTransactionTest(BitcoinTestFramework):
@@ -39,10 +39,10 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
txids.append([])
start_range = i * range_size
end_range = start_range + range_size
- txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[start_range:end_range], (i+1)*base_fee)
+ txids[i] = create_lots_of_big_transactions(self.nodes[0], self.txouts, utxos[start_range:end_range], end_range - start_range, (i+1)*base_fee)
# Make sure that the size of each group of transactions exceeds
- # MAX_BLOCK_SIZE -- otherwise the test needs to be revised to create
+ # MAX_BLOCK_BASE_SIZE -- otherwise the test needs to be revised to create
# more transactions.
mempool = self.nodes[0].getrawmempool(True)
sizes = [0, 0, 0]
@@ -50,7 +50,7 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
for j in txids[i]:
assert(j in mempool)
sizes[i] += mempool[j]['size']
- assert(sizes[i] > MAX_BLOCK_SIZE) # Fail => raise utxo_count
+ assert(sizes[i] > MAX_BLOCK_BASE_SIZE) # Fail => raise utxo_count
# add a fee delta to something in the cheapest bucket and make sure it gets mined
# also check that a different entry in the cheapest bucket is NOT mined (lower
diff --git a/qa/rpc-tests/proxy_test.py b/qa/rpc-tests/proxy_test.py
index 27160cae07..9ccc0ffbb0 100755
--- a/qa/rpc-tests/proxy_test.py
+++ b/qa/rpc-tests/proxy_test.py
@@ -4,10 +4,16 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import socket
+import os
from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import *
+from test_framework.util import (
+ PORT_MIN,
+ PORT_RANGE,
+ start_nodes,
+ assert_equal,
+)
from test_framework.netutil import test_ipv6_local
'''
Test plan:
@@ -33,6 +39,8 @@ addnode connect to onion
addnode connect to generic DNS name
'''
+RANGE_BEGIN = PORT_MIN + 2 * PORT_RANGE # Start after p2p and rpc ports
+
class ProxyTest(BitcoinTestFramework):
def __init__(self):
@@ -44,19 +52,19 @@ class ProxyTest(BitcoinTestFramework):
# Create two proxies on different ports
# ... one unauthenticated
self.conf1 = Socks5Configuration()
- self.conf1.addr = ('127.0.0.1', 13000 + (os.getpid() % 1000))
+ self.conf1.addr = ('127.0.0.1', RANGE_BEGIN + (os.getpid() % 1000))
self.conf1.unauth = True
self.conf1.auth = False
# ... one supporting authenticated and unauthenticated (Tor)
self.conf2 = Socks5Configuration()
- self.conf2.addr = ('127.0.0.1', 14000 + (os.getpid() % 1000))
+ self.conf2.addr = ('127.0.0.1', RANGE_BEGIN + 1000 + (os.getpid() % 1000))
self.conf2.unauth = True
self.conf2.auth = True
if self.have_ipv6:
# ... one on IPv6 with similar configuration
self.conf3 = Socks5Configuration()
self.conf3.af = socket.AF_INET6
- self.conf3.addr = ('::1', 15000 + (os.getpid() % 1000))
+ self.conf3.addr = ('::1', RANGE_BEGIN + 2000 + (os.getpid() % 1000))
self.conf3.unauth = True
self.conf3.auth = True
else:
diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py
index 287dbc776e..05e72e6078 100755
--- a/qa/rpc-tests/pruning.py
+++ b/qa/rpc-tests/pruning.py
@@ -13,6 +13,11 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
+import time
+import os
+
+MIN_BLOCKS_TO_KEEP = 288
+
def calc_usage(blockdir):
return sum(os.path.getsize(blockdir+f) for f in os.listdir(blockdir) if os.path.isfile(blockdir+f)) / (1024. * 1024.)
@@ -22,11 +27,11 @@ class PruneTest(BitcoinTestFramework):
def __init__(self):
super().__init__()
self.setup_clean_chain = True
- self.num_nodes = 3
+ self.num_nodes = 6
- self.utxo = []
- self.address = ["",""]
- self.txouts = gen_return_txouts()
+ # Cache for utxos, as the listunspent may take a long time later in the test
+ self.utxo_cache_0 = []
+ self.utxo_cache_1 = []
def setup_network(self):
self.nodes = []
@@ -40,8 +45,12 @@ class PruneTest(BitcoinTestFramework):
self.nodes.append(start_node(2, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-prune=550"], timewait=900))
self.prunedir = self.options.tmpdir+"/node2/regtest/blocks/"
- self.address[0] = self.nodes[0].getnewaddress()
- self.address[1] = self.nodes[1].getnewaddress()
+ # Create nodes 3 and 4 to test manual pruning (they will be re-started with manual pruning later)
+ self.nodes.append(start_node(3, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
+ self.nodes.append(start_node(4, self.options.tmpdir, ["-debug=0","-maxreceivebuffer=20000","-blockmaxsize=999000"], timewait=900))
+
+ # Create nodes 5 to test wallet in prune mode, but do not connect
+ self.nodes.append(start_node(5, self.options.tmpdir, ["-debug=0", "-prune=550"]))
# Determine default relay fee
self.relayfee = self.nodes[0].getnetworkinfo()["relayfee"]
@@ -49,7 +58,9 @@ class PruneTest(BitcoinTestFramework):
connect_nodes(self.nodes[0], 1)
connect_nodes(self.nodes[1], 2)
connect_nodes(self.nodes[2], 0)
- sync_blocks(self.nodes[0:3])
+ connect_nodes(self.nodes[0], 3)
+ connect_nodes(self.nodes[0], 4)
+ sync_blocks(self.nodes[0:5])
def create_big_chain(self):
# Start by creating some coinbases we can spend later
@@ -58,9 +69,9 @@ class PruneTest(BitcoinTestFramework):
self.nodes[0].generate(150)
# Then mine enough full blocks to create more than 550MiB of data
for i in range(645):
- self.mine_full_block(self.nodes[0], self.address[0])
+ mine_large_block(self.nodes[0], self.utxo_cache_0)
- sync_blocks(self.nodes[0:3])
+ sync_blocks(self.nodes[0:5])
def test_height_min(self):
if not os.path.isfile(self.prunedir+"blk00000.dat"):
@@ -70,7 +81,7 @@ class PruneTest(BitcoinTestFramework):
print("Mining 25 more blocks should cause the first block file to be pruned")
# Pruning doesn't run until we're allocating another chunk, 20 full blocks past the height cutoff will ensure this
for i in range(25):
- self.mine_full_block(self.nodes[0],self.address[0])
+ mine_large_block(self.nodes[0], self.utxo_cache_0)
waitstart = time.time()
while os.path.isfile(self.prunedir+"blk00000.dat"):
@@ -95,17 +106,15 @@ class PruneTest(BitcoinTestFramework):
stop_node(self.nodes[0],0)
self.nodes[0]=start_node(0, self.options.tmpdir, ["-debug","-maxreceivebuffer=20000","-blockmaxsize=999000", "-checkblocks=5"], timewait=900)
# Mine 24 blocks in node 1
- self.utxo = self.nodes[1].listunspent()
for i in range(24):
if j == 0:
- self.mine_full_block(self.nodes[1],self.address[1])
+ mine_large_block(self.nodes[1], self.utxo_cache_1)
else:
self.nodes[1].generate(1) #tx's already in mempool from previous disconnects
# Reorg back with 25 block chain from node 0
- self.utxo = self.nodes[0].listunspent()
for i in range(25):
- self.mine_full_block(self.nodes[0],self.address[0])
+ mine_large_block(self.nodes[0], self.utxo_cache_0)
# Create connections in the order so both nodes can see the reorg at the same time
connect_nodes(self.nodes[1], 0)
@@ -217,31 +226,118 @@ class PruneTest(BitcoinTestFramework):
# Verify we can now have the data for a block previously pruned
assert(self.nodes[2].getblock(self.forkhash)["height"] == self.forkheight)
- def mine_full_block(self, node, address):
- # Want to create a full block
- # We'll generate a 66k transaction below, and 14 of them is close to the 1MB block limit
- for j in range(14):
- if len(self.utxo) < 14:
- self.utxo = node.listunspent()
- inputs=[]
- outputs = {}
- t = self.utxo.pop()
- inputs.append({ "txid" : t["txid"], "vout" : t["vout"]})
- remchange = t["amount"] - 100*self.relayfee # Fee must be above min relay rate for 66kb tx
- outputs[address]=remchange
- # Create a basic transaction that will send change back to ourself after account for a fee
- # And then insert the 128 generated transaction outs in the middle rawtx[92] is where the #
- # of txouts is stored and is the only thing we overwrite from the original transaction
- rawtx = node.createrawtransaction(inputs, outputs)
- newtx = rawtx[0:92]
- newtx = newtx + self.txouts
- newtx = newtx + rawtx[94:]
- # Appears to be ever so slightly faster to sign with SIGHASH_NONE
- signresult = node.signrawtransaction(newtx,None,None,"NONE")
- txid = node.sendrawtransaction(signresult["hex"], True)
- # Mine a full sized block which will be these transactions we just created
- node.generate(1)
+ def manual_test(self, node_number, use_timestamp):
+ # at this point, node has 995 blocks and has not yet run in prune mode
+ node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0"], timewait=900)
+ assert_equal(node.getblockcount(), 995)
+ assert_raises_message(JSONRPCException, "not in prune mode", node.pruneblockchain, 500)
+ stop_node(node, node_number)
+
+ # now re-start in manual pruning mode
+ node = self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=1"], timewait=900)
+ assert_equal(node.getblockcount(), 995)
+
+ def height(index):
+ if use_timestamp:
+ return node.getblockheader(node.getblockhash(index))["time"]
+ else:
+ return index
+
+ def prune(index, expected_ret=None):
+ ret = node.pruneblockchain(height(index))
+ # Check the return value. When use_timestamp is True, just check
+ # that the return value is less than or equal to the expected
+ # value, because when more than one block is generated per second,
+ # a timestamp will not be granular enough to uniquely identify an
+ # individual block.
+ if expected_ret is None:
+ expected_ret = index
+ if use_timestamp:
+ assert_greater_than(ret, 0)
+ assert_greater_than(expected_ret + 1, ret)
+ else:
+ assert_equal(ret, expected_ret)
+
+ def has_block(index):
+ return os.path.isfile(self.options.tmpdir + "/node{}/regtest/blocks/blk{:05}.dat".format(node_number, index))
+
+ # should not prune because chain tip of node 3 (995) < PruneAfterHeight (1000)
+ assert_raises_message(JSONRPCException, "Blockchain is too short for pruning", node.pruneblockchain, height(500))
+
+ # mine 6 blocks so we are at height 1001 (i.e., above PruneAfterHeight)
+ node.generate(6)
+
+ # negative and zero inputs should raise an exception
+ try:
+ node.pruneblockchain(-10)
+ raise AssertionError("pruneblockchain(-10) should have failed.")
+ except:
+ pass
+
+ try:
+ node.pruneblockchain(0)
+ raise AssertionError("pruneblockchain(0) should have failed.")
+ except:
+ pass
+
+ # height=100 too low to prune first block file so this is a no-op
+ prune(100)
+ if not has_block(0):
+ raise AssertionError("blk00000.dat is missing when should still be there")
+
+ # height=500 should prune first file
+ prune(500)
+ if has_block(0):
+ raise AssertionError("blk00000.dat is still there, should be pruned by now")
+ if not has_block(1):
+ raise AssertionError("blk00001.dat is missing when should still be there")
+
+ # height=650 should prune second file
+ prune(650)
+ if has_block(1):
+ raise AssertionError("blk00001.dat is still there, should be pruned by now")
+
+ # height=1000 should not prune anything more, because tip-288 is in blk00002.dat.
+ prune(1000, 1001 - MIN_BLOCKS_TO_KEEP)
+ if not has_block(2):
+ raise AssertionError("blk00002.dat is still there, should be pruned by now")
+
+ # advance the tip so blk00002.dat and blk00003.dat can be pruned (the last 288 blocks should now be in blk00004.dat)
+ node.generate(288)
+ prune(1000)
+ if has_block(2):
+ raise AssertionError("blk00002.dat is still there, should be pruned by now")
+ if has_block(3):
+ raise AssertionError("blk00003.dat is still there, should be pruned by now")
+
+ # stop node, start back up with auto-prune at 550MB, make sure still runs
+ stop_node(node, node_number)
+ self.nodes[node_number] = start_node(node_number, self.options.tmpdir, ["-debug=0","-prune=550"], timewait=900)
+
+ print("Success")
+ def wallet_test(self):
+ # check that the pruning node's wallet is still in good shape
+ print("Stop and start pruning node to trigger wallet rescan")
+ try:
+ stop_node(self.nodes[2], 2)
+ start_node(2, self.options.tmpdir, ["-debug=1","-prune=550"])
+ print("Success")
+ except Exception as detail:
+ raise AssertionError("Wallet test: unable to re-start the pruning node")
+
+ # check that wallet loads loads successfully when restarting a pruned node after IBD.
+ # this was reported to fail in #7494.
+ print ("Syncing node 5 to test wallet")
+ connect_nodes(self.nodes[0], 5)
+ nds = [self.nodes[0], self.nodes[5]]
+ sync_blocks(nds)
+ try:
+ stop_node(self.nodes[5],5) #stop and start to trigger rescan
+ start_node(5, self.options.tmpdir, ["-debug=1","-prune=550"])
+ print ("Success")
+ except Exception as detail:
+ raise AssertionError("Wallet test: unable to re-start node5")
def run_test(self):
print("Warning! This test requires 4GB of disk space and takes over 30 mins (up to 2 hours)")
@@ -256,6 +352,10 @@ class PruneTest(BitcoinTestFramework):
# Start by mining a simple chain that all nodes have
# N0=N1=N2 **...*(995)
+ # stop manual-pruning node with 995 blocks
+ stop_node(self.nodes[3],3)
+ stop_node(self.nodes[4],4)
+
print("Check that we haven't started pruning yet because we're below PruneAfterHeight")
self.test_height_min()
# Extend this chain past the PruneAfterHeight
@@ -338,6 +438,15 @@ class PruneTest(BitcoinTestFramework):
#
# N1 doesn't change because 1033 on main chain (*) is invalid
+ print("Test manual pruning with block indices")
+ self.manual_test(3, use_timestamp=False)
+
+ print("Test manual pruning with timestamps")
+ self.manual_test(4, use_timestamp=True)
+
+ print("Test wallet re-scan")
+ self.wallet_test()
+
print("Done")
if __name__ == '__main__':
diff --git a/qa/rpc-tests/rawtransactions.py b/qa/rpc-tests/rawtransactions.py
index ab6d2e8def..33a6f2b0cc 100755
--- a/qa/rpc-tests/rawtransactions.py
+++ b/qa/rpc-tests/rawtransactions.py
@@ -2,11 +2,15 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+"""rawtranscation RPCs QA test.
-#
-# Test re-org scenarios with a mempool that contains transactions
-# that spend (directly or indirectly) coinbase transactions.
-#
+# Tests the following RPCs:
+# - createrawtransaction
+# - signrawtransaction
+# - sendrawtransaction
+# - decoderawtransaction
+# - getrawtransaction
+"""
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
@@ -138,6 +142,33 @@ class RawTransactionsTest(BitcoinTestFramework):
self.sync_all()
assert_equal(self.nodes[0].getbalance(), bal+Decimal('50.00000000')+Decimal('2.19000000')) #block reward + tx
+ # getrawtransaction tests
+ # 1. valid parameters - only supply txid
+ txHash = rawTx["hash"]
+ assert_equal(self.nodes[0].getrawtransaction(txHash), rawTxSigned['hex'])
+
+ # 2. valid parameters - supply txid and 0 for non-verbose
+ assert_equal(self.nodes[0].getrawtransaction(txHash, 0), rawTxSigned['hex'])
+
+ # 3. valid parameters - supply txid and False for non-verbose
+ assert_equal(self.nodes[0].getrawtransaction(txHash, False), rawTxSigned['hex'])
+
+ # 4. valid parameters - supply txid and 1 for verbose.
+ # We only check the "hex" field of the output so we don't need to update this test every time the output format changes.
+ assert_equal(self.nodes[0].getrawtransaction(txHash, 1)["hex"], rawTxSigned['hex'])
+
+ # 5. valid parameters - supply txid and True for non-verbose
+ assert_equal(self.nodes[0].getrawtransaction(txHash, True)["hex"], rawTxSigned['hex'])
+
+ # 6. invalid parameters - supply txid and string "Flase"
+ assert_raises(JSONRPCException, self.nodes[0].getrawtransaction, txHash, "Flase")
+
+ # 7. invalid parameters - supply txid and empty array
+ assert_raises(JSONRPCException, self.nodes[0].getrawtransaction, txHash, [])
+
+ # 8. invalid parameters - supply txid and empty dict
+ assert_raises(JSONRPCException, self.nodes[0].getrawtransaction, txHash, {})
+
inputs = [ {'txid' : "1d1d4e24ed99057e84c3f80fd8fbec79ed9e1acee37da269356ecea000000000", 'vout' : 1, 'sequence' : 1000}]
outputs = { self.nodes[0].getnewaddress() : 1 }
rawtx = self.nodes[0].createrawtransaction(inputs, outputs)
diff --git a/qa/rpc-tests/replace-by-fee.py b/qa/rpc-tests/replace-by-fee.py
index 34c0f9d795..8aba06c60c 100755
--- a/qa/rpc-tests/replace-by-fee.py
+++ b/qa/rpc-tests/replace-by-fee.py
@@ -76,7 +76,7 @@ class ReplaceByFeeTest(BitcoinTestFramework):
def setup_network(self):
self.nodes = []
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000", "-debug",
- "-relaypriority=0", "-whitelist=127.0.0.1",
+ "-whitelist=127.0.0.1",
"-limitancestorcount=50",
"-limitancestorsize=101",
"-limitdescendantcount=200",
diff --git a/qa/rpc-tests/rpcnamedargs.py b/qa/rpc-tests/rpcnamedargs.py
new file mode 100755
index 0000000000..0484204668
--- /dev/null
+++ b/qa/rpc-tests/rpcnamedargs.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+# Copyright (c) 2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+from decimal import Decimal
+
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.authproxy import JSONRPCException
+from test_framework.util import (
+ assert_equal,
+ assert_raises_jsonrpc,
+ assert_is_hex_string,
+ assert_is_hash_string,
+ start_nodes,
+ connect_nodes_bi,
+)
+
+
+class NamedArgumentTest(BitcoinTestFramework):
+ """
+ Test named arguments on RPC calls.
+ """
+
+ def __init__(self):
+ super().__init__()
+ self.setup_clean_chain = False
+ self.num_nodes = 1
+
+ def setup_network(self, split=False):
+ self.nodes = start_nodes(self.num_nodes, self.options.tmpdir)
+ self.is_network_split = False
+ self.sync_all()
+
+ def run_test(self):
+ node = self.nodes[0]
+ h = node.help(command='getinfo')
+ assert(h.startswith('getinfo\n'))
+
+ assert_raises_jsonrpc(-8, node.help, random='getinfo')
+
+ h = node.getblockhash(height=0)
+ node.getblock(blockhash=h)
+
+ assert_equal(node.echo(), [])
+ assert_equal(node.echo(arg0=0,arg9=9), [0] + [None]*8 + [9])
+ assert_equal(node.echo(arg1=1), [None, 1])
+ assert_equal(node.echo(arg9=None), [None]*10)
+ assert_equal(node.echo(arg0=0,arg3=3,arg9=9), [0] + [None]*2 + [3] + [None]*5 + [9])
+
+if __name__ == '__main__':
+ NamedArgumentTest().main()
diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py
index 41a1b3b20f..be6fae5088 100755
--- a/qa/rpc-tests/segwit.py
+++ b/qa/rpc-tests/segwit.py
@@ -13,6 +13,7 @@ from test_framework.mininode import sha256, ripemd160, CTransaction, CTxIn, COut
from test_framework.address import script_to_p2sh, key_to_p2pkh
from test_framework.script import CScript, OP_HASH160, OP_CHECKSIG, OP_0, hash160, OP_EQUAL, OP_DUP, OP_EQUALVERIFY, OP_1, OP_2, OP_CHECKMULTISIG
from io import BytesIO
+from test_framework.mininode import FromHex
NODE_0 = 0
NODE_1 = 1
@@ -84,8 +85,8 @@ class SegWitTest(BitcoinTestFramework):
def setup_network(self):
self.nodes = []
- self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness"]))
- self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"]))
+ self.nodes.append(start_node(0, self.options.tmpdir, ["-logtimemicros", "-debug", "-walletprematurewitness", "-rpcserialversion=0"]))
+ self.nodes.append(start_node(1, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=4", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness", "-rpcserialversion=1"]))
self.nodes.append(start_node(2, self.options.tmpdir, ["-logtimemicros", "-debug", "-blockversion=536870915", "-promiscuousmempoolflags=517", "-prematurewitness", "-walletprematurewitness"]))
connect_nodes(self.nodes[1], 0)
connect_nodes(self.nodes[2], 1)
@@ -211,7 +212,19 @@ class SegWitTest(BitcoinTestFramework):
block = self.nodes[2].generate(1) #block 432 (first block with new rules; 432 = 144 * 3)
sync_blocks(self.nodes)
assert_equal(len(self.nodes[2].getrawmempool()), 0)
- assert_equal(len(self.nodes[2].getblock(block[0])["tx"]), 5)
+ segwit_tx_list = self.nodes[2].getblock(block[0])["tx"]
+ assert_equal(len(segwit_tx_list), 5)
+
+ print("Verify block and transaction serialization rpcs return differing serializations depending on rpc serialization flag")
+ assert(self.nodes[2].getblock(block[0], False) != self.nodes[0].getblock(block[0], False))
+ assert(self.nodes[1].getblock(block[0], False) == self.nodes[2].getblock(block[0], False))
+ for i in range(len(segwit_tx_list)):
+ tx = FromHex(CTransaction(), self.nodes[2].gettransaction(segwit_tx_list[i])["hex"])
+ assert(self.nodes[2].getrawtransaction(segwit_tx_list[i]) != self.nodes[0].getrawtransaction(segwit_tx_list[i]))
+ assert(self.nodes[1].getrawtransaction(segwit_tx_list[i], 0) == self.nodes[2].getrawtransaction(segwit_tx_list[i]))
+ assert(self.nodes[0].getrawtransaction(segwit_tx_list[i]) != self.nodes[2].gettransaction(segwit_tx_list[i])["hex"])
+ assert(self.nodes[1].getrawtransaction(segwit_tx_list[i]) == self.nodes[2].gettransaction(segwit_tx_list[i])["hex"])
+ assert(self.nodes[0].getrawtransaction(segwit_tx_list[i]) == bytes_to_hex_str(tx.serialize_without_witness()))
print("Verify witness txs without witness data are invalid after the fork")
self.fail_mine(self.nodes[2], wit_ids[NODE_2][WIT_V0][2], False)
diff --git a/qa/rpc-tests/sendheaders.py b/qa/rpc-tests/sendheaders.py
index 81b2442e6a..37b98c576e 100755
--- a/qa/rpc-tests/sendheaders.py
+++ b/qa/rpc-tests/sendheaders.py
@@ -348,14 +348,13 @@ class SendHeadersTest(BitcoinTestFramework):
if j == 0:
# Announce via inv
test_node.send_block_inv(tip)
- test_node.wait_for_getdata([tip], timeout=5)
+ test_node.wait_for_getheaders(timeout=5)
+ # Should have received a getheaders now
+ test_node.send_header_for_blocks(blocks)
# Test that duplicate inv's won't result in duplicate
# getdata requests, or duplicate headers announcements
- inv_node.send_block_inv(tip)
- # Should have received a getheaders as well!
- test_node.send_header_for_blocks(blocks)
- test_node.wait_for_getdata([x.sha256 for x in blocks[0:-1]], timeout=5)
- [ inv_node.send_block_inv(x.sha256) for x in blocks[0:-1] ]
+ [ inv_node.send_block_inv(x.sha256) for x in blocks ]
+ test_node.wait_for_getdata([x.sha256 for x in blocks], timeout=5)
inv_node.sync_with_ping()
else:
# Announce via headers
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index d76fba4b07..2c56f954a2 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -159,7 +159,7 @@ class EstimateFeeTest(BitcoinTestFramework):
self.nodes = []
# Use node0 to mine blocks for input splitting
self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000",
- "-relaypriority=0", "-whitelist=127.0.0.1"]))
+ "-whitelist=127.0.0.1"]))
print("This test is time consuming, please be patient")
print("Splitting inputs to small size so we can generate low priority tx's")
@@ -197,12 +197,12 @@ class EstimateFeeTest(BitcoinTestFramework):
# (17k is room enough for 110 or so transactions)
self.nodes.append(start_node(1, self.options.tmpdir,
["-blockprioritysize=1500", "-blockmaxsize=17000",
- "-maxorphantx=1000", "-relaypriority=0", "-debug=estimatefee"]))
+ "-maxorphantx=1000", "-debug=estimatefee"]))
connect_nodes(self.nodes[1], 0)
# Node2 is a stingy miner, that
# produces too small blocks (room for only 55 or so transactions)
- node2args = ["-blockprioritysize=0", "-blockmaxsize=8000", "-maxorphantx=1000", "-relaypriority=0"]
+ node2args = ["-blockprioritysize=0", "-blockmaxsize=8000", "-maxorphantx=1000"]
self.nodes.append(start_node(2, self.options.tmpdir, node2args))
connect_nodes(self.nodes[0], 2)
@@ -225,9 +225,9 @@ class EstimateFeeTest(BitcoinTestFramework):
self.memutxo, Decimal("0.005"), min_fee, min_fee)
tx_kbytes = (len(txhex) // 2) / 1000.0
self.fees_per_kb.append(float(fee)/tx_kbytes)
- sync_mempools(self.nodes[0:3],.1)
+ sync_mempools(self.nodes[0:3], wait=.1)
mined = mining_node.getblock(mining_node.generate(1)[0],True)["tx"]
- sync_blocks(self.nodes[0:3],.1)
+ sync_blocks(self.nodes[0:3], wait=.1)
# update which txouts are confirmed
newmem = []
for utx in self.memutxo:
@@ -259,7 +259,7 @@ class EstimateFeeTest(BitcoinTestFramework):
while len(self.nodes[1].getrawmempool()) > 0:
self.nodes[1].generate(1)
- sync_blocks(self.nodes[0:3],.1)
+ sync_blocks(self.nodes[0:3], wait=.1)
print("Final estimates after emptying mempools")
check_estimates(self.nodes[1], self.fees_per_kb, 2)
diff --git a/qa/rpc-tests/test_framework/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py
index fd7f32b5c6..09ed611299 100644
--- a/qa/rpc-tests/test_framework/authproxy.py
+++ b/qa/rpc-tests/test_framework/authproxy.py
@@ -1,6 +1,6 @@
"""
- Copyright 2011 Jeff Garzik
+ Copyright (c) 2011 Jeff Garzik
AuthServiceProxy has the following improvements over python-jsonrpc's
ServiceProxy class:
@@ -42,6 +42,7 @@ import base64
import decimal
import json
import logging
+import socket
try:
import urllib.parse as urlparse
except ImportError:
@@ -137,14 +138,16 @@ class AuthServiceProxy(object):
self.__conn.request(method, path, postdata, headers)
return self._get_response()
- def __call__(self, *args):
+ def __call__(self, *args, **argsn):
AuthServiceProxy.__id_count += 1
log.debug("-%s-> %s %s"%(AuthServiceProxy.__id_count, self._service_name,
json.dumps(args, default=EncodeDecimal, ensure_ascii=self.ensure_ascii)))
+ if args and argsn:
+ raise ValueError('Cannot handle both named and positional arguments')
postdata = json.dumps({'version': '1.1',
'method': self._service_name,
- 'params': args,
+ 'params': args or argsn,
'id': AuthServiceProxy.__id_count}, default=EncodeDecimal, ensure_ascii=self.ensure_ascii)
response = self._request('POST', self.__url.path, postdata.encode('utf-8'))
if response['error'] is not None:
@@ -161,7 +164,15 @@ class AuthServiceProxy(object):
return self._request('POST', self.__url.path, postdata.encode('utf-8'))
def _get_response(self):
- http_response = self.__conn.getresponse()
+ try:
+ http_response = self.__conn.getresponse()
+ except socket.timeout as e:
+ raise JSONRPCException({
+ 'code': -344,
+ 'message': '%r RPC took longer than %f seconds. Consider '
+ 'using larger timeout for calls that take '
+ 'longer to return.' % (self._service_name,
+ self.__conn.timeout)})
if http_response is None:
raise JSONRPCException({
'code': -342, 'message': 'missing HTTP response from server'})
diff --git a/qa/rpc-tests/test_framework/comptool.py b/qa/rpc-tests/test_framework/comptool.py
index 7c92d3f828..17679fc7e1 100755
--- a/qa/rpc-tests/test_framework/comptool.py
+++ b/qa/rpc-tests/test_framework/comptool.py
@@ -111,6 +111,11 @@ class TestNode(NodeConnCB):
m.locator = self.block_store.get_locator(self.bestblockhash)
self.conn.send_message(m)
+ def send_header(self, header):
+ m = msg_headers()
+ m.headers.append(header)
+ self.conn.send_message(m)
+
# This assumes BIP31
def send_ping(self, nonce):
self.pingMap[nonce] = True
@@ -345,8 +350,16 @@ class TestManager(object):
# Either send inv's to each node and sync, or add
# to invqueue for later inv'ing.
if (test_instance.sync_every_block):
- [ c.cb.send_inv(block) for c in self.connections ]
- self.sync_blocks(block.sha256, 1)
+ # if we expect success, send inv and sync every block
+ # if we expect failure, just push the block and see what happens.
+ if outcome == True:
+ [ c.cb.send_inv(block) for c in self.connections ]
+ self.sync_blocks(block.sha256, 1)
+ else:
+ [ c.send_message(msg_block(block)) for c in self.connections ]
+ [ c.cb.send_ping(self.ping_counter) for c in self.connections ]
+ self.wait_for_pings(self.ping_counter)
+ self.ping_counter += 1
if (not self.check_results(tip, outcome)):
raise AssertionError("Test failed at test %d" % test_number)
else:
@@ -354,6 +367,8 @@ class TestManager(object):
elif isinstance(b_or_t, CBlockHeader):
block_header = b_or_t
self.block_store.add_header(block_header)
+ [ c.cb.send_header(block_header) for c in self.connections ]
+
else: # Tx test runner
assert(isinstance(b_or_t, CTransaction))
tx = b_or_t
diff --git a/qa/rpc-tests/test_framework/mininode.py b/qa/rpc-tests/test_framework/mininode.py
index 4d238c08d9..91daa4ab1f 100755
--- a/qa/rpc-tests/test_framework/mininode.py
+++ b/qa/rpc-tests/test_framework/mininode.py
@@ -41,9 +41,10 @@ from test_framework.siphash import siphash256
BIP0031_VERSION = 60000
MY_VERSION = 70014 # past bip-31 for ping/pong
MY_SUBVERSION = b"/python-mininode-tester:0.0.3/"
+MY_RELAY = 1 # from version 70001 onwards, fRelay should be appended to version messages (BIP37)
MAX_INV_SZ = 50000
-MAX_BLOCK_SIZE = 1000000
+MAX_BLOCK_BASE_SIZE = 1000000
COIN = 100000000 # 1 btc in satoshis
@@ -951,6 +952,7 @@ class msg_version(object):
self.nNonce = random.getrandbits(64)
self.strSubVer = MY_SUBVERSION
self.nStartingHeight = -1
+ self.nRelay = MY_RELAY
def deserialize(self, f):
self.nVersion = struct.unpack("<i", f.read(4))[0]
@@ -960,21 +962,32 @@ class msg_version(object):
self.nTime = struct.unpack("<q", f.read(8))[0]
self.addrTo = CAddress()
self.addrTo.deserialize(f)
+
if self.nVersion >= 106:
self.addrFrom = CAddress()
self.addrFrom.deserialize(f)
self.nNonce = struct.unpack("<Q", f.read(8))[0]
self.strSubVer = deser_string(f)
- if self.nVersion >= 209:
- self.nStartingHeight = struct.unpack("<i", f.read(4))[0]
- else:
- self.nStartingHeight = None
else:
self.addrFrom = None
self.nNonce = None
self.strSubVer = None
self.nStartingHeight = None
+ if self.nVersion >= 209:
+ self.nStartingHeight = struct.unpack("<i", f.read(4))[0]
+ else:
+ self.nStartingHeight = None
+
+ if self.nVersion >= 70001:
+ # Relay field is optional for version 70001 onwards
+ try:
+ self.nRelay = struct.unpack("<b", f.read(1))[0]
+ except:
+ self.nRelay = 0
+ else:
+ self.nRelay = 0
+
def serialize(self):
r = b""
r += struct.pack("<i", self.nVersion)
@@ -985,13 +998,14 @@ class msg_version(object):
r += struct.pack("<Q", self.nNonce)
r += ser_string(self.strSubVer)
r += struct.pack("<i", self.nStartingHeight)
+ r += struct.pack("<b", self.nRelay)
return r
def __repr__(self):
- return 'msg_version(nVersion=%i nServices=%i nTime=%s addrTo=%s addrFrom=%s nNonce=0x%016X strSubVer=%s nStartingHeight=%i)' \
+ return 'msg_version(nVersion=%i nServices=%i nTime=%s addrTo=%s addrFrom=%s nNonce=0x%016X strSubVer=%s nStartingHeight=%i nRelay=%i)' \
% (self.nVersion, self.nServices, time.ctime(self.nTime),
repr(self.addrTo), repr(self.addrFrom), self.nNonce,
- self.strSubVer, self.nStartingHeight)
+ self.strSubVer, self.nStartingHeight, self.nRelay)
class msg_verack(object):
diff --git a/qa/rpc-tests/test_framework/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py
index e6fc5fd8a2..98c4f6070b 100755
--- a/qa/rpc-tests/test_framework/test_framework.py
+++ b/qa/rpc-tests/test_framework/test_framework.py
@@ -139,16 +139,11 @@ class BitcoinTestFramework(object):
success = False
try:
- if not os.path.isdir(self.options.tmpdir):
- os.makedirs(self.options.tmpdir)
+ os.makedirs(self.options.tmpdir, exist_ok=False)
self.setup_chain()
-
self.setup_network()
-
self.run_test()
-
success = True
-
except JSONRPCException as e:
print("JSONRPC error: "+e.error['message'])
traceback.print_tb(sys.exc_info()[2])
@@ -177,7 +172,16 @@ class BitcoinTestFramework(object):
os.rmdir(self.options.root)
else:
print("Not cleaning up dir %s" % self.options.tmpdir)
-
+ if os.getenv("PYTHON_DEBUG", ""):
+ # Dump the end of the debug logs, to aid in debugging rare
+ # travis failures.
+ import glob
+ filenames = glob.glob(self.options.tmpdir + "/node*/regtest/debug.log")
+ MAX_LINES_TO_PRINT = 1000
+ for f in filenames:
+ print("From" , f, ":")
+ from collections import deque
+ print("".join(deque(open(f), MAX_LINES_TO_PRINT)))
if success:
print("Tests successful")
sys.exit(0)
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py
index c818af4bd7..aca82c8b6f 100644
--- a/qa/rpc-tests/test_framework/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -121,33 +121,44 @@ def hex_str_to_bytes(hex_str):
def str_to_b64str(string):
return b64encode(string.encode('utf-8')).decode('ascii')
-def sync_blocks(rpc_connections, wait=1, timeout=60):
+def sync_blocks(rpc_connections, *, wait=1, timeout=60):
"""
- Wait until everybody has the same tip
- """
- maxheight = 0
- while timeout > 0:
- tips = [ x.waitforblockheight(maxheight, int(wait * 1000)) for x in rpc_connections ]
- heights = [ x["height"] for x in tips ]
- if tips == [ tips[0] ]*len(tips):
- return True
- if heights == [ heights[0] ]*len(heights): #heights are the same but hashes are not
- raise AssertionError("Block sync failed")
- timeout -= wait
- maxheight = max(heights)
- raise AssertionError("Block sync failed")
+ Wait until everybody has the same tip.
-def sync_chain(rpc_connections, wait=1):
+ sync_blocks needs to be called with an rpc_connections set that has least
+ one node already synced to the latest, stable tip, otherwise there's a
+ chance it might return before all nodes are stably synced.
+ """
+ # Use getblockcount() instead of waitforblockheight() to determine the
+ # initial max height because the two RPCs look at different internal global
+ # variables (chainActive vs latestBlock) and the former gets updated
+ # earlier.
+ maxheight = max(x.getblockcount() for x in rpc_connections)
+ start_time = cur_time = time.time()
+ while cur_time <= start_time + timeout:
+ tips = [r.waitforblockheight(maxheight, int(wait * 1000)) for r in rpc_connections]
+ if all(t["height"] == maxheight for t in tips):
+ if all(t["hash"] == tips[0]["hash"] for t in tips):
+ return
+ raise AssertionError("Block sync failed, mismatched block hashes:{}".format(
+ "".join("\n {!r}".format(tip) for tip in tips)))
+ cur_time = time.time()
+ raise AssertionError("Block sync to height {} timed out:{}".format(
+ maxheight, "".join("\n {!r}".format(tip) for tip in tips)))
+
+def sync_chain(rpc_connections, *, wait=1, timeout=60):
"""
Wait until everybody has the same best block
"""
- while True:
- counts = [ x.getbestblockhash() for x in rpc_connections ]
- if counts == [ counts[0] ]*len(counts):
- break
+ while timeout > 0:
+ best_hash = [x.getbestblockhash() for x in rpc_connections]
+ if best_hash == [best_hash[0]]*len(best_hash):
+ return
time.sleep(wait)
+ timeout -= wait
+ raise AssertionError("Chain sync failed: Best block hashes don't match")
-def sync_mempools(rpc_connections, wait=1, timeout=60):
+def sync_mempools(rpc_connections, *, wait=1, timeout=60):
"""
Wait until everybody has the same transactions in their memory
pools
@@ -159,7 +170,7 @@ def sync_mempools(rpc_connections, wait=1, timeout=60):
if set(rpc_connections[i].getrawmempool()) == pool:
num_match = num_match+1
if num_match == len(rpc_connections):
- return True
+ return
time.sleep(wait)
timeout -= wait
raise AssertionError("Mempool sync failed")
@@ -212,7 +223,7 @@ def wait_for_bitcoind_start(process, url, i):
raise # unknown IO error
except JSONRPCException as e: # Initialization phase
if e.error['code'] != -28: # RPC in warmup?
- raise # unkown JSON RPC exception
+ raise # unknown JSON RPC exception
time.sleep(0.25)
def initialize_chain(test_dir, num_nodes, cachedir):
@@ -246,7 +257,7 @@ def initialize_chain(test_dir, num_nodes, cachedir):
print("initialize_chain: bitcoind started, waiting for RPC to come up")
wait_for_bitcoind_start(bitcoind_processes[i], rpc_url(i), i)
if os.getenv("PYTHON_DEBUG", ""):
- print("initialize_chain: RPC succesfully started")
+ print("initialize_chain: RPC successfully started")
rpcs = []
for i in range(MAX_NODES):
@@ -333,7 +344,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
url = rpc_url(i, rpchost)
wait_for_bitcoind_start(bitcoind_processes[i], url, i)
if os.getenv("PYTHON_DEBUG", ""):
- print("start_node: RPC succesfully started")
+ print("start_node: RPC successfully started")
proxy = get_rpc_proxy(url, i, timeout=timewait)
if COVERAGE_DIR:
@@ -341,7 +352,7 @@ def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=
return proxy
-def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None):
+def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, timewait=None, binary=None):
"""
Start multiple bitcoinds, return RPC connections to them
"""
@@ -350,7 +361,7 @@ def start_nodes(num_nodes, dirname, extra_args=None, rpchost=None, binary=None):
rpcs = []
try:
for i in range(num_nodes):
- rpcs.append(start_node(i, dirname, extra_args[i], rpchost, binary=binary[i]))
+ rpcs.append(start_node(i, dirname, extra_args[i], rpchost, timewait=timewait, binary=binary[i]))
except: # If one node failed to start, stop the others
stop_nodes(rpcs)
raise
@@ -513,19 +524,39 @@ def assert_fee_amount(fee, tx_size, fee_per_kB):
if fee > (tx_size + 2) * fee_per_kB / 1000:
raise AssertionError("Fee of %s BTC too high! (Should be %s BTC)"%(str(fee), str(target_fee)))
-def assert_equal(thing1, thing2):
- if thing1 != thing2:
- raise AssertionError("%s != %s"%(str(thing1),str(thing2)))
+def assert_equal(thing1, thing2, *args):
+ if thing1 != thing2 or any(thing1 != arg for arg in args):
+ raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args))
def assert_greater_than(thing1, thing2):
if thing1 <= thing2:
raise AssertionError("%s <= %s"%(str(thing1),str(thing2)))
+def assert_greater_than_or_equal(thing1, thing2):
+ if thing1 < thing2:
+ raise AssertionError("%s < %s"%(str(thing1),str(thing2)))
+
def assert_raises(exc, fun, *args, **kwds):
+ assert_raises_message(exc, None, fun, *args, **kwds)
+
+def assert_raises_message(exc, message, fun, *args, **kwds):
try:
fun(*args, **kwds)
- except exc:
- pass
+ except exc as e:
+ if message is not None and message not in e.error['message']:
+ raise AssertionError("Expected substring not found:"+e.error['message'])
+ except Exception as e:
+ raise AssertionError("Unexpected exception raised: "+type(e).__name__)
+ else:
+ raise AssertionError("No exception raised")
+
+def assert_raises_jsonrpc(code, fun, *args, **kwds):
+ '''Check for specific JSONRPC exception code'''
+ try:
+ fun(*args, **kwds)
+ except JSONRPCException as e:
+ if e.error["code"] != code:
+ raise AssertionError("Unexpected JSONRPC error code %i" % e.error["code"])
except Exception as e:
raise AssertionError("Unexpected exception raised: "+type(e).__name__)
else:
@@ -639,16 +670,15 @@ def create_tx(node, coinbase, to_address, amount):
# Create a spend of each passed-in utxo, splicing in "txouts" to each raw
# transaction to make it large. See gen_return_txouts() above.
-def create_lots_of_big_transactions(node, txouts, utxos, fee):
+def create_lots_of_big_transactions(node, txouts, utxos, num, fee):
addr = node.getnewaddress()
txids = []
- for i in range(len(utxos)):
+ for _ in range(num):
t = utxos.pop()
- inputs = []
- inputs.append({ "txid" : t["txid"], "vout" : t["vout"]})
+ inputs=[{ "txid" : t["txid"], "vout" : t["vout"]}]
outputs = {}
- send_value = t['amount'] - fee
- outputs[addr] = satoshi_round(send_value)
+ change = t['amount'] - fee
+ outputs[addr] = satoshi_round(change)
rawtx = node.createrawtransaction(inputs, outputs)
newtx = rawtx[0:92]
newtx = newtx + txouts
@@ -658,6 +688,19 @@ def create_lots_of_big_transactions(node, txouts, utxos, fee):
txids.append(txid)
return txids
+def mine_large_block(node, utxos=None):
+ # generate a 66k transaction,
+ # and 14 of them is close to the 1MB block limit
+ num = 14
+ txouts = gen_return_txouts()
+ utxos = utxos if utxos is not None else []
+ if len(utxos) < num:
+ utxos.clear()
+ utxos.extend(node.listunspent())
+ fee = 100 * node.getnetworkinfo()["relayfee"]
+ create_lots_of_big_transactions(node, txouts, utxos, num, fee=fee)
+ node.generate(1)
+
def get_bip9_status(node, key):
info = node.getblockchaininfo()
return info['bip9_softforks'][key]
diff --git a/qa/rpc-tests/wallet-dump.py b/qa/rpc-tests/wallet-dump.py
index a37096a40c..c6dc2e3d10 100755
--- a/qa/rpc-tests/wallet-dump.py
+++ b/qa/rpc-tests/wallet-dump.py
@@ -61,7 +61,11 @@ class WalletDumpTest(BitcoinTestFramework):
self.extra_args = [["-keypool=90"]]
def setup_network(self, split=False):
- self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
+ # Use 1 minute timeout because the initial getnewaddress RPC can take
+ # longer than the default 30 seconds due to an expensive
+ # CWallet::TopUpKeyPool call, and the encryptwallet RPC made later in
+ # the test often takes even longer.
+ self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args, timewait=60)
def run_test (self):
tmpdir = self.options.tmpdir
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
index e43f6ea5d2..f325ecb4a3 100755
--- a/qa/rpc-tests/wallet.py
+++ b/qa/rpc-tests/wallet.py
@@ -71,7 +71,7 @@ class WalletTest (BitcoinTestFramework):
unspent_0 = self.nodes[2].listunspent()[0]
unspent_0 = {"txid": unspent_0["txid"], "vout": unspent_0["vout"]}
self.nodes[2].lockunspent(False, [unspent_0])
- assert_raises(JSONRPCException, self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20)
+ assert_raises_message(JSONRPCException, "Insufficient funds", self.nodes[2].sendtoaddress, self.nodes[2].getnewaddress(), 20)
assert_equal([unspent_0], self.nodes[2].listlockunspent())
self.nodes[2].lockunspent(True, [unspent_0])
assert_equal(len(self.nodes[2].listlockunspent()), 0)
@@ -330,10 +330,12 @@ class WalletTest (BitcoinTestFramework):
# disabled until issue is fixed: https://github.com/bitcoin/bitcoin/issues/7463
# '-salvagewallet',
]
+ chainlimit = 6
for m in maintenance:
print("check " + m)
stop_nodes(self.nodes)
- self.nodes = start_nodes(3, self.options.tmpdir, [[m]] * 3)
+ # set lower ancestor limit for later
+ self.nodes = start_nodes(3, self.options.tmpdir, [[m, "-limitancestorcount="+str(chainlimit)]] * 3)
while m == '-reindex' and [block_count] * 3 != [self.nodes[i].getblockcount() for i in range(3)]:
# reindex will leave rpc warm up "early"; Wait for it to finish
time.sleep(0.1)
@@ -346,5 +348,57 @@ class WalletTest (BitcoinTestFramework):
assert_equal(coinbase_tx_1["transactions"][0]["blockhash"], blocks[1])
assert_equal(len(self.nodes[0].listsinceblock(blocks[1])["transactions"]), 0)
+ # ==Check that wallet prefers to use coins that don't exceed mempool limits =====
+
+ # Get all non-zero utxos together
+ chain_addrs = [self.nodes[0].getnewaddress(), self.nodes[0].getnewaddress()]
+ singletxid = self.nodes[0].sendtoaddress(chain_addrs[0], self.nodes[0].getbalance(), "", "", True)
+ self.nodes[0].generate(1)
+ node0_balance = self.nodes[0].getbalance()
+ # Split into two chains
+ rawtx = self.nodes[0].createrawtransaction([{"txid":singletxid, "vout":0}], {chain_addrs[0]:node0_balance/2-Decimal('0.01'), chain_addrs[1]:node0_balance/2-Decimal('0.01')})
+ signedtx = self.nodes[0].signrawtransaction(rawtx)
+ singletxid = self.nodes[0].sendrawtransaction(signedtx["hex"])
+ txids = [singletxid, singletxid]
+ self.nodes[0].generate(1)
+
+ # Make a long chain of unconfirmed payments without hitting mempool limit
+ # Each tx we make leaves only one output of change on a chain 1 longer
+ # Since the amount to send is always much less than the outputs, we only ever need one output
+ # So we should be able to generate exactly chainlimit txs for each original output
+ sending_addr = self.nodes[1].getnewaddress()
+ txid_list = []
+ for i in range(chainlimit*2):
+ txid_list.append(self.nodes[0].sendtoaddress(sending_addr, Decimal('0.0001')))
+ assert_equal(self.nodes[0].getmempoolinfo()['size'], chainlimit*2)
+ assert_equal(len(txid_list), chainlimit*2)
+
+ # Without walletrejectlongchains, we will still generate a txid
+ # The tx will be stored in the wallet but not accepted to the mempool
+ extra_txid = self.nodes[0].sendtoaddress(sending_addr, Decimal('0.0001'))
+ assert(extra_txid not in self.nodes[0].getrawmempool())
+ assert(extra_txid in [tx["txid"] for tx in self.nodes[0].listtransactions()])
+ self.nodes[0].abandontransaction(extra_txid)
+ total_txs = len(self.nodes[0].listtransactions("*",99999))
+
+ # Try with walletrejectlongchains
+ # Double chain limit but require combining inputs, so we pass SelectCoinsMinConf
+ stop_node(self.nodes[0],0)
+ self.nodes[0] = start_node(0, self.options.tmpdir, ["-walletrejectlongchains", "-limitancestorcount="+str(2*chainlimit)])
+
+ # wait for loadmempool
+ timeout = 10
+ while (timeout > 0 and len(self.nodes[0].getrawmempool()) < chainlimit*2):
+ time.sleep(0.5)
+ timeout -= 0.5
+ assert_equal(len(self.nodes[0].getrawmempool()), chainlimit*2)
+
+ node0_balance = self.nodes[0].getbalance()
+ # With walletrejectlongchains we will not create the tx and store it in our wallet.
+ assert_raises_message(JSONRPCException, "mempool chain", self.nodes[0].sendtoaddress, sending_addr, node0_balance - Decimal('0.01'))
+
+ # Verify nothing new in wallet
+ assert_equal(total_txs, len(self.nodes[0].listtransactions("*",99999)))
+
if __name__ == '__main__':
WalletTest().main()
diff --git a/qa/rpc-tests/zmq_test.py b/qa/rpc-tests/zmq_test.py
index 3a116317fe..e9afb2b09a 100755
--- a/qa/rpc-tests/zmq_test.py
+++ b/qa/rpc-tests/zmq_test.py
@@ -12,9 +12,6 @@ from test_framework.util import *
import zmq
import struct
-import http.client
-import urllib.parse
-
class ZMQTest (BitcoinTestFramework):
def __init__(self):
diff --git a/share/qt/extract_strings_qt.py b/share/qt/extract_strings_qt.py
index 92e0df259e..5492fdb8c5 100755
--- a/share/qt/extract_strings_qt.py
+++ b/share/qt/extract_strings_qt.py
@@ -8,7 +8,6 @@ they can be picked up by Qt linguist.
'''
from __future__ import division,print_function,unicode_literals
from subprocess import Popen, PIPE
-import glob
import operator
import os
import sys
diff --git a/share/rpcuser/rpcuser.py b/share/rpcuser/rpcuser.py
index 9fd176908b..63c69e308a 100755
--- a/share/rpcuser/rpcuser.py
+++ b/share/rpcuser/rpcuser.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python2
-# Copyright (c) 2015 The Bitcoin Core developers
+# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/Makefile.am b/src/Makefile.am
index 5a5e3abcfa..a2072865a3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -61,6 +61,7 @@ EXTRA_LIBRARIES += \
lib_LTLIBRARIES = $(LIBBITCOINCONSENSUS)
bin_PROGRAMS =
+noinst_PROGRAMS =
TESTS =
BENCHMARKS =
@@ -96,6 +97,7 @@ BITCOIN_CORE_H = \
consensus/consensus.h \
core_io.h \
core_memusage.h \
+ cuckoocache.h \
httprpc.h \
httpserver.h \
indirectmap.h \
@@ -104,13 +106,14 @@ BITCOIN_CORE_H = \
keystore.h \
dbwrapper.h \
limitedmap.h \
- main.h \
memusage.h \
merkleblock.h \
miner.h \
net.h \
+ net_processing.h \
netaddress.h \
netbase.h \
+ netmessagemaker.h \
noui.h \
policy/fees.h \
policy/policy.h \
@@ -132,9 +135,11 @@ BITCOIN_CORE_H = \
support/allocators/secure.h \
support/allocators/zeroafterfree.h \
support/cleanse.h \
+ support/events.h \
support/lockedpool.h \
sync.h \
threadsafety.h \
+ threadinterrupt.h \
timedata.h \
torcontrol.h \
txdb.h \
@@ -144,6 +149,7 @@ BITCOIN_CORE_H = \
util.h \
utilmoneystr.h \
utiltime.h \
+ validation.h \
validationinterface.h \
versionbits.h \
wallet/coincontrol.h \
@@ -152,6 +158,7 @@ BITCOIN_CORE_H = \
wallet/rpcwallet.h \
wallet/wallet.h \
wallet/walletdb.h \
+ warnings.h \
zmq/zmqabstractnotifier.h \
zmq/zmqconfig.h\
zmq/zmqnotificationinterface.h \
@@ -178,10 +185,10 @@ libbitcoin_server_a_SOURCES = \
httpserver.cpp \
init.cpp \
dbwrapper.cpp \
- main.cpp \
merkleblock.cpp \
miner.cpp \
net.cpp \
+ net_processing.cpp \
noui.cpp \
policy/fees.cpp \
policy/policy.cpp \
@@ -200,6 +207,7 @@ libbitcoin_server_a_SOURCES = \
txdb.cpp \
txmempool.cpp \
ui_interface.cpp \
+ validation.cpp \
validationinterface.cpp \
versionbits.cpp \
$(BITCOIN_CORE_H)
@@ -302,6 +310,7 @@ libbitcoin_common_a_SOURCES = \
scheduler.cpp \
script/sign.cpp \
script/standard.cpp \
+ warnings.cpp \
$(BITCOIN_CORE_H)
# util: shared between all executables.
@@ -320,6 +329,7 @@ libbitcoin_util_a_SOURCES = \
rpc/protocol.cpp \
support/cleanse.cpp \
sync.cpp \
+ threadinterrupt.cpp \
util.cpp \
utilmoneystr.cpp \
utilstrencodings.cpp \
diff --git a/src/Makefile.bench.include b/src/Makefile.bench.include
index 9760ad089c..e58bd9dfbf 100644
--- a/src/Makefile.bench.include
+++ b/src/Makefile.bench.include
@@ -6,11 +6,15 @@ bin_PROGRAMS += bench/bench_bitcoin
BENCH_SRCDIR = bench
BENCH_BINARY = bench/bench_bitcoin$(EXEEXT)
+RAW_TEST_FILES = \
+ bench/data/block413567.raw
+GENERATED_TEST_FILES = $(RAW_TEST_FILES:.raw=.raw.h)
bench_bench_bitcoin_SOURCES = \
bench/bench_bitcoin.cpp \
bench/bench.cpp \
bench/bench.h \
+ bench/checkblock.cpp \
bench/Examples.cpp \
bench/rollingbloom.cpp \
bench/crypto_hash.cpp \
@@ -18,7 +22,11 @@ bench_bench_bitcoin_SOURCES = \
bench/mempool_eviction.cpp \
bench/verify_script.cpp \
bench/base58.cpp \
- bench/lockedpool.cpp
+ bench/lockedpool.cpp \
+ bench/perf.cpp \
+ bench/perf.h
+
+nodist_bench_bench_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
bench_bench_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
bench_bench_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
@@ -45,10 +53,12 @@ endif
bench_bench_bitcoin_LDADD += $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS)
bench_bench_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
-CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno
+CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_TEST_FILES)
CLEANFILES += $(CLEAN_BITCOIN_BENCH)
+bench/checkblock.cpp: bench/data/block413567.raw.h
+
bitcoin_bench: $(BENCH_BINARY)
bench: $(BENCH_BINARY) FORCE
@@ -56,3 +66,12 @@ bench: $(BENCH_BINARY) FORCE
bitcoin_bench_clean : FORCE
rm -f $(CLEAN_BITCOIN_BENCH) $(bench_bench_bitcoin_OBJECTS) $(BENCH_BINARY)
+
+%.raw.h: %.raw
+ @$(MKDIR_P) $(@D)
+ @{ \
+ echo "static unsigned const char $(*F)[] = {" && \
+ $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
+ echo "};"; \
+ } > "$@.new" && mv -f "$@.new" "$@"
+ @echo "Generated $@"
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 1f9a901d75..edc3c4b292 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -11,12 +11,11 @@ QT_TS = \
qt/locale/bitcoin_af_ZA.ts \
qt/locale/bitcoin_ar.ts \
qt/locale/bitcoin_be_BY.ts \
- qt/locale/bitcoin_bg.ts \
qt/locale/bitcoin_bg_BG.ts \
+ qt/locale/bitcoin_bg.ts \
qt/locale/bitcoin_ca_ES.ts \
qt/locale/bitcoin_ca.ts \
qt/locale/bitcoin_ca@valencia.ts \
- qt/locale/bitcoin_cs_CZ.ts \
qt/locale/bitcoin_cs.ts \
qt/locale/bitcoin_cy.ts \
qt/locale/bitcoin_da.ts \
@@ -35,6 +34,7 @@ QT_TS = \
qt/locale/bitcoin_es.ts \
qt/locale/bitcoin_es_UY.ts \
qt/locale/bitcoin_es_VE.ts \
+ qt/locale/bitcoin_et_EE.ts \
qt/locale/bitcoin_et.ts \
qt/locale/bitcoin_eu_ES.ts \
qt/locale/bitcoin_fa_IR.ts \
@@ -64,6 +64,7 @@ QT_TS = \
qt/locale/bitcoin_mn.ts \
qt/locale/bitcoin_ms_MY.ts \
qt/locale/bitcoin_nb.ts \
+ qt/locale/bitcoin_ne.ts \
qt/locale/bitcoin_nl.ts \
qt/locale/bitcoin_pam.ts \
qt/locale/bitcoin_pl.ts \
@@ -271,6 +272,7 @@ RES_ICONS = \
qt/res/icons/key.png \
qt/res/icons/lock_closed.png \
qt/res/icons/lock_open.png \
+ qt/res/icons/network_disabled.png \
qt/res/icons/open.png \
qt/res/icons/overview.png \
qt/res/icons/quit.png \
@@ -353,7 +355,7 @@ endif
RES_IMAGES =
-RES_MOVIES = $(wildcard qt/res/movies/spinner-*.png)
+RES_MOVIES = $(wildcard $(srcdir)/qt/res/movies/spinner-*.png)
BITCOIN_RC = qt/res/bitcoin-qt-res.rc
@@ -413,11 +415,11 @@ QT_QM=$(QT_TS:.ts=.qm)
SECONDARY: $(QT_QM)
-$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
+$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES) $(libbitcoin_common_a_SOURCES) $(libbitcoin_zmq_a_SOURCES) $(libbitcoin_consensus_a_SOURCES) $(libbitcoin_util_a_SOURCES)
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^
-translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
+translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/bitcoin.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts $(srcdir)/qt/locale/bitcoin_en.ts
diff --git a/src/Makefile.qttest.include b/src/Makefile.qttest.include
index cb310d5a1b..039f8ac547 100644
--- a/src/Makefile.qttest.include
+++ b/src/Makefile.qttest.include
@@ -6,6 +6,7 @@ bin_PROGRAMS += qt/test/test_bitcoin-qt
TESTS += qt/test/test_bitcoin-qt
TEST_QT_MOC_CPP = \
+ qt/test/moc_compattests.cpp \
qt/test/moc_rpcnestedtests.cpp \
qt/test/moc_uritests.cpp
@@ -14,6 +15,7 @@ TEST_QT_MOC_CPP += qt/test/moc_paymentservertests.cpp
endif
TEST_QT_H = \
+ qt/test/compattests.h \
qt/test/rpcnestedtests.h \
qt/test/uritests.h \
qt/test/paymentrequestdata.h \
@@ -23,6 +25,7 @@ qt_test_test_bitcoin_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN_
$(QT_INCLUDES) $(QT_TEST_INCLUDES) $(PROTOBUF_CFLAGS)
qt_test_test_bitcoin_qt_SOURCES = \
+ qt/test/compattests.cpp \
qt/test/rpcnestedtests.cpp \
qt/test/test_main.cpp \
qt/test/uritests.cpp \
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index 4e4cca14ca..4d44b35bb6 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -4,6 +4,7 @@
TESTS += test/test_bitcoin
bin_PROGRAMS += test/test_bitcoin
+noinst_PROGRAMS += test/test_bitcoin_fuzzy
TEST_SRCDIR = test
TEST_BINARY=test/test_bitcoin$(EXEEXT)
@@ -12,18 +13,54 @@ EXTRA_DIST += \
test/bctest.py \
test/bitcoin-util-test.py \
test/data/bitcoin-util-test.json \
- test/data/blanktx.hex \
+ test/data/blanktxv1.hex \
+ test/data/blanktxv1.json \
+ test/data/blanktxv2.hex \
+ test/data/blanktxv2.json \
test/data/tt-delin1-out.hex \
+ test/data/tt-delin1-out.json \
test/data/tt-delout1-out.hex \
+ test/data/tt-delout1-out.json \
test/data/tt-locktime317000-out.hex \
+ test/data/tt-locktime317000-out.json \
test/data/tx394b54bb.hex \
test/data/txcreate1.hex \
+ test/data/txcreate1.json \
test/data/txcreate2.hex \
+ test/data/txcreate2.json \
test/data/txcreatedata1.hex \
+ test/data/txcreatedata1.json \
test/data/txcreatedata2.hex \
- test/data/txcreatesign.hex \
+ test/data/txcreatedata2.json \
test/data/txcreatedata_seq0.hex \
- test/data/txcreatedata_seq1.hex
+ test/data/txcreatedata_seq0.json \
+ test/data/txcreatedata_seq1.hex \
+ test/data/txcreatedata_seq1.json \
+ test/data/txcreatemultisig1.hex \
+ test/data/txcreatemultisig1.json \
+ test/data/txcreatemultisig2.hex \
+ test/data/txcreatemultisig2.json \
+ test/data/txcreatemultisig3.hex \
+ test/data/txcreatemultisig3.json \
+ test/data/txcreatemultisig4.hex \
+ test/data/txcreatemultisig4.json \
+ test/data/txcreateoutpubkey1.hex \
+ test/data/txcreateoutpubkey1.json \
+ test/data/txcreateoutpubkey2.hex \
+ test/data/txcreateoutpubkey2.json \
+ test/data/txcreateoutpubkey3.hex \
+ test/data/txcreateoutpubkey3.json \
+ test/data/txcreatescript1.hex \
+ test/data/txcreatescript1.json \
+ test/data/txcreatescript2.hex \
+ test/data/txcreatescript2.json \
+ test/data/txcreatescript3.hex \
+ test/data/txcreatescript3.json \
+ test/data/txcreatescript4.hex \
+ test/data/txcreatescript4.json \
+ test/data/txcreatesignv1.hex \
+ test/data/txcreatesignv1.json \
+ test/data/txcreatesignv2.hex
JSON_TEST_FILES = \
test/data/script_tests.json \
@@ -38,6 +75,7 @@ RAW_TEST_FILES =
GENERATED_TEST_FILES = $(JSON_TEST_FILES:.json=.json.h) $(RAW_TEST_FILES:.raw=.raw.h)
+# test_bitcoin binary #
BITCOIN_TESTS =\
test/arith_uint256_tests.cpp \
test/scriptnum10.h \
@@ -50,9 +88,11 @@ BITCOIN_TESTS =\
test/bip32_tests.cpp \
test/blockencodings_tests.cpp \
test/bloom_tests.cpp \
+ test/bswap_tests.cpp \
test/coins_tests.cpp \
test/compress_tests.cpp \
test/crypto_tests.cpp \
+ test/cuckoocache_tests.cpp \
test/DoS_tests.cpp \
test/getarg_tests.cpp \
test/hash_tests.cpp \
@@ -70,6 +110,7 @@ BITCOIN_TESTS =\
test/policyestimator_tests.cpp \
test/pow_tests.cpp \
test/prevector_tests.cpp \
+ test/raii_event_tests.cpp \
test/reverselock_tests.cpp \
test/rpc_tests.cpp \
test/sanity_tests.cpp \
@@ -84,6 +125,7 @@ BITCOIN_TESTS =\
test/streams_tests.cpp \
test/test_bitcoin.cpp \
test/test_bitcoin.h \
+ test/test_random.h \
test/testutil.cpp \
test/testutil.h \
test/timedata_tests.cpp \
@@ -104,9 +146,9 @@ BITCOIN_TESTS += \
endif
test_test_bitcoin_SOURCES = $(BITCOIN_TESTS) $(JSON_TEST_FILES) $(RAW_TEST_FILES)
-test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS)
+test_test_bitcoin_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) -I$(builddir)/test/ $(TESTDEFS) $(EVENT_CFLAGS)
test_test_bitcoin_LDADD = $(LIBBITCOIN_SERVER) $(LIBBITCOIN_CLI) $(LIBBITCOIN_COMMON) $(LIBBITCOIN_UTIL) $(LIBBITCOIN_CONSENSUS) $(LIBBITCOIN_CRYPTO) $(LIBUNIVALUE) $(LIBLEVELDB) $(LIBMEMENV) \
- $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1)
+ $(BOOST_LIBS) $(BOOST_UNIT_TEST_FRAMEWORK_LIB) $(LIBSECP256K1) $(EVENT_LIBS)
test_test_bitcoin_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
if ENABLE_WALLET
test_test_bitcoin_LDADD += $(LIBBITCOIN_WALLET)
@@ -118,6 +160,25 @@ test_test_bitcoin_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -s
if ENABLE_ZMQ
test_test_bitcoin_LDADD += $(ZMQ_LIBS)
endif
+#
+
+# test_bitcoin_fuzzy binary #
+test_test_bitcoin_fuzzy_SOURCES = test/test_bitcoin_fuzzy.cpp
+test_test_bitcoin_fuzzy_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
+test_test_bitcoin_fuzzy_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
+test_test_bitcoin_fuzzy_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+
+test_test_bitcoin_fuzzy_LDADD = \
+ $(LIBUNIVALUE) \
+ $(LIBBITCOIN_SERVER) \
+ $(LIBBITCOIN_COMMON) \
+ $(LIBBITCOIN_UTIL) \
+ $(LIBBITCOIN_CONSENSUS) \
+ $(LIBBITCOIN_CRYPTO) \
+ $(LIBSECP256K1)
+
+test_test_bitcoin_fuzzy_LDADD += $(BOOST_LIBS) $(CRYPTO_LIBS)
+#
nodist_test_test_bitcoin_SOURCES = $(GENERATED_TEST_FILES)
@@ -148,16 +209,10 @@ endif
%.json.h: %.json
@$(MKDIR_P) $(@D)
- @echo "namespace json_tests{" > $@
- @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
- @echo "};};" >> $@
- @echo "Generated $@"
-
-%.raw.h: %.raw
- @$(MKDIR_P) $(@D)
- @echo "namespace alert_tests{" > $@
- @echo "static unsigned const char $(*F)[] = {" >> $@
- @$(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' >> $@
- @echo "};};" >> $@
+ @{ \
+ echo "namespace json_tests{" && \
+ echo "static unsigned const char $(*F)[] = {" && \
+ $(HEXDUMP) -v -e '8/1 "0x%02x, "' -e '"\n"' $< | $(SED) -e 's/0x ,//g' && \
+ echo "};};"; \
+ } > "$@.new" && mv -f "$@.new" "$@"
@echo "Generated $@"
diff --git a/src/addrdb.cpp b/src/addrdb.cpp
index ddf41f92de..224d3921cc 100644
--- a/src/addrdb.cpp
+++ b/src/addrdb.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -103,7 +103,7 @@ bool CBanDB::Read(banmap_t& banSet)
if (memcmp(pchMsgTmp, Params().MessageStart(), sizeof(pchMsgTmp)))
return error("%s: Invalid network magic number", __func__);
- // de-serialize address data into one CAddrMan object
+ // de-serialize ban data
ssBanlist >> banSet;
}
catch (const std::exception& e) {
diff --git a/src/addrdb.h b/src/addrdb.h
index 62835a6fb4..ab985b10cb 100644
--- a/src/addrdb.h
+++ b/src/addrdb.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -46,7 +46,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(this->nVersion);
READWRITE(nCreateTime);
READWRITE(nBanUntil);
diff --git a/src/addrman.cpp b/src/addrman.cpp
index 2016523212..662e931d25 100644
--- a/src/addrman.cpp
+++ b/src/addrman.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2012 Pieter Wuille
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/addrman.h b/src/addrman.h
index e9e137c978..6e5f946bf2 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -1,5 +1,5 @@
// Copyright (c) 2012 Pieter Wuille
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -58,7 +58,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(*(CAddress*)this);
READWRITE(source);
READWRITE(nLastSuccess);
@@ -293,7 +293,7 @@ public:
* very little in common.
*/
template<typename Stream>
- void Serialize(Stream &s, int nType, int nVersionDummy) const
+ void Serialize(Stream &s) const
{
LOCK(cs);
@@ -343,7 +343,7 @@ public:
}
template<typename Stream>
- void Unserialize(Stream& s, int nType, int nVersionDummy)
+ void Unserialize(Stream& s)
{
LOCK(cs);
@@ -448,11 +448,6 @@ public:
Check();
}
- unsigned int GetSerializeSize(int nType, int nVersion) const
- {
- return (CSizeComputer(nType, nVersion) << *this).size();
- }
-
void Clear()
{
std::vector<int>().swap(vRandom);
@@ -487,6 +482,7 @@ public:
//! Return the number of (unique) addresses in all tables.
size_t size() const
{
+ LOCK(cs); // TODO: Cache this in an atomic to avoid this overhead
return vRandom.size();
}
@@ -506,13 +502,11 @@ public:
//! Add a single address.
bool Add(const CAddress &addr, const CNetAddr& source, int64_t nTimePenalty = 0)
{
+ LOCK(cs);
bool fRet = false;
- {
- LOCK(cs);
- Check();
- fRet |= Add_(addr, source, nTimePenalty);
- Check();
- }
+ Check();
+ fRet |= Add_(addr, source, nTimePenalty);
+ Check();
if (fRet)
LogPrint("addrman", "Added %s from %s: %i tried, %i new\n", addr.ToStringIPPort(), source.ToString(), nTried, nNew);
return fRet;
@@ -521,14 +515,12 @@ public:
//! Add multiple addresses.
bool Add(const std::vector<CAddress> &vAddr, const CNetAddr& source, int64_t nTimePenalty = 0)
{
+ LOCK(cs);
int nAdd = 0;
- {
- LOCK(cs);
- Check();
- for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++)
- nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0;
- Check();
- }
+ Check();
+ for (std::vector<CAddress>::const_iterator it = vAddr.begin(); it != vAddr.end(); it++)
+ nAdd += Add_(*it, source, nTimePenalty) ? 1 : 0;
+ Check();
if (nAdd)
LogPrint("addrman", "Added %i addresses from %s: %i tried, %i new\n", nAdd, source.ToString(), nTried, nNew);
return nAdd > 0;
@@ -537,23 +529,19 @@ public:
//! Mark an entry as accessible.
void Good(const CService &addr, int64_t nTime = GetAdjustedTime())
{
- {
- LOCK(cs);
- Check();
- Good_(addr, nTime);
- Check();
- }
+ LOCK(cs);
+ Check();
+ Good_(addr, nTime);
+ Check();
}
//! Mark an entry as connection attempted to.
void Attempt(const CService &addr, bool fCountFailure, int64_t nTime = GetAdjustedTime())
{
- {
- LOCK(cs);
- Check();
- Attempt_(addr, fCountFailure, nTime);
- Check();
- }
+ LOCK(cs);
+ Check();
+ Attempt_(addr, fCountFailure, nTime);
+ Check();
}
/**
@@ -587,12 +575,10 @@ public:
//! Mark an entry as currently-connected-to.
void Connected(const CService &addr, int64_t nTime = GetAdjustedTime())
{
- {
- LOCK(cs);
- Check();
- Connected_(addr, nTime);
- Check();
- }
+ LOCK(cs);
+ Check();
+ Connected_(addr, nTime);
+ Check();
}
void SetServices(const CService &addr, ServiceFlags nServices)
diff --git a/src/amount.cpp b/src/amount.cpp
index 7b8618de33..a5f6bc3cd9 100644
--- a/src/amount.cpp
+++ b/src/amount.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/amount.h b/src/amount.h
index 5e52f37f23..93060f7193 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -64,7 +64,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(nSatoshisPerK);
}
};
diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp
index 2e61363576..f9f2d19e68 100644
--- a/src/arith_uint256.cpp
+++ b/src/arith_uint256.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/arith_uint256.h b/src/arith_uint256.h
index ba3d620158..0f6b3d4fba 100644
--- a/src/arith_uint256.h
+++ b/src/arith_uint256.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/base58.cpp b/src/base58.cpp
index d1d60a6f1d..e2f475bb7f 100644
--- a/src/base58.cpp
+++ b/src/base58.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -25,12 +25,14 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
psz++;
// Skip and count leading '1's.
int zeroes = 0;
+ int length = 0;
while (*psz == '1') {
zeroes++;
psz++;
}
// Allocate enough space in big-endian base256 representation.
- std::vector<unsigned char> b256(strlen(psz) * 733 / 1000 + 1); // log(58) / log(256), rounded up.
+ int size = strlen(psz) * 733 /1000 + 1; // log(58) / log(256), rounded up.
+ std::vector<unsigned char> b256(size);
// Process the characters.
while (*psz && !isspace(*psz)) {
// Decode base58 character
@@ -39,12 +41,14 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
return false;
// Apply "b256 = b256 * 58 + ch".
int carry = ch - pszBase58;
- for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); it != b256.rend(); it++) {
+ int i = 0;
+ for (std::vector<unsigned char>::reverse_iterator it = b256.rbegin(); (carry != 0 || i < length) && (it != b256.rend()); ++it, ++i) {
carry += 58 * (*it);
*it = carry % 256;
carry /= 256;
}
assert(carry == 0);
+ length = i;
psz++;
}
// Skip trailing spaces.
@@ -53,7 +57,7 @@ bool DecodeBase58(const char* psz, std::vector<unsigned char>& vch)
if (*psz != 0)
return false;
// Skip leading zeroes in b256.
- std::vector<unsigned char>::iterator it = b256.begin();
+ std::vector<unsigned char>::iterator it = b256.begin() + (size - length);
while (it != b256.end() && *it == 0)
it++;
// Copy result into output vector.
diff --git a/src/bench/Examples.cpp b/src/bench/Examples.cpp
index b6b020a971..314947d48c 100644
--- a/src/bench/Examples.cpp
+++ b/src/bench/Examples.cpp
@@ -1,9 +1,9 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
-#include "main.h"
+#include "validation.h"
#include "utiltime.h"
// Sanity test: this should loop ten times, and
diff --git a/src/bench/base58.cpp b/src/bench/base58.cpp
index 1279c3e7df..3319c179bf 100644
--- a/src/bench/base58.cpp
+++ b/src/bench/base58.cpp
@@ -1,10 +1,10 @@
-// Copyright (c) 2016 the Bitcoin Core developers
+// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
-#include "main.h"
+#include "validation.h"
#include "base58.h"
#include <vector>
diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp
index 227546a7a7..1bd9d06b80 100644
--- a/src/bench/bench.cpp
+++ b/src/bench/bench.cpp
@@ -1,16 +1,15 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
+#include "perf.h"
#include <iostream>
#include <iomanip>
#include <sys/time.h>
-using namespace benchmark;
-
-std::map<std::string, BenchFunction> BenchRunner::benchmarks;
+std::map<std::string, benchmark::BenchFunction> benchmark::BenchRunner::benchmarks;
static double gettimedouble(void) {
struct timeval tv;
@@ -18,34 +17,39 @@ static double gettimedouble(void) {
return tv.tv_usec * 0.000001 + tv.tv_sec;
}
-BenchRunner::BenchRunner(std::string name, BenchFunction func)
+benchmark::BenchRunner::BenchRunner(std::string name, benchmark::BenchFunction func)
{
benchmarks.insert(std::make_pair(name, func));
}
void
-BenchRunner::RunAll(double elapsedTimeForOne)
+benchmark::BenchRunner::RunAll(double elapsedTimeForOne)
{
- std::cout << "#Benchmark" << "," << "count" << "," << "min" << "," << "max" << "," << "average" << "\n";
+ perf_init();
+ std::cout << "#Benchmark" << "," << "count" << "," << "min" << "," << "max" << "," << "average" << ","
+ << "min_cycles" << "," << "max_cycles" << "," << "average_cycles" << "\n";
- for (std::map<std::string,BenchFunction>::iterator it = benchmarks.begin();
+ for (std::map<std::string,benchmark::BenchFunction>::iterator it = benchmarks.begin();
it != benchmarks.end(); ++it) {
State state(it->first, elapsedTimeForOne);
- BenchFunction& func = it->second;
+ benchmark::BenchFunction& func = it->second;
func(state);
}
+ perf_fini();
}
-bool State::KeepRunning()
+bool benchmark::State::KeepRunning()
{
if (count & countMask) {
++count;
return true;
}
double now;
+ uint64_t nowCycles;
if (count == 0) {
lastTime = beginTime = now = gettimedouble();
+ lastCycles = beginCycles = nowCycles = perf_cpucycles();
}
else {
now = gettimedouble();
@@ -53,6 +57,13 @@ bool State::KeepRunning()
double elapsedOne = elapsed * countMaskInv;
if (elapsedOne < minTime) minTime = elapsedOne;
if (elapsedOne > maxTime) maxTime = elapsedOne;
+
+ // We only use relative values, so don't have to handle 64-bit wrap-around specially
+ nowCycles = perf_cpucycles();
+ uint64_t elapsedOneCycles = (nowCycles - lastCycles) * countMaskInv;
+ if (elapsedOneCycles < minCycles) minCycles = elapsedOneCycles;
+ if (elapsedOneCycles > maxCycles) maxCycles = elapsedOneCycles;
+
if (elapsed*128 < maxElapsed) {
// If the execution was much too fast (1/128th of maxElapsed), increase the count mask by 8x and restart timing.
// The restart avoids including the overhead of this code in the measurement.
@@ -61,14 +72,20 @@ bool State::KeepRunning()
count = 0;
minTime = std::numeric_limits<double>::max();
maxTime = std::numeric_limits<double>::min();
+ minCycles = std::numeric_limits<uint64_t>::max();
+ maxCycles = std::numeric_limits<uint64_t>::min();
return true;
}
if (elapsed*16 < maxElapsed) {
- countMask = ((countMask<<1)|1) & ((1LL<<60)-1);
- countMaskInv = 1./(countMask+1);
+ uint64_t newCountMask = ((countMask<<1)|1) & ((1LL<<60)-1);
+ if ((count & newCountMask)==0) {
+ countMask = newCountMask;
+ countMaskInv = 1./(countMask+1);
+ }
}
}
lastTime = now;
+ lastCycles = nowCycles;
++count;
if (now - beginTime < maxElapsed) return true; // Keep going
@@ -77,7 +94,9 @@ bool State::KeepRunning()
// Output results
double average = (now-beginTime)/count;
- std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << "\n";
+ int64_t averageCycles = (nowCycles-beginCycles)/count;
+ std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << ","
+ << minCycles << "," << maxCycles << "," << averageCycles << "\n";
return false;
}
diff --git a/src/bench/bench.h b/src/bench/bench.h
index f13b145aaf..80dad6a8ef 100644
--- a/src/bench/bench.h
+++ b/src/bench/bench.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -41,12 +41,18 @@ namespace benchmark {
double maxElapsed;
double beginTime;
double lastTime, minTime, maxTime, countMaskInv;
- int64_t count;
- int64_t countMask;
+ uint64_t count;
+ uint64_t countMask;
+ uint64_t beginCycles;
+ uint64_t lastCycles;
+ uint64_t minCycles;
+ uint64_t maxCycles;
public:
State(std::string _name, double _maxElapsed) : name(_name), maxElapsed(_maxElapsed), count(0) {
minTime = std::numeric_limits<double>::max();
maxTime = std::numeric_limits<double>::min();
+ minCycles = std::numeric_limits<uint64_t>::max();
+ maxCycles = std::numeric_limits<uint64_t>::min();
countMask = 1;
countMaskInv = 1./(countMask + 1);
}
diff --git a/src/bench/bench_bitcoin.cpp b/src/bench/bench_bitcoin.cpp
index db1402216d..61a0b31aed 100644
--- a/src/bench/bench_bitcoin.cpp
+++ b/src/bench/bench_bitcoin.cpp
@@ -1,11 +1,11 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bench.h"
#include "key.h"
-#include "main.h"
+#include "validation.h"
#include "util.h"
int
diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp
new file mode 100644
index 0000000000..230e4ca773
--- /dev/null
+++ b/src/bench/checkblock.cpp
@@ -0,0 +1,56 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "bench.h"
+
+#include "chainparams.h"
+#include "validation.h"
+#include "streams.h"
+#include "consensus/validation.h"
+
+namespace block_bench {
+#include "bench/data/block413567.raw.h"
+}
+
+// These are the two major time-sinks which happen after we have fully received
+// a block off the wire, but before we can relay the block on to peers using
+// compact block relay.
+
+static void DeserializeBlockTest(benchmark::State& state)
+{
+ CDataStream stream((const char*)block_bench::block413567,
+ (const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
+ SER_NETWORK, PROTOCOL_VERSION);
+ char a;
+ stream.write(&a, 1); // Prevent compaction
+
+ while (state.KeepRunning()) {
+ CBlock block;
+ stream >> block;
+ assert(stream.Rewind(sizeof(block_bench::block413567)));
+ }
+}
+
+static void DeserializeAndCheckBlockTest(benchmark::State& state)
+{
+ CDataStream stream((const char*)block_bench::block413567,
+ (const char*)&block_bench::block413567[sizeof(block_bench::block413567)],
+ SER_NETWORK, PROTOCOL_VERSION);
+ char a;
+ stream.write(&a, 1); // Prevent compaction
+
+ Consensus::Params params = Params(CBaseChainParams::MAIN).GetConsensus();
+
+ while (state.KeepRunning()) {
+ CBlock block; // Note that CBlock caches its checked state, so we need to recreate it here
+ stream >> block;
+ assert(stream.Rewind(sizeof(block_bench::block413567)));
+
+ CValidationState validationState;
+ assert(CheckBlock(block, validationState, params));
+ }
+}
+
+BENCHMARK(DeserializeBlockTest);
+BENCHMARK(DeserializeAndCheckBlockTest);
diff --git a/src/bench/coin_selection.cpp b/src/bench/coin_selection.cpp
index 7091ee3e11..29fbd34631 100644
--- a/src/bench/coin_selection.cpp
+++ b/src/bench/coin_selection.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,9 +8,7 @@
#include <boost/foreach.hpp>
#include <set>
-using namespace std;
-
-static void addCoin(const CAmount& nValue, const CWallet& wallet, vector<COutput>& vCoins)
+static void addCoin(const CAmount& nValue, const CWallet& wallet, std::vector<COutput>& vCoins)
{
int nInput = 0;
@@ -19,7 +17,7 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, vector<COutput
tx.nLockTime = nextLockTime++; // so all transactions get different hashes
tx.vout.resize(nInput + 1);
tx.vout[nInput].nValue = nValue;
- CWalletTx* wtx = new CWalletTx(&wallet, tx);
+ CWalletTx* wtx = new CWalletTx(&wallet, MakeTransactionRef(std::move(tx)));
int nAge = 6 * 24;
COutput output(wtx, nInput, nAge, true, true);
@@ -36,7 +34,7 @@ static void addCoin(const CAmount& nValue, const CWallet& wallet, vector<COutput
static void CoinSelection(benchmark::State& state)
{
const CWallet wallet;
- vector<COutput> vCoins;
+ std::vector<COutput> vCoins;
LOCK(wallet.cs_wallet);
while (state.KeepRunning()) {
@@ -50,9 +48,9 @@ static void CoinSelection(benchmark::State& state)
addCoin(1000 * COIN, wallet, vCoins);
addCoin(3 * COIN, wallet, vCoins);
- set<pair<const CWalletTx*, unsigned int> > setCoinsRet;
+ std::set<std::pair<const CWalletTx*, unsigned int> > setCoinsRet;
CAmount nValueRet;
- bool success = wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet);
+ bool success = wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, 0, vCoins, setCoinsRet, nValueRet);
assert(success);
assert(nValueRet == 1003 * COIN);
assert(setCoinsRet.size() == 2);
diff --git a/src/bench/crypto_hash.cpp b/src/bench/crypto_hash.cpp
index 168006154f..737d3572ae 100644
--- a/src/bench/crypto_hash.cpp
+++ b/src/bench/crypto_hash.cpp
@@ -22,7 +22,7 @@ static void RIPEMD160(benchmark::State& state)
uint8_t hash[CRIPEMD160::OUTPUT_SIZE];
std::vector<uint8_t> in(BUFFER_SIZE,0);
while (state.KeepRunning())
- CRIPEMD160().Write(begin_ptr(in), in.size()).Finalize(hash);
+ CRIPEMD160().Write(in.data(), in.size()).Finalize(hash);
}
static void SHA1(benchmark::State& state)
@@ -30,7 +30,7 @@ static void SHA1(benchmark::State& state)
uint8_t hash[CSHA1::OUTPUT_SIZE];
std::vector<uint8_t> in(BUFFER_SIZE,0);
while (state.KeepRunning())
- CSHA1().Write(begin_ptr(in), in.size()).Finalize(hash);
+ CSHA1().Write(in.data(), in.size()).Finalize(hash);
}
static void SHA256(benchmark::State& state)
@@ -38,7 +38,7 @@ static void SHA256(benchmark::State& state)
uint8_t hash[CSHA256::OUTPUT_SIZE];
std::vector<uint8_t> in(BUFFER_SIZE,0);
while (state.KeepRunning())
- CSHA256().Write(begin_ptr(in), in.size()).Finalize(hash);
+ CSHA256().Write(in.data(), in.size()).Finalize(hash);
}
static void SHA256_32b(benchmark::State& state)
@@ -46,7 +46,7 @@ static void SHA256_32b(benchmark::State& state)
std::vector<uint8_t> in(32,0);
while (state.KeepRunning()) {
for (int i = 0; i < 1000000; i++) {
- CSHA256().Write(begin_ptr(in), in.size()).Finalize(&in[0]);
+ CSHA256().Write(in.data(), in.size()).Finalize(&in[0]);
}
}
}
@@ -56,7 +56,7 @@ static void SHA512(benchmark::State& state)
uint8_t hash[CSHA512::OUTPUT_SIZE];
std::vector<uint8_t> in(BUFFER_SIZE,0);
while (state.KeepRunning())
- CSHA512().Write(begin_ptr(in), in.size()).Finalize(hash);
+ CSHA512().Write(in.data(), in.size()).Finalize(hash);
}
static void SipHash_32b(benchmark::State& state)
diff --git a/src/bench/data/block413567.raw b/src/bench/data/block413567.raw
new file mode 100644
index 0000000000..67d2d5d382
--- /dev/null
+++ b/src/bench/data/block413567.raw
Binary files differ
diff --git a/src/bench/mempool_eviction.cpp b/src/bench/mempool_eviction.cpp
index 0ae69c75fc..5790d51a82 100644
--- a/src/bench/mempool_eviction.cpp
+++ b/src/bench/mempool_eviction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -18,7 +18,7 @@ static void AddTx(const CTransaction& tx, const CAmount& nFee, CTxMemPool& pool)
unsigned int sigOpCost = 4;
LockPoints lp;
pool.addUnchecked(tx.GetHash(), CTxMemPoolEntry(
- tx, nFee, nTime, dPriority, nHeight, pool.HasNoInputsOf(tx),
+ MakeTransactionRef(tx), nFee, nTime, dPriority, nHeight,
tx.GetValueOut(), spendsCoinbase, sigOpCost, lp));
}
diff --git a/src/bench/perf.cpp b/src/bench/perf.cpp
new file mode 100644
index 0000000000..1f43e5d3ac
--- /dev/null
+++ b/src/bench/perf.cpp
@@ -0,0 +1,53 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "perf.h"
+
+#if defined(__i386__) || defined(__x86_64__)
+
+/* These architectures support quering the cycle counter
+ * from user space, no need for any syscall overhead.
+ */
+void perf_init(void) { }
+void perf_fini(void) { }
+
+#elif defined(__linux__)
+
+#include <unistd.h>
+#include <sys/syscall.h>
+#include <linux/perf_event.h>
+
+static int fd = -1;
+static struct perf_event_attr attr;
+
+void perf_init(void)
+{
+ attr.type = PERF_TYPE_HARDWARE;
+ attr.config = PERF_COUNT_HW_CPU_CYCLES;
+ fd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, 0);
+}
+
+void perf_fini(void)
+{
+ if (fd != -1) {
+ close(fd);
+ }
+}
+
+uint64_t perf_cpucycles(void)
+{
+ uint64_t result = 0;
+ if (fd == -1 || read(fd, &result, sizeof(result)) < (ssize_t)sizeof(result)) {
+ return 0;
+ }
+ return result;
+}
+
+#else /* Unhandled platform */
+
+void perf_init(void) { }
+void perf_fini(void) { }
+uint64_t perf_cpucycles(void) { return 0; }
+
+#endif
diff --git a/src/bench/perf.h b/src/bench/perf.h
new file mode 100644
index 0000000000..681bd0c8a2
--- /dev/null
+++ b/src/bench/perf.h
@@ -0,0 +1,37 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+/** Functions for measurement of CPU cycles */
+#ifndef H_PERF
+#define H_PERF
+
+#include <stdint.h>
+
+#if defined(__i386__)
+
+static inline uint64_t perf_cpucycles(void)
+{
+ uint64_t x;
+ __asm__ volatile (".byte 0x0f, 0x31" : "=A" (x));
+ return x;
+}
+
+#elif defined(__x86_64__)
+
+static inline uint64_t perf_cpucycles(void)
+{
+ uint32_t hi, lo;
+ __asm__ __volatile__ ("rdtsc" : "=a"(lo), "=d"(hi));
+ return ((uint64_t)lo)|(((uint64_t)hi)<<32);
+}
+#else
+
+uint64_t perf_cpucycles(void);
+
+#endif
+
+void perf_init(void);
+void perf_fini(void);
+
+#endif // H_PERF
diff --git a/src/bench/verify_script.cpp b/src/bench/verify_script.cpp
index dc3940cdbd..23bbadc88d 100644
--- a/src/bench/verify_script.cpp
+++ b/src/bench/verify_script.cpp
@@ -36,7 +36,6 @@ static CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, co
txSpend.nLockTime = 0;
txSpend.vin.resize(1);
txSpend.vout.resize(1);
- txSpend.wit.vtxinwit.resize(1);
txSpend.vin[0].prevout.hash = txCredit.GetHash();
txSpend.vin[0].prevout.n = 0;
txSpend.vin[0].scriptSig = scriptSig;
@@ -68,7 +67,7 @@ static void VerifyScriptBench(benchmark::State& state)
CScript witScriptPubkey = CScript() << OP_DUP << OP_HASH160 << ToByteVector(pubkeyHash) << OP_EQUALVERIFY << OP_CHECKSIG;
CTransaction txCredit = BuildCreditingTransaction(scriptPubKey);
CMutableTransaction txSpend = BuildSpendingTransaction(scriptSig, txCredit);
- CScriptWitness& witness = txSpend.wit.vtxinwit[0].scriptWitness;
+ CScriptWitness& witness = txSpend.vin[0].scriptWitness;
witness.stack.emplace_back();
key.Sign(SignatureHash(witScriptPubkey, txSpend, 0, SIGHASH_ALL, txCredit.vout[0].nValue, SIGVERSION_WITNESS_V0), witness.stack.back(), 0);
witness.stack.back().push_back(static_cast<unsigned char>(SIGHASH_ALL));
@@ -80,7 +79,7 @@ static void VerifyScriptBench(benchmark::State& state)
bool success = VerifyScript(
txSpend.vin[0].scriptSig,
txCredit.vout[0].scriptPubKey,
- &txSpend.wit.vtxinwit[0].scriptWitness,
+ &txSpend.vin[0].scriptWitness,
flags,
MutableTransactionSignatureChecker(&txSpend, 0, txCredit.vout[0].nValue),
&err);
@@ -91,10 +90,10 @@ static void VerifyScriptBench(benchmark::State& state)
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << txSpend;
int csuccess = bitcoinconsensus_verify_script_with_amount(
- begin_ptr(txCredit.vout[0].scriptPubKey),
+ txCredit.vout[0].scriptPubKey.data(),
txCredit.vout[0].scriptPubKey.size(),
txCredit.vout[0].nValue,
- (const unsigned char*)&stream[0], stream.size(), 0, flags, nullptr);
+ (const unsigned char*)stream.data(), stream.size(), 0, flags, nullptr);
assert(csuccess == 1);
#endif
}
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 8a2f380e67..1c330cf5ea 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,26 +17,26 @@
#include <boost/filesystem/operations.hpp>
#include <stdio.h>
-#include <event2/event.h>
-#include <event2/http.h>
#include <event2/buffer.h>
#include <event2/keyvalq_struct.h>
+#include "support/events.h"
#include <univalue.h>
-using namespace std;
-
static const char DEFAULT_RPCCONNECT[] = "127.0.0.1";
static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900;
+static const bool DEFAULT_NAMED=false;
+static const int CONTINUE_EXECUTION=-1;
std::string HelpMessageCli()
{
- string strUsage;
+ std::string strUsage;
strUsage += HelpMessageGroup(_("Options:"));
strUsage += HelpMessageOpt("-?", _("This help message"));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), BITCOIN_CONF_FILENAME));
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory"));
AppendParamsHelpMessages(strUsage);
+ strUsage += HelpMessageOpt("-named", strprintf(_("Pass named instead of positional arguments (default: %s)"), DEFAULT_NAMED));
strUsage += HelpMessageOpt("-rpcconnect=<ip>", strprintf(_("Send commands to node running on <ip> (default: %s)"), DEFAULT_RPCCONNECT));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Connect to JSON-RPC on <port> (default: %u or testnet: %u)"), BaseParams(CBaseChainParams::MAIN).RPCPort(), BaseParams(CBaseChainParams::TESTNET).RPCPort()));
strUsage += HelpMessageOpt("-rpcwait", _("Wait for RPC server to start"));
@@ -67,17 +67,22 @@ public:
};
-static bool AppInitRPC(int argc, char* argv[])
+//
+// This function returns either one of EXIT_ codes when it's expected to stop the process or
+// CONTINUE_EXECUTION when it's expected to continue further.
+//
+static int AppInitRPC(int argc, char* argv[])
{
//
// Parameters
//
ParseParameters(argc, argv);
- if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
+ if (argc<2 || IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || IsArgSet("-version")) {
std::string strUsage = strprintf(_("%s RPC client version"), _(PACKAGE_NAME)) + " " + FormatFullVersion() + "\n";
- if (!mapArgs.count("-version")) {
+ if (!IsArgSet("-version")) {
strUsage += "\n" + _("Usage:") + "\n" +
" bitcoin-cli [options] <command> [params] " + strprintf(_("Send command to %s"), _(PACKAGE_NAME)) + "\n" +
+ " bitcoin-cli [options] -named <command> [name=value] ... " + strprintf(_("Send command to %s (with named arguments)"), _(PACKAGE_NAME)) + "\n" +
" bitcoin-cli [options] help " + _("List commands") + "\n" +
" bitcoin-cli [options] help <command> " + _("Get help for a command") + "\n";
@@ -85,31 +90,35 @@ static bool AppInitRPC(int argc, char* argv[])
}
fprintf(stdout, "%s", strUsage.c_str());
- return false;
+ if (argc < 2) {
+ fprintf(stderr, "Error: too few parameters\n");
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
}
if (!boost::filesystem::is_directory(GetDataDir(false))) {
- fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
- return false;
+ fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", GetArg("-datadir", "").c_str());
+ return EXIT_FAILURE;
}
try {
- ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs);
+ ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME));
} catch (const std::exception& e) {
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
- return false;
+ return EXIT_FAILURE;
}
// Check for -testnet or -regtest parameter (BaseParams() calls are only valid after this clause)
try {
SelectBaseParams(ChainNameFromCommandLine());
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
- return false;
+ return EXIT_FAILURE;
}
if (GetBoolArg("-rpcssl", false))
{
fprintf(stderr, "Error: SSL mode for RPC (-rpcssl) is no longer supported.\n");
- return false;
+ return EXIT_FAILURE;
}
- return true;
+ return CONTINUE_EXECUTION;
}
@@ -178,45 +187,41 @@ static void http_error_cb(enum evhttp_request_error err, void *ctx)
}
#endif
-UniValue CallRPC(const string& strMethod, const UniValue& params)
+UniValue CallRPC(const std::string& strMethod, const UniValue& params)
{
std::string host = GetArg("-rpcconnect", DEFAULT_RPCCONNECT);
int port = GetArg("-rpcport", BaseParams().RPCPort());
- // Create event base
- struct event_base *base = event_base_new(); // TODO RAII
- if (!base)
- throw runtime_error("cannot create event_base");
+ // Obtain event base
+ raii_event_base base = obtain_event_base();
// Synchronously look up hostname
- struct evhttp_connection *evcon = evhttp_connection_base_new(base, NULL, host.c_str(), port); // TODO RAII
- if (evcon == NULL)
- throw runtime_error("create connection failed");
- evhttp_connection_set_timeout(evcon, GetArg("-rpcclienttimeout", DEFAULT_HTTP_CLIENT_TIMEOUT));
+ raii_evhttp_connection evcon = obtain_evhttp_connection_base(base.get(), host, port);
+ evhttp_connection_set_timeout(evcon.get(), GetArg("-rpcclienttimeout", DEFAULT_HTTP_CLIENT_TIMEOUT));
HTTPReply response;
- struct evhttp_request *req = evhttp_request_new(http_request_done, (void*)&response); // TODO RAII
+ raii_evhttp_request req = obtain_evhttp_request(http_request_done, (void*)&response);
if (req == NULL)
- throw runtime_error("create http request failed");
+ throw std::runtime_error("create http request failed");
#if LIBEVENT_VERSION_NUMBER >= 0x02010300
- evhttp_request_set_error_cb(req, http_error_cb);
+ evhttp_request_set_error_cb(req.get(), http_error_cb);
#endif
// Get credentials
std::string strRPCUserColonPass;
- if (mapArgs["-rpcpassword"] == "") {
+ if (GetArg("-rpcpassword", "") == "") {
// Try fall back to cookie-based authentication if no password is provided
if (!GetAuthCookie(&strRPCUserColonPass)) {
- throw runtime_error(strprintf(
+ throw std::runtime_error(strprintf(
_("Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (%s)"),
GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string().c_str()));
}
} else {
- strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
+ strRPCUserColonPass = GetArg("-rpcuser", "") + ":" + GetArg("-rpcpassword", "");
}
- struct evkeyvalq *output_headers = evhttp_request_get_output_headers(req);
+ struct evkeyvalq* output_headers = evhttp_request_get_output_headers(req.get());
assert(output_headers);
evhttp_add_header(output_headers, "Host", host.c_str());
evhttp_add_header(output_headers, "Connection", "close");
@@ -224,44 +229,41 @@ UniValue CallRPC(const string& strMethod, const UniValue& params)
// Attach request data
std::string strRequest = JSONRPCRequestObj(strMethod, params, 1).write() + "\n";
- struct evbuffer * output_buffer = evhttp_request_get_output_buffer(req);
+ struct evbuffer* output_buffer = evhttp_request_get_output_buffer(req.get());
assert(output_buffer);
evbuffer_add(output_buffer, strRequest.data(), strRequest.size());
- int r = evhttp_make_request(evcon, req, EVHTTP_REQ_POST, "/");
+ int r = evhttp_make_request(evcon.get(), req.get(), EVHTTP_REQ_POST, "/");
+ req.release(); // ownership moved to evcon in above call
if (r != 0) {
- evhttp_connection_free(evcon);
- event_base_free(base);
throw CConnectionFailed("send http request failed");
}
- event_base_dispatch(base);
- evhttp_connection_free(evcon);
- event_base_free(base);
+ event_base_dispatch(base.get());
if (response.status == 0)
- throw CConnectionFailed(strprintf("couldn't connect to server\n(make sure server is running and you are connecting to the correct RPC port: %d %s)", response.error, http_errorstring(response.error)));
+ throw CConnectionFailed(strprintf("couldn't connect to server: %s (code %d)\n(make sure server is running and you are connecting to the correct RPC port)", http_errorstring(response.error), response.error));
else if (response.status == HTTP_UNAUTHORIZED)
- throw runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
+ throw std::runtime_error("incorrect rpcuser or rpcpassword (authorization failed)");
else if (response.status >= 400 && response.status != HTTP_BAD_REQUEST && response.status != HTTP_NOT_FOUND && response.status != HTTP_INTERNAL_SERVER_ERROR)
- throw runtime_error(strprintf("server returned HTTP error %d", response.status));
+ throw std::runtime_error(strprintf("server returned HTTP error %d", response.status));
else if (response.body.empty())
- throw runtime_error("no response from server");
+ throw std::runtime_error("no response from server");
// Parse reply
UniValue valReply(UniValue::VSTR);
if (!valReply.read(response.body))
- throw runtime_error("couldn't parse reply from server");
+ throw std::runtime_error("couldn't parse reply from server");
const UniValue& reply = valReply.get_obj();
if (reply.empty())
- throw runtime_error("expected reply to have result, error and id properties");
+ throw std::runtime_error("expected reply to have result, error and id properties");
return reply;
}
int CommandLineRPC(int argc, char *argv[])
{
- string strPrint;
+ std::string strPrint;
int nRet = 0;
try {
// Skip switches
@@ -277,9 +279,16 @@ int CommandLineRPC(int argc, char *argv[])
args.push_back(line);
}
if (args.size() < 1)
- throw runtime_error("too few parameters (need at least command)");
+ throw std::runtime_error("too few parameters (need at least command)");
std::string strMethod = args[0];
- UniValue params = RPCConvertValues(strMethod, std::vector<std::string>(args.begin()+1, args.end()));
+ args.erase(args.begin()); // Remove trailing method name from arguments vector
+
+ UniValue params;
+ if(GetBoolArg("-named", DEFAULT_NAMED)) {
+ params = RPCConvertNamedValues(strMethod, args);
+ } else {
+ params = RPCConvertValues(strMethod, args);
+ }
// Execute and handle connection failures with -rpcwait
const bool fWait = GetBoolArg("-rpcwait", false);
@@ -331,7 +340,7 @@ int CommandLineRPC(int argc, char *argv[])
throw;
}
catch (const std::exception& e) {
- strPrint = string("error: ") + e.what();
+ strPrint = std::string("error: ") + e.what();
nRet = EXIT_FAILURE;
}
catch (...) {
@@ -354,8 +363,9 @@ int main(int argc, char* argv[])
}
try {
- if(!AppInitRPC(argc, argv))
- return EXIT_FAILURE;
+ int ret = AppInitRPC(argc, argv);
+ if (ret != CONTINUE_EXECUTION)
+ return ret;
}
catch (const std::exception& e) {
PrintExceptionContinue(&e, "AppInitRPC()");
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index e09afd632e..3c3646523a 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -26,12 +26,15 @@
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>
-using namespace std;
-
static bool fCreateBlank;
-static map<string,UniValue> registers;
-
-static bool AppInitRawTx(int argc, char* argv[])
+static std::map<std::string,UniValue> registers;
+static const int CONTINUE_EXECUTION=-1;
+
+//
+// This function returns either one of EXIT_ codes when it's expected to stop the process or
+// CONTINUE_EXECUTION when it's expected to continue further.
+//
+static int AppInitRawTx(int argc, char* argv[])
{
//
// Parameters
@@ -43,12 +46,12 @@ static bool AppInitRawTx(int argc, char* argv[])
SelectParams(ChainNameFromCommandLine());
} catch (const std::exception& e) {
fprintf(stderr, "Error: %s\n", e.what());
- return false;
+ return EXIT_FAILURE;
}
fCreateBlank = GetBoolArg("-create", false);
- if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
+ if (argc<2 || IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help"))
{
// First part of help message is specific to this utility
std::string strUsage = strprintf(_("%s bitcoin-tx utility version"), _(PACKAGE_NAME)) + " " + FormatFullVersion() + "\n\n" +
@@ -75,8 +78,16 @@ static bool AppInitRawTx(int argc, char* argv[])
strUsage += HelpMessageOpt("locktime=N", _("Set TX lock time to N"));
strUsage += HelpMessageOpt("nversion=N", _("Set TX version to N"));
strUsage += HelpMessageOpt("outaddr=VALUE:ADDRESS", _("Add address-based output to TX"));
+ strUsage += HelpMessageOpt("outpubkey=VALUE:PUBKEY[:FLAGS]", _("Add pay-to-pubkey output to TX") + ". " +
+ _("Optionally add the \"W\" flag to produce a pay-to-witness-pubkey-hash output") + ". " +
+ _("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
strUsage += HelpMessageOpt("outdata=[VALUE:]DATA", _("Add data-based output to TX"));
- strUsage += HelpMessageOpt("outscript=VALUE:SCRIPT", _("Add raw script output to TX"));
+ strUsage += HelpMessageOpt("outscript=VALUE:SCRIPT[:FLAGS]", _("Add raw script output to TX") + ". " +
+ _("Optionally add the \"W\" flag to produce a pay-to-witness-script-hash output") + ". " +
+ _("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
+ strUsage += HelpMessageOpt("outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]", _("Add Pay To n-of-m Multi-sig output to TX. n = REQUIRED, m = PUBKEYS") + ". " +
+ _("Optionally add the \"W\" flag to produce a pay-to-witness-script-hash output") + ". " +
+ _("Optionally add the \"S\" flag to wrap the output in a pay-to-script-hash."));
strUsage += HelpMessageOpt("sign=SIGHASH-FLAGS", _("Add zero or more signatures to transaction") + ". " +
_("This command requires JSON registers:") +
_("prevtxs=JSON object") + ", " +
@@ -89,57 +100,61 @@ static bool AppInitRawTx(int argc, char* argv[])
strUsage += HelpMessageOpt("set=NAME:JSON-STRING", _("Set register NAME to given JSON-STRING"));
fprintf(stdout, "%s", strUsage.c_str());
- return false;
+ if (argc < 2) {
+ fprintf(stderr, "Error: too few parameters\n");
+ return EXIT_FAILURE;
+ }
+ return EXIT_SUCCESS;
}
- return true;
+ return CONTINUE_EXECUTION;
}
-static void RegisterSetJson(const string& key, const string& rawJson)
+static void RegisterSetJson(const std::string& key, const std::string& rawJson)
{
UniValue val;
if (!val.read(rawJson)) {
- string strErr = "Cannot parse JSON for key " + key;
- throw runtime_error(strErr);
+ std::string strErr = "Cannot parse JSON for key " + key;
+ throw std::runtime_error(strErr);
}
registers[key] = val;
}
-static void RegisterSet(const string& strInput)
+static void RegisterSet(const std::string& strInput)
{
// separate NAME:VALUE in string
size_t pos = strInput.find(':');
- if ((pos == string::npos) ||
+ if ((pos == std::string::npos) ||
(pos == 0) ||
(pos == (strInput.size() - 1)))
- throw runtime_error("Register input requires NAME:VALUE");
+ throw std::runtime_error("Register input requires NAME:VALUE");
- string key = strInput.substr(0, pos);
- string valStr = strInput.substr(pos + 1, string::npos);
+ std::string key = strInput.substr(0, pos);
+ std::string valStr = strInput.substr(pos + 1, std::string::npos);
RegisterSetJson(key, valStr);
}
-static void RegisterLoad(const string& strInput)
+static void RegisterLoad(const std::string& strInput)
{
// separate NAME:FILENAME in string
size_t pos = strInput.find(':');
- if ((pos == string::npos) ||
+ if ((pos == std::string::npos) ||
(pos == 0) ||
(pos == (strInput.size() - 1)))
- throw runtime_error("Register load requires NAME:FILENAME");
+ throw std::runtime_error("Register load requires NAME:FILENAME");
- string key = strInput.substr(0, pos);
- string filename = strInput.substr(pos + 1, string::npos);
+ std::string key = strInput.substr(0, pos);
+ std::string filename = strInput.substr(pos + 1, std::string::npos);
FILE *f = fopen(filename.c_str(), "r");
if (!f) {
- string strErr = "Cannot open file " + filename;
- throw runtime_error(strErr);
+ std::string strErr = "Cannot open file " + filename;
+ throw std::runtime_error(strErr);
}
// load file chunks into one big buffer
- string valStr;
+ std::string valStr;
while ((!feof(f)) && (!ferror(f))) {
char buf[4096];
int bread = fread(buf, 1, sizeof(buf), f);
@@ -153,55 +168,63 @@ static void RegisterLoad(const string& strInput)
fclose(f);
if (error) {
- string strErr = "Error reading file " + filename;
- throw runtime_error(strErr);
+ std::string strErr = "Error reading file " + filename;
+ throw std::runtime_error(strErr);
}
// evaluate as JSON buffer register
RegisterSetJson(key, valStr);
}
-static void MutateTxVersion(CMutableTransaction& tx, const string& cmdVal)
+static CAmount ExtractAndValidateValue(const std::string& strValue)
+{
+ CAmount value;
+ if (!ParseMoney(strValue, value))
+ throw std::runtime_error("invalid TX output value");
+ return value;
+}
+
+static void MutateTxVersion(CMutableTransaction& tx, const std::string& cmdVal)
{
int64_t newVersion = atoi64(cmdVal);
if (newVersion < 1 || newVersion > CTransaction::MAX_STANDARD_VERSION)
- throw runtime_error("Invalid TX version requested");
+ throw std::runtime_error("Invalid TX version requested");
tx.nVersion = (int) newVersion;
}
-static void MutateTxLocktime(CMutableTransaction& tx, const string& cmdVal)
+static void MutateTxLocktime(CMutableTransaction& tx, const std::string& cmdVal)
{
int64_t newLocktime = atoi64(cmdVal);
if (newLocktime < 0LL || newLocktime > 0xffffffffLL)
- throw runtime_error("Invalid TX locktime requested");
+ throw std::runtime_error("Invalid TX locktime requested");
tx.nLockTime = (unsigned int) newLocktime;
}
-static void MutateTxAddInput(CMutableTransaction& tx, const string& strInput)
+static void MutateTxAddInput(CMutableTransaction& tx, const std::string& strInput)
{
std::vector<std::string> vStrInputParts;
boost::split(vStrInputParts, strInput, boost::is_any_of(":"));
// separate TXID:VOUT in string
if (vStrInputParts.size()<2)
- throw runtime_error("TX input missing separator");
+ throw std::runtime_error("TX input missing separator");
// extract and validate TXID
- string strTxid = vStrInputParts[0];
+ std::string strTxid = vStrInputParts[0];
if ((strTxid.size() != 64) || !IsHex(strTxid))
- throw runtime_error("invalid TX input txid");
+ throw std::runtime_error("invalid TX input txid");
uint256 txid(uint256S(strTxid));
static const unsigned int minTxOutSz = 9;
static const unsigned int maxVout = MAX_BLOCK_BASE_SIZE / minTxOutSz;
// extract and validate vout
- string strVout = vStrInputParts[1];
+ std::string strVout = vStrInputParts[1];
int vout = atoi(strVout);
if ((vout < 0) || (vout > (int)maxVout))
- throw runtime_error("invalid TX input vout");
+ throw std::runtime_error("invalid TX input vout");
// extract the optional sequence number
uint32_t nSequenceIn=std::numeric_limits<unsigned int>::max();
@@ -213,27 +236,20 @@ static void MutateTxAddInput(CMutableTransaction& tx, const string& strInput)
tx.vin.push_back(txin);
}
-static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
+static void MutateTxAddOutAddr(CMutableTransaction& tx, const std::string& strInput)
{
- // separate VALUE:ADDRESS in string
- size_t pos = strInput.find(':');
- if ((pos == string::npos) ||
- (pos == 0) ||
- (pos == (strInput.size() - 1)))
- throw runtime_error("TX output missing separator");
+ // Separate into VALUE:ADDRESS
+ std::vector<std::string> vStrInputParts;
+ boost::split(vStrInputParts, strInput, boost::is_any_of(":"));
- // extract and validate VALUE
- string strValue = strInput.substr(0, pos);
- CAmount value;
- if (!ParseMoney(strValue, value))
- throw runtime_error("invalid TX output value");
+ // Extract and validate VALUE
+ CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
// extract and validate ADDRESS
- string strAddr = strInput.substr(pos + 1, string::npos);
+ std::string strAddr = vStrInputParts[1];
CBitcoinAddress addr(strAddr);
if (!addr.IsValid())
- throw runtime_error("invalid TX output address");
-
+ throw std::runtime_error("invalid TX output address");
// build standard output script via GetScriptForDestination()
CScript scriptPubKey = GetScriptForDestination(addr.Get());
@@ -242,7 +258,115 @@ static void MutateTxAddOutAddr(CMutableTransaction& tx, const string& strInput)
tx.vout.push_back(txout);
}
-static void MutateTxAddOutData(CMutableTransaction& tx, const string& strInput)
+static void MutateTxAddOutPubKey(CMutableTransaction& tx, const std::string& strInput)
+{
+ // Separate into VALUE:PUBKEY[:FLAGS]
+ std::vector<std::string> vStrInputParts;
+ boost::split(vStrInputParts, strInput, boost::is_any_of(":"));
+
+ // Extract and validate VALUE
+ CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
+
+ // Extract and validate PUBKEY
+ CPubKey pubkey(ParseHex(vStrInputParts[1]));
+ if (!pubkey.IsFullyValid())
+ throw std::runtime_error("invalid TX output pubkey");
+ CScript scriptPubKey = GetScriptForRawPubKey(pubkey);
+ CBitcoinAddress addr(scriptPubKey);
+
+ // Extract and validate FLAGS
+ bool bSegWit = false;
+ bool bScriptHash = false;
+ if (vStrInputParts.size() == 3) {
+ std::string flags = vStrInputParts[2];
+ bSegWit = (flags.find("W") != std::string::npos);
+ bScriptHash = (flags.find("S") != std::string::npos);
+ }
+
+ if (bSegWit) {
+ // Call GetScriptForWitness() to build a P2WSH scriptPubKey
+ scriptPubKey = GetScriptForWitness(scriptPubKey);
+ }
+ if (bScriptHash) {
+ // Get the address for the redeem script, then call
+ // GetScriptForDestination() to construct a P2SH scriptPubKey.
+ CBitcoinAddress redeemScriptAddr(scriptPubKey);
+ scriptPubKey = GetScriptForDestination(redeemScriptAddr.Get());
+ }
+
+ // construct TxOut, append to transaction output list
+ CTxOut txout(value, scriptPubKey);
+ tx.vout.push_back(txout);
+}
+
+static void MutateTxAddOutMultiSig(CMutableTransaction& tx, const std::string& strInput)
+{
+ // Separate into VALUE:REQUIRED:NUMKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]
+ std::vector<std::string> vStrInputParts;
+ boost::split(vStrInputParts, strInput, boost::is_any_of(":"));
+
+ // Check that there are enough parameters
+ if (vStrInputParts.size()<3)
+ throw std::runtime_error("Not enough multisig parameters");
+
+ // Extract and validate VALUE
+ CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
+
+ // Extract REQUIRED
+ uint32_t required = stoul(vStrInputParts[1]);
+
+ // Extract NUMKEYS
+ uint32_t numkeys = stoul(vStrInputParts[2]);
+
+ // Validate there are the correct number of pubkeys
+ if (vStrInputParts.size() < numkeys + 3)
+ throw std::runtime_error("incorrect number of multisig pubkeys");
+
+ if (required < 1 || required > 20 || numkeys < 1 || numkeys > 20 || numkeys < required)
+ throw std::runtime_error("multisig parameter mismatch. Required " \
+ + std::to_string(required) + " of " + std::to_string(numkeys) + "signatures.");
+
+ // extract and validate PUBKEYs
+ std::vector<CPubKey> pubkeys;
+ for(int pos = 1; pos <= int(numkeys); pos++) {
+ CPubKey pubkey(ParseHex(vStrInputParts[pos + 2]));
+ if (!pubkey.IsFullyValid())
+ throw std::runtime_error("invalid TX output pubkey");
+ pubkeys.push_back(pubkey);
+ }
+
+ // Extract FLAGS
+ bool bSegWit = false;
+ bool bScriptHash = false;
+ if (vStrInputParts.size() == numkeys + 4) {
+ std::string flags = vStrInputParts.back();
+ bSegWit = (flags.find("W") != std::string::npos);
+ bScriptHash = (flags.find("S") != std::string::npos);
+ }
+ else if (vStrInputParts.size() > numkeys + 4) {
+ // Validate that there were no more parameters passed
+ throw std::runtime_error("Too many parameters");
+ }
+
+ CScript scriptPubKey = GetScriptForMultisig(required, pubkeys);
+
+ if (bSegWit) {
+ // Call GetScriptForWitness() to build a P2WSH scriptPubKey
+ scriptPubKey = GetScriptForWitness(scriptPubKey);
+ }
+ if (bScriptHash) {
+ // Get the address for the redeem script, then call
+ // GetScriptForDestination() to construct a P2SH scriptPubKey.
+ CBitcoinAddress addr(scriptPubKey);
+ scriptPubKey = GetScriptForDestination(addr.Get());
+ }
+
+ // construct TxOut, append to transaction output list
+ CTxOut txout(value, scriptPubKey);
+ tx.vout.push_back(txout);
+}
+
+static void MutateTxAddOutData(CMutableTransaction& tx, const std::string& strInput)
{
CAmount value = 0;
@@ -250,20 +374,18 @@ static void MutateTxAddOutData(CMutableTransaction& tx, const string& strInput)
size_t pos = strInput.find(':');
if (pos==0)
- throw runtime_error("TX output value not specified");
+ throw std::runtime_error("TX output value not specified");
- if (pos != string::npos) {
- // extract and validate VALUE
- string strValue = strInput.substr(0, pos);
- if (!ParseMoney(strValue, value))
- throw runtime_error("invalid TX output value");
+ if (pos != std::string::npos) {
+ // Extract and validate VALUE
+ value = ExtractAndValidateValue(strInput.substr(0, pos));
}
// extract and validate DATA
- string strData = strInput.substr(pos + 1, string::npos);
+ std::string strData = strInput.substr(pos + 1, std::string::npos);
if (!IsHex(strData))
- throw runtime_error("invalid TX output data");
+ throw std::runtime_error("invalid TX output data");
std::vector<unsigned char> data = ParseHex(strData);
@@ -271,49 +393,63 @@ static void MutateTxAddOutData(CMutableTransaction& tx, const string& strInput)
tx.vout.push_back(txout);
}
-static void MutateTxAddOutScript(CMutableTransaction& tx, const string& strInput)
+static void MutateTxAddOutScript(CMutableTransaction& tx, const std::string& strInput)
{
- // separate VALUE:SCRIPT in string
- size_t pos = strInput.find(':');
- if ((pos == string::npos) ||
- (pos == 0))
- throw runtime_error("TX output missing separator");
+ // separate VALUE:SCRIPT[:FLAGS]
+ std::vector<std::string> vStrInputParts;
+ boost::split(vStrInputParts, strInput, boost::is_any_of(":"));
+ if (vStrInputParts.size() < 2)
+ throw std::runtime_error("TX output missing separator");
- // extract and validate VALUE
- string strValue = strInput.substr(0, pos);
- CAmount value;
- if (!ParseMoney(strValue, value))
- throw runtime_error("invalid TX output value");
+ // Extract and validate VALUE
+ CAmount value = ExtractAndValidateValue(vStrInputParts[0]);
// extract and validate script
- string strScript = strInput.substr(pos + 1, string::npos);
- CScript scriptPubKey = ParseScript(strScript); // throws on err
+ std::string strScript = vStrInputParts[1];
+ CScript scriptPubKey = ParseScript(strScript);
+
+ // Extract FLAGS
+ bool bSegWit = false;
+ bool bScriptHash = false;
+ if (vStrInputParts.size() == 3) {
+ std::string flags = vStrInputParts.back();
+ bSegWit = (flags.find("W") != std::string::npos);
+ bScriptHash = (flags.find("S") != std::string::npos);
+ }
+
+ if (bSegWit) {
+ scriptPubKey = GetScriptForWitness(scriptPubKey);
+ }
+ if (bScriptHash) {
+ CBitcoinAddress addr(scriptPubKey);
+ scriptPubKey = GetScriptForDestination(addr.Get());
+ }
// construct TxOut, append to transaction output list
CTxOut txout(value, scriptPubKey);
tx.vout.push_back(txout);
}
-static void MutateTxDelInput(CMutableTransaction& tx, const string& strInIdx)
+static void MutateTxDelInput(CMutableTransaction& tx, const std::string& strInIdx)
{
// parse requested deletion index
int inIdx = atoi(strInIdx);
if (inIdx < 0 || inIdx >= (int)tx.vin.size()) {
- string strErr = "Invalid TX input index '" + strInIdx + "'";
- throw runtime_error(strErr.c_str());
+ std::string strErr = "Invalid TX input index '" + strInIdx + "'";
+ throw std::runtime_error(strErr.c_str());
}
// delete input from transaction
tx.vin.erase(tx.vin.begin() + inIdx);
}
-static void MutateTxDelOutput(CMutableTransaction& tx, const string& strOutIdx)
+static void MutateTxDelOutput(CMutableTransaction& tx, const std::string& strOutIdx)
{
// parse requested deletion index
int outIdx = atoi(strOutIdx);
if (outIdx < 0 || outIdx >= (int)tx.vout.size()) {
- string strErr = "Invalid TX output index '" + strOutIdx + "'";
- throw runtime_error(strErr.c_str());
+ std::string strErr = "Invalid TX output index '" + strOutIdx + "'";
+ throw std::runtime_error(strErr.c_str());
}
// delete output from transaction
@@ -333,7 +469,7 @@ static const struct {
{"SINGLE|ANYONECANPAY", SIGHASH_SINGLE|SIGHASH_ANYONECANPAY},
};
-static bool findSighashFlags(int& flags, const string& flagStr)
+static bool findSighashFlags(int& flags, const std::string& flagStr)
{
flags = 0;
@@ -347,17 +483,17 @@ static bool findSighashFlags(int& flags, const string& flagStr)
return false;
}
-uint256 ParseHashUO(map<string,UniValue>& o, string strKey)
+uint256 ParseHashUO(std::map<std::string,UniValue>& o, std::string strKey)
{
if (!o.count(strKey))
return uint256();
return ParseHashUV(o[strKey], strKey);
}
-vector<unsigned char> ParseHexUO(map<string,UniValue>& o, string strKey)
+std::vector<unsigned char> ParseHexUO(std::map<std::string,UniValue>& o, std::string strKey)
{
if (!o.count(strKey)) {
- vector<unsigned char> emptyVec;
+ std::vector<unsigned char> emptyVec;
return emptyVec;
}
return ParseHexUV(o[strKey], strKey);
@@ -366,24 +502,24 @@ vector<unsigned char> ParseHexUO(map<string,UniValue>& o, string strKey)
static CAmount AmountFromValue(const UniValue& value)
{
if (!value.isNum() && !value.isStr())
- throw runtime_error("Amount is not a number or string");
+ throw std::runtime_error("Amount is not a number or string");
CAmount amount;
if (!ParseFixedPoint(value.getValStr(), 8, &amount))
- throw runtime_error("Invalid amount");
+ throw std::runtime_error("Invalid amount");
if (!MoneyRange(amount))
- throw runtime_error("Amount out of range");
+ throw std::runtime_error("Amount out of range");
return amount;
}
-static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
+static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)
{
int nHashType = SIGHASH_ALL;
if (flagStr.size() > 0)
if (!findSighashFlags(nHashType, flagStr))
- throw runtime_error("unknown sighash flag/sign option");
+ throw std::runtime_error("unknown sighash flag/sign option");
- vector<CTransaction> txVariants;
+ std::vector<CTransaction> txVariants;
txVariants.push_back(tx);
// mergedTx will end up with all the signatures; it
@@ -394,17 +530,17 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
CCoinsViewCache view(&viewDummy);
if (!registers.count("privatekeys"))
- throw runtime_error("privatekeys register variable must be set.");
+ throw std::runtime_error("privatekeys register variable must be set.");
CBasicKeyStore tempKeystore;
UniValue keysObj = registers["privatekeys"];
for (unsigned int kidx = 0; kidx < keysObj.size(); kidx++) {
if (!keysObj[kidx].isStr())
- throw runtime_error("privatekey not a string");
+ throw std::runtime_error("privatekey not a std::string");
CBitcoinSecret vchSecret;
bool fGood = vchSecret.SetString(keysObj[kidx].getValStr());
if (!fGood)
- throw runtime_error("privatekey not valid");
+ throw std::runtime_error("privatekey not valid");
CKey key = vchSecret.GetKey();
tempKeystore.AddKey(key);
@@ -412,34 +548,34 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
// Add previous txouts given in the RPC call:
if (!registers.count("prevtxs"))
- throw runtime_error("prevtxs register variable must be set.");
+ throw std::runtime_error("prevtxs register variable must be set.");
UniValue prevtxsObj = registers["prevtxs"];
{
for (unsigned int previdx = 0; previdx < prevtxsObj.size(); previdx++) {
UniValue prevOut = prevtxsObj[previdx];
if (!prevOut.isObject())
- throw runtime_error("expected prevtxs internal object");
+ throw std::runtime_error("expected prevtxs internal object");
- map<string,UniValue::VType> types = boost::assign::map_list_of("txid", UniValue::VSTR)("vout",UniValue::VNUM)("scriptPubKey",UniValue::VSTR);
+ std::map<std::string,UniValue::VType> types = boost::assign::map_list_of("txid", UniValue::VSTR)("vout",UniValue::VNUM)("scriptPubKey",UniValue::VSTR);
if (!prevOut.checkObject(types))
- throw runtime_error("prevtxs internal object typecheck fail");
+ throw std::runtime_error("prevtxs internal object typecheck fail");
uint256 txid = ParseHashUV(prevOut["txid"], "txid");
int nOut = atoi(prevOut["vout"].getValStr());
if (nOut < 0)
- throw runtime_error("vout must be positive");
+ throw std::runtime_error("vout must be positive");
- vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
+ std::vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
CScript scriptPubKey(pkData.begin(), pkData.end());
{
CCoinsModifier coins = view.ModifyCoins(txid);
if (coins->IsAvailable(nOut) && coins->vout[nOut].scriptPubKey != scriptPubKey) {
- string err("Previous output scriptPubKey mismatch:\n");
+ std::string err("Previous output scriptPubKey mismatch:\n");
err = err + ScriptToAsmStr(coins->vout[nOut].scriptPubKey) + "\nvs:\n"+
ScriptToAsmStr(scriptPubKey);
- throw runtime_error(err);
+ throw std::runtime_error(err);
}
if ((unsigned int)nOut >= coins->vout.size())
coins->vout.resize(nOut+1);
@@ -455,7 +591,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
if ((scriptPubKey.IsPayToScriptHash() || scriptPubKey.IsPayToWitnessScriptHash()) &&
prevOut.exists("redeemScript")) {
UniValue v = prevOut["redeemScript"];
- vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
+ std::vector<unsigned char> rsData(ParseHexUV(v, "redeemScript"));
CScript redeemScript(rsData.begin(), rsData.end());
tempKeystore.AddCScript(redeemScript);
}
@@ -487,7 +623,7 @@ static void MutateTxSign(CMutableTransaction& tx, const string& flagStr)
sigdata = CombineSignatures(prevPubKey, MutableTransactionSignatureChecker(&mergedTx, i, amount), sigdata, DataFromTransaction(txv, i));
UpdateTransaction(mergedTx, i, sigdata);
- if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx.wit.vtxinwit.size() > i ? &mergedTx.wit.vtxinwit[i].scriptWitness : NULL, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i, amount)))
+ if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&mergedTx, i, amount)))
fComplete = false;
}
@@ -512,8 +648,8 @@ public:
}
};
-static void MutateTx(CMutableTransaction& tx, const string& command,
- const string& commandVal)
+static void MutateTx(CMutableTransaction& tx, const std::string& command,
+ const std::string& commandVal)
{
std::unique_ptr<Secp256k1Init> ecc;
@@ -531,10 +667,14 @@ static void MutateTx(CMutableTransaction& tx, const string& command,
MutateTxDelOutput(tx, commandVal);
else if (command == "outaddr")
MutateTxAddOutAddr(tx, commandVal);
- else if (command == "outdata")
- MutateTxAddOutData(tx, commandVal);
+ else if (command == "outpubkey")
+ MutateTxAddOutPubKey(tx, commandVal);
+ else if (command == "outmultisig")
+ MutateTxAddOutMultiSig(tx, commandVal);
else if (command == "outscript")
MutateTxAddOutScript(tx, commandVal);
+ else if (command == "outdata")
+ MutateTxAddOutData(tx, commandVal);
else if (command == "sign") {
if (!ecc) { ecc.reset(new Secp256k1Init()); }
@@ -548,7 +688,7 @@ static void MutateTx(CMutableTransaction& tx, const string& command,
RegisterSet(commandVal);
else
- throw runtime_error("unknown command");
+ throw std::runtime_error("unknown command");
}
static void OutputTxJSON(const CTransaction& tx)
@@ -556,20 +696,20 @@ static void OutputTxJSON(const CTransaction& tx)
UniValue entry(UniValue::VOBJ);
TxToUniv(tx, uint256(), entry);
- string jsonOutput = entry.write(4);
+ std::string jsonOutput = entry.write(4);
fprintf(stdout, "%s\n", jsonOutput.c_str());
}
static void OutputTxHash(const CTransaction& tx)
{
- string strHexHash = tx.GetHash().GetHex(); // the hex-encoded transaction hash (aka the transaction id)
+ std::string strHexHash = tx.GetHash().GetHex(); // the hex-encoded transaction hash (aka the transaction id)
fprintf(stdout, "%s\n", strHexHash.c_str());
}
static void OutputTxHex(const CTransaction& tx)
{
- string strHex = EncodeHexTx(tx);
+ std::string strHex = EncodeHexTx(tx);
fprintf(stdout, "%s\n", strHex.c_str());
}
@@ -584,10 +724,10 @@ static void OutputTx(const CTransaction& tx)
OutputTxHex(tx);
}
-static string readStdin()
+static std::string readStdin()
{
char buf[4096];
- string ret;
+ std::string ret;
while (!feof(stdin)) {
size_t bread = fread(buf, 1, sizeof(buf), stdin);
@@ -597,7 +737,7 @@ static string readStdin()
}
if (ferror(stdin))
- throw runtime_error("error reading stdin");
+ throw std::runtime_error("error reading stdin");
boost::algorithm::trim_right(ret);
@@ -606,7 +746,7 @@ static string readStdin()
static int CommandLineRawTx(int argc, char* argv[])
{
- string strPrint;
+ std::string strPrint;
int nRet = 0;
try {
// Skip switches; Permit common stdin convention "-"
@@ -616,33 +756,31 @@ static int CommandLineRawTx(int argc, char* argv[])
argv++;
}
- CTransaction txDecodeTmp;
+ CMutableTransaction tx;
int startArg;
if (!fCreateBlank) {
// require at least one param
if (argc < 2)
- throw runtime_error("too few parameters");
+ throw std::runtime_error("too few parameters");
// param: hex-encoded bitcoin transaction
- string strHexTx(argv[1]);
+ std::string strHexTx(argv[1]);
if (strHexTx == "-") // "-" implies standard input
strHexTx = readStdin();
- if (!DecodeHexTx(txDecodeTmp, strHexTx))
- throw runtime_error("invalid transaction encoding");
+ if (!DecodeHexTx(tx, strHexTx, true))
+ throw std::runtime_error("invalid transaction encoding");
startArg = 2;
} else
startArg = 1;
- CMutableTransaction tx(txDecodeTmp);
-
for (int i = startArg; i < argc; i++) {
- string arg = argv[i];
- string key, value;
+ std::string arg = argv[i];
+ std::string key, value;
size_t eqpos = arg.find('=');
- if (eqpos == string::npos)
+ if (eqpos == std::string::npos)
key = arg;
else {
key = arg.substr(0, eqpos);
@@ -659,7 +797,7 @@ static int CommandLineRawTx(int argc, char* argv[])
throw;
}
catch (const std::exception& e) {
- strPrint = string("error: ") + e.what();
+ strPrint = std::string("error: ") + e.what();
nRet = EXIT_FAILURE;
}
catch (...) {
@@ -678,8 +816,9 @@ int main(int argc, char* argv[])
SetupEnvironment();
try {
- if(!AppInitRawTx(argc, argv))
- return EXIT_FAILURE;
+ int ret = AppInitRawTx(argc, argv);
+ if (ret != CONTINUE_EXECUTION)
+ return ret;
}
catch (const std::exception& e) {
PrintExceptionContinue(&e, "AppInitRawTx()");
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 351463c256..9bab3a2026 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -75,11 +75,11 @@ bool AppInit(int argc, char* argv[])
ParseParameters(argc, argv);
// Process help and version before taking care about datadir
- if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
+ if (IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || IsArgSet("-version"))
{
std::string strUsage = strprintf(_("%s Daemon"), _(PACKAGE_NAME)) + " " + _("version") + " " + FormatFullVersion() + "\n";
- if (mapArgs.count("-version"))
+ if (IsArgSet("-version"))
{
strUsage += FormatParagraph(LicenseInfo());
}
@@ -92,19 +92,19 @@ bool AppInit(int argc, char* argv[])
}
fprintf(stdout, "%s", strUsage.c_str());
- return false;
+ return true;
}
try
{
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
- fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", mapArgs["-datadir"].c_str());
+ fprintf(stderr, "Error: Specified data directory \"%s\" does not exist.\n", GetArg("-datadir", "").c_str());
return false;
}
try
{
- ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs);
+ ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME));
} catch (const std::exception& e) {
fprintf(stderr,"Error reading configuration file: %s\n", e.what());
return false;
@@ -126,6 +126,26 @@ bool AppInit(int argc, char* argv[])
if (fCommandLine)
{
fprintf(stderr, "Error: There is no RPC client functionality in bitcoind anymore. Use the bitcoin-cli utility instead.\n");
+ exit(EXIT_FAILURE);
+ }
+ // -server defaults to true for bitcoind but not for the GUI so do this here
+ SoftSetBoolArg("-server", true);
+ // Set this early so that parameter interactions go to console
+ InitLogging();
+ InitParameterInteraction();
+ if (!AppInitBasicSetup())
+ {
+ // InitError will have been called with detailed error, which ends up on console
+ exit(1);
+ }
+ if (!AppInitParameterInteraction())
+ {
+ // InitError will have been called with detailed error, which ends up on console
+ exit(1);
+ }
+ if (!AppInitSanityChecks())
+ {
+ // InitError will have been called with detailed error, which ends up on console
exit(1);
}
if (GetBoolArg("-daemon", false))
@@ -143,12 +163,8 @@ bool AppInit(int argc, char* argv[])
return false;
#endif // HAVE_DECL_DAEMON
}
- SoftSetBoolArg("-server", true);
- // Set this early so that parameter interactions go to console
- InitLogging();
- InitParameterInteraction();
- fRet = AppInit2(threadGroup, scheduler);
+ fRet = AppInitMain(threadGroup, scheduler);
}
catch (const std::exception& e) {
PrintExceptionContinue(&e, "AppInit()");
@@ -177,5 +193,5 @@ int main(int argc, char* argv[])
// Connect bitcoind signal handlers
noui_connect();
- return (AppInit(argc, argv) ? 0 : 1);
+ return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/src/blockencodings.cpp b/src/blockencodings.cpp
index 93d3fa372b..4a311cbba2 100644
--- a/src/blockencodings.cpp
+++ b/src/blockencodings.cpp
@@ -10,7 +10,7 @@
#include "random.h"
#include "streams.h"
#include "txmempool.h"
-#include "main.h"
+#include "validation.h"
#include "util.h"
#include <unordered_map>
@@ -24,7 +24,7 @@ CBlockHeaderAndShortTxIDs::CBlockHeaderAndShortTxIDs(const CBlock& block, bool f
//TODO: Use our mempool prior to block acceptance to predictively fill more than just the coinbase
prefilledtxn[0] = {0, block.vtx[0]};
for (size_t i = 1; i < block.vtx.size(); i++) {
- const CTransaction& tx = block.vtx[i];
+ const CTransaction& tx = *block.vtx[i];
shorttxids[i - 1] = GetShortID(fUseWTXID ? tx.GetWitnessHash() : tx.GetHash());
}
}
@@ -47,7 +47,7 @@ uint64_t CBlockHeaderAndShortTxIDs::GetShortID(const uint256& txhash) const {
-ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& cmpctblock) {
+ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<std::pair<uint256, CTransactionRef>>& extra_txn) {
if (cmpctblock.header.IsNull() || (cmpctblock.shorttxids.empty() && cmpctblock.prefilledtxn.empty()))
return READ_STATUS_INVALID;
if (cmpctblock.shorttxids.size() + cmpctblock.prefilledtxn.size() > MAX_BLOCK_BASE_SIZE / MIN_TRANSACTION_BASE_SIZE)
@@ -59,10 +59,10 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
int32_t lastprefilledindex = -1;
for (size_t i = 0; i < cmpctblock.prefilledtxn.size(); i++) {
- if (cmpctblock.prefilledtxn[i].tx.IsNull())
+ if (cmpctblock.prefilledtxn[i].tx->IsNull())
return READ_STATUS_INVALID;
- lastprefilledindex += cmpctblock.prefilledtxn[i].index + 1; //index is a uint16_t, so cant overflow here
+ lastprefilledindex += cmpctblock.prefilledtxn[i].index + 1; //index is a uint16_t, so can't overflow here
if (lastprefilledindex > std::numeric_limits<uint16_t>::max())
return READ_STATUS_INVALID;
if ((uint32_t)lastprefilledindex > cmpctblock.shorttxids.size() + i) {
@@ -71,7 +71,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
// have neither a prefilled txn or a shorttxid!
return READ_STATUS_INVALID;
}
- txn_available[lastprefilledindex] = std::make_shared<CTransaction>(cmpctblock.prefilledtxn[i].tx);
+ txn_available[lastprefilledindex] = cmpctblock.prefilledtxn[i].tx;
}
prefilled_count = cmpctblock.prefilledtxn.size();
@@ -104,6 +104,7 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
return READ_STATUS_FAILED; // Short ID collision
std::vector<bool> have_txn(txn_available.size());
+ {
LOCK(pool->cs);
const std::vector<std::pair<uint256, CTxMemPool::txiter> >& vTxHashes = pool->vTxHashes;
for (size_t i = 0; i < vTxHashes.size(); i++) {
@@ -130,8 +131,40 @@ ReadStatus PartiallyDownloadedBlock::InitData(const CBlockHeaderAndShortTxIDs& c
if (mempool_count == shorttxids.size())
break;
}
+ }
+
+ for (size_t i = 0; i < extra_txn.size(); i++) {
+ uint64_t shortid = cmpctblock.GetShortID(extra_txn[i].first);
+ std::unordered_map<uint64_t, uint16_t>::iterator idit = shorttxids.find(shortid);
+ if (idit != shorttxids.end()) {
+ if (!have_txn[idit->second]) {
+ txn_available[idit->second] = extra_txn[i].second;
+ have_txn[idit->second] = true;
+ mempool_count++;
+ extra_count++;
+ } else {
+ // If we find two mempool/extra txn that match the short id, just
+ // request it.
+ // This should be rare enough that the extra bandwidth doesn't matter,
+ // but eating a round-trip due to FillBlock failure would be annoying
+ // Note that we dont want duplication between extra_txn and mempool to
+ // trigger this case, so we compare witness hashes first
+ if (txn_available[idit->second] &&
+ txn_available[idit->second]->GetWitnessHash() != extra_txn[i].second->GetWitnessHash()) {
+ txn_available[idit->second].reset();
+ mempool_count--;
+ extra_count--;
+ }
+ }
+ }
+ // Though ideally we'd continue scanning for the two-txn-match-shortid case,
+ // the performance win of an early exit here is too good to pass up and worth
+ // the extra risk.
+ if (mempool_count == shorttxids.size())
+ break;
+ }
- LogPrint("cmpctblock", "Initialized PartiallyDownloadedBlock for block %s using a cmpctblock of size %lu\n", cmpctblock.header.GetHash().ToString(), cmpctblock.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION));
+ LogPrint("cmpctblock", "Initialized PartiallyDownloadedBlock for block %s using a cmpctblock of size %lu\n", cmpctblock.header.GetHash().ToString(), GetSerializeSize(cmpctblock, SER_NETWORK, PROTOCOL_VERSION));
return READ_STATUS_OK;
}
@@ -142,8 +175,9 @@ bool PartiallyDownloadedBlock::IsTxAvailable(size_t index) const {
return txn_available[index] ? true : false;
}
-ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<CTransaction>& vtx_missing) const {
+ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing) {
assert(!header.IsNull());
+ uint256 hash = header.GetHash();
block = header;
block.vtx.resize(txn_available.size());
@@ -154,8 +188,13 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<
return READ_STATUS_INVALID;
block.vtx[i] = vtx_missing[tx_missing_offset++];
} else
- block.vtx[i] = *txn_available[i];
+ block.vtx[i] = std::move(txn_available[i]);
}
+
+ // Make sure we can't call FillBlock again.
+ header.SetNull();
+ txn_available.clear();
+
if (vtx_missing.size() != tx_missing_offset)
return READ_STATUS_INVALID;
@@ -167,13 +206,13 @@ ReadStatus PartiallyDownloadedBlock::FillBlock(CBlock& block, const std::vector<
// check its own merkle root and cache that check.
if (state.CorruptionPossible())
return READ_STATUS_FAILED; // Possible Short ID collision
- return READ_STATUS_INVALID;
+ return READ_STATUS_CHECKBLOCK_FAILED;
}
- LogPrint("cmpctblock", "Successfully reconstructed block %s with %lu txn prefilled, %lu txn from mempool and %lu txn requested\n", header.GetHash().ToString(), prefilled_count, mempool_count, vtx_missing.size());
+ LogPrint("cmpctblock", "Successfully reconstructed block %s with %lu txn prefilled, %lu txn from mempool (incl at least %lu from extra pool) and %lu txn requested\n", hash.ToString(), prefilled_count, mempool_count, extra_count, vtx_missing.size());
if (vtx_missing.size() < 5) {
- for(const CTransaction& tx : vtx_missing)
- LogPrint("cmpctblock", "Reconstructed block %s required tx %s\n", header.GetHash().ToString(), tx.GetHash().ToString());
+ for (const auto& tx : vtx_missing)
+ LogPrint("cmpctblock", "Reconstructed block %s required tx %s\n", hash.ToString(), tx->GetHash().ToString());
}
return READ_STATUS_OK;
diff --git a/src/blockencodings.h b/src/blockencodings.h
index 99b1cb140d..281db9fe01 100644
--- a/src/blockencodings.h
+++ b/src/blockencodings.h
@@ -14,14 +14,14 @@ class CTxMemPool;
// Dumb helper to handle CTransaction compression at serialize-time
struct TransactionCompressor {
private:
- CTransaction& tx;
+ CTransactionRef& tx;
public:
- TransactionCompressor(CTransaction& txIn) : tx(txIn) {}
+ TransactionCompressor(CTransactionRef& txIn) : tx(txIn) {}
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(tx); //TODO: Compress tx encoding
}
};
@@ -35,7 +35,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(blockhash);
uint64_t indexes_size = (uint64_t)indexes.size();
READWRITE(COMPACTSIZE(indexes_size));
@@ -72,7 +72,7 @@ class BlockTransactions {
public:
// A BlockTransactions message
uint256 blockhash;
- std::vector<CTransaction> txn;
+ std::vector<CTransactionRef> txn;
BlockTransactions() {}
BlockTransactions(const BlockTransactionsRequest& req) :
@@ -81,7 +81,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(blockhash);
uint64_t txn_size = (uint64_t)txn.size();
READWRITE(COMPACTSIZE(txn_size));
@@ -104,12 +104,12 @@ struct PrefilledTransaction {
// Used as an offset since last prefilled tx in CBlockHeaderAndShortTxIDs,
// as a proper transaction-in-block-index in PartiallyDownloadedBlock
uint16_t index;
- CTransaction tx;
+ CTransactionRef tx;
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
uint64_t idx = index;
READWRITE(COMPACTSIZE(idx));
if (idx > std::numeric_limits<uint16_t>::max())
@@ -124,6 +124,8 @@ typedef enum ReadStatus_t
READ_STATUS_OK,
READ_STATUS_INVALID, // Invalid object, peer is sending bogus crap
READ_STATUS_FAILED, // Failed to process object
+ READ_STATUS_CHECKBLOCK_FAILED, // Used only by FillBlock to indicate a
+ // failure in CheckBlock.
} ReadStatus;
class CBlockHeaderAndShortTxIDs {
@@ -155,7 +157,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(header);
READWRITE(nonce);
@@ -191,16 +193,17 @@ public:
class PartiallyDownloadedBlock {
protected:
- std::vector<std::shared_ptr<const CTransaction> > txn_available;
- size_t prefilled_count = 0, mempool_count = 0;
+ std::vector<CTransactionRef> txn_available;
+ size_t prefilled_count = 0, mempool_count = 0, extra_count = 0;
CTxMemPool* pool;
public:
CBlockHeader header;
PartiallyDownloadedBlock(CTxMemPool* poolIn) : pool(poolIn) {}
- ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock);
+ // extra_txn is a list of extra transactions to look at, in <witness hash, reference> form
+ ReadStatus InitData(const CBlockHeaderAndShortTxIDs& cmpctblock, const std::vector<std::pair<uint256, CTransactionRef>>& extra_txn);
bool IsTxAvailable(size_t index) const;
- ReadStatus FillBlock(CBlock& block, const std::vector<CTransaction>& vtx_missing) const;
+ ReadStatus FillBlock(CBlock& block, const std::vector<CTransactionRef>& vtx_missing);
};
#endif
diff --git a/src/bloom.cpp b/src/bloom.cpp
index d00befc61c..520e10cdc8 100644
--- a/src/bloom.cpp
+++ b/src/bloom.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/bloom.h b/src/bloom.h
index ad6de625d8..5ad727c330 100644
--- a/src/bloom.h
+++ b/src/bloom.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -73,7 +73,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(vData);
READWRITE(nHashFuncs);
READWRITE(nTweak);
diff --git a/src/chain.cpp b/src/chain.cpp
index 1e611906d1..0f4d422b9f 100644
--- a/src/chain.cpp
+++ b/src/chain.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -61,10 +61,10 @@ const CBlockIndex *CChain::FindFork(const CBlockIndex *pindex) const {
return pindex;
}
-CBlockIndex* CChain::FindLatestBefore(int64_t nTime) const
+CBlockIndex* CChain::FindEarliestAtLeast(int64_t nTime) const
{
std::vector<CBlockIndex*>::const_iterator lower = std::lower_bound(vChain.begin(), vChain.end(), nTime,
- [](CBlockIndex* pBlock, const int64_t& time) -> bool { return pBlock->GetBlockTime() < time; });
+ [](CBlockIndex* pBlock, const int64_t& time) -> bool { return pBlock->GetBlockTimeMax() < time; });
return (lower == vChain.end() ? NULL : *lower);
}
diff --git a/src/chain.h b/src/chain.h
index 46a16a3061..acb29b667b 100644
--- a/src/chain.h
+++ b/src/chain.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -28,7 +28,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(VARINT(nBlocks));
READWRITE(VARINT(nSize));
READWRITE(VARINT(nUndoSize));
@@ -76,7 +76,7 @@ struct CDiskBlockPos
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(VARINT(nFile));
READWRITE(VARINT(nPos));
}
@@ -202,6 +202,9 @@ public:
//! (memory only) Sequential id assigned to distinguish order in which blocks are received.
int32_t nSequenceId;
+ //! (memory only) Maximum nTime in the chain upto and including this block.
+ unsigned int nTimeMax;
+
void SetNull()
{
phashBlock = NULL;
@@ -216,6 +219,7 @@ public:
nChainTx = 0;
nStatus = 0;
nSequenceId = 0;
+ nTimeMax = 0;
nVersion = 0;
hashMerkleRoot = uint256();
@@ -281,6 +285,11 @@ public:
return (int64_t)nTime;
}
+ int64_t GetBlockTimeMax() const
+ {
+ return (int64_t)nTimeMax;
+ }
+
enum { nMedianTimeSpan=11 };
int64_t GetMedianTimePast() const
@@ -357,8 +366,9 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(VARINT(nVersion));
READWRITE(VARINT(nHeight));
@@ -460,8 +470,8 @@ public:
/** Find the last common block between this chain and a block index entry. */
const CBlockIndex *FindFork(const CBlockIndex *pindex) const;
- /** Find the most recent block with timestamp lower than the given. */
- CBlockIndex* FindLatestBefore(int64_t nTime) const;
+ /** Find the earliest block with timestamp equal or greater than the given. */
+ CBlockIndex* FindEarliestAtLeast(int64_t nTime) const;
};
#endif // BITCOIN_CHAIN_H
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index a57ab632e4..d99f800f0a 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -31,7 +31,7 @@ static CBlock CreateGenesisBlock(const char* pszTimestamp, const CScript& genesi
genesis.nBits = nBits;
genesis.nNonce = nNonce;
genesis.nVersion = nVersion;
- genesis.vtx.push_back(txNew);
+ genesis.vtx.push_back(MakeTransactionRef(std::move(txNew)));
genesis.hashPrevBlock.SetNull();
genesis.hashMerkleRoot = BlockMerkleRoot(genesis);
return genesis;
@@ -99,6 +99,9 @@ public:
// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000002cb971dd56d1c583c20f90");
+ // By default assume that the signatures in ancestors of this block are valid.
+ consensus.defaultAssumeValid = uint256S("0x0000000000000000030abc968e1bd635736e880b946085c93152969b9a81a6e2"); //447235
+
/**
* 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
@@ -151,11 +154,15 @@ public:
(225430, uint256S("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
(250000, uint256S("0x000000000000003887df1f29024b06fc2200b55f8af8f35453d7be294df2d214"))
(279000, uint256S("0x0000000000000001ae8c72a0b0c301f67e3afca10e819efa9041e458e9bd7e40"))
- (295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983")),
- 1397080064, // * UNIX timestamp of last checkpoint block
- 36544669, // * total number of transactions between genesis and last checkpoint
+ (295000, uint256S("0x00000000000000004d9b4ef50f0f9d686fd69db2e03af35a100370c64632a983"))
+ };
+
+ chainTxData = ChainTxData{
+ // Data as of block 00000000000000000166d612d5595e2b1cd88d71d695fc580af64d8da8658c23 (height 446482).
+ 1483472411, // * UNIX timestamp of last known number of transactions
+ 184495391, // * total number of transactions between genesis and that timestamp
// (the tx=... number in the SetBestChain debug.log lines)
- 60000.0 // * estimated number of transactions per day after checkpoint
+ 3.2 // * estimated number of transactions per second after that timestamp
};
}
};
@@ -197,6 +204,9 @@ public:
// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x0000000000000000000000000000000000000000000000198b4def2baa9338d6");
+ // By default assume that the signatures in ancestors of this block are valid.
+ consensus.defaultAssumeValid = uint256S("0x000000000871ee6842d3648317ccc8a435eb8cc3c2429aee94faff9ba26b05a0"); //1043841
+
pchMessageStart[0] = 0x0b;
pchMessageStart[1] = 0x11;
pchMessageStart[2] = 0x09;
@@ -234,9 +244,13 @@ public:
checkpointData = (CCheckpointData) {
boost::assign::map_list_of
( 546, uint256S("000000002a936ca763904c3c35fce2f3556c559c0214345d31b1bcebf76acb70")),
- 1337966069,
- 1488,
- 300
+ };
+
+ chainTxData = ChainTxData{
+ // Data as of block 00000000c2872f8f8a8935c8e3c5862be9038c97d4de2cf37ed496991166928a (height 1063660)
+ 1483546230,
+ 12834668,
+ 0.15
};
}
@@ -275,6 +289,9 @@ public:
// The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("0x00");
+ // By default assume that the signatures in ancestors of this block are valid.
+ consensus.defaultAssumeValid = uint256S("0x00");
+
pchMessageStart[0] = 0xfa;
pchMessageStart[1] = 0xbf;
pchMessageStart[2] = 0xb5;
@@ -297,11 +314,15 @@ public:
checkpointData = (CCheckpointData){
boost::assign::map_list_of
- ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206")),
+ ( 0, uint256S("0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206"))
+ };
+
+ chainTxData = ChainTxData{
0,
0,
0
};
+
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
base58Prefixes[SECRET_KEY] = std::vector<unsigned char>(1,239);
diff --git a/src/chainparams.h b/src/chainparams.h
index 633fbd5120..db524e8f8e 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -28,9 +28,12 @@ typedef std::map<int, uint256> MapCheckpoints;
struct CCheckpointData {
MapCheckpoints mapCheckpoints;
- int64_t nTimeLastCheckpoint;
- int64_t nTransactionsLastCheckpoint;
- double fTransactionsPerDay;
+};
+
+struct ChainTxData {
+ int64_t nTime;
+ int64_t nTxCount;
+ double dTxRate;
};
/**
@@ -73,6 +76,7 @@ public:
const std::vector<unsigned char>& Base58Prefix(Base58Type type) const { return base58Prefixes[type]; }
const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; }
const CCheckpointData& Checkpoints() const { return checkpointData; }
+ const ChainTxData& TxData() const { return chainTxData; }
protected:
CChainParams() {}
@@ -90,6 +94,7 @@ protected:
bool fRequireStandard;
bool fMineBlocksOnDemand;
CCheckpointData checkpointData;
+ ChainTxData chainTxData;
};
/**
diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
index d22c188c16..13b5876530 100644
--- a/src/checkpoints.cpp
+++ b/src/checkpoints.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include "chain.h"
#include "chainparams.h"
-#include "main.h"
+#include "validation.h"
#include "uint256.h"
#include <stdint.h>
@@ -15,46 +15,6 @@
namespace Checkpoints {
- /**
- * How many times slower we expect checking transactions after the last
- * checkpoint to be (from checking signatures, which is skipped up to the
- * last checkpoint). This number is a compromise, as it can't be accurate
- * for every system. When reindexing from a fast disk with a slow CPU, it
- * can be up to 20, while when downloading from a slow network with a
- * fast multicore CPU, it won't be much higher than 1.
- */
- static const double SIGCHECK_VERIFICATION_FACTOR = 5.0;
-
- //! Guess how far we are in the verification process at the given block index
- double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex *pindex, bool fSigchecks) {
- if (pindex==NULL)
- return 0.0;
-
- int64_t nNow = time(NULL);
-
- double fSigcheckVerificationFactor = fSigchecks ? SIGCHECK_VERIFICATION_FACTOR : 1.0;
- double fWorkBefore = 0.0; // Amount of work done before pindex
- double fWorkAfter = 0.0; // Amount of work left after pindex (estimated)
- // Work is defined as: 1.0 per transaction before the last checkpoint, and
- // fSigcheckVerificationFactor per transaction after.
-
- if (pindex->nChainTx <= data.nTransactionsLastCheckpoint) {
- double nCheapBefore = pindex->nChainTx;
- double nCheapAfter = data.nTransactionsLastCheckpoint - pindex->nChainTx;
- double nExpensiveAfter = (nNow - data.nTimeLastCheckpoint)/86400.0*data.fTransactionsPerDay;
- fWorkBefore = nCheapBefore;
- fWorkAfter = nCheapAfter + nExpensiveAfter*fSigcheckVerificationFactor;
- } else {
- double nCheapBefore = data.nTransactionsLastCheckpoint;
- double nExpensiveBefore = pindex->nChainTx - data.nTransactionsLastCheckpoint;
- double nExpensiveAfter = (nNow - pindex->GetBlockTime())/86400.0*data.fTransactionsPerDay;
- fWorkBefore = nCheapBefore + nExpensiveBefore*fSigcheckVerificationFactor;
- fWorkAfter = nExpensiveAfter*fSigcheckVerificationFactor;
- }
-
- return fWorkBefore / (fWorkBefore + fWorkAfter);
- }
-
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data)
{
const MapCheckpoints& checkpoints = data.mapCheckpoints;
diff --git a/src/checkpoints.h b/src/checkpoints.h
index 04346f35ff..7449d1063b 100644
--- a/src/checkpoints.h
+++ b/src/checkpoints.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -22,8 +22,6 @@ namespace Checkpoints
//! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);
-double GuessVerificationProgress(const CCheckpointData& data, CBlockIndex* pindex, bool fSigchecks = true);
-
} //namespace Checkpoints
#endif // BITCOIN_CHECKPOINTS_H
diff --git a/src/clientversion.cpp b/src/clientversion.cpp
index bfe9e16f80..d2344ded09 100644
--- a/src/clientversion.cpp
+++ b/src/clientversion.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2014 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/clientversion.h b/src/clientversion.h
index 53ad460346..0cd7e517ee 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/coins.cpp b/src/coins.cpp
index 8ff652b474..4d0e4bc0ad 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -117,17 +117,37 @@ CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256 &txid) {
return CCoinsModifier(*this, ret.first, cachedCoinUsage);
}
-// ModifyNewCoins has to know whether the new outputs its creating are for a
-// coinbase or not. If they are for a coinbase, it can not mark them as fresh.
-// This is to ensure that the historical duplicate coinbases before BIP30 was
-// in effect will still be properly overwritten when spent.
+/* ModifyNewCoins allows for faster coin modification when creating the new
+ * outputs from a transaction. It assumes that BIP 30 (no duplicate txids)
+ * applies and has already been tested for (or the test is not required due to
+ * BIP 34, height in coinbase). If we can assume BIP 30 then we know that any
+ * non-coinbase transaction we are adding to the UTXO must not already exist in
+ * the utxo unless it is fully spent. Thus we can check only if it exists DIRTY
+ * at the current level of the cache, in which case it is not safe to mark it
+ * FRESH (b/c then its spentness still needs to flushed). If it's not dirty and
+ * doesn't exist or is pruned in the current cache, we know it either doesn't
+ * exist or is pruned in parent caches, which is the definition of FRESH. The
+ * exception to this is the two historical violations of BIP 30 in the chain,
+ * both of which were coinbases. We do not mark these fresh so we we can ensure
+ * that they will still be properly overwritten when spent.
+ */
CCoinsModifier CCoinsViewCache::ModifyNewCoins(const uint256 &txid, bool coinbase) {
assert(!hasModifier);
std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoinsCacheEntry()));
- ret.first->second.coins.Clear();
if (!coinbase) {
- ret.first->second.flags = CCoinsCacheEntry::FRESH;
+ // New coins must not already exist.
+ if (!ret.first->second.coins.IsPruned())
+ throw std::logic_error("ModifyNewCoins should not find pre-existing coins on a non-coinbase unless they are pruned!");
+
+ if (!(ret.first->second.flags & CCoinsCacheEntry::DIRTY)) {
+ // If the coin is known to be pruned (have no unspent outputs) in
+ // the current view and the cache entry is not dirty, we know the
+ // coin also must be pruned in the parent view as well, so it is safe
+ // to mark this fresh.
+ ret.first->second.flags |= CCoinsCacheEntry::FRESH;
+ }
}
+ ret.first->second.coins.Clear();
ret.first->second.flags |= CCoinsCacheEntry::DIRTY;
return CCoinsModifier(*this, ret.first, 0);
}
@@ -187,6 +207,13 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn
entry.flags |= CCoinsCacheEntry::FRESH;
}
} else {
+ // Assert that the child cache entry was not marked FRESH if the
+ // parent cache entry has unspent outputs. If this ever happens,
+ // it means the FRESH flag was misapplied and there is a logic
+ // error in the calling code.
+ if ((it->second.flags & CCoinsCacheEntry::FRESH) && !itUs->second.coins.IsPruned())
+ throw std::logic_error("FRESH flag misapplied to cache entry for base transaction with spendable outputs");
+
// Found the entry in the parent cache
if ((itUs->second.flags & CCoinsCacheEntry::FRESH) && it->second.coins.IsPruned()) {
// The grandparent does not have an entry, and the child is
@@ -200,6 +227,11 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn
itUs->second.coins.swap(it->second.coins);
cachedCoinsUsage += itUs->second.coins.DynamicMemoryUsage();
itUs->second.flags |= CCoinsCacheEntry::DIRTY;
+ // NOTE: It is possible the child has a FRESH flag here in
+ // the event the entry we found in the parent is pruned. But
+ // we must not copy that FRESH flag to the parent as that
+ // pruned state likely still needs to be communicated to the
+ // grandparent.
}
}
}
diff --git a/src/coins.h b/src/coins.h
index 033651a435..902cb57f69 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -153,31 +153,8 @@ public:
return fCoinBase;
}
- unsigned int GetSerializeSize(int nType, int nVersion) const {
- unsigned int nSize = 0;
- unsigned int nMaskSize = 0, nMaskCode = 0;
- CalcMaskSize(nMaskSize, nMaskCode);
- bool fFirst = vout.size() > 0 && !vout[0].IsNull();
- bool fSecond = vout.size() > 1 && !vout[1].IsNull();
- assert(fFirst || fSecond || nMaskCode);
- unsigned int nCode = 8*(nMaskCode - (fFirst || fSecond ? 0 : 1)) + (fCoinBase ? 1 : 0) + (fFirst ? 2 : 0) + (fSecond ? 4 : 0);
- // version
- nSize += ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion);
- // size of header code
- nSize += ::GetSerializeSize(VARINT(nCode), nType, nVersion);
- // spentness bitmask
- nSize += nMaskSize;
- // txouts themself
- for (unsigned int i = 0; i < vout.size(); i++)
- if (!vout[i].IsNull())
- nSize += ::GetSerializeSize(CTxOutCompressor(REF(vout[i])), nType, nVersion);
- // height
- nSize += ::GetSerializeSize(VARINT(nHeight), nType, nVersion);
- return nSize;
- }
-
template<typename Stream>
- void Serialize(Stream &s, int nType, int nVersion) const {
+ void Serialize(Stream &s) const {
unsigned int nMaskSize = 0, nMaskCode = 0;
CalcMaskSize(nMaskSize, nMaskCode);
bool fFirst = vout.size() > 0 && !vout[0].IsNull();
@@ -185,33 +162,33 @@ public:
assert(fFirst || fSecond || nMaskCode);
unsigned int nCode = 8*(nMaskCode - (fFirst || fSecond ? 0 : 1)) + (fCoinBase ? 1 : 0) + (fFirst ? 2 : 0) + (fSecond ? 4 : 0);
// version
- ::Serialize(s, VARINT(this->nVersion), nType, nVersion);
+ ::Serialize(s, VARINT(this->nVersion));
// header code
- ::Serialize(s, VARINT(nCode), nType, nVersion);
+ ::Serialize(s, VARINT(nCode));
// spentness bitmask
for (unsigned int b = 0; b<nMaskSize; b++) {
unsigned char chAvail = 0;
for (unsigned int i = 0; i < 8 && 2+b*8+i < vout.size(); i++)
if (!vout[2+b*8+i].IsNull())
chAvail |= (1 << i);
- ::Serialize(s, chAvail, nType, nVersion);
+ ::Serialize(s, chAvail);
}
// txouts themself
for (unsigned int i = 0; i < vout.size(); i++) {
if (!vout[i].IsNull())
- ::Serialize(s, CTxOutCompressor(REF(vout[i])), nType, nVersion);
+ ::Serialize(s, CTxOutCompressor(REF(vout[i])));
}
// coinbase height
- ::Serialize(s, VARINT(nHeight), nType, nVersion);
+ ::Serialize(s, VARINT(nHeight));
}
template<typename Stream>
- void Unserialize(Stream &s, int nType, int nVersion) {
+ void Unserialize(Stream &s) {
unsigned int nCode = 0;
// version
- ::Unserialize(s, VARINT(this->nVersion), nType, nVersion);
+ ::Unserialize(s, VARINT(this->nVersion));
// header code
- ::Unserialize(s, VARINT(nCode), nType, nVersion);
+ ::Unserialize(s, VARINT(nCode));
fCoinBase = nCode & 1;
std::vector<bool> vAvail(2, false);
vAvail[0] = (nCode & 2) != 0;
@@ -220,7 +197,7 @@ public:
// spentness bitmask
while (nMaskCode > 0) {
unsigned char chAvail = 0;
- ::Unserialize(s, chAvail, nType, nVersion);
+ ::Unserialize(s, chAvail);
for (unsigned int p = 0; p < 8; p++) {
bool f = (chAvail & (1 << p)) != 0;
vAvail.push_back(f);
@@ -232,10 +209,10 @@ public:
vout.assign(vAvail.size(), CTxOut());
for (unsigned int i = 0; i < vAvail.size(); i++) {
if (vAvail[i])
- ::Unserialize(s, REF(CTxOutCompressor(vout[i])), nType, nVersion);
+ ::Unserialize(s, REF(CTxOutCompressor(vout[i])));
}
// coinbase height
- ::Unserialize(s, VARINT(nHeight), nType, nVersion);
+ ::Unserialize(s, VARINT(nHeight));
Cleanup();
}
@@ -292,6 +269,11 @@ struct CCoinsCacheEntry
enum Flags {
DIRTY = (1 << 0), // This cache entry is potentially different from the version in the parent view.
FRESH = (1 << 1), // The parent view does not have this entry (or it is pruned).
+ /* Note that FRESH is a performance optimization with which we can
+ * erase coins that are fully spent if we know we do not need to
+ * flush the changes to the parent cache. It is always safe to
+ * not mark FRESH if that condition is not guaranteed.
+ */
};
CCoinsCacheEntry() : coins(), flags(0) {}
@@ -490,7 +472,6 @@ public:
friend class CCoinsModifier;
private:
- CCoinsMap::iterator FetchCoins(const uint256 &txid);
CCoinsMap::const_iterator FetchCoins(const uint256 &txid) const;
/**
diff --git a/src/compat.h b/src/compat.h
index 79a297e5e4..28aa77eea2 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -34,6 +34,7 @@
#else
#include <sys/fcntl.h>
#include <sys/mman.h>
+#include <sys/select.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <net/if.h>
diff --git a/src/compat/byteswap.h b/src/compat/byteswap.h
index 899220bdc5..3c5a5c0837 100644
--- a/src/compat/byteswap.h
+++ b/src/compat/byteswap.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,6 +15,23 @@
#include <byteswap.h>
#endif
+#if defined(__APPLE__)
+
+#if !defined(bswap_16)
+
+// Mac OS X / Darwin features; we include a check for bswap_16 because if it is already defined, protobuf has
+// defined these macros for us already; if it isn't, we do it ourselves. In either case, we get the exact same
+// result regardless which path was taken
+#include <libkern/OSByteOrder.h>
+#define bswap_16(x) OSSwapInt16(x)
+#define bswap_32(x) OSSwapInt32(x)
+#define bswap_64(x) OSSwapInt64(x)
+
+#endif // !defined(bswap_16)
+
+#else
+// Non-Mac OS X / non-Darwin
+
#if HAVE_DECL_BSWAP_16 == 0
inline uint16_t bswap_16(uint16_t x)
{
@@ -44,4 +61,6 @@ inline uint64_t bswap_64(uint64_t x)
}
#endif // HAVE_DECL_BSWAP64
+#endif // defined(__APPLE__)
+
#endif // BITCOIN_COMPAT_BYTESWAP_H
diff --git a/src/compat/endian.h b/src/compat/endian.h
index 6bfae42c77..79d6b2fdbb 100644
--- a/src/compat/endian.h
+++ b/src/compat/endian.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2015 The Bitcoin developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/compressor.h b/src/compressor.h
index fa702f0dfa..015911484a 100644
--- a/src/compressor.h
+++ b/src/compressor.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -55,16 +55,8 @@ protected:
public:
CScriptCompressor(CScript &scriptIn) : script(scriptIn) { }
- unsigned int GetSerializeSize(int nType, int nVersion) const {
- std::vector<unsigned char> compr;
- if (Compress(compr))
- return compr.size();
- unsigned int nSize = script.size() + nSpecialScripts;
- return script.size() + VARINT(nSize).GetSerializeSize(nType, nVersion);
- }
-
template<typename Stream>
- void Serialize(Stream &s, int nType, int nVersion) const {
+ void Serialize(Stream &s) const {
std::vector<unsigned char> compr;
if (Compress(compr)) {
s << CFlatData(compr);
@@ -76,7 +68,7 @@ public:
}
template<typename Stream>
- void Unserialize(Stream &s, int nType, int nVersion) {
+ void Unserialize(Stream &s) {
unsigned int nSize = 0;
s >> VARINT(nSize);
if (nSize < nSpecialScripts) {
@@ -112,7 +104,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
if (!ser_action.ForRead()) {
uint64_t nVal = CompressAmount(txout.nValue);
READWRITE(VARINT(nVal));
diff --git a/src/consensus/consensus.h b/src/consensus/consensus.h
index 6908565866..351911a3a4 100644
--- a/src/consensus/consensus.h
+++ b/src/consensus/consensus.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/consensus/merkle.cpp b/src/consensus/merkle.cpp
index 35f7d2e05a..1ce5a9d87e 100644
--- a/src/consensus/merkle.cpp
+++ b/src/consensus/merkle.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -160,7 +160,7 @@ uint256 BlockMerkleRoot(const CBlock& block, bool* mutated)
std::vector<uint256> leaves;
leaves.resize(block.vtx.size());
for (size_t s = 0; s < block.vtx.size(); s++) {
- leaves[s] = block.vtx[s].GetHash();
+ leaves[s] = block.vtx[s]->GetHash();
}
return ComputeMerkleRoot(leaves, mutated);
}
@@ -171,7 +171,7 @@ uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated)
leaves.resize(block.vtx.size());
leaves[0].SetNull(); // The witness hash of the coinbase is 0.
for (size_t s = 1; s < block.vtx.size(); s++) {
- leaves[s] = block.vtx[s].GetWitnessHash();
+ leaves[s] = block.vtx[s]->GetWitnessHash();
}
return ComputeMerkleRoot(leaves, mutated);
}
@@ -181,7 +181,7 @@ std::vector<uint256> BlockMerkleBranch(const CBlock& block, uint32_t position)
std::vector<uint256> leaves;
leaves.resize(block.vtx.size());
for (size_t s = 0; s < block.vtx.size(); s++) {
- leaves[s] = block.vtx[s].GetHash();
+ leaves[s] = block.vtx[s]->GetHash();
}
return ComputeMerkleBranch(leaves, position);
}
diff --git a/src/consensus/params.h b/src/consensus/params.h
index 20efc68ade..3f98938f7e 100644
--- a/src/consensus/params.h
+++ b/src/consensus/params.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -62,6 +62,7 @@ struct Params {
int64_t nPowTargetTimespan;
int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; }
uint256 nMinimumChainWork;
+ uint256 defaultAssumeValid;
};
} // namespace Consensus
diff --git a/src/consensus/validation.h b/src/consensus/validation.h
index 3e24294a64..5a7d7f11a9 100644
--- a/src/consensus/validation.h
+++ b/src/consensus/validation.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/core_io.h b/src/core_io.h
index b559d44bf5..2d63be5fc4 100644
--- a/src/core_io.h
+++ b/src/core_io.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,22 +11,23 @@
class CBlock;
class CScript;
class CTransaction;
+struct CMutableTransaction;
class uint256;
class UniValue;
// core_read.cpp
-extern CScript ParseScript(const std::string& s);
-extern std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
-extern bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx, bool fTryNoWitness = false);
-extern bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
-extern uint256 ParseHashUV(const UniValue& v, const std::string& strName);
-extern uint256 ParseHashStr(const std::string&, const std::string& strName);
-extern std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
+CScript ParseScript(const std::string& s);
+std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
+bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx, bool fTryNoWitness = false);
+bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
+uint256 ParseHashUV(const UniValue& v, const std::string& strName);
+uint256 ParseHashStr(const std::string&, const std::string& strName);
+std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
// core_write.cpp
-extern std::string FormatScript(const CScript& script);
-extern std::string EncodeHexTx(const CTransaction& tx);
-extern void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
-extern void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
+std::string FormatScript(const CScript& script);
+std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
+void ScriptPubKeyToUniv(const CScript& scriptPubKey, UniValue& out, bool fIncludeHex);
+void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry);
#endif // BITCOIN_CORE_IO_H
diff --git a/src/core_memusage.h b/src/core_memusage.h
index b8e0f08bbf..5e10182075 100644
--- a/src/core_memusage.h
+++ b/src/core_memusage.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -18,35 +18,19 @@ static inline size_t RecursiveDynamicUsage(const COutPoint& out) {
}
static inline size_t RecursiveDynamicUsage(const CTxIn& in) {
- return RecursiveDynamicUsage(in.scriptSig) + RecursiveDynamicUsage(in.prevout);
-}
-
-static inline size_t RecursiveDynamicUsage(const CTxOut& out) {
- return RecursiveDynamicUsage(out.scriptPubKey);
-}
-
-static inline size_t RecursiveDynamicUsage(const CScriptWitness& scriptWit) {
- size_t mem = memusage::DynamicUsage(scriptWit.stack);
- for (std::vector<std::vector<unsigned char> >::const_iterator it = scriptWit.stack.begin(); it != scriptWit.stack.end(); it++) {
- mem += memusage::DynamicUsage(*it);
+ size_t mem = RecursiveDynamicUsage(in.scriptSig) + RecursiveDynamicUsage(in.prevout) + memusage::DynamicUsage(in.scriptWitness.stack);
+ for (std::vector<std::vector<unsigned char> >::const_iterator it = in.scriptWitness.stack.begin(); it != in.scriptWitness.stack.end(); it++) {
+ mem += memusage::DynamicUsage(*it);
}
return mem;
}
-static inline size_t RecursiveDynamicUsage(const CTxInWitness& txinwit) {
- return RecursiveDynamicUsage(txinwit.scriptWitness);
-}
-
-static inline size_t RecursiveDynamicUsage(const CTxWitness& txwit) {
- size_t mem = memusage::DynamicUsage(txwit.vtxinwit);
- for (std::vector<CTxInWitness>::const_iterator it = txwit.vtxinwit.begin(); it != txwit.vtxinwit.end(); it++) {
- mem += RecursiveDynamicUsage(*it);
- }
- return mem;
+static inline size_t RecursiveDynamicUsage(const CTxOut& out) {
+ return RecursiveDynamicUsage(out.scriptPubKey);
}
static inline size_t RecursiveDynamicUsage(const CTransaction& tx) {
- size_t mem = memusage::DynamicUsage(tx.vin) + memusage::DynamicUsage(tx.vout) + RecursiveDynamicUsage(tx.wit);
+ size_t mem = memusage::DynamicUsage(tx.vin) + memusage::DynamicUsage(tx.vout);
for (std::vector<CTxIn>::const_iterator it = tx.vin.begin(); it != tx.vin.end(); it++) {
mem += RecursiveDynamicUsage(*it);
}
@@ -57,7 +41,7 @@ static inline size_t RecursiveDynamicUsage(const CTransaction& tx) {
}
static inline size_t RecursiveDynamicUsage(const CMutableTransaction& tx) {
- size_t mem = memusage::DynamicUsage(tx.vin) + memusage::DynamicUsage(tx.vout) + RecursiveDynamicUsage(tx.wit);
+ size_t mem = memusage::DynamicUsage(tx.vin) + memusage::DynamicUsage(tx.vout);
for (std::vector<CTxIn>::const_iterator it = tx.vin.begin(); it != tx.vin.end(); it++) {
mem += RecursiveDynamicUsage(*it);
}
@@ -69,8 +53,8 @@ static inline size_t RecursiveDynamicUsage(const CMutableTransaction& tx) {
static inline size_t RecursiveDynamicUsage(const CBlock& block) {
size_t mem = memusage::DynamicUsage(block.vtx);
- for (std::vector<CTransaction>::const_iterator it = block.vtx.begin(); it != block.vtx.end(); it++) {
- mem += RecursiveDynamicUsage(*it);
+ for (const auto& tx : block.vtx) {
+ mem += memusage::DynamicUsage(tx) + RecursiveDynamicUsage(*tx);
}
return mem;
}
diff --git a/src/core_read.cpp b/src/core_read.cpp
index 7cfda6dd6d..85bb62c176 100644
--- a/src/core_read.cpp
+++ b/src/core_read.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -90,7 +90,7 @@ CScript ParseScript(const std::string& s)
return result;
}
-bool DecodeHexTx(CTransaction& tx, const std::string& strHexTx, bool fTryNoWitness)
+bool DecodeHexTx(CMutableTransaction& tx, const std::string& strHexTx, bool fTryNoWitness)
{
if (!IsHex(strHexTx))
return false;
diff --git a/src/core_write.cpp b/src/core_write.cpp
index ea01ddc10d..ee8a897ca4 100644
--- a/src/core_write.cpp
+++ b/src/core_write.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -116,9 +116,9 @@ string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode)
return str;
}
-string EncodeHexTx(const CTransaction& tx)
+string EncodeHexTx(const CTransaction& tx, const int serialFlags)
{
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | serialFlags);
ssTx << tx;
return HexStr(ssTx.begin(), ssTx.end());
}
@@ -168,9 +168,9 @@ void TxToUniv(const CTransaction& tx, const uint256& hashBlock, UniValue& entry)
o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true));
o.pushKV("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end()));
in.pushKV("scriptSig", o);
- if (!tx.wit.IsNull() && i < tx.wit.vtxinwit.size() && !tx.wit.vtxinwit[i].IsNull()) {
+ if (!tx.vin[i].scriptWitness.IsNull()) {
UniValue txinwitness(UniValue::VARR);
- for (const auto& item : tx.wit.vtxinwit[i].scriptWitness.stack) {
+ for (const auto& item : tx.vin[i].scriptWitness.stack) {
txinwitness.push_back(HexStr(item.begin(), item.end()));
}
in.pushKV("txinwitness", txinwitness);
diff --git a/src/crypto/aes.h b/src/crypto/aes.h
index 8cae357c12..e9f1b52e71 100644
--- a/src/crypto/aes.h
+++ b/src/crypto/aes.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
//
diff --git a/src/crypto/common.h b/src/crypto/common.h
index 580c72f5a6..4a9d1150b6 100644
--- a/src/crypto/common.h
+++ b/src/crypto/common.h
@@ -10,57 +10,73 @@
#endif
#include <stdint.h>
+#include <string.h>
#include "compat/endian.h"
uint16_t static inline ReadLE16(const unsigned char* ptr)
{
- return le16toh(*((uint16_t*)ptr));
+ uint16_t x;
+ memcpy((char*)&x, ptr, 2);
+ return le16toh(x);
}
uint32_t static inline ReadLE32(const unsigned char* ptr)
{
- return le32toh(*((uint32_t*)ptr));
+ uint32_t x;
+ memcpy((char*)&x, ptr, 4);
+ return le32toh(x);
}
uint64_t static inline ReadLE64(const unsigned char* ptr)
{
- return le64toh(*((uint64_t*)ptr));
+ uint64_t x;
+ memcpy((char*)&x, ptr, 8);
+ return le64toh(x);
}
void static inline WriteLE16(unsigned char* ptr, uint16_t x)
{
- *((uint16_t*)ptr) = htole16(x);
+ uint16_t v = htole16(x);
+ memcpy(ptr, (char*)&v, 2);
}
void static inline WriteLE32(unsigned char* ptr, uint32_t x)
{
- *((uint32_t*)ptr) = htole32(x);
+ uint32_t v = htole32(x);
+ memcpy(ptr, (char*)&v, 4);
}
void static inline WriteLE64(unsigned char* ptr, uint64_t x)
{
- *((uint64_t*)ptr) = htole64(x);
+ uint64_t v = htole64(x);
+ memcpy(ptr, (char*)&v, 8);
}
uint32_t static inline ReadBE32(const unsigned char* ptr)
{
- return be32toh(*((uint32_t*)ptr));
+ uint32_t x;
+ memcpy((char*)&x, ptr, 4);
+ return be32toh(x);
}
uint64_t static inline ReadBE64(const unsigned char* ptr)
{
- return be64toh(*((uint64_t*)ptr));
+ uint64_t x;
+ memcpy((char*)&x, ptr, 8);
+ return be64toh(x);
}
void static inline WriteBE32(unsigned char* ptr, uint32_t x)
{
- *((uint32_t*)ptr) = htobe32(x);
+ uint32_t v = htobe32(x);
+ memcpy(ptr, (char*)&v, 4);
}
void static inline WriteBE64(unsigned char* ptr, uint64_t x)
{
- *((uint64_t*)ptr) = htobe64(x);
+ uint64_t v = htobe64(x);
+ memcpy(ptr, (char*)&v, 8);
}
#endif // BITCOIN_CRYPTO_COMMON_H
diff --git a/src/crypto/ctaes/ctaes.c b/src/crypto/ctaes/ctaes.c
index 2389fc0bb2..55962bf252 100644
--- a/src/crypto/ctaes/ctaes.c
+++ b/src/crypto/ctaes/ctaes.c
@@ -134,7 +134,7 @@ static void SubBytes(AES_state *s, int inv) {
D = U7;
}
- /* Non-linear transformation (identical to the code in SubBytes) */
+ /* Non-linear transformation (shared between the forward and backward case) */
M1 = T13 & T6;
M6 = T3 & T16;
M11 = T1 & T15;
@@ -469,9 +469,9 @@ static void AES_encrypt(const AES_state* rounds, int nrounds, unsigned char* cip
static void AES_decrypt(const AES_state* rounds, int nrounds, unsigned char* plain16, const unsigned char* cipher16) {
/* Most AES decryption implementations use the alternate scheme
- * (the Equivalent Inverse Cipher), which looks more like encryption, but
- * needs different round constants. We can't reuse any code here anyway, so
- * don't bother. */
+ * (the Equivalent Inverse Cipher), which allows for more code reuse between
+ * the encryption and decryption code, but requires separate setup for both.
+ */
AES_state s = {{0}};
int round;
diff --git a/src/crypto/ctaes/test.c b/src/crypto/ctaes/test.c
index fce1696acd..21439a16f1 100644
--- a/src/crypto/ctaes/test.c
+++ b/src/crypto/ctaes/test.c
@@ -102,7 +102,7 @@ int main(void) {
}
}
if (fail == 0) {
- fprintf(stderr, "All tests succesful\n");
+ fprintf(stderr, "All tests successful\n");
} else {
fprintf(stderr, "%i tests failed\n", fail);
}
diff --git a/src/crypto/ripemd160.h b/src/crypto/ripemd160.h
index bd41f02508..38ea375c1f 100644
--- a/src/crypto/ripemd160.h
+++ b/src/crypto/ripemd160.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/crypto/sha1.h b/src/crypto/sha1.h
index 8fb20810be..8b4568ee12 100644
--- a/src/crypto/sha1.h
+++ b/src/crypto/sha1.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/crypto/sha256.h b/src/crypto/sha256.h
index 5b15b6a233..127e62a228 100644
--- a/src/crypto/sha256.h
+++ b/src/crypto/sha256.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/crypto/sha512.h b/src/crypto/sha512.h
index 614681fae2..cd1023bc85 100644
--- a/src/crypto/sha512.h
+++ b/src/crypto/sha512.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/cuckoocache.h b/src/cuckoocache.h
new file mode 100644
index 0000000000..efd6a820b5
--- /dev/null
+++ b/src/cuckoocache.h
@@ -0,0 +1,457 @@
+// Copyright (c) 2016 Jeremy Rubin
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef _BITCOIN_CUCKOOCACHE_H_
+#define _BITCOIN_CUCKOOCACHE_H_
+
+#include <array>
+#include <algorithm>
+#include <atomic>
+#include <cstring>
+#include <cmath>
+#include <memory>
+#include <vector>
+
+
+/** namespace CuckooCache provides high performance cache primitives
+ *
+ * Summary:
+ *
+ * 1) bit_packed_atomic_flags is bit-packed atomic flags for garbage collection
+ *
+ * 2) cache is a cache which is performant in memory usage and lookup speed. It
+ * is lockfree for erase operations. Elements are lazily erased on the next
+ * insert.
+ */
+namespace CuckooCache
+{
+/** bit_packed_atomic_flags implements a container for garbage collection flags
+ * that is only thread unsafe on calls to setup. This class bit-packs collection
+ * flags for memory efficiency.
+ *
+ * All operations are std::memory_order_relaxed so external mechanisms must
+ * ensure that writes and reads are properly synchronized.
+ *
+ * On setup(n), all bits up to n are marked as collected.
+ *
+ * Under the hood, because it is an 8-bit type, it makes sense to use a multiple
+ * of 8 for setup, but it will be safe if that is not the case as well.
+ *
+ */
+class bit_packed_atomic_flags
+{
+ std::unique_ptr<std::atomic<uint8_t>[]> mem;
+
+public:
+ /** No default constructor as there must be some size */
+ bit_packed_atomic_flags() = delete;
+
+ /**
+ * bit_packed_atomic_flags constructor creates memory to sufficiently
+ * keep track of garbage collection information for size entries.
+ *
+ * @param size the number of elements to allocate space for
+ *
+ * @post bit_set, bit_unset, and bit_is_set function properly forall x. x <
+ * size
+ * @post All calls to bit_is_set (without subsequent bit_unset) will return
+ * true.
+ */
+ bit_packed_atomic_flags(uint32_t size)
+ {
+ // pad out the size if needed
+ size = (size + 7) / 8;
+ mem.reset(new std::atomic<uint8_t>[size]);
+ for (uint32_t i = 0; i < size; ++i)
+ mem[i].store(0xFF);
+ };
+
+ /** setup marks all entries and ensures that bit_packed_atomic_flags can store
+ * at least size entries
+ *
+ * @param b the number of elements to allocate space for
+ * @post bit_set, bit_unset, and bit_is_set function properly forall x. x <
+ * b
+ * @post All calls to bit_is_set (without subsequent bit_unset) will return
+ * true.
+ */
+ inline void setup(uint32_t b)
+ {
+ bit_packed_atomic_flags d(b);
+ std::swap(mem, d.mem);
+ }
+
+ /** bit_set sets an entry as discardable.
+ *
+ * @param s the index of the entry to bit_set.
+ * @post immediately subsequent call (assuming proper external memory
+ * ordering) to bit_is_set(s) == true.
+ *
+ */
+ inline void bit_set(uint32_t s)
+ {
+ mem[s >> 3].fetch_or(1 << (s & 7), std::memory_order_relaxed);
+ }
+
+ /** bit_unset marks an entry as something that should not be overwritten
+ *
+ * @param s the index of the entry to bit_unset.
+ * @post immediately subsequent call (assuming proper external memory
+ * ordering) to bit_is_set(s) == false.
+ */
+ inline void bit_unset(uint32_t s)
+ {
+ mem[s >> 3].fetch_and(~(1 << (s & 7)), std::memory_order_relaxed);
+ }
+
+ /** bit_is_set queries the table for discardability at s
+ *
+ * @param s the index of the entry to read.
+ * @returns if the bit at index s was set.
+ * */
+ inline bool bit_is_set(uint32_t s) const
+ {
+ return (1 << (s & 7)) & mem[s >> 3].load(std::memory_order_relaxed);
+ }
+};
+
+/** cache implements a cache with properties similar to a cuckoo-set
+ *
+ * The cache is able to hold up to (~(uint32_t)0) - 1 elements.
+ *
+ * Read Operations:
+ * - contains(*, false)
+ *
+ * Read+Erase Operations:
+ * - contains(*, true)
+ *
+ * Erase Operations:
+ * - allow_erase()
+ *
+ * Write Operations:
+ * - setup()
+ * - setup_bytes()
+ * - insert()
+ * - please_keep()
+ *
+ * Synchronization Free Operations:
+ * - invalid()
+ * - compute_hashes()
+ *
+ * User Must Guarantee:
+ *
+ * 1) Write Requires synchronized access (e.g., a lock)
+ * 2) Read Requires no concurrent Write, synchronized with the last insert.
+ * 3) Erase requires no concurrent Write, synchronized with last insert.
+ * 4) An Erase caller must release all memory before allowing a new Writer.
+ *
+ *
+ * Note on function names:
+ * - The name "allow_erase" is used because the real discard happens later.
+ * - The name "please_keep" is used because elements may be erased anyways on insert.
+ *
+ * @tparam Element should be a movable and copyable type
+ * @tparam Hash should be a function/callable which takes a template parameter
+ * hash_select and an Element and extracts a hash from it. Should return
+ * high-entropy hashes for `Hash h; h<0>(e) ... h<7>(e)`.
+ */
+template <typename Element, typename Hash>
+class cache
+{
+private:
+ /** table stores all the elements */
+ std::vector<Element> table;
+
+ /** size stores the total available slots in the hash table */
+ uint32_t size;
+
+ /** The bit_packed_atomic_flags array is marked mutable because we want
+ * garbage collection to be allowed to occur from const methods */
+ mutable bit_packed_atomic_flags collection_flags;
+
+ /** epoch_flags tracks how recently an element was inserted into
+ * the cache. true denotes recent, false denotes not-recent. See insert()
+ * method for full semantics.
+ */
+ mutable std::vector<bool> epoch_flags;
+
+ /** epoch_heuristic_counter is used to determine when a epoch might be aged
+ * & an expensive scan should be done. epoch_heuristic_counter is
+ * decremented on insert and reset to the new number of inserts which would
+ * cause the epoch to reach epoch_size when it reaches zero.
+ */
+ uint32_t epoch_heuristic_counter;
+
+ /** epoch_size is set to be the number of elements supposed to be in a
+ * epoch. When the number of non-erased elements in a epoch
+ * exceeds epoch_size, a new epoch should be started and all
+ * current entries demoted. epoch_size is set to be 45% of size because
+ * we want to keep load around 90%, and we support 3 epochs at once --
+ * one "dead" which has been erased, one "dying" which has been marked to be
+ * erased next, and one "living" which new inserts add to.
+ */
+ uint32_t epoch_size;
+
+ /** hash_mask should be set to appropriately mask out a hash such that every
+ * masked hash is [0,size), eg, if floor(log2(size)) == 20, then hash_mask
+ * should be (1<<20)-1
+ */
+ uint32_t hash_mask;
+
+ /** depth_limit determines how many elements insert should try to replace.
+ * Should be set to log2(n)*/
+ uint8_t depth_limit;
+
+ /** hash_function is a const instance of the hash function. It cannot be
+ * static or initialized at call time as it may have internal state (such as
+ * a nonce).
+ * */
+ const Hash hash_function;
+
+ /** compute_hashes is convenience for not having to write out this
+ * expression everywhere we use the hash values of an Element.
+ *
+ * @param e the element whose hashes will be returned
+ * @returns std::array<uint32_t, 8> of deterministic hashes derived from e
+ */
+ inline std::array<uint32_t, 8> compute_hashes(const Element& e) const
+ {
+ return {{hash_function.template operator()<0>(e) & hash_mask,
+ hash_function.template operator()<1>(e) & hash_mask,
+ hash_function.template operator()<2>(e) & hash_mask,
+ hash_function.template operator()<3>(e) & hash_mask,
+ hash_function.template operator()<4>(e) & hash_mask,
+ hash_function.template operator()<5>(e) & hash_mask,
+ hash_function.template operator()<6>(e) & hash_mask,
+ hash_function.template operator()<7>(e) & hash_mask}};
+ }
+
+ /* end
+ * @returns a constexpr index that can never be inserted to */
+ constexpr uint32_t invalid() const
+ {
+ return ~(uint32_t)0;
+ }
+
+ /** allow_erase marks the element at index n as discardable. Threadsafe
+ * without any concurrent insert.
+ * @param n the index to allow erasure of
+ */
+ inline void allow_erase(uint32_t n) const
+ {
+ collection_flags.bit_set(n);
+ }
+
+ /** please_keep marks the element at index n as an entry that should be kept.
+ * Threadsafe without any concurrent insert.
+ * @param n the index to prioritize keeping
+ */
+ inline void please_keep(uint32_t n) const
+ {
+ collection_flags.bit_unset(n);
+ }
+
+ /** epoch_check handles the changing of epochs for elements stored in the
+ * cache. epoch_check should be run before every insert.
+ *
+ * First, epoch_check decrements and checks the cheap heuristic, and then does
+ * a more expensive scan if the cheap heuristic runs out. If the expensive
+ * scan suceeds, the epochs are aged and old elements are allow_erased. The
+ * cheap heuristic is reset to retrigger after the worst case growth of the
+ * current epoch's elements would exceed the epoch_size.
+ */
+ void epoch_check()
+ {
+ if (epoch_heuristic_counter != 0) {
+ --epoch_heuristic_counter;
+ return;
+ }
+ // count the number of elements from the latest epoch which
+ // have not been erased.
+ uint32_t epoch_unused_count = 0;
+ for (uint32_t i = 0; i < size; ++i)
+ epoch_unused_count += epoch_flags[i] &&
+ !collection_flags.bit_is_set(i);
+ // If there are more non-deleted entries in the current epoch than the
+ // epoch size, then allow_erase on all elements in the old epoch (marked
+ // false) and move all elements in the current epoch to the old epoch
+ // but do not call allow_erase on their indices.
+ if (epoch_unused_count >= epoch_size) {
+ for (uint32_t i = 0; i < size; ++i)
+ if (epoch_flags[i])
+ epoch_flags[i] = false;
+ else
+ allow_erase(i);
+ epoch_heuristic_counter = epoch_size;
+ } else
+ // reset the epoch_heuristic_counter to next do a scan when worst
+ // case behavior (no intermittent erases) would exceed epoch size,
+ // with a reasonable minimum scan size.
+ // Ordinarily, we would have to sanity check std::min(epoch_size,
+ // epoch_unused_count), but we already know that `epoch_unused_count
+ // < epoch_size` in this branch
+ epoch_heuristic_counter = std::max(1u, std::max(epoch_size / 16,
+ epoch_size - epoch_unused_count));
+ }
+
+public:
+ /** You must always construct a cache with some elements via a subsequent
+ * call to setup or setup_bytes, otherwise operations may segfault.
+ */
+ cache() : table(), size(), collection_flags(0), epoch_flags(),
+ epoch_heuristic_counter(), epoch_size(), depth_limit(0), hash_function()
+ {
+ }
+
+ /** setup initializes the container to store no more than new_size
+ * elements. setup rounds down to a power of two size.
+ *
+ * setup should only be called once.
+ *
+ * @param new_size the desired number of elements to store
+ * @returns the maximum number of elements storable
+ **/
+ uint32_t setup(uint32_t new_size)
+ {
+ // depth_limit must be at least one otherwise errors can occur.
+ depth_limit = static_cast<uint8_t>(std::log2(static_cast<float>(std::max((uint32_t)2, new_size))));
+ size = 1 << depth_limit;
+ hash_mask = size-1;
+ table.resize(size);
+ collection_flags.setup(size);
+ epoch_flags.resize(size);
+ // Set to 45% as described above
+ epoch_size = std::max((uint32_t)1, (45 * size) / 100);
+ // Initially set to wait for a whole epoch
+ epoch_heuristic_counter = epoch_size;
+ return size;
+ }
+
+ /** setup_bytes is a convenience function which accounts for internal memory
+ * usage when deciding how many elements to store. It isn't perfect because
+ * it doesn't account for any overhead (struct size, MallocUsage, collection
+ * and epoch flags). This was done to simplify selecting a power of two
+ * size. In the expected use case, an extra two bits per entry should be
+ * negligible compared to the size of the elements.
+ *
+ * @param bytes the approximate number of bytes to use for this data
+ * structure.
+ * @returns the maximum number of elements storable (see setup()
+ * documentation for more detail)
+ */
+ uint32_t setup_bytes(size_t bytes)
+ {
+ return setup(bytes/sizeof(Element));
+ }
+
+ /** insert loops at most depth_limit times trying to insert a hash
+ * at various locations in the table via a variant of the Cuckoo Algorithm
+ * with eight hash locations.
+ *
+ * It drops the last tried element if it runs out of depth before
+ * encountering an open slot.
+ *
+ * Thus
+ *
+ * insert(x);
+ * return contains(x, false);
+ *
+ * is not guaranteed to return true.
+ *
+ * @param e the element to insert
+ * @post one of the following: All previously inserted elements and e are
+ * now in the table, one previously inserted element is evicted from the
+ * table, the entry attempted to be inserted is evicted.
+ *
+ */
+ inline void insert(Element e)
+ {
+ epoch_check();
+ uint32_t last_loc = invalid();
+ bool last_epoch = true;
+ std::array<uint32_t, 8> locs = compute_hashes(e);
+ // Make sure we have not already inserted this element
+ // If we have, make sure that it does not get deleted
+ for (uint32_t loc : locs)
+ if (table[loc] == e) {
+ please_keep(loc);
+ epoch_flags[loc] = last_epoch;
+ return;
+ }
+ for (uint8_t depth = 0; depth < depth_limit; ++depth) {
+ // First try to insert to an empty slot, if one exists
+ for (uint32_t loc : locs) {
+ if (!collection_flags.bit_is_set(loc))
+ continue;
+ table[loc] = std::move(e);
+ please_keep(loc);
+ epoch_flags[loc] = last_epoch;
+ return;
+ }
+ /** Swap with the element at the location that was
+ * not the last one looked at. Example:
+ *
+ * 1) On first iteration, last_loc == invalid(), find returns last, so
+ * last_loc defaults to locs[0].
+ * 2) On further iterations, where last_loc == locs[k], last_loc will
+ * go to locs[k+1 % 8], i.e., next of the 8 indicies wrapping around
+ * to 0 if needed.
+ *
+ * This prevents moving the element we just put in.
+ *
+ * The swap is not a move -- we must switch onto the evicted element
+ * for the next iteration.
+ */
+ last_loc = locs[(1 + (std::find(locs.begin(), locs.end(), last_loc) - locs.begin())) & 7];
+ std::swap(table[last_loc], e);
+ // Can't std::swap a std::vector<bool>::reference and a bool&.
+ bool epoch = last_epoch;
+ last_epoch = epoch_flags[last_loc];
+ epoch_flags[last_loc] = epoch;
+
+ // Recompute the locs -- unfortunately happens one too many times!
+ locs = compute_hashes(e);
+ }
+ }
+
+ /* contains iterates through the hash locations for a given element
+ * and checks to see if it is present.
+ *
+ * contains does not check garbage collected state (in other words,
+ * garbage is only collected when the space is needed), so:
+ *
+ * insert(x);
+ * if (contains(x, true))
+ * return contains(x, false);
+ * else
+ * return true;
+ *
+ * executed on a single thread will always return true!
+ *
+ * This is a great property for re-org performance for example.
+ *
+ * contains returns a bool set true if the element was found.
+ *
+ * @param e the element to check
+ * @param erase
+ *
+ * @post if erase is true and the element is found, then the garbage collect
+ * flag is set
+ * @returns true if the element is found, false otherwise
+ */
+ inline bool contains(const Element& e, const bool erase) const
+ {
+ std::array<uint32_t, 8> locs = compute_hashes(e);
+ for (uint32_t loc : locs)
+ if (table[loc] == e) {
+ if (erase)
+ allow_erase(loc);
+ return true;
+ }
+ return false;
+ }
+};
+} // namespace CuckooCache
+
+#endif
diff --git a/src/dbwrapper.cpp b/src/dbwrapper.cpp
index 4fa06135d2..94ebedeb72 100644
--- a/src/dbwrapper.cpp
+++ b/src/dbwrapper.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/dbwrapper.h b/src/dbwrapper.h
index 47bdb31b5b..dd59cc00ff 100644
--- a/src/dbwrapper.h
+++ b/src/dbwrapper.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,6 +17,9 @@
#include <leveldb/db.h>
#include <leveldb/write_batch.h>
+static const size_t DBWRAPPER_PREALLOC_KEY_SIZE = 64;
+static const size_t DBWRAPPER_PREALLOC_VALUE_SIZE = 1024;
+
class dbwrapper_error : public std::runtime_error
{
public:
@@ -50,38 +53,41 @@ private:
const CDBWrapper &parent;
leveldb::WriteBatch batch;
+ CDataStream ssKey;
+ CDataStream ssValue;
+
public:
/**
* @param[in] _parent CDBWrapper that this batch is to be submitted to
*/
- CDBBatch(const CDBWrapper &_parent) : parent(_parent) { };
+ CDBBatch(const CDBWrapper &_parent) : parent(_parent), ssKey(SER_DISK, CLIENT_VERSION), ssValue(SER_DISK, CLIENT_VERSION) { };
template <typename K, typename V>
void Write(const K& key, const V& value)
{
- CDataStream ssKey(SER_DISK, CLIENT_VERSION);
- ssKey.reserve(ssKey.GetSerializeSize(key));
+ ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
- CDataStream ssValue(SER_DISK, CLIENT_VERSION);
- ssValue.reserve(ssValue.GetSerializeSize(value));
+ ssValue.reserve(DBWRAPPER_PREALLOC_VALUE_SIZE);
ssValue << value;
ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent));
- leveldb::Slice slValue(&ssValue[0], ssValue.size());
+ leveldb::Slice slValue(ssValue.data(), ssValue.size());
batch.Put(slKey, slValue);
+ ssKey.clear();
+ ssValue.clear();
}
template <typename K>
void Erase(const K& key)
{
- CDataStream ssKey(SER_DISK, CLIENT_VERSION);
- ssKey.reserve(ssKey.GetSerializeSize(key));
+ ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
batch.Delete(slKey);
+ ssKey.clear();
}
};
@@ -107,9 +113,9 @@ public:
template<typename K> void Seek(const K& key) {
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
- ssKey.reserve(ssKey.GetSerializeSize(key));
+ ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
piter->Seek(slKey);
}
@@ -200,9 +206,9 @@ public:
bool Read(const K& key, V& value) const
{
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
- ssKey.reserve(ssKey.GetSerializeSize(key));
+ ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
@@ -234,9 +240,9 @@ public:
bool Exists(const K& key) const
{
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
- ssKey.reserve(ssKey.GetSerializeSize(key));
+ ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
diff --git a/src/hash.cpp b/src/hash.cpp
index 20a83342db..a399ca9252 100644
--- a/src/hash.cpp
+++ b/src/hash.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2013-2015 The Bitcoin Core developers
+// Copyright (c) 2013-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/hash.h b/src/hash.h
index db4e130ae7..3b86fcc033 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -132,15 +132,17 @@ class CHashWriter
private:
CHash256 ctx;
+ const int nType;
+ const int nVersion;
public:
- int nType;
- int nVersion;
CHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn) {}
- CHashWriter& write(const char *pch, size_t size) {
+ int GetType() const { return nType; }
+ int GetVersion() const { return nVersion; }
+
+ void write(const char *pch, size_t size) {
ctx.Write((const unsigned char*)pch, size);
- return (*this);
}
// invalidates the object
@@ -153,7 +155,7 @@ public:
template<typename T>
CHashWriter& operator<<(const T& obj) {
// Serialize to this stream
- ::Serialize(*this, obj, nType, nVersion);
+ ::Serialize(*this, obj);
return (*this);
}
};
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index e35acb6cd9..93beda09a4 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -95,7 +95,7 @@ static bool multiUserAuthorized(std::string strUserPass)
if (mapMultiArgs.count("-rpcauth") > 0) {
//Search for multi-user login/pass "rpcauth" from config
- BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs["-rpcauth"])
+ BOOST_FOREACH(std::string strRPCAuth, mapMultiArgs.at("-rpcauth"))
{
std::vector<std::string> vFields;
boost::split(vFields, strRPCAuth, boost::is_any_of(":$"));
@@ -113,8 +113,8 @@ static bool multiUserAuthorized(std::string strUserPass)
std::string strHash = vFields[2];
unsigned int KEY_SIZE = 32;
- unsigned char *out = new unsigned char[KEY_SIZE];
-
+ unsigned char out[KEY_SIZE];
+
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
std::vector<unsigned char> hexvec(out, out+KEY_SIZE);
std::string strHashFromPass = HexStr(hexvec);
@@ -215,7 +215,7 @@ static bool HTTPReq_JSONRPC(HTTPRequest* req, const std::string &)
static bool InitRPCAuthentication()
{
- if (mapArgs["-rpcpassword"] == "")
+ if (GetArg("-rpcpassword", "") == "")
{
LogPrintf("No rpcpassword set - using random cookie authentication\n");
if (!GenerateAuthCookie(&strRPCUserColonPass)) {
@@ -226,7 +226,7 @@ static bool InitRPCAuthentication()
}
} else {
LogPrintf("Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.\n");
- strRPCUserColonPass = mapArgs["-rpcuser"] + ":" + mapArgs["-rpcpassword"];
+ strRPCUserColonPass = GetArg("-rpcuser", "") + ":" + GetArg("-rpcpassword", "");
}
return true;
}
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index b296b28503..1692b43f28 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -204,7 +204,7 @@ static bool InitHTTPAllowList()
rpc_allow_subnets.push_back(CSubNet(localv4, 8)); // always allow IPv4 local subnet
rpc_allow_subnets.push_back(CSubNet(localv6)); // always allow IPv6 localhost
if (mapMultiArgs.count("-rpcallowip")) {
- const std::vector<std::string>& vAllow = mapMultiArgs["-rpcallowip"];
+ const std::vector<std::string>& vAllow = mapMultiArgs.at("-rpcallowip");
for (std::string strAllow : vAllow) {
CSubNet subnet;
LookupSubNet(strAllow.c_str(), subnet);
@@ -322,14 +322,14 @@ static bool HTTPBindAddresses(struct evhttp* http)
std::vector<std::pair<std::string, uint16_t> > endpoints;
// Determine what addresses to bind to
- if (!mapArgs.count("-rpcallowip")) { // Default to loopback if not allowing external IPs
+ if (!IsArgSet("-rpcallowip")) { // Default to loopback if not allowing external IPs
endpoints.push_back(std::make_pair("::1", defaultPort));
endpoints.push_back(std::make_pair("127.0.0.1", defaultPort));
- if (mapArgs.count("-rpcbind")) {
+ if (IsArgSet("-rpcbind")) {
LogPrintf("WARNING: option -rpcbind was ignored because -rpcallowip was not specified, refusing to allow everyone to connect\n");
}
- } else if (mapArgs.count("-rpcbind")) { // Specific bind address
- const std::vector<std::string>& vbind = mapMultiArgs["-rpcbind"];
+ } else if (mapMultiArgs.count("-rpcbind")) { // Specific bind address
+ const std::vector<std::string>& vbind = mapMultiArgs.at("-rpcbind");
for (std::vector<std::string>::const_iterator i = vbind.begin(); i != vbind.end(); ++i) {
int port = defaultPort;
std::string host;
diff --git a/src/httpserver.h b/src/httpserver.h
index 49d67f4b88..b55b253bea 100644
--- a/src/httpserver.h
+++ b/src/httpserver.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/init.cpp b/src/init.cpp
index 31e3efb459..5be011f944 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,10 +19,11 @@
#include "httpserver.h"
#include "httprpc.h"
#include "key.h"
-#include "main.h"
+#include "validation.h"
#include "miner.h"
#include "netbase.h"
#include "net.h"
+#include "net_processing.h"
#include "policy/policy.h"
#include "rpc/server.h"
#include "rpc/register.h"
@@ -40,6 +41,7 @@
#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
#endif
+#include "warnings.h"
#include <stdint.h>
#include <stdio.h>
#include <memory>
@@ -128,6 +130,7 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
//
std::atomic<bool> fRequestShutdown(false);
+std::atomic<bool> fDumpMempoolLater(false);
void StartShutdown()
{
@@ -174,6 +177,8 @@ void Interrupt(boost::thread_group& threadGroup)
InterruptRPC();
InterruptREST();
InterruptTorControl();
+ if (g_connman)
+ g_connman->Interrupt();
threadGroup.interrupt_all();
}
@@ -207,7 +212,8 @@ void Shutdown()
StopTorControl();
UnregisterNodeSignals(GetNodeSignals());
- DumpMempool();
+ if (fDumpMempoolLater)
+ DumpMempool();
if (fFeeEstimatesInitialized)
{
@@ -323,8 +329,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
if (showDebug)
strUsage += HelpMessageOpt("-blocksonly", strprintf(_("Whether to operate in a blocks only mode (default: %u)"), DEFAULT_BLOCKSONLY));
- strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS));
- strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL));
+ strUsage +=HelpMessageOpt("-assumevalid=<hex>", strprintf(_("If this block is in the chain assume that it and its ancestors are valid and potentially skip their script verification (0 to verify all, default: %s, testnet: %s)"), Params(CBaseChainParams::MAIN).GetConsensus().defaultAssumeValid.GetHex(), Params(CBaseChainParams::TESTNET).GetConsensus().defaultAssumeValid.GetHex()));
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), BITCOIN_CONF_FILENAME));
if (mode == HMM_BITCOIND)
{
@@ -340,14 +345,15 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-maxorphantx=<n>", strprintf(_("Keep at most <n> unconnectable transactions in memory (default: %u)"), DEFAULT_MAX_ORPHAN_TRANSACTIONS));
strUsage += HelpMessageOpt("-maxmempool=<n>", strprintf(_("Keep the transaction memory pool below <n> megabytes (default: %u)"), DEFAULT_MAX_MEMPOOL_SIZE));
strUsage += HelpMessageOpt("-mempoolexpiry=<n>", strprintf(_("Do not keep transactions in the mempool longer than <n> hours (default: %u)"), DEFAULT_MEMPOOL_EXPIRY));
+ strUsage += HelpMessageOpt("-blockreconstructionextratxn=<n>", strprintf(_("Extra transactions to keep in memory for compact block reconstructions (default: %u)"), DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN));
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
#ifndef WIN32
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), BITCOIN_PID_FILENAME));
#endif
- strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. "
+ strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. "
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
- "(default: 0 = disable pruning blocks, >%u = target size in MiB to use for block files)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
+ "(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u = automatically prune block files to stay under the specified target size in MiB)"), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
strUsage += HelpMessageOpt("-reindex-chainstate", _("Rebuild chain state from the currently indexed blocks"));
strUsage += HelpMessageOpt("-reindex", _("Rebuild chain state and block index from the blk*.dat files on disk"));
#ifndef WIN32
@@ -379,6 +385,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), Params(CBaseChainParams::MAIN).GetDefaultPort(), Params(CBaseChainParams::TESTNET).GetDefaultPort()));
strUsage += HelpMessageOpt("-proxy=<ip:port>", _("Connect through SOCKS5 proxy"));
strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), DEFAULT_PROXYRANDOMIZE));
+ strUsage += HelpMessageOpt("-rpcserialversion", strprintf(_("Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)"), DEFAULT_RPC_SERIALIZE_VERSION));
strUsage += HelpMessageOpt("-seednode=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
strUsage += HelpMessageOpt("-timeout=<n>", strprintf(_("Specify connection timeout in milliseconds (minimum: 1, default: %d)"), DEFAULT_CONNECT_TIMEOUT));
strUsage += HelpMessageOpt("-torcontrol=<ip>:<port>", strprintf(_("Tor control port to use if onion listening enabled (default: %s)"), DEFAULT_TOR_CONTROL));
@@ -391,7 +398,7 @@ std::string HelpMessage(HelpMessageMode mode)
#endif
#endif
strUsage += HelpMessageOpt("-whitebind=<addr>", _("Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6"));
- strUsage += HelpMessageOpt("-whitelist=<netmask>", _("Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.") +
+ strUsage += HelpMessageOpt("-whitelist=<IP address or network>", _("Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.") +
" " + _("Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway"));
strUsage += HelpMessageOpt("-whitelistrelay", strprintf(_("Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)"), DEFAULT_WHITELISTRELAY));
strUsage += HelpMessageOpt("-whitelistforcerelay", strprintf(_("Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)"), DEFAULT_WHITELISTFORCERELAY));
@@ -413,6 +420,8 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-uacomment=<cmt>", _("Append comment to the user agent string"));
if (showDebug)
{
+ strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), DEFAULT_CHECKBLOCKS));
+ strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), DEFAULT_CHECKLEVEL));
strUsage += HelpMessageOpt("-checkblockindex", strprintf("Do a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive and mapBlocksUnlinked occasionally. Also sets -checkmempool (default: %u)", Params(CBaseChainParams::MAIN).DefaultConsistencyChecks()));
strUsage += HelpMessageOpt("-checkmempool=<n>", strprintf("Run checks every <n> transactions (default: %u)", Params(CBaseChainParams::MAIN).DefaultConsistencyChecks()));
strUsage += HelpMessageOpt("-checkpoints", strprintf("Disable expensive verification for known chain history (default: %u)", DEFAULT_CHECKPOINTS_ENABLED));
@@ -460,8 +469,11 @@ std::string HelpMessage(HelpMessageMode mode)
AppendParamsHelpMessages(strUsage, showDebug);
strUsage += HelpMessageGroup(_("Node relay options:"));
- if (showDebug)
+ if (showDebug) {
strUsage += HelpMessageOpt("-acceptnonstdtxn", strprintf("Relay and mine \"non-standard\" transactions (%sdefault: %u)", "testnet/regtest only; ", !Params(CBaseChainParams::TESTNET).RequireStandard()));
+ strUsage += HelpMessageOpt("-incrementalrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to define cost of relay, used for mempool limiting and BIP 125 replacement. (default: %s)", CURRENCY_UNIT, FormatMoney(DEFAULT_INCREMENTAL_RELAY_FEE)));
+ strUsage += HelpMessageOpt("-dustrelayfee=<amt>", strprintf("Fee rate (in %s/kB) used to defined dust, the value of an output such that it will cost about 1/3 of its value in fees at this fee rate to spend it. (default: %s)", CURRENCY_UNIT, FormatMoney(DUST_RELAY_TX_FEE)));
+ }
strUsage += HelpMessageOpt("-bytespersigop", strprintf(_("Equivalent bytes per sigop in transactions for relay and mining (default: %u)"), DEFAULT_BYTES_PER_SIGOP));
strUsage += HelpMessageOpt("-datacarrier", strprintf(_("Relay and mine data carrier transactions (default: %u)"), DEFAULT_ACCEPT_DATACARRIER));
strUsage += HelpMessageOpt("-datacarriersize", strprintf(_("Maximum size of data in data carrier transactions we relay and mine (default: %u)"), MAX_OP_RETURN_RELAY));
@@ -471,6 +483,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-blockmaxweight=<n>", strprintf(_("Set maximum BIP141 block weight (default: %d)"), DEFAULT_BLOCK_MAX_WEIGHT));
strUsage += HelpMessageOpt("-blockmaxsize=<n>", strprintf(_("Set maximum block size in bytes (default: %d)"), DEFAULT_BLOCK_MAX_SIZE));
strUsage += HelpMessageOpt("-blockprioritysize=<n>", strprintf(_("Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"), DEFAULT_BLOCK_PRIORITY_SIZE));
+ strUsage += HelpMessageOpt("-blockmintxfee=<amt>", strprintf(_("Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)"), CURRENCY_UNIT, FormatMoney(DEFAULT_BLOCK_MIN_TX_FEE)));
if (showDebug)
strUsage += HelpMessageOpt("-blockversion=<n>", "Override block version to test forking scenarios");
@@ -481,7 +494,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-rpccookiefile=<loc>", _("Location of the auth cookie (default: data dir)"));
strUsage += HelpMessageOpt("-rpcuser=<user>", _("Username for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
- strUsage += HelpMessageOpt("-rpcauth=<userpw>", _("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. This option can be specified multiple times"));
+ strUsage += HelpMessageOpt("-rpcauth=<userpw>", _("Username and hashed password for JSON-RPC connections. The field <userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can be specified multiple times"));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), BaseParams(CBaseChainParams::MAIN).RPCPort(), BaseParams(CBaseChainParams::TESTNET).RPCPort()));
strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times"));
strUsage += HelpMessageOpt("-rpcthreads=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS));
@@ -601,6 +614,8 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
{
const CChainParams& chainparams = Params();
RenameThread("bitcoin-loadblk");
+
+ {
CImportingNow imp;
// -reindex
@@ -660,8 +675,9 @@ void ThreadImport(std::vector<boost::filesystem::path> vImportFiles)
LogPrintf("Stopping after block import\n");
StartShutdown();
}
-
+ } // End scope of CImportingNow
LoadMempool();
+ fDumpMempoolLater = !fRequestShutdown;
}
/** Sanity checks
@@ -703,16 +719,16 @@ void InitParameterInteraction()
{
// when specifying an explicit binding address, you want to listen on it
// even when -connect or -proxy is specified
- if (mapArgs.count("-bind")) {
+ if (IsArgSet("-bind")) {
if (SoftSetBoolArg("-listen", true))
LogPrintf("%s: parameter interaction: -bind set -> setting -listen=1\n", __func__);
}
- if (mapArgs.count("-whitebind")) {
+ if (IsArgSet("-whitebind")) {
if (SoftSetBoolArg("-listen", true))
LogPrintf("%s: parameter interaction: -whitebind set -> setting -listen=1\n", __func__);
}
- if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0) {
+ if (mapMultiArgs.count("-connect") && mapMultiArgs.at("-connect").size() > 0) {
// when only connecting to trusted nodes, do not seed via DNS, or listen by default
if (SoftSetBoolArg("-dnsseed", false))
LogPrintf("%s: parameter interaction: -connect set -> setting -dnsseed=0\n", __func__);
@@ -720,7 +736,7 @@ void InitParameterInteraction()
LogPrintf("%s: parameter interaction: -connect set -> setting -listen=0\n", __func__);
}
- if (mapArgs.count("-proxy")) {
+ if (IsArgSet("-proxy")) {
// to protect privacy, do not listen by default if a default proxy server is specified
if (SoftSetBoolArg("-listen", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
@@ -743,29 +759,16 @@ void InitParameterInteraction()
LogPrintf("%s: parameter interaction: -listen=0 -> setting -listenonion=0\n", __func__);
}
- if (mapArgs.count("-externalip")) {
+ if (IsArgSet("-externalip")) {
// if an explicit public IP is specified, do not try to find others
if (SoftSetBoolArg("-discover", false))
LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__);
}
- if (GetBoolArg("-salvagewallet", false)) {
- // Rewrite just private keys: rescan to find transactions
- if (SoftSetBoolArg("-rescan", true))
- LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
- }
-
- // -zapwallettx implies a rescan
- if (GetBoolArg("-zapwallettxes", false)) {
- if (SoftSetBoolArg("-rescan", true))
- LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
- }
-
- // disable walletbroadcast and whitelistrelay in blocksonly mode
+ // disable whitelistrelay in blocksonly mode
if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY)) {
if (SoftSetBoolArg("-whitelistrelay", false))
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -whitelistrelay=0\n", __func__);
- // walletbroadcast is disabled in CWallet::ParameterInteraction()
}
// Forcing relay from whitelisted hosts implies we will accept relays from them in the first place.
@@ -791,10 +794,17 @@ void InitLogging()
LogPrintf("Bitcoin version %s\n", FormatFullVersion());
}
-/** Initialize bitcoin.
- * @pre Parameters should be parsed and config file should be read.
- */
-bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
+namespace { // Variables internal to initialization process only
+
+ServiceFlags nRelevantServices = NODE_NETWORK;
+int nMaxConnections;
+int nUserMaxConnections;
+int nFD;
+ServiceFlags nLocalServices = NODE_NETWORK;
+
+}
+
+bool AppInitBasicSetup()
{
// ********************************************************* Step 1: setup
#ifdef _MSC_VER
@@ -846,9 +856,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Ignore SIGPIPE, otherwise it will bring the daemon down if the client closes unexpectedly
signal(SIGPIPE, SIG_IGN);
#endif
+ return true;
+}
- // ********************************************************* Step 2: parameter interactions
+bool AppInitParameterInteraction()
+{
const CChainParams& chainparams = Params();
+ // ********************************************************* Step 2: parameter interactions
// also see: InitParameterInteraction()
@@ -859,33 +873,37 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
}
// Make sure enough file descriptors are available
- int nBind = std::max((int)mapArgs.count("-bind") + (int)mapArgs.count("-whitebind"), 1);
- int nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
- int nMaxConnections = std::max(nUserMaxConnections, 0);
+ int nBind = std::max(
+ (mapMultiArgs.count("-bind") ? mapMultiArgs.at("-bind").size() : 0) +
+ (mapMultiArgs.count("-whitebind") ? mapMultiArgs.at("-whitebind").size() : 0), size_t(1));
+ nUserMaxConnections = GetArg("-maxconnections", DEFAULT_MAX_PEER_CONNECTIONS);
+ nMaxConnections = std::max(nUserMaxConnections, 0);
// Trim requested connection counts, to fit into system limitations
- nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS)), 0);
- int nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS);
+ nMaxConnections = std::max(std::min(nMaxConnections, (int)(FD_SETSIZE - nBind - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS)), 0);
+ nFD = RaiseFileDescriptorLimit(nMaxConnections + MIN_CORE_FILEDESCRIPTORS + MAX_ADDNODE_CONNECTIONS);
if (nFD < MIN_CORE_FILEDESCRIPTORS)
return InitError(_("Not enough file descriptors available."));
- nMaxConnections = std::min(nFD - MIN_CORE_FILEDESCRIPTORS, nMaxConnections);
+ nMaxConnections = std::min(nFD - MIN_CORE_FILEDESCRIPTORS - MAX_ADDNODE_CONNECTIONS, nMaxConnections);
if (nMaxConnections < nUserMaxConnections)
InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections));
// ********************************************************* Step 3: parameter-to-internal-flags
- fDebug = !mapMultiArgs["-debug"].empty();
+ fDebug = mapMultiArgs.count("-debug");
// Special-case: if -debug=0/-nodebug is set, turn off debugging messages
- const vector<string>& categories = mapMultiArgs["-debug"];
- if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), string("0")) != categories.end())
- fDebug = false;
+ if (fDebug) {
+ const vector<string>& categories = mapMultiArgs.at("-debug");
+ if (GetBoolArg("-nodebug", false) || find(categories.begin(), categories.end(), string("0")) != categories.end())
+ fDebug = false;
+ }
// Check for -debugnet
if (GetBoolArg("-debugnet", false))
InitWarning(_("Unsupported argument -debugnet ignored, use -debug=net."));
// Check for -socks - as this is a privacy risk to continue, exit here
- if (mapArgs.count("-socks"))
+ if (IsArgSet("-socks"))
return InitError(_("Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported."));
// Check for -tor - as this is a privacy risk to continue, exit here
if (GetBoolArg("-tor", false))
@@ -897,7 +915,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (GetBoolArg("-whitelistalwaysrelay", false))
InitWarning(_("Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay."));
- if (mapArgs.count("-blockminsize"))
+ if (IsArgSet("-blockminsize"))
InitWarning("Unsupported argument -blockminsize ignored.");
// Checkmempool and checkblockindex default to true in regtest mode
@@ -908,11 +926,26 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
fCheckpointsEnabled = GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
+ hashAssumeValid = uint256S(GetArg("-assumevalid", chainparams.GetConsensus().defaultAssumeValid.GetHex()));
+ if (!hashAssumeValid.IsNull())
+ LogPrintf("Assuming ancestors of block %s have valid signatures.\n", hashAssumeValid.GetHex());
+ else
+ LogPrintf("Validating signatures for all blocks.\n");
+
// mempool limits
int64_t nMempoolSizeMax = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
int64_t nMempoolSizeMin = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000 * 40;
if (nMempoolSizeMax < 0 || nMempoolSizeMax < nMempoolSizeMin)
return InitError(strprintf(_("-maxmempool must be at least %d MB"), std::ceil(nMempoolSizeMin / 1000000.0)));
+ // incremental relay fee sets the minimimum feerate increase necessary for BIP 125 replacement in the mempool
+ // and the amount the mempool min fee increases above the feerate of txs evicted due to mempool limiting.
+ if (IsArgSet("-incrementalrelayfee"))
+ {
+ CAmount n = 0;
+ if (!ParseMoney(GetArg("-incrementalrelayfee", ""), n))
+ return InitError(AmountErrMsg("incrementalrelayfee", GetArg("-incrementalrelayfee", "")));
+ incrementalRelayFee = CFeeRate(n);
+ }
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
@@ -923,15 +956,17 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
else if (nScriptCheckThreads > MAX_SCRIPTCHECK_THREADS)
nScriptCheckThreads = MAX_SCRIPTCHECK_THREADS;
- fServer = GetBoolArg("-server", false);
-
// block pruning; get the amount of disk space (in MiB) to allot for block & undo files
- int64_t nSignedPruneTarget = GetArg("-prune", 0) * 1024 * 1024;
- if (nSignedPruneTarget < 0) {
+ int64_t nPruneArg = GetArg("-prune", 0);
+ if (nPruneArg < 0) {
return InitError(_("Prune cannot be configured with a negative value."));
}
- nPruneTarget = (uint64_t) nSignedPruneTarget;
- if (nPruneTarget) {
+ nPruneTarget = (uint64_t) nPruneArg * 1024 * 1024;
+ if (nPruneArg == 1) { // manual pruning: -prune=1
+ LogPrintf("Block pruning enabled. Use RPC call pruneblockchain(height) to manually prune block and undo files.\n");
+ nPruneTarget = std::numeric_limits<uint64_t>::max();
+ fPruneMode = true;
+ } else if (nPruneTarget) {
if (nPruneTarget < MIN_DISK_SPACE_FOR_BLOCK_FILES) {
return InitError(strprintf(_("Prune configured below the minimum of %d MiB. Please use a higher number."), MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024));
}
@@ -954,13 +989,36 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// 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.
- if (mapArgs.count("-minrelaytxfee"))
+ if (IsArgSet("-minrelaytxfee"))
{
CAmount n = 0;
- if (!ParseMoney(mapArgs["-minrelaytxfee"], n) || 0 == n)
- return InitError(AmountErrMsg("minrelaytxfee", mapArgs["-minrelaytxfee"]));
+ if (!ParseMoney(GetArg("-minrelaytxfee", ""), n) || 0 == n)
+ return InitError(AmountErrMsg("minrelaytxfee", GetArg("-minrelaytxfee", "")));
// High fee check is done afterward in CWallet::ParameterInteraction()
::minRelayTxFee = CFeeRate(n);
+ } else if (incrementalRelayFee > ::minRelayTxFee) {
+ // Allow only setting incrementalRelayFee to control both
+ ::minRelayTxFee = incrementalRelayFee;
+ LogPrintf("Increasing minrelaytxfee to %s to match incrementalrelayfee\n",::minRelayTxFee.ToString());
+ }
+
+ // Sanity check argument for min fee for including tx in block
+ // TODO: Harmonize which arguments need sanity checking and where that happens
+ if (IsArgSet("-blockmintxfee"))
+ {
+ CAmount n = 0;
+ if (!ParseMoney(GetArg("-blockmintxfee", ""), n))
+ return InitError(AmountErrMsg("blockmintxfee", GetArg("-blockmintxfee", "")));
+ }
+
+ // Feerate used to define dust. Shouldn't be changed lightly as old
+ // implementations may inadvertently create non-standard transactions
+ if (IsArgSet("-dustrelayfee"))
+ {
+ CAmount n = 0;
+ if (!ParseMoney(GetArg("-dustrelayfee", ""), n) || 0 == n)
+ return InitError(AmountErrMsg("dustrelayfee", GetArg("-dustrelayfee", "")));
+ dustRelayFee = CFeeRate(n);
}
fRequireStandard = !GetBoolArg("-acceptnonstdtxn", !chainparams.RequireStandard());
@@ -980,16 +1038,19 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// Option to startup with mocktime set (used for regression testing):
SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op
- ServiceFlags nLocalServices = NODE_NETWORK;
- ServiceFlags nRelevantServices = NODE_NETWORK;
-
if (GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS))
nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM);
+ if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) < 0)
+ return InitError("rpcserialversion must be non-negative.");
+
+ if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) > 1)
+ return InitError("unknown rpcserialversion requested.");
+
nMaxTipAge = GetArg("-maxtipage", DEFAULT_MAX_TIP_AGE);
fEnableReplacement = GetBoolArg("-mempoolreplacement", DEFAULT_ENABLE_REPLACEMENT);
- if ((!fEnableReplacement) && mapArgs.count("-mempoolreplacement")) {
+ if ((!fEnableReplacement) && IsArgSet("-mempoolreplacement")) {
// Minimal effort at forwards compatibility
std::string strReplacementModeList = GetArg("-mempoolreplacement", ""); // default is impossible
std::vector<std::string> vstrReplacementModes;
@@ -997,12 +1058,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end());
}
- if (!mapMultiArgs["-bip9params"].empty()) {
+ if (mapMultiArgs.count("-bip9params")) {
// Allow overriding BIP9 parameters for testing
if (!chainparams.MineBlocksOnDemand()) {
return InitError("BIP9 parameters may only be overridden on regtest.");
}
- const vector<string>& deployments = mapMultiArgs["-bip9params"];
+ const vector<string>& deployments = mapMultiArgs.at("-bip9params");
for (auto i : deployments) {
std::vector<std::string> vDeploymentParams;
boost::split(vDeploymentParams, i, boost::is_any_of(":"));
@@ -1031,17 +1092,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
}
}
}
+ return true;
+}
- // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log
-
- // Initialize elliptic curve code
- ECC_Start();
- globalVerifyHandle.reset(new ECCVerifyHandle());
-
- // Sanity check
- if (!InitSanityCheck())
- return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME)));
-
+static bool LockDataDirectory(bool probeOnly)
+{
std::string strDataDir = GetDataDir().string();
// Make sure only a single Bitcoin process is using the data directory.
@@ -1051,11 +1106,45 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
try {
static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
- if (!lock.try_lock())
+ if (!lock.try_lock()) {
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running."), strDataDir, _(PACKAGE_NAME)));
+ }
+ if (probeOnly) {
+ lock.unlock();
+ }
} catch(const boost::interprocess::interprocess_exception& e) {
return InitError(strprintf(_("Cannot obtain a lock on data directory %s. %s is probably already running.") + " %s.", strDataDir, _(PACKAGE_NAME), e.what()));
}
+ return true;
+}
+
+bool AppInitSanityChecks()
+{
+ // ********************************************************* Step 4: sanity checks
+
+ // Initialize elliptic curve code
+ ECC_Start();
+ globalVerifyHandle.reset(new ECCVerifyHandle());
+
+ // Sanity check
+ if (!InitSanityCheck())
+ return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), _(PACKAGE_NAME)));
+
+ // Probe the data directory lock to give an early error message, if possible
+ return LockDataDirectory(true);
+}
+
+bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
+{
+ const CChainParams& chainparams = Params();
+ // ********************************************************* Step 4a: application initialization
+ // After daemonization get the data directory lock again and hold on to it until exit
+ // This creates a slight window for a race condition to happen, however this condition is harmless: it
+ // will at most make us exit without printing a message to console.
+ if (!LockDataDirectory(false)) {
+ // Detailed error printed inside LockDataDirectory
+ return false;
+ }
#ifndef WIN32
CreatePidFile(GetPidFile(), getpid());
@@ -1069,9 +1158,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (!fLogTimestamps)
LogPrintf("Startup time: %s\n", DateTimeStrFormat("%Y-%m-%d %H:%M:%S", GetTime()));
LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
- LogPrintf("Using data directory %s\n", strDataDir);
+ LogPrintf("Using data directory %s\n", GetDataDir().string());
LogPrintf("Using config file %s\n", GetConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME)).string());
- LogPrintf("Using at most %i connections (%i file descriptors available)\n", nMaxConnections, nFD);
+ LogPrintf("Using at most %i automatic connections (%i file descriptors available)\n", nMaxConnections, nFD);
+
+ InitSignatureCache();
LogPrintf("Using %u threads for script verification\n", nScriptCheckThreads);
if (nScriptCheckThreads) {
@@ -1088,7 +1179,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
* that the server is there and will be ready later). Warmup mode will
* be disabled when initialisation is finished.
*/
- if (fServer)
+ if (GetBoolArg("-server", false))
{
uiInterface.InitMessage.connect(SetRPCWarmupStatus);
if (!AppInitServers(threadGroup))
@@ -1118,11 +1209,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// sanitize comments per BIP-0014, format user agent and check total size
std::vector<string> uacomments;
- BOOST_FOREACH(string cmt, mapMultiArgs["-uacomment"])
- {
- if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT))
- return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
- uacomments.push_back(SanitizeString(cmt, SAFE_CHARS_UA_COMMENT));
+ if (mapMultiArgs.count("-uacomment")) {
+ BOOST_FOREACH(string cmt, mapMultiArgs.at("-uacomment"))
+ {
+ if (cmt != SanitizeString(cmt, SAFE_CHARS_UA_COMMENT))
+ return InitError(strprintf(_("User Agent comment (%s) contains unsafe characters."), cmt));
+ uacomments.push_back(cmt);
+ }
}
strSubVersion = FormatSubVersion(CLIENT_NAME, CLIENT_VERSION, uacomments);
if (strSubVersion.size() > MAX_SUBVERSION_LENGTH) {
@@ -1130,9 +1223,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
strSubVersion.size(), MAX_SUBVERSION_LENGTH));
}
- if (mapArgs.count("-onlynet")) {
+ if (mapMultiArgs.count("-onlynet")) {
std::set<enum Network> nets;
- BOOST_FOREACH(const std::string& snet, mapMultiArgs["-onlynet"]) {
+ BOOST_FOREACH(const std::string& snet, mapMultiArgs.at("-onlynet")) {
enum Network net = ParseNetwork(snet);
if (net == NET_UNROUTABLE)
return InitError(strprintf(_("Unknown network specified in -onlynet: '%s'"), snet));
@@ -1145,8 +1238,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
}
}
- if (mapArgs.count("-whitelist")) {
- BOOST_FOREACH(const std::string& net, mapMultiArgs["-whitelist"]) {
+ if (mapMultiArgs.count("-whitelist")) {
+ BOOST_FOREACH(const std::string& net, mapMultiArgs.at("-whitelist")) {
CSubNet subnet;
LookupSubNet(net.c_str(), subnet);
if (!subnet.IsValid())
@@ -1198,14 +1291,16 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
if (fListen) {
bool fBound = false;
- if (mapArgs.count("-bind") || mapArgs.count("-whitebind")) {
- BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-bind"]) {
+ if (mapMultiArgs.count("-bind")) {
+ BOOST_FOREACH(const std::string& strBind, mapMultiArgs.at("-bind")) {
CService addrBind;
if (!Lookup(strBind.c_str(), addrBind, GetListenPort(), false))
return InitError(ResolveErrMsg("bind", strBind));
fBound |= Bind(connman, addrBind, (BF_EXPLICIT | BF_REPORT_ERROR));
}
- BOOST_FOREACH(const std::string& strBind, mapMultiArgs["-whitebind"]) {
+ }
+ if (mapMultiArgs.count("-whitebind")) {
+ BOOST_FOREACH(const std::string& strBind, mapMultiArgs.at("-whitebind")) {
CService addrBind;
if (!Lookup(strBind.c_str(), addrBind, 0, false))
return InitError(ResolveErrMsg("whitebind", strBind));
@@ -1214,7 +1309,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fBound |= Bind(connman, addrBind, (BF_EXPLICIT | BF_REPORT_ERROR | BF_WHITELIST));
}
}
- else {
+ if (!mapMultiArgs.count("-bind") && !mapMultiArgs.count("-whitebind")) {
struct in_addr inaddr_any;
inaddr_any.s_addr = INADDR_ANY;
fBound |= Bind(connman, CService(in6addr_any, GetListenPort()), BF_NONE);
@@ -1224,8 +1319,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
return InitError(_("Failed to listen on any port. Use -listen=0 if you want this."));
}
- if (mapArgs.count("-externalip")) {
- BOOST_FOREACH(const std::string& strAddr, mapMultiArgs["-externalip"]) {
+ if (mapMultiArgs.count("-externalip")) {
+ BOOST_FOREACH(const std::string& strAddr, mapMultiArgs.at("-externalip")) {
CService addrLocal;
if (Lookup(strAddr.c_str(), addrLocal, GetListenPort(), fNameLookup) && addrLocal.IsValid())
AddLocal(addrLocal, LOCAL_MANUAL);
@@ -1234,11 +1329,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
}
}
- BOOST_FOREACH(const std::string& strDest, mapMultiArgs["-seednode"])
- connman.AddOneShot(strDest);
+ if (mapMultiArgs.count("-seednode")) {
+ BOOST_FOREACH(const std::string& strDest, mapMultiArgs.at("-seednode"))
+ connman.AddOneShot(strDest);
+ }
#if ENABLE_ZMQ
- pzmqNotificationInterface = CZMQNotificationInterface::CreateWithArguments(mapArgs);
+ pzmqNotificationInterface = CZMQNotificationInterface::Create();
if (pzmqNotificationInterface) {
RegisterValidationInterface(pzmqNotificationInterface);
@@ -1247,7 +1344,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
uint64_t nMaxOutboundLimit = 0; //unlimited unless -maxuploadtarget is set
uint64_t nMaxOutboundTimeframe = MAX_UPLOAD_TIMEFRAME;
- if (mapArgs.count("-maxuploadtarget")) {
+ if (IsArgSet("-maxuploadtarget")) {
nMaxOutboundLimit = GetArg("-maxuploadtarget", DEFAULT_MAX_UPLOAD_TARGET)*1024*1024;
}
@@ -1294,10 +1391,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
nCoinDBCache = std::min(nCoinDBCache, nMaxCoinsDBCache << 20); // cap total coins db cache
nTotalCache -= nCoinDBCache;
nCoinCacheUsage = nTotalCache; // the rest goes to in-memory cache
+ int64_t nMempoolSizeMax = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
LogPrintf("Cache configuration:\n");
LogPrintf("* Using %.1fMiB for block index database\n", nBlockTreeDBCache * (1.0 / 1024 / 1024));
LogPrintf("* Using %.1fMiB for chain state database\n", nCoinDBCache * (1.0 / 1024 / 1024));
- LogPrintf("* Using %.1fMiB for in-memory UTXO set\n", nCoinCacheUsage * (1.0 / 1024 / 1024));
+ LogPrintf("* Using %.1fMiB for in-memory UTXO set (plus up to %.1fMiB of unused mempool space)\n", nCoinCacheUsage * (1.0 / 1024 / 1024), nMempoolSizeMax * (1.0 / 1024 / 1024));
bool fLoaded = false;
while (!fLoaded) {
@@ -1479,13 +1577,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fHaveGenesis = true;
}
- if (mapArgs.count("-blocknotify"))
+ if (IsArgSet("-blocknotify"))
uiInterface.NotifyBlockTip.connect(BlockNotifyCallback);
std::vector<boost::filesystem::path> vImportFiles;
- if (mapArgs.count("-loadblock"))
+ if (mapMultiArgs.count("-loadblock"))
{
- BOOST_FOREACH(const std::string& strFile, mapMultiArgs["-loadblock"])
+ BOOST_FOREACH(const std::string& strFile, mapMultiArgs.at("-loadblock"))
vImportFiles.push_back(strFile);
}
@@ -1519,6 +1617,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
connOptions.nRelevantServices = nRelevantServices;
connOptions.nMaxConnections = nMaxConnections;
connOptions.nMaxOutbound = std::min(MAX_OUTBOUND_CONNECTIONS, connOptions.nMaxConnections);
+ connOptions.nMaxAddnode = MAX_ADDNODE_CONNECTIONS;
connOptions.nMaxFeeler = 1;
connOptions.nBestHeight = chainActive.Height();
connOptions.uiInterface = &uiInterface;
@@ -1528,7 +1627,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
connOptions.nMaxOutboundTimeframe = nMaxOutboundTimeframe;
connOptions.nMaxOutboundLimit = nMaxOutboundLimit;
- if(!connman.Start(threadGroup, scheduler, strNodeError, connOptions))
+ if (!connman.Start(scheduler, strNodeError, connOptions))
return InitError(strNodeError);
// ********************************************************* Step 12: finished
diff --git a/src/init.h b/src/init.h
index 63e07ccb3c..8222794374 100644
--- a/src/init.h
+++ b/src/init.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -25,7 +25,30 @@ void Shutdown();
void InitLogging();
//!Parameter interaction: change current parameters depending on various rules
void InitParameterInteraction();
-bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler);
+
+/** Initialize bitcoin core: Basic context setup.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read.
+ */
+bool AppInitBasicSetup();
+/**
+ * Initialization: parameter interaction.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.
+ */
+bool AppInitParameterInteraction();
+/**
+ * Initialization sanity checks: ecc init, sanity checks, dir lock.
+ * @note This can be done before daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.
+ */
+bool AppInitSanityChecks();
+/**
+ * Bitcoin core main initialization.
+ * @note This should only be done after daemonization.
+ * @pre Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.
+ */
+bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler);
/** The help message mode determines what help message to show */
enum HelpMessageMode {
diff --git a/src/key.cpp b/src/key.cpp
index b3ea98fb92..b4f0dc8202 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/key.h b/src/key.h
index 48a07d62c9..37c74e8732 100644
--- a/src/key.h
+++ b/src/key.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -162,7 +162,7 @@ struct CExtKey {
CExtPubKey Neuter() const;
void SetMaster(const unsigned char* seed, unsigned int nSeedLen);
template <typename Stream>
- void Serialize(Stream& s, int nType, int nVersion) const
+ void Serialize(Stream& s) const
{
unsigned int len = BIP32_EXTKEY_SIZE;
::WriteCompactSize(s, len);
@@ -171,7 +171,7 @@ struct CExtKey {
s.write((const char *)&code[0], len);
}
template <typename Stream>
- void Unserialize(Stream& s, int nType, int nVersion)
+ void Unserialize(Stream& s)
{
unsigned int len = ::ReadCompactSize(s);
unsigned char code[BIP32_EXTKEY_SIZE];
diff --git a/src/keystore.cpp b/src/keystore.cpp
index d568a74350..b17567e99b 100644
--- a/src/keystore.cpp
+++ b/src/keystore.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/leveldb/.travis.yml b/src/leveldb/.travis.yml
new file mode 100644
index 0000000000..f5bd74c454
--- /dev/null
+++ b/src/leveldb/.travis.yml
@@ -0,0 +1,13 @@
+language: cpp
+compiler:
+- clang
+- gcc
+os:
+- linux
+- osx
+sudo: false
+before_install:
+- echo $LANG
+- echo $LC_ALL
+script:
+- make -j 4 check
diff --git a/src/leveldb/Makefile b/src/leveldb/Makefile
index 2bd2cadcdd..07a5a1ead6 100644
--- a/src/leveldb/Makefile
+++ b/src/leveldb/Makefile
@@ -20,208 +20,395 @@ $(shell CC="$(CC)" CXX="$(CXX)" TARGET_OS="$(TARGET_OS)" \
# this file is generated by the previous line to set build flags and sources
include build_config.mk
+TESTS = \
+ db/autocompact_test \
+ db/c_test \
+ db/corruption_test \
+ db/db_test \
+ db/dbformat_test \
+ db/fault_injection_test \
+ db/filename_test \
+ db/log_test \
+ db/recovery_test \
+ db/skiplist_test \
+ db/version_edit_test \
+ db/version_set_test \
+ db/write_batch_test \
+ helpers/memenv/memenv_test \
+ issues/issue178_test \
+ issues/issue200_test \
+ table/filter_block_test \
+ table/table_test \
+ util/arena_test \
+ util/bloom_test \
+ util/cache_test \
+ util/coding_test \
+ util/crc32c_test \
+ util/env_test \
+ util/hash_test
+
+UTILS = \
+ db/db_bench \
+ db/leveldbutil
+
+# Put the object files in a subdirectory, but the application at the top of the object dir.
+PROGNAMES := $(notdir $(TESTS) $(UTILS))
+
+# On Linux may need libkyotocabinet-dev for dependency.
+BENCHMARKS = \
+ doc/bench/db_bench_sqlite3 \
+ doc/bench/db_bench_tree_db
+
CFLAGS += -I. -I./include $(PLATFORM_CCFLAGS) $(OPT)
CXXFLAGS += -I. -I./include $(PLATFORM_CXXFLAGS) $(OPT)
LDFLAGS += $(PLATFORM_LDFLAGS)
LIBS += $(PLATFORM_LIBS)
-LIBOBJECTS = $(SOURCES:.cc=.o)
-MEMENVOBJECTS = $(MEMENV_SOURCES:.cc=.o)
-
-TESTUTIL = ./util/testutil.o
-TESTHARNESS = ./util/testharness.o $(TESTUTIL)
+SIMULATOR_OUTDIR=out-ios-x86
+DEVICE_OUTDIR=out-ios-arm
-# Note: iOS should probably be using libtool, not ar.
ifeq ($(PLATFORM), IOS)
+# Note: iOS should probably be using libtool, not ar.
AR=xcrun ar
+SIMULATORSDK=$(shell xcrun -sdk iphonesimulator --show-sdk-path)
+DEVICESDK=$(shell xcrun -sdk iphoneos --show-sdk-path)
+DEVICE_CFLAGS = -isysroot "$(DEVICESDK)" -arch armv6 -arch armv7 -arch armv7s -arch arm64
+SIMULATOR_CFLAGS = -isysroot "$(SIMULATORSDK)" -arch i686 -arch x86_64
+STATIC_OUTDIR=out-ios-universal
+else
+STATIC_OUTDIR=out-static
+SHARED_OUTDIR=out-shared
+STATIC_PROGRAMS := $(addprefix $(STATIC_OUTDIR)/, $(PROGNAMES))
+SHARED_PROGRAMS := $(addprefix $(SHARED_OUTDIR)/, db_bench)
endif
-TESTS = \
- arena_test \
- autocompact_test \
- bloom_test \
- c_test \
- cache_test \
- coding_test \
- corruption_test \
- crc32c_test \
- db_test \
- dbformat_test \
- env_test \
- filename_test \
- filter_block_test \
- hash_test \
- issue178_test \
- issue200_test \
- log_test \
- memenv_test \
- skiplist_test \
- table_test \
- version_edit_test \
- version_set_test \
- write_batch_test
-
-PROGRAMS = db_bench leveldbutil $(TESTS)
-BENCHMARKS = db_bench_sqlite3 db_bench_tree_db
-
-LIBRARY = libleveldb.a
-MEMENVLIBRARY = libmemenv.a
+STATIC_LIBOBJECTS := $(addprefix $(STATIC_OUTDIR)/, $(SOURCES:.cc=.o))
+STATIC_MEMENVOBJECTS := $(addprefix $(STATIC_OUTDIR)/, $(MEMENV_SOURCES:.cc=.o))
+
+DEVICE_LIBOBJECTS := $(addprefix $(DEVICE_OUTDIR)/, $(SOURCES:.cc=.o))
+DEVICE_MEMENVOBJECTS := $(addprefix $(DEVICE_OUTDIR)/, $(MEMENV_SOURCES:.cc=.o))
+
+SIMULATOR_LIBOBJECTS := $(addprefix $(SIMULATOR_OUTDIR)/, $(SOURCES:.cc=.o))
+SIMULATOR_MEMENVOBJECTS := $(addprefix $(SIMULATOR_OUTDIR)/, $(MEMENV_SOURCES:.cc=.o))
+
+SHARED_LIBOBJECTS := $(addprefix $(SHARED_OUTDIR)/, $(SOURCES:.cc=.o))
+SHARED_MEMENVOBJECTS := $(addprefix $(SHARED_OUTDIR)/, $(MEMENV_SOURCES:.cc=.o))
+
+TESTUTIL := $(STATIC_OUTDIR)/util/testutil.o
+TESTHARNESS := $(STATIC_OUTDIR)/util/testharness.o $(TESTUTIL)
+
+STATIC_TESTOBJS := $(addprefix $(STATIC_OUTDIR)/, $(addsuffix .o, $(TESTS)))
+STATIC_UTILOBJS := $(addprefix $(STATIC_OUTDIR)/, $(addsuffix .o, $(UTILS)))
+STATIC_ALLOBJS := $(STATIC_LIBOBJECTS) $(STATIC_MEMENVOBJECTS) $(STATIC_TESTOBJS) $(STATIC_UTILOBJS) $(TESTHARNESS)
+DEVICE_ALLOBJS := $(DEVICE_LIBOBJECTS) $(DEVICE_MEMENVOBJECTS)
+SIMULATOR_ALLOBJS := $(SIMULATOR_LIBOBJECTS) $(SIMULATOR_MEMENVOBJECTS)
default: all
# Should we build shared libraries?
ifneq ($(PLATFORM_SHARED_EXT),)
+# Many leveldb test apps use non-exported API's. Only build a subset for testing.
+SHARED_ALLOBJS := $(SHARED_LIBOBJECTS) $(SHARED_MEMENVOBJECTS) $(TESTHARNESS)
+
ifneq ($(PLATFORM_SHARED_VERSIONED),true)
-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
-SHARED2 = $(SHARED1)
-SHARED3 = $(SHARED1)
-SHARED = $(SHARED1)
+SHARED_LIB1 = libleveldb.$(PLATFORM_SHARED_EXT)
+SHARED_LIB2 = $(SHARED_LIB1)
+SHARED_LIB3 = $(SHARED_LIB1)
+SHARED_LIBS = $(SHARED_LIB1)
+SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a
else
# Update db.h if you change these.
-SHARED_MAJOR = 1
-SHARED_MINOR = 18
-SHARED1 = libleveldb.$(PLATFORM_SHARED_EXT)
-SHARED2 = $(SHARED1).$(SHARED_MAJOR)
-SHARED3 = $(SHARED1).$(SHARED_MAJOR).$(SHARED_MINOR)
-SHARED = $(SHARED1) $(SHARED2) $(SHARED3)
-$(SHARED1): $(SHARED3)
- ln -fs $(SHARED3) $(SHARED1)
-$(SHARED2): $(SHARED3)
- ln -fs $(SHARED3) $(SHARED2)
+SHARED_VERSION_MAJOR = 1
+SHARED_VERSION_MINOR = 19
+SHARED_LIB1 = libleveldb.$(PLATFORM_SHARED_EXT)
+SHARED_LIB2 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR)
+SHARED_LIB3 = $(SHARED_LIB1).$(SHARED_VERSION_MAJOR).$(SHARED_VERSION_MINOR)
+SHARED_LIBS = $(SHARED_OUTDIR)/$(SHARED_LIB1) $(SHARED_OUTDIR)/$(SHARED_LIB2) $(SHARED_OUTDIR)/$(SHARED_LIB3)
+$(SHARED_OUTDIR)/$(SHARED_LIB1): $(SHARED_OUTDIR)/$(SHARED_LIB3)
+ ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB1)
+$(SHARED_OUTDIR)/$(SHARED_LIB2): $(SHARED_OUTDIR)/$(SHARED_LIB3)
+ ln -fs $(SHARED_LIB3) $(SHARED_OUTDIR)/$(SHARED_LIB2)
+SHARED_MEMENVLIB = $(SHARED_OUTDIR)/libmemenv.a
endif
-$(SHARED3):
- $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED2) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SOURCES) -o $(SHARED3) $(LIBS)
+$(SHARED_OUTDIR)/$(SHARED_LIB3): $(SHARED_LIBOBJECTS)
+ $(CXX) $(LDFLAGS) $(PLATFORM_SHARED_LDFLAGS)$(SHARED_LIB2) $(SHARED_LIBOBJECTS) -o $(SHARED_OUTDIR)/$(SHARED_LIB3) $(LIBS)
endif # PLATFORM_SHARED_EXT
-all: $(SHARED) $(LIBRARY)
+all: $(SHARED_LIBS) $(SHARED_PROGRAMS) $(STATIC_OUTDIR)/libleveldb.a $(STATIC_OUTDIR)/libmemenv.a $(STATIC_PROGRAMS)
-check: all $(PROGRAMS) $(TESTS)
- for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
+check: $(STATIC_PROGRAMS)
+ for t in $(notdir $(TESTS)); do echo "***** Running $$t"; $(STATIC_OUTDIR)/$$t || exit 1; done
clean:
- -rm -f $(PROGRAMS) $(BENCHMARKS) $(LIBRARY) $(SHARED) $(MEMENVLIBRARY) */*.o */*/*.o ios-x86/*/*.o ios-arm/*/*.o build_config.mk
- -rm -rf ios-x86/* ios-arm/*
+ -rm -rf out-static out-shared out-ios-x86 out-ios-arm out-ios-universal
+ -rm -f build_config.mk
+ -rm -rf ios-x86 ios-arm
-$(LIBRARY): $(LIBOBJECTS)
- rm -f $@
- $(AR) -rs $@ $(LIBOBJECTS)
+$(STATIC_OUTDIR):
+ mkdir $@
-db_bench: db/db_bench.o $(LIBOBJECTS) $(TESTUTIL)
- $(CXX) $(LDFLAGS) db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) -o $@ $(LIBS)
+$(STATIC_OUTDIR)/db: | $(STATIC_OUTDIR)
+ mkdir $@
-db_bench_sqlite3: doc/bench/db_bench_sqlite3.o $(LIBOBJECTS) $(TESTUTIL)
- $(CXX) $(LDFLAGS) doc/bench/db_bench_sqlite3.o $(LIBOBJECTS) $(TESTUTIL) -o $@ -lsqlite3 $(LIBS)
+$(STATIC_OUTDIR)/helpers/memenv: | $(STATIC_OUTDIR)
+ mkdir -p $@
-db_bench_tree_db: doc/bench/db_bench_tree_db.o $(LIBOBJECTS) $(TESTUTIL)
- $(CXX) $(LDFLAGS) doc/bench/db_bench_tree_db.o $(LIBOBJECTS) $(TESTUTIL) -o $@ -lkyotocabinet $(LIBS)
+$(STATIC_OUTDIR)/port: | $(STATIC_OUTDIR)
+ mkdir $@
-leveldbutil: db/leveldb_main.o $(LIBOBJECTS)
- $(CXX) $(LDFLAGS) db/leveldb_main.o $(LIBOBJECTS) -o $@ $(LIBS)
+$(STATIC_OUTDIR)/table: | $(STATIC_OUTDIR)
+ mkdir $@
-arena_test: util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(STATIC_OUTDIR)/util: | $(STATIC_OUTDIR)
+ mkdir $@
-autocompact_test: db/autocompact_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/autocompact_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+.PHONY: STATIC_OBJDIRS
+STATIC_OBJDIRS: \
+ $(STATIC_OUTDIR)/db \
+ $(STATIC_OUTDIR)/port \
+ $(STATIC_OUTDIR)/table \
+ $(STATIC_OUTDIR)/util \
+ $(STATIC_OUTDIR)/helpers/memenv
-bloom_test: util/bloom_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/bloom_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR):
+ mkdir $@
-c_test: db/c_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/c_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR)/db: | $(SHARED_OUTDIR)
+ mkdir $@
-cache_test: util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR)/helpers/memenv: | $(SHARED_OUTDIR)
+ mkdir -p $@
-coding_test: util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR)/port: | $(SHARED_OUTDIR)
+ mkdir $@
-corruption_test: db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR)/table: | $(SHARED_OUTDIR)
+ mkdir $@
-crc32c_test: util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SHARED_OUTDIR)/util: | $(SHARED_OUTDIR)
+ mkdir $@
-db_test: db/db_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/db_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+.PHONY: SHARED_OBJDIRS
+SHARED_OBJDIRS: \
+ $(SHARED_OUTDIR)/db \
+ $(SHARED_OUTDIR)/port \
+ $(SHARED_OUTDIR)/table \
+ $(SHARED_OUTDIR)/util \
+ $(SHARED_OUTDIR)/helpers/memenv
-dbformat_test: db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR):
+ mkdir $@
-env_test: util/env_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/env_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR)/db: | $(DEVICE_OUTDIR)
+ mkdir $@
-filename_test: db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR)/helpers/memenv: | $(DEVICE_OUTDIR)
+ mkdir -p $@
-filter_block_test: table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) table/filter_block_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR)/port: | $(DEVICE_OUTDIR)
+ mkdir $@
-hash_test: util/hash_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) util/hash_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR)/table: | $(DEVICE_OUTDIR)
+ mkdir $@
-issue178_test: issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) issues/issue178_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(DEVICE_OUTDIR)/util: | $(DEVICE_OUTDIR)
+ mkdir $@
-issue200_test: issues/issue200_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) issues/issue200_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+.PHONY: DEVICE_OBJDIRS
+DEVICE_OBJDIRS: \
+ $(DEVICE_OUTDIR)/db \
+ $(DEVICE_OUTDIR)/port \
+ $(DEVICE_OUTDIR)/table \
+ $(DEVICE_OUTDIR)/util \
+ $(DEVICE_OUTDIR)/helpers/memenv
-log_test: db/log_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/log_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR):
+ mkdir $@
-table_test: table/table_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) table/table_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR)/db: | $(SIMULATOR_OUTDIR)
+ mkdir $@
-skiplist_test: db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR)/helpers/memenv: | $(SIMULATOR_OUTDIR)
+ mkdir -p $@
-version_edit_test: db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR)/port: | $(SIMULATOR_OUTDIR)
+ mkdir $@
-version_set_test: db/version_set_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/version_set_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR)/table: | $(SIMULATOR_OUTDIR)
+ mkdir $@
-write_batch_test: db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+$(SIMULATOR_OUTDIR)/util: | $(SIMULATOR_OUTDIR)
+ mkdir $@
-$(MEMENVLIBRARY) : $(MEMENVOBJECTS)
- rm -f $@
- $(AR) -rs $@ $(MEMENVOBJECTS)
+.PHONY: SIMULATOR_OBJDIRS
+SIMULATOR_OBJDIRS: \
+ $(SIMULATOR_OUTDIR)/db \
+ $(SIMULATOR_OUTDIR)/port \
+ $(SIMULATOR_OUTDIR)/table \
+ $(SIMULATOR_OUTDIR)/util \
+ $(SIMULATOR_OUTDIR)/helpers/memenv
-memenv_test : helpers/memenv/memenv_test.o $(MEMENVLIBRARY) $(LIBRARY) $(TESTHARNESS)
- $(CXX) $(LDFLAGS) helpers/memenv/memenv_test.o $(MEMENVLIBRARY) $(LIBRARY) $(TESTHARNESS) -o $@ $(LIBS)
+$(STATIC_ALLOBJS): | STATIC_OBJDIRS
+$(DEVICE_ALLOBJS): | DEVICE_OBJDIRS
+$(SIMULATOR_ALLOBJS): | SIMULATOR_OBJDIRS
+$(SHARED_ALLOBJS): | SHARED_OBJDIRS
ifeq ($(PLATFORM), IOS)
-# For iOS, create universal object files to be used on both the simulator and
+$(DEVICE_OUTDIR)/libleveldb.a: $(DEVICE_LIBOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(DEVICE_LIBOBJECTS)
+
+$(SIMULATOR_OUTDIR)/libleveldb.a: $(SIMULATOR_LIBOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(SIMULATOR_LIBOBJECTS)
+
+$(DEVICE_OUTDIR)/libmemenv.a: $(DEVICE_MEMENVOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(DEVICE_MEMENVOBJECTS)
+
+$(SIMULATOR_OUTDIR)/libmemenv.a: $(SIMULATOR_MEMENVOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(SIMULATOR_MEMENVOBJECTS)
+
+# For iOS, create universal object libraries to be used on both the simulator and
# a device.
-PLATFORMSROOT=/Applications/Xcode.app/Contents/Developer/Platforms
-SIMULATORROOT=$(PLATFORMSROOT)/iPhoneSimulator.platform/Developer
-DEVICEROOT=$(PLATFORMSROOT)/iPhoneOS.platform/Developer
-IOSVERSION=$(shell defaults read $(PLATFORMSROOT)/iPhoneOS.platform/version CFBundleShortVersionString)
-IOSARCH=-arch armv6 -arch armv7 -arch armv7s -arch arm64
-
-.cc.o:
- mkdir -p ios-x86/$(dir $@)
- xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
- mkdir -p ios-arm/$(dir $@)
- xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
- xcrun lipo ios-x86/$@ ios-arm/$@ -create -output $@
-
-.c.o:
- mkdir -p ios-x86/$(dir $@)
- xcrun -sdk iphonesimulator $(CC) $(CFLAGS) -isysroot $(SIMULATORROOT)/SDKs/iPhoneSimulator$(IOSVERSION).sdk -arch i686 -arch x86_64 -c $< -o ios-x86/$@
- mkdir -p ios-arm/$(dir $@)
- xcrun -sdk iphoneos $(CC) $(CFLAGS) -isysroot $(DEVICEROOT)/SDKs/iPhoneOS$(IOSVERSION).sdk $(IOSARCH) -c $< -o ios-arm/$@
- xcrun lipo ios-x86/$@ ios-arm/$@ -create -output $@
+$(STATIC_OUTDIR)/libleveldb.a: $(STATIC_OUTDIR) $(DEVICE_OUTDIR)/libleveldb.a $(SIMULATOR_OUTDIR)/libleveldb.a
+ lipo -create $(DEVICE_OUTDIR)/libleveldb.a $(SIMULATOR_OUTDIR)/libleveldb.a -output $@
+$(STATIC_OUTDIR)/libmemenv.a: $(STATIC_OUTDIR) $(DEVICE_OUTDIR)/libmemenv.a $(SIMULATOR_OUTDIR)/libmemenv.a
+ lipo -create $(DEVICE_OUTDIR)/libmemenv.a $(SIMULATOR_OUTDIR)/libmemenv.a -output $@
else
-.cc.o:
+$(STATIC_OUTDIR)/libleveldb.a:$(STATIC_LIBOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(STATIC_LIBOBJECTS)
+
+$(STATIC_OUTDIR)/libmemenv.a:$(STATIC_MEMENVOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(STATIC_MEMENVOBJECTS)
+endif
+
+$(SHARED_MEMENVLIB):$(SHARED_MEMENVOBJECTS)
+ rm -f $@
+ $(AR) -rs $@ $(SHARED_MEMENVOBJECTS)
+
+$(STATIC_OUTDIR)/db_bench:db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/db_bench.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/db_bench_sqlite3:doc/bench/db_bench_sqlite3.cc $(STATIC_LIBOBJECTS) $(TESTUTIL)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) doc/bench/db_bench_sqlite3.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) -o $@ -lsqlite3 $(LIBS)
+
+$(STATIC_OUTDIR)/db_bench_tree_db:doc/bench/db_bench_tree_db.cc $(STATIC_LIBOBJECTS) $(TESTUTIL)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) doc/bench/db_bench_tree_db.cc $(STATIC_LIBOBJECTS) $(TESTUTIL) -o $@ -lkyotocabinet $(LIBS)
+
+$(STATIC_OUTDIR)/leveldbutil:db/leveldbutil.cc $(STATIC_LIBOBJECTS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/leveldbutil.cc $(STATIC_LIBOBJECTS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/arena_test:util/arena_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/arena_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/autocompact_test:db/autocompact_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/autocompact_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/bloom_test:util/bloom_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/bloom_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/c_test:$(STATIC_OUTDIR)/db/c_test.o $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(STATIC_OUTDIR)/db/c_test.o $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/cache_test:util/cache_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/cache_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/coding_test:util/coding_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/coding_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/corruption_test:db/corruption_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/corruption_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/crc32c_test:util/crc32c_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/crc32c_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/db_test:db/db_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/db_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/dbformat_test:db/dbformat_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/dbformat_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/env_test:util/env_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/env_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/fault_injection_test:db/fault_injection_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/fault_injection_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/filename_test:db/filename_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/filename_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/filter_block_test:table/filter_block_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) table/filter_block_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/hash_test:util/hash_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) util/hash_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/issue178_test:issues/issue178_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) issues/issue178_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/issue200_test:issues/issue200_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) issues/issue200_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/log_test:db/log_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/log_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/recovery_test:db/recovery_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/recovery_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/table_test:table/table_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) table/table_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/skiplist_test:db/skiplist_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/skiplist_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/version_edit_test:db/version_edit_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/version_edit_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/version_set_test:db/version_set_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/version_set_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/write_batch_test:db/write_batch_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS)
+ $(CXX) $(LDFLAGS) $(CXXFLAGS) db/write_batch_test.cc $(STATIC_LIBOBJECTS) $(TESTHARNESS) -o $@ $(LIBS)
+
+$(STATIC_OUTDIR)/memenv_test:$(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS)
+ $(XCRUN) $(CXX) $(LDFLAGS) $(STATIC_OUTDIR)/helpers/memenv/memenv_test.o $(STATIC_OUTDIR)/libmemenv.a $(STATIC_OUTDIR)/libleveldb.a $(TESTHARNESS) -o $@ $(LIBS)
+
+$(SHARED_OUTDIR)/db_bench:$(SHARED_OUTDIR)/db/db_bench.o $(SHARED_LIBS) $(TESTUTIL)
+ $(XCRUN) $(CXX) $(LDFLAGS) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(SHARED_OUTDIR)/db/db_bench.o $(TESTUTIL) $(SHARED_OUTDIR)/$(SHARED_LIB3) -o $@ $(LIBS)
+
+.PHONY: run-shared
+run-shared: $(SHARED_OUTDIR)/db_bench
+ LD_LIBRARY_PATH=$(SHARED_OUTDIR) $(SHARED_OUTDIR)/db_bench
+
+$(SIMULATOR_OUTDIR)/%.o: %.cc
+ xcrun -sdk iphonesimulator $(CXX) $(CXXFLAGS) $(SIMULATOR_CFLAGS) -c $< -o $@
+
+$(DEVICE_OUTDIR)/%.o: %.cc
+ xcrun -sdk iphoneos $(CXX) $(CXXFLAGS) $(DEVICE_CFLAGS) -c $< -o $@
+
+$(SIMULATOR_OUTDIR)/%.o: %.c
+ xcrun -sdk iphonesimulator $(CC) $(CFLAGS) $(SIMULATOR_CFLAGS) -c $< -o $@
+
+$(DEVICE_OUTDIR)/%.o: %.c
+ xcrun -sdk iphoneos $(CC) $(CFLAGS) $(DEVICE_CFLAGS) -c $< -o $@
+
+$(STATIC_OUTDIR)/%.o: %.cc
$(CXX) $(CXXFLAGS) -c $< -o $@
-.c.o:
+$(STATIC_OUTDIR)/%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
-endif
+
+$(SHARED_OUTDIR)/%.o: %.cc
+ $(CXX) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) -c $< -o $@
+
+$(SHARED_OUTDIR)/%.o: %.c
+ $(CC) $(CFLAGS) $(PLATFORM_SHARED_CFLAGS) -c $< -o $@
diff --git a/src/leveldb/README b/src/leveldb/README
deleted file mode 100644
index 3618adeeed..0000000000
--- a/src/leveldb/README
+++ /dev/null
@@ -1,51 +0,0 @@
-leveldb: A key-value store
-Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)
-
-The code under this directory implements a system for maintaining a
-persistent key/value store.
-
-See doc/index.html for more explanation.
-See doc/impl.html for a brief overview of the implementation.
-
-The public interface is in include/*.h. Callers should not include or
-rely on the details of any other header files in this package. Those
-internal APIs may be changed without warning.
-
-Guide to header files:
-
-include/db.h
- Main interface to the DB: Start here
-
-include/options.h
- Control over the behavior of an entire database, and also
- control over the behavior of individual reads and writes.
-
-include/comparator.h
- Abstraction for user-specified comparison function. If you want
- just bytewise comparison of keys, you can use the default comparator,
- but clients can write their own comparator implementations if they
- want custom ordering (e.g. to handle different character
- encodings, etc.)
-
-include/iterator.h
- Interface for iterating over data. You can get an iterator
- from a DB object.
-
-include/write_batch.h
- Interface for atomically applying multiple updates to a database.
-
-include/slice.h
- A simple module for maintaining a pointer and a length into some
- other byte array.
-
-include/status.h
- Status is returned from many of the public interfaces and is used
- to report success and various kinds of errors.
-
-include/env.h
- Abstraction of the OS environment. A posix implementation of
- this interface is in util/env_posix.cc
-
-include/table.h
-include/table_builder.h
- Lower-level modules that most clients probably won't use directly
diff --git a/src/leveldb/README.md b/src/leveldb/README.md
index 480affb5ca..c75b185e0e 100644
--- a/src/leveldb/README.md
+++ b/src/leveldb/README.md
@@ -1,5 +1,7 @@
**LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.**
+[![Build Status](https://travis-ci.org/google/leveldb.svg?branch=master)](https://travis-ci.org/google/leveldb)
+
Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)
# Features
@@ -10,9 +12,11 @@ Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)
* Multiple changes can be made in one atomic batch.
* Users can create a transient snapshot to get a consistent view of data.
* Forward and backward iteration is supported over the data.
- * Data is automatically compressed using the [Snappy compression library](http://code.google.com/p/snappy).
+ * Data is automatically compressed using the [Snappy compression library](http://google.github.io/snappy/).
* External activity (file system operations etc.) is relayed through a virtual interface so users can customize the operating system interactions.
- * [Detailed documentation](http://htmlpreview.github.io/?https://github.com/google/leveldb/blob/master/doc/index.html) about how to use the library is included with the source code.
+
+# Documentation
+ [LevelDB library documentation](https://rawgit.com/google/leveldb/master/doc/index.html) is online and bundled with the source code.
# Limitations
@@ -20,6 +24,37 @@ Authors: Sanjay Ghemawat (sanjay@google.com) and Jeff Dean (jeff@google.com)
* Only a single process (possibly multi-threaded) can access a particular database at a time.
* There is no client-server support builtin to the library. An application that needs such support will have to wrap their own server around the library.
+# Contributing to the leveldb Project
+The leveldb project welcomes contributions. leveldb's primary goal is to be
+a reliable and fast key/value store. Changes that are in line with the
+features/limitations outlined above, and meet the requirements below,
+will be considered.
+
+Contribution requirements:
+
+1. **POSIX only**. We _generally_ will only accept changes that are both
+ compiled, and tested on a POSIX platform - usually Linux. Very small
+ changes will sometimes be accepted, but consider that more of an
+ exception than the rule.
+
+2. **Stable API**. We strive very hard to maintain a stable API. Changes that
+ require changes for projects using leveldb _might_ be rejected without
+ sufficient benefit to the project.
+
+3. **Tests**: All changes must be accompanied by a new (or changed) test, or
+ a sufficient explanation as to why a new (or changed) test is not required.
+
+## Submitting a Pull Request
+Before any pull request will be accepted the author must first sign a
+Contributor License Agreement (CLA) at https://cla.developers.google.com/.
+
+In order to keep the commit timeline linear
+[squash](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits)
+your changes down to a single commit and [rebase](https://git-scm.com/docs/git-rebase)
+on google/leveldb/master. This keeps the commit timeline linear and more easily sync'ed
+with the internal repository at Google. More information at GitHub's
+[About Git rebase](https://help.github.com/articles/about-git-rebase/) page.
+
# Performance
Here is a performance report (with explanations) from the run of the
diff --git a/src/leveldb/build_detect_platform b/src/leveldb/build_detect_platform
index a1101c1bda..d7edab1d87 100755
--- a/src/leveldb/build_detect_platform
+++ b/src/leveldb/build_detect_platform
@@ -175,7 +175,7 @@ DIRS="$PREFIX/db $PREFIX/util $PREFIX/table"
set -f # temporarily disable globbing so that our patterns aren't expanded
PRUNE_TEST="-name *test*.cc -prune"
PRUNE_BENCH="-name *_bench.cc -prune"
-PRUNE_TOOL="-name leveldb_main.cc -prune"
+PRUNE_TOOL="-name leveldbutil.cc -prune"
PORTABLE_FILES=`find $DIRS $PRUNE_TEST -o $PRUNE_BENCH -o $PRUNE_TOOL -o -name '*.cc' -print | sort | sed "s,^$PREFIX/,," | tr "\n" " "`
set +f # re-enable globbing
diff --git a/src/leveldb/db/corruption_test.cc b/src/leveldb/db/corruption_test.cc
index 96afc68913..37a484d25f 100644
--- a/src/leveldb/db/corruption_test.cc
+++ b/src/leveldb/db/corruption_test.cc
@@ -36,7 +36,7 @@ class CorruptionTest {
tiny_cache_ = NewLRUCache(100);
options_.env = &env_;
options_.block_cache = tiny_cache_;
- dbname_ = test::TmpDir() + "/db_test";
+ dbname_ = test::TmpDir() + "/corruption_test";
DestroyDB(dbname_, options_);
db_ = NULL;
diff --git a/src/leveldb/db/db_bench.cc b/src/leveldb/db/db_bench.cc
index 705a170aae..7a0f5e08cd 100644
--- a/src/leveldb/db/db_bench.cc
+++ b/src/leveldb/db/db_bench.cc
@@ -33,6 +33,7 @@
// readmissing -- read N missing keys in random order
// readhot -- read N times in random order from 1% section of DB
// seekrandom -- N random seeks
+// open -- cost of opening a DB
// crc32c -- repeated crc32c of 4K of data
// acquireload -- load N*1000 times
// Meta operations:
@@ -99,6 +100,9 @@ static int FLAGS_bloom_bits = -1;
// benchmark will fail.
static bool FLAGS_use_existing_db = false;
+// If true, reuse existing log/MANIFEST files when re-opening a database.
+static bool FLAGS_reuse_logs = false;
+
// Use the db with the following name.
static const char* FLAGS_db = NULL;
@@ -138,6 +142,7 @@ class RandomGenerator {
}
};
+#if defined(__linux)
static Slice TrimSpace(Slice s) {
size_t start = 0;
while (start < s.size() && isspace(s[start])) {
@@ -149,6 +154,7 @@ static Slice TrimSpace(Slice s) {
}
return Slice(s.data() + start, limit - start);
}
+#endif
static void AppendWithSpace(std::string* str, Slice msg) {
if (msg.empty()) return;
@@ -442,7 +448,11 @@ class Benchmark {
bool fresh_db = false;
int num_threads = FLAGS_threads;
- if (name == Slice("fillseq")) {
+ if (name == Slice("open")) {
+ method = &Benchmark::OpenBench;
+ num_ /= 10000;
+ if (num_ < 1) num_ = 1;
+ } else if (name == Slice("fillseq")) {
fresh_db = true;
method = &Benchmark::WriteSeq;
} else if (name == Slice("fillbatch")) {
@@ -695,6 +705,7 @@ class Benchmark {
options.write_buffer_size = FLAGS_write_buffer_size;
options.max_open_files = FLAGS_open_files;
options.filter_policy = filter_policy_;
+ options.reuse_logs = FLAGS_reuse_logs;
Status s = DB::Open(options, FLAGS_db, &db_);
if (!s.ok()) {
fprintf(stderr, "open error: %s\n", s.ToString().c_str());
@@ -702,6 +713,14 @@ class Benchmark {
}
}
+ void OpenBench(ThreadState* thread) {
+ for (int i = 0; i < num_; i++) {
+ delete db_;
+ Open();
+ thread->stats.FinishedSingleOp();
+ }
+ }
+
void WriteSeq(ThreadState* thread) {
DoWrite(thread, true);
}
@@ -941,6 +960,9 @@ int main(int argc, char** argv) {
} else if (sscanf(argv[i], "--use_existing_db=%d%c", &n, &junk) == 1 &&
(n == 0 || n == 1)) {
FLAGS_use_existing_db = n;
+ } else if (sscanf(argv[i], "--reuse_logs=%d%c", &n, &junk) == 1 &&
+ (n == 0 || n == 1)) {
+ FLAGS_reuse_logs = n;
} else if (sscanf(argv[i], "--num=%d%c", &n, &junk) == 1) {
FLAGS_num = n;
} else if (sscanf(argv[i], "--reads=%d%c", &n, &junk) == 1) {
diff --git a/src/leveldb/db/db_impl.cc b/src/leveldb/db/db_impl.cc
index 49b95953b4..60f4e66e55 100644
--- a/src/leveldb/db/db_impl.cc
+++ b/src/leveldb/db/db_impl.cc
@@ -125,7 +125,7 @@ DBImpl::DBImpl(const Options& raw_options, const std::string& dbname)
db_lock_(NULL),
shutting_down_(NULL),
bg_cv_(&mutex_),
- mem_(new MemTable(internal_comparator_)),
+ mem_(NULL),
imm_(NULL),
logfile_(NULL),
logfile_number_(0),
@@ -134,7 +134,6 @@ DBImpl::DBImpl(const Options& raw_options, const std::string& dbname)
tmp_batch_(new WriteBatch),
bg_compaction_scheduled_(false),
manual_compaction_(NULL) {
- mem_->Ref();
has_imm_.Release_Store(NULL);
// Reserve ten files or so for other uses and give the rest to TableCache.
@@ -271,7 +270,7 @@ void DBImpl::DeleteObsoleteFiles() {
}
}
-Status DBImpl::Recover(VersionEdit* edit) {
+Status DBImpl::Recover(VersionEdit* edit, bool *save_manifest) {
mutex_.AssertHeld();
// Ignore error from CreateDir since the creation of the DB is
@@ -301,66 +300,69 @@ Status DBImpl::Recover(VersionEdit* edit) {
}
}
- s = versions_->Recover();
- if (s.ok()) {
- SequenceNumber max_sequence(0);
-
- // Recover from all newer log files than the ones named in the
- // descriptor (new log files may have been added by the previous
- // incarnation without registering them in the descriptor).
- //
- // Note that PrevLogNumber() is no longer used, but we pay
- // attention to it in case we are recovering a database
- // produced by an older version of leveldb.
- const uint64_t min_log = versions_->LogNumber();
- const uint64_t prev_log = versions_->PrevLogNumber();
- std::vector<std::string> filenames;
- s = env_->GetChildren(dbname_, &filenames);
+ s = versions_->Recover(save_manifest);
+ if (!s.ok()) {
+ return s;
+ }
+ SequenceNumber max_sequence(0);
+
+ // Recover from all newer log files than the ones named in the
+ // descriptor (new log files may have been added by the previous
+ // incarnation without registering them in the descriptor).
+ //
+ // Note that PrevLogNumber() is no longer used, but we pay
+ // attention to it in case we are recovering a database
+ // produced by an older version of leveldb.
+ const uint64_t min_log = versions_->LogNumber();
+ const uint64_t prev_log = versions_->PrevLogNumber();
+ std::vector<std::string> filenames;
+ s = env_->GetChildren(dbname_, &filenames);
+ if (!s.ok()) {
+ return s;
+ }
+ std::set<uint64_t> expected;
+ versions_->AddLiveFiles(&expected);
+ uint64_t number;
+ FileType type;
+ std::vector<uint64_t> logs;
+ for (size_t i = 0; i < filenames.size(); i++) {
+ if (ParseFileName(filenames[i], &number, &type)) {
+ expected.erase(number);
+ if (type == kLogFile && ((number >= min_log) || (number == prev_log)))
+ logs.push_back(number);
+ }
+ }
+ if (!expected.empty()) {
+ char buf[50];
+ snprintf(buf, sizeof(buf), "%d missing files; e.g.",
+ static_cast<int>(expected.size()));
+ return Status::Corruption(buf, TableFileName(dbname_, *(expected.begin())));
+ }
+
+ // Recover in the order in which the logs were generated
+ std::sort(logs.begin(), logs.end());
+ for (size_t i = 0; i < logs.size(); i++) {
+ s = RecoverLogFile(logs[i], (i == logs.size() - 1), save_manifest, edit,
+ &max_sequence);
if (!s.ok()) {
return s;
}
- std::set<uint64_t> expected;
- versions_->AddLiveFiles(&expected);
- uint64_t number;
- FileType type;
- std::vector<uint64_t> logs;
- for (size_t i = 0; i < filenames.size(); i++) {
- if (ParseFileName(filenames[i], &number, &type)) {
- expected.erase(number);
- if (type == kLogFile && ((number >= min_log) || (number == prev_log)))
- logs.push_back(number);
- }
- }
- if (!expected.empty()) {
- char buf[50];
- snprintf(buf, sizeof(buf), "%d missing files; e.g.",
- static_cast<int>(expected.size()));
- return Status::Corruption(buf, TableFileName(dbname_, *(expected.begin())));
- }
-
- // Recover in the order in which the logs were generated
- std::sort(logs.begin(), logs.end());
- for (size_t i = 0; i < logs.size(); i++) {
- s = RecoverLogFile(logs[i], edit, &max_sequence);
- // The previous incarnation may not have written any MANIFEST
- // records after allocating this log number. So we manually
- // update the file number allocation counter in VersionSet.
- versions_->MarkFileNumberUsed(logs[i]);
- }
+ // The previous incarnation may not have written any MANIFEST
+ // records after allocating this log number. So we manually
+ // update the file number allocation counter in VersionSet.
+ versions_->MarkFileNumberUsed(logs[i]);
+ }
- if (s.ok()) {
- if (versions_->LastSequence() < max_sequence) {
- versions_->SetLastSequence(max_sequence);
- }
- }
+ if (versions_->LastSequence() < max_sequence) {
+ versions_->SetLastSequence(max_sequence);
}
- return s;
+ return Status::OK();
}
-Status DBImpl::RecoverLogFile(uint64_t log_number,
- VersionEdit* edit,
+Status DBImpl::RecoverLogFile(uint64_t log_number, bool last_log,
+ bool* save_manifest, VersionEdit* edit,
SequenceNumber* max_sequence) {
struct LogReporter : public log::Reader::Reporter {
Env* env;
@@ -405,6 +407,7 @@ Status DBImpl::RecoverLogFile(uint64_t log_number,
std::string scratch;
Slice record;
WriteBatch batch;
+ int compactions = 0;
MemTable* mem = NULL;
while (reader.ReadRecord(&record, &scratch) &&
status.ok()) {
@@ -432,25 +435,52 @@ Status DBImpl::RecoverLogFile(uint64_t log_number,
}
if (mem->ApproximateMemoryUsage() > options_.write_buffer_size) {
+ compactions++;
+ *save_manifest = true;
status = WriteLevel0Table(mem, edit, NULL);
+ mem->Unref();
+ mem = NULL;
if (!status.ok()) {
// Reflect errors immediately so that conditions like full
// file-systems cause the DB::Open() to fail.
break;
}
- mem->Unref();
- mem = NULL;
}
}
- if (status.ok() && mem != NULL) {
- status = WriteLevel0Table(mem, edit, NULL);
- // Reflect errors immediately so that conditions like full
- // file-systems cause the DB::Open() to fail.
+ delete file;
+
+ // See if we should keep reusing the last log file.
+ if (status.ok() && options_.reuse_logs && last_log && compactions == 0) {
+ assert(logfile_ == NULL);
+ assert(log_ == NULL);
+ assert(mem_ == NULL);
+ uint64_t lfile_size;
+ if (env_->GetFileSize(fname, &lfile_size).ok() &&
+ env_->NewAppendableFile(fname, &logfile_).ok()) {
+ Log(options_.info_log, "Reusing old log %s \n", fname.c_str());
+ log_ = new log::Writer(logfile_, lfile_size);
+ logfile_number_ = log_number;
+ if (mem != NULL) {
+ mem_ = mem;
+ mem = NULL;
+ } else {
+ // mem can be NULL if lognum exists but was empty.
+ mem_ = new MemTable(internal_comparator_);
+ mem_->Ref();
+ }
+ }
+ }
+
+ if (mem != NULL) {
+ // mem did not get reused; compact it.
+ if (status.ok()) {
+ *save_manifest = true;
+ status = WriteLevel0Table(mem, edit, NULL);
+ }
+ mem->Unref();
}
- if (mem != NULL) mem->Unref();
- delete file;
return status;
}
@@ -821,8 +851,9 @@ Status DBImpl::FinishCompactionOutputFile(CompactionState* compact,
delete iter;
if (s.ok()) {
Log(options_.info_log,
- "Generated table #%llu: %lld keys, %lld bytes",
+ "Generated table #%llu@%d: %lld keys, %lld bytes",
(unsigned long long) output_number,
+ compact->compaction->level(),
(unsigned long long) current_entries,
(unsigned long long) current_bytes);
}
@@ -1395,6 +1426,19 @@ bool DBImpl::GetProperty(const Slice& property, std::string* value) {
} else if (in == "sstables") {
*value = versions_->current()->DebugString();
return true;
+ } else if (in == "approximate-memory-usage") {
+ size_t total_usage = options_.block_cache->TotalCharge();
+ if (mem_) {
+ total_usage += mem_->ApproximateMemoryUsage();
+ }
+ if (imm_) {
+ total_usage += imm_->ApproximateMemoryUsage();
+ }
+ char buf[50];
+ snprintf(buf, sizeof(buf), "%llu",
+ static_cast<unsigned long long>(total_usage));
+ value->append(buf);
+ return true;
}
return false;
@@ -1449,8 +1493,11 @@ Status DB::Open(const Options& options, const std::string& dbname,
DBImpl* impl = new DBImpl(options, dbname);
impl->mutex_.Lock();
VersionEdit edit;
- Status s = impl->Recover(&edit); // Handles create_if_missing, error_if_exists
- if (s.ok()) {
+ // Recover handles create_if_missing, error_if_exists
+ bool save_manifest = false;
+ Status s = impl->Recover(&edit, &save_manifest);
+ if (s.ok() && impl->mem_ == NULL) {
+ // Create new log and a corresponding memtable.
uint64_t new_log_number = impl->versions_->NewFileNumber();
WritableFile* lfile;
s = options.env->NewWritableFile(LogFileName(dbname, new_log_number),
@@ -1460,15 +1507,22 @@ Status DB::Open(const Options& options, const std::string& dbname,
impl->logfile_ = lfile;
impl->logfile_number_ = new_log_number;
impl->log_ = new log::Writer(lfile);
- s = impl->versions_->LogAndApply(&edit, &impl->mutex_);
- }
- if (s.ok()) {
- impl->DeleteObsoleteFiles();
- impl->MaybeScheduleCompaction();
+ impl->mem_ = new MemTable(impl->internal_comparator_);
+ impl->mem_->Ref();
}
}
+ if (s.ok() && save_manifest) {
+ edit.SetPrevLogNumber(0); // No older logs needed after recovery.
+ edit.SetLogNumber(impl->logfile_number_);
+ s = impl->versions_->LogAndApply(&edit, &impl->mutex_);
+ }
+ if (s.ok()) {
+ impl->DeleteObsoleteFiles();
+ impl->MaybeScheduleCompaction();
+ }
impl->mutex_.Unlock();
if (s.ok()) {
+ assert(impl->mem_ != NULL);
*dbptr = impl;
} else {
delete impl;
diff --git a/src/leveldb/db/db_impl.h b/src/leveldb/db/db_impl.h
index cfc998164a..8ff323e728 100644
--- a/src/leveldb/db/db_impl.h
+++ b/src/leveldb/db/db_impl.h
@@ -78,7 +78,8 @@ class DBImpl : public DB {
// Recover the descriptor from persistent storage. May do a significant
// amount of work to recover recently logged updates. Any changes to
// be made to the descriptor are added to *edit.
- Status Recover(VersionEdit* edit) EXCLUSIVE_LOCKS_REQUIRED(mutex_);
+ Status Recover(VersionEdit* edit, bool* save_manifest)
+ EXCLUSIVE_LOCKS_REQUIRED(mutex_);
void MaybeIgnoreError(Status* s) const;
@@ -90,9 +91,8 @@ class DBImpl : public DB {
// Errors are recorded in bg_error_.
void CompactMemTable() EXCLUSIVE_LOCKS_REQUIRED(mutex_);
- Status RecoverLogFile(uint64_t log_number,
- VersionEdit* edit,
- SequenceNumber* max_sequence)
+ Status RecoverLogFile(uint64_t log_number, bool last_log, bool* save_manifest,
+ VersionEdit* edit, SequenceNumber* max_sequence)
EXCLUSIVE_LOCKS_REQUIRED(mutex_);
Status WriteLevel0Table(MemTable* mem, VersionEdit* edit, Version* base)
diff --git a/src/leveldb/db/db_test.cc b/src/leveldb/db/db_test.cc
index 0fed9137d5..a0b08bc19c 100644
--- a/src/leveldb/db/db_test.cc
+++ b/src/leveldb/db/db_test.cc
@@ -193,6 +193,7 @@ class DBTest {
// Sequence of option configurations to try
enum OptionConfig {
kDefault,
+ kReuse,
kFilter,
kUncompressed,
kEnd
@@ -237,7 +238,11 @@ class DBTest {
// Return the current option configuration.
Options CurrentOptions() {
Options options;
+ options.reuse_logs = false;
switch (option_config_) {
+ case kReuse:
+ options.reuse_logs = true;
+ break;
case kFilter:
options.filter_policy = filter_policy_;
break;
@@ -558,6 +563,17 @@ TEST(DBTest, GetFromVersions) {
} while (ChangeOptions());
}
+TEST(DBTest, GetMemUsage) {
+ do {
+ ASSERT_OK(Put("foo", "v1"));
+ std::string val;
+ ASSERT_TRUE(db_->GetProperty("leveldb.approximate-memory-usage", &val));
+ int mem_usage = atoi(val.c_str());
+ ASSERT_GT(mem_usage, 0);
+ ASSERT_LT(mem_usage, 5*1024*1024);
+ } while (ChangeOptions());
+}
+
TEST(DBTest, GetSnapshot) {
do {
// Try with both a short key and a long key
@@ -1080,6 +1096,14 @@ TEST(DBTest, ApproximateSizes) {
// 0 because GetApproximateSizes() does not account for memtable space
ASSERT_TRUE(Between(Size("", Key(50)), 0, 0));
+ if (options.reuse_logs) {
+ // Recovery will reuse memtable, and GetApproximateSizes() does not
+ // account for memtable usage;
+ Reopen(&options);
+ ASSERT_TRUE(Between(Size("", Key(50)), 0, 0));
+ continue;
+ }
+
// Check sizes across recovery by reopening a few times
for (int run = 0; run < 3; run++) {
Reopen(&options);
@@ -1123,6 +1147,11 @@ TEST(DBTest, ApproximateSizes_MixOfSmallAndLarge) {
ASSERT_OK(Put(Key(6), RandomString(&rnd, 300000)));
ASSERT_OK(Put(Key(7), RandomString(&rnd, 10000)));
+ if (options.reuse_logs) {
+ // Need to force a memtable compaction since recovery does not do so.
+ ASSERT_OK(dbfull()->TEST_CompactMemTable());
+ }
+
// Check sizes across recovery by reopening a few times
for (int run = 0; run < 3; run++) {
Reopen(&options);
@@ -2084,7 +2113,8 @@ void BM_LogAndApply(int iters, int num_base_files) {
InternalKeyComparator cmp(BytewiseComparator());
Options options;
VersionSet vset(dbname, &options, NULL, &cmp);
- ASSERT_OK(vset.Recover());
+ bool save_manifest;
+ ASSERT_OK(vset.Recover(&save_manifest));
VersionEdit vbase;
uint64_t fnum = 1;
for (int i = 0; i < num_base_files; i++) {
diff --git a/src/leveldb/db/fault_injection_test.cc b/src/leveldb/db/fault_injection_test.cc
new file mode 100644
index 0000000000..875dfe81ee
--- /dev/null
+++ b/src/leveldb/db/fault_injection_test.cc
@@ -0,0 +1,554 @@
+// Copyright 2014 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+// This test uses a custom Env to keep track of the state of a filesystem as of
+// the last "sync". It then checks for data loss errors by purposely dropping
+// file data (or entire files) not protected by a "sync".
+
+#include "leveldb/db.h"
+
+#include <map>
+#include <set>
+#include "db/db_impl.h"
+#include "db/filename.h"
+#include "db/log_format.h"
+#include "db/version_set.h"
+#include "leveldb/cache.h"
+#include "leveldb/env.h"
+#include "leveldb/table.h"
+#include "leveldb/write_batch.h"
+#include "util/logging.h"
+#include "util/mutexlock.h"
+#include "util/testharness.h"
+#include "util/testutil.h"
+
+namespace leveldb {
+
+static const int kValueSize = 1000;
+static const int kMaxNumValues = 2000;
+static const size_t kNumIterations = 3;
+
+class FaultInjectionTestEnv;
+
+namespace {
+
+// Assume a filename, and not a directory name like "/foo/bar/"
+static std::string GetDirName(const std::string filename) {
+ size_t found = filename.find_last_of("/\\");
+ if (found == std::string::npos) {
+ return "";
+ } else {
+ return filename.substr(0, found);
+ }
+}
+
+Status SyncDir(const std::string& dir) {
+ // As this is a test it isn't required to *actually* sync this directory.
+ return Status::OK();
+}
+
+// A basic file truncation function suitable for this test.
+Status Truncate(const std::string& filename, uint64_t length) {
+ leveldb::Env* env = leveldb::Env::Default();
+
+ SequentialFile* orig_file;
+ Status s = env->NewSequentialFile(filename, &orig_file);
+ if (!s.ok())
+ return s;
+
+ char* scratch = new char[length];
+ leveldb::Slice result;
+ s = orig_file->Read(length, &result, scratch);
+ delete orig_file;
+ if (s.ok()) {
+ std::string tmp_name = GetDirName(filename) + "/truncate.tmp";
+ WritableFile* tmp_file;
+ s = env->NewWritableFile(tmp_name, &tmp_file);
+ if (s.ok()) {
+ s = tmp_file->Append(result);
+ delete tmp_file;
+ if (s.ok()) {
+ s = env->RenameFile(tmp_name, filename);
+ } else {
+ env->DeleteFile(tmp_name);
+ }
+ }
+ }
+
+ delete[] scratch;
+
+ return s;
+}
+
+struct FileState {
+ std::string filename_;
+ ssize_t pos_;
+ ssize_t pos_at_last_sync_;
+ ssize_t pos_at_last_flush_;
+
+ FileState(const std::string& filename)
+ : filename_(filename),
+ pos_(-1),
+ pos_at_last_sync_(-1),
+ pos_at_last_flush_(-1) { }
+
+ FileState() : pos_(-1), pos_at_last_sync_(-1), pos_at_last_flush_(-1) {}
+
+ bool IsFullySynced() const { return pos_ <= 0 || pos_ == pos_at_last_sync_; }
+
+ Status DropUnsyncedData() const;
+};
+
+} // anonymous namespace
+
+// A wrapper around WritableFile which informs another Env whenever this file
+// is written to or sync'ed.
+class TestWritableFile : public WritableFile {
+ public:
+ TestWritableFile(const FileState& state,
+ WritableFile* f,
+ FaultInjectionTestEnv* env);
+ virtual ~TestWritableFile();
+ virtual Status Append(const Slice& data);
+ virtual Status Close();
+ virtual Status Flush();
+ virtual Status Sync();
+
+ private:
+ FileState state_;
+ WritableFile* target_;
+ bool writable_file_opened_;
+ FaultInjectionTestEnv* env_;
+
+ Status SyncParent();
+};
+
+class FaultInjectionTestEnv : public EnvWrapper {
+ public:
+ FaultInjectionTestEnv() : EnvWrapper(Env::Default()), filesystem_active_(true) {}
+ virtual ~FaultInjectionTestEnv() { }
+ virtual Status NewWritableFile(const std::string& fname,
+ WritableFile** result);
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result);
+ virtual Status DeleteFile(const std::string& f);
+ virtual Status RenameFile(const std::string& s, const std::string& t);
+
+ void WritableFileClosed(const FileState& state);
+ Status DropUnsyncedFileData();
+ Status DeleteFilesCreatedAfterLastDirSync();
+ void DirWasSynced();
+ bool IsFileCreatedSinceLastDirSync(const std::string& filename);
+ void ResetState();
+ void UntrackFile(const std::string& f);
+ // Setting the filesystem to inactive is the test equivalent to simulating a
+ // system reset. Setting to inactive will freeze our saved filesystem state so
+ // that it will stop being recorded. It can then be reset back to the state at
+ // the time of the reset.
+ bool IsFilesystemActive() const { return filesystem_active_; }
+ void SetFilesystemActive(bool active) { filesystem_active_ = active; }
+
+ private:
+ port::Mutex mutex_;
+ std::map<std::string, FileState> db_file_state_;
+ std::set<std::string> new_files_since_last_dir_sync_;
+ bool filesystem_active_; // Record flushes, syncs, writes
+};
+
+TestWritableFile::TestWritableFile(const FileState& state,
+ WritableFile* f,
+ FaultInjectionTestEnv* env)
+ : state_(state),
+ target_(f),
+ writable_file_opened_(true),
+ env_(env) {
+ assert(f != NULL);
+}
+
+TestWritableFile::~TestWritableFile() {
+ if (writable_file_opened_) {
+ Close();
+ }
+ delete target_;
+}
+
+Status TestWritableFile::Append(const Slice& data) {
+ Status s = target_->Append(data);
+ if (s.ok() && env_->IsFilesystemActive()) {
+ state_.pos_ += data.size();
+ }
+ return s;
+}
+
+Status TestWritableFile::Close() {
+ writable_file_opened_ = false;
+ Status s = target_->Close();
+ if (s.ok()) {
+ env_->WritableFileClosed(state_);
+ }
+ return s;
+}
+
+Status TestWritableFile::Flush() {
+ Status s = target_->Flush();
+ if (s.ok() && env_->IsFilesystemActive()) {
+ state_.pos_at_last_flush_ = state_.pos_;
+ }
+ return s;
+}
+
+Status TestWritableFile::SyncParent() {
+ Status s = SyncDir(GetDirName(state_.filename_));
+ if (s.ok()) {
+ env_->DirWasSynced();
+ }
+ return s;
+}
+
+Status TestWritableFile::Sync() {
+ if (!env_->IsFilesystemActive()) {
+ return Status::OK();
+ }
+ // Ensure new files referred to by the manifest are in the filesystem.
+ Status s = target_->Sync();
+ if (s.ok()) {
+ state_.pos_at_last_sync_ = state_.pos_;
+ }
+ if (env_->IsFileCreatedSinceLastDirSync(state_.filename_)) {
+ Status ps = SyncParent();
+ if (s.ok() && !ps.ok()) {
+ s = ps;
+ }
+ }
+ return s;
+}
+
+Status FaultInjectionTestEnv::NewWritableFile(const std::string& fname,
+ WritableFile** result) {
+ WritableFile* actual_writable_file;
+ Status s = target()->NewWritableFile(fname, &actual_writable_file);
+ if (s.ok()) {
+ FileState state(fname);
+ state.pos_ = 0;
+ *result = new TestWritableFile(state, actual_writable_file, this);
+ // NewWritableFile doesn't append to files, so if the same file is
+ // opened again then it will be truncated - so forget our saved
+ // state.
+ UntrackFile(fname);
+ MutexLock l(&mutex_);
+ new_files_since_last_dir_sync_.insert(fname);
+ }
+ return s;
+}
+
+Status FaultInjectionTestEnv::NewAppendableFile(const std::string& fname,
+ WritableFile** result) {
+ WritableFile* actual_writable_file;
+ Status s = target()->NewAppendableFile(fname, &actual_writable_file);
+ if (s.ok()) {
+ FileState state(fname);
+ state.pos_ = 0;
+ {
+ MutexLock l(&mutex_);
+ if (db_file_state_.count(fname) == 0) {
+ new_files_since_last_dir_sync_.insert(fname);
+ } else {
+ state = db_file_state_[fname];
+ }
+ }
+ *result = new TestWritableFile(state, actual_writable_file, this);
+ }
+ return s;
+}
+
+Status FaultInjectionTestEnv::DropUnsyncedFileData() {
+ Status s;
+ MutexLock l(&mutex_);
+ for (std::map<std::string, FileState>::const_iterator it =
+ db_file_state_.begin();
+ s.ok() && it != db_file_state_.end(); ++it) {
+ const FileState& state = it->second;
+ if (!state.IsFullySynced()) {
+ s = state.DropUnsyncedData();
+ }
+ }
+ return s;
+}
+
+void FaultInjectionTestEnv::DirWasSynced() {
+ MutexLock l(&mutex_);
+ new_files_since_last_dir_sync_.clear();
+}
+
+bool FaultInjectionTestEnv::IsFileCreatedSinceLastDirSync(
+ const std::string& filename) {
+ MutexLock l(&mutex_);
+ return new_files_since_last_dir_sync_.find(filename) !=
+ new_files_since_last_dir_sync_.end();
+}
+
+void FaultInjectionTestEnv::UntrackFile(const std::string& f) {
+ MutexLock l(&mutex_);
+ db_file_state_.erase(f);
+ new_files_since_last_dir_sync_.erase(f);
+}
+
+Status FaultInjectionTestEnv::DeleteFile(const std::string& f) {
+ Status s = EnvWrapper::DeleteFile(f);
+ ASSERT_OK(s);
+ if (s.ok()) {
+ UntrackFile(f);
+ }
+ return s;
+}
+
+Status FaultInjectionTestEnv::RenameFile(const std::string& s,
+ const std::string& t) {
+ Status ret = EnvWrapper::RenameFile(s, t);
+
+ if (ret.ok()) {
+ MutexLock l(&mutex_);
+ if (db_file_state_.find(s) != db_file_state_.end()) {
+ db_file_state_[t] = db_file_state_[s];
+ db_file_state_.erase(s);
+ }
+
+ if (new_files_since_last_dir_sync_.erase(s) != 0) {
+ assert(new_files_since_last_dir_sync_.find(t) ==
+ new_files_since_last_dir_sync_.end());
+ new_files_since_last_dir_sync_.insert(t);
+ }
+ }
+
+ return ret;
+}
+
+void FaultInjectionTestEnv::ResetState() {
+ // Since we are not destroying the database, the existing files
+ // should keep their recorded synced/flushed state. Therefore
+ // we do not reset db_file_state_ and new_files_since_last_dir_sync_.
+ MutexLock l(&mutex_);
+ SetFilesystemActive(true);
+}
+
+Status FaultInjectionTestEnv::DeleteFilesCreatedAfterLastDirSync() {
+ // Because DeleteFile access this container make a copy to avoid deadlock
+ mutex_.Lock();
+ std::set<std::string> new_files(new_files_since_last_dir_sync_.begin(),
+ new_files_since_last_dir_sync_.end());
+ mutex_.Unlock();
+ Status s;
+ std::set<std::string>::const_iterator it;
+ for (it = new_files.begin(); s.ok() && it != new_files.end(); ++it) {
+ s = DeleteFile(*it);
+ }
+ return s;
+}
+
+void FaultInjectionTestEnv::WritableFileClosed(const FileState& state) {
+ MutexLock l(&mutex_);
+ db_file_state_[state.filename_] = state;
+}
+
+Status FileState::DropUnsyncedData() const {
+ ssize_t sync_pos = pos_at_last_sync_ == -1 ? 0 : pos_at_last_sync_;
+ return Truncate(filename_, sync_pos);
+}
+
+class FaultInjectionTest {
+ public:
+ enum ExpectedVerifResult { VAL_EXPECT_NO_ERROR, VAL_EXPECT_ERROR };
+ enum ResetMethod { RESET_DROP_UNSYNCED_DATA, RESET_DELETE_UNSYNCED_FILES };
+
+ FaultInjectionTestEnv* env_;
+ std::string dbname_;
+ Cache* tiny_cache_;
+ Options options_;
+ DB* db_;
+
+ FaultInjectionTest()
+ : env_(new FaultInjectionTestEnv),
+ tiny_cache_(NewLRUCache(100)),
+ db_(NULL) {
+ dbname_ = test::TmpDir() + "/fault_test";
+ DestroyDB(dbname_, Options()); // Destroy any db from earlier run
+ options_.reuse_logs = true;
+ options_.env = env_;
+ options_.paranoid_checks = true;
+ options_.block_cache = tiny_cache_;
+ options_.create_if_missing = true;
+ }
+
+ ~FaultInjectionTest() {
+ CloseDB();
+ DestroyDB(dbname_, Options());
+ delete tiny_cache_;
+ delete env_;
+ }
+
+ void ReuseLogs(bool reuse) {
+ options_.reuse_logs = reuse;
+ }
+
+ void Build(int start_idx, int num_vals) {
+ std::string key_space, value_space;
+ WriteBatch batch;
+ for (int i = start_idx; i < start_idx + num_vals; i++) {
+ Slice key = Key(i, &key_space);
+ batch.Clear();
+ batch.Put(key, Value(i, &value_space));
+ WriteOptions options;
+ ASSERT_OK(db_->Write(options, &batch));
+ }
+ }
+
+ Status ReadValue(int i, std::string* val) const {
+ std::string key_space, value_space;
+ Slice key = Key(i, &key_space);
+ Value(i, &value_space);
+ ReadOptions options;
+ return db_->Get(options, key, val);
+ }
+
+ Status Verify(int start_idx, int num_vals,
+ ExpectedVerifResult expected) const {
+ std::string val;
+ std::string value_space;
+ Status s;
+ for (int i = start_idx; i < start_idx + num_vals && s.ok(); i++) {
+ Value(i, &value_space);
+ s = ReadValue(i, &val);
+ if (expected == VAL_EXPECT_NO_ERROR) {
+ if (s.ok()) {
+ ASSERT_EQ(value_space, val);
+ }
+ } else if (s.ok()) {
+ fprintf(stderr, "Expected an error at %d, but was OK\n", i);
+ s = Status::IOError(dbname_, "Expected value error:");
+ } else {
+ s = Status::OK(); // An expected error
+ }
+ }
+ return s;
+ }
+
+ // Return the ith key
+ Slice Key(int i, std::string* storage) const {
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%016d", i);
+ storage->assign(buf, strlen(buf));
+ return Slice(*storage);
+ }
+
+ // Return the value to associate with the specified key
+ Slice Value(int k, std::string* storage) const {
+ Random r(k);
+ return test::RandomString(&r, kValueSize, storage);
+ }
+
+ Status OpenDB() {
+ delete db_;
+ db_ = NULL;
+ env_->ResetState();
+ return DB::Open(options_, dbname_, &db_);
+ }
+
+ void CloseDB() {
+ delete db_;
+ db_ = NULL;
+ }
+
+ void DeleteAllData() {
+ Iterator* iter = db_->NewIterator(ReadOptions());
+ WriteOptions options;
+ for (iter->SeekToFirst(); iter->Valid(); iter->Next()) {
+ ASSERT_OK(db_->Delete(WriteOptions(), iter->key()));
+ }
+
+ delete iter;
+ }
+
+ void ResetDBState(ResetMethod reset_method) {
+ switch (reset_method) {
+ case RESET_DROP_UNSYNCED_DATA:
+ ASSERT_OK(env_->DropUnsyncedFileData());
+ break;
+ case RESET_DELETE_UNSYNCED_FILES:
+ ASSERT_OK(env_->DeleteFilesCreatedAfterLastDirSync());
+ break;
+ default:
+ assert(false);
+ }
+ }
+
+ void PartialCompactTestPreFault(int num_pre_sync, int num_post_sync) {
+ DeleteAllData();
+ Build(0, num_pre_sync);
+ db_->CompactRange(NULL, NULL);
+ Build(num_pre_sync, num_post_sync);
+ }
+
+ void PartialCompactTestReopenWithFault(ResetMethod reset_method,
+ int num_pre_sync,
+ int num_post_sync) {
+ env_->SetFilesystemActive(false);
+ CloseDB();
+ ResetDBState(reset_method);
+ ASSERT_OK(OpenDB());
+ ASSERT_OK(Verify(0, num_pre_sync, FaultInjectionTest::VAL_EXPECT_NO_ERROR));
+ ASSERT_OK(Verify(num_pre_sync, num_post_sync, FaultInjectionTest::VAL_EXPECT_ERROR));
+ }
+
+ void NoWriteTestPreFault() {
+ }
+
+ void NoWriteTestReopenWithFault(ResetMethod reset_method) {
+ CloseDB();
+ ResetDBState(reset_method);
+ ASSERT_OK(OpenDB());
+ }
+
+ void DoTest() {
+ Random rnd(0);
+ ASSERT_OK(OpenDB());
+ for (size_t idx = 0; idx < kNumIterations; idx++) {
+ int num_pre_sync = rnd.Uniform(kMaxNumValues);
+ int num_post_sync = rnd.Uniform(kMaxNumValues);
+
+ PartialCompactTestPreFault(num_pre_sync, num_post_sync);
+ PartialCompactTestReopenWithFault(RESET_DROP_UNSYNCED_DATA,
+ num_pre_sync,
+ num_post_sync);
+
+ NoWriteTestPreFault();
+ NoWriteTestReopenWithFault(RESET_DROP_UNSYNCED_DATA);
+
+ PartialCompactTestPreFault(num_pre_sync, num_post_sync);
+ // No new files created so we expect all values since no files will be
+ // dropped.
+ PartialCompactTestReopenWithFault(RESET_DELETE_UNSYNCED_FILES,
+ num_pre_sync + num_post_sync,
+ 0);
+
+ NoWriteTestPreFault();
+ NoWriteTestReopenWithFault(RESET_DELETE_UNSYNCED_FILES);
+ }
+ }
+};
+
+TEST(FaultInjectionTest, FaultTestNoLogReuse) {
+ ReuseLogs(false);
+ DoTest();
+}
+
+TEST(FaultInjectionTest, FaultTestWithLogReuse) {
+ ReuseLogs(true);
+ DoTest();
+}
+
+} // namespace leveldb
+
+int main(int argc, char** argv) {
+ return leveldb::test::RunAllTests();
+}
diff --git a/src/leveldb/db/leveldb_main.cc b/src/leveldb/db/leveldbutil.cc
index 9f4b7dd70c..9f4b7dd70c 100644
--- a/src/leveldb/db/leveldb_main.cc
+++ b/src/leveldb/db/leveldbutil.cc
diff --git a/src/leveldb/db/log_reader.cc b/src/leveldb/db/log_reader.cc
index e44b66c85b..a6d304545d 100644
--- a/src/leveldb/db/log_reader.cc
+++ b/src/leveldb/db/log_reader.cc
@@ -25,7 +25,8 @@ Reader::Reader(SequentialFile* file, Reporter* reporter, bool checksum,
eof_(false),
last_record_offset_(0),
end_of_buffer_offset_(0),
- initial_offset_(initial_offset) {
+ initial_offset_(initial_offset),
+ resyncing_(initial_offset > 0) {
}
Reader::~Reader() {
@@ -72,8 +73,25 @@ bool Reader::ReadRecord(Slice* record, std::string* scratch) {
Slice fragment;
while (true) {
- uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size();
const unsigned int record_type = ReadPhysicalRecord(&fragment);
+
+ // ReadPhysicalRecord may have only had an empty trailer remaining in its
+ // internal buffer. Calculate the offset of the next physical record now
+ // that it has returned, properly accounting for its header size.
+ uint64_t physical_record_offset =
+ end_of_buffer_offset_ - buffer_.size() - kHeaderSize - fragment.size();
+
+ if (resyncing_) {
+ if (record_type == kMiddleType) {
+ continue;
+ } else if (record_type == kLastType) {
+ resyncing_ = false;
+ continue;
+ } else {
+ resyncing_ = false;
+ }
+ }
+
switch (record_type) {
case kFullType:
if (in_fragmented_record) {
diff --git a/src/leveldb/db/log_reader.h b/src/leveldb/db/log_reader.h
index 6aff791716..8389d61f8f 100644
--- a/src/leveldb/db/log_reader.h
+++ b/src/leveldb/db/log_reader.h
@@ -73,6 +73,11 @@ class Reader {
// Offset at which to start looking for the first record to return
uint64_t const initial_offset_;
+ // True if we are resynchronizing after a seek (initial_offset_ > 0). In
+ // particular, a run of kMiddleType and kLastType records can be silently
+ // skipped in this mode
+ bool resyncing_;
+
// Extend record types with the following special values
enum {
kEof = kMaxRecordType + 1,
diff --git a/src/leveldb/db/log_test.cc b/src/leveldb/db/log_test.cc
index dcf0562652..48a5928657 100644
--- a/src/leveldb/db/log_test.cc
+++ b/src/leveldb/db/log_test.cc
@@ -79,7 +79,7 @@ class LogTest {
virtual Status Skip(uint64_t n) {
if (n > contents_.size()) {
contents_.clear();
- return Status::NotFound("in-memory file skipepd past end");
+ return Status::NotFound("in-memory file skipped past end");
}
contents_.remove_prefix(n);
@@ -104,23 +104,34 @@ class LogTest {
StringSource source_;
ReportCollector report_;
bool reading_;
- Writer writer_;
- Reader reader_;
+ Writer* writer_;
+ Reader* reader_;
// Record metadata for testing initial offset functionality
static size_t initial_offset_record_sizes_[];
static uint64_t initial_offset_last_record_offsets_[];
+ static int num_initial_offset_records_;
public:
LogTest() : reading_(false),
- writer_(&dest_),
- reader_(&source_, &report_, true/*checksum*/,
- 0/*initial_offset*/) {
+ writer_(new Writer(&dest_)),
+ reader_(new Reader(&source_, &report_, true/*checksum*/,
+ 0/*initial_offset*/)) {
+ }
+
+ ~LogTest() {
+ delete writer_;
+ delete reader_;
+ }
+
+ void ReopenForAppend() {
+ delete writer_;
+ writer_ = new Writer(&dest_, dest_.contents_.size());
}
void Write(const std::string& msg) {
ASSERT_TRUE(!reading_) << "Write() after starting to read";
- writer_.AddRecord(Slice(msg));
+ writer_->AddRecord(Slice(msg));
}
size_t WrittenBytes() const {
@@ -134,7 +145,7 @@ class LogTest {
}
std::string scratch;
Slice record;
- if (reader_.ReadRecord(&record, &scratch)) {
+ if (reader_->ReadRecord(&record, &scratch)) {
return record.ToString();
} else {
return "EOF";
@@ -182,13 +193,18 @@ class LogTest {
}
void WriteInitialOffsetLog() {
- for (int i = 0; i < 4; i++) {
+ for (int i = 0; i < num_initial_offset_records_; i++) {
std::string record(initial_offset_record_sizes_[i],
static_cast<char>('a' + i));
Write(record);
}
}
+ void StartReadingAt(uint64_t initial_offset) {
+ delete reader_;
+ reader_ = new Reader(&source_, &report_, true/*checksum*/, initial_offset);
+ }
+
void CheckOffsetPastEndReturnsNoRecords(uint64_t offset_past_end) {
WriteInitialOffsetLog();
reading_ = true;
@@ -208,32 +224,48 @@ class LogTest {
source_.contents_ = Slice(dest_.contents_);
Reader* offset_reader = new Reader(&source_, &report_, true/*checksum*/,
initial_offset);
- Slice record;
- std::string scratch;
- ASSERT_TRUE(offset_reader->ReadRecord(&record, &scratch));
- ASSERT_EQ(initial_offset_record_sizes_[expected_record_offset],
- record.size());
- ASSERT_EQ(initial_offset_last_record_offsets_[expected_record_offset],
- offset_reader->LastRecordOffset());
- ASSERT_EQ((char)('a' + expected_record_offset), record.data()[0]);
+
+ // Read all records from expected_record_offset through the last one.
+ ASSERT_LT(expected_record_offset, num_initial_offset_records_);
+ for (; expected_record_offset < num_initial_offset_records_;
+ ++expected_record_offset) {
+ Slice record;
+ std::string scratch;
+ ASSERT_TRUE(offset_reader->ReadRecord(&record, &scratch));
+ ASSERT_EQ(initial_offset_record_sizes_[expected_record_offset],
+ record.size());
+ ASSERT_EQ(initial_offset_last_record_offsets_[expected_record_offset],
+ offset_reader->LastRecordOffset());
+ ASSERT_EQ((char)('a' + expected_record_offset), record.data()[0]);
+ }
delete offset_reader;
}
-
};
size_t LogTest::initial_offset_record_sizes_[] =
{10000, // Two sizable records in first block
10000,
2 * log::kBlockSize - 1000, // Span three blocks
- 1};
+ 1,
+ 13716, // Consume all but two bytes of block 3.
+ log::kBlockSize - kHeaderSize, // Consume the entirety of block 4.
+ };
uint64_t LogTest::initial_offset_last_record_offsets_[] =
{0,
kHeaderSize + 10000,
2 * (kHeaderSize + 10000),
2 * (kHeaderSize + 10000) +
- (2 * log::kBlockSize - 1000) + 3 * kHeaderSize};
+ (2 * log::kBlockSize - 1000) + 3 * kHeaderSize,
+ 2 * (kHeaderSize + 10000) +
+ (2 * log::kBlockSize - 1000) + 3 * kHeaderSize
+ + kHeaderSize + 1,
+ 3 * log::kBlockSize,
+ };
+// LogTest::initial_offset_last_record_offsets_ must be defined before this.
+int LogTest::num_initial_offset_records_ =
+ sizeof(LogTest::initial_offset_last_record_offsets_)/sizeof(uint64_t);
TEST(LogTest, Empty) {
ASSERT_EQ("EOF", Read());
@@ -318,6 +350,15 @@ TEST(LogTest, AlignedEof) {
ASSERT_EQ("EOF", Read());
}
+TEST(LogTest, OpenForAppend) {
+ Write("hello");
+ ReopenForAppend();
+ Write("world");
+ ASSERT_EQ("hello", Read());
+ ASSERT_EQ("world", Read());
+ ASSERT_EQ("EOF", Read());
+}
+
TEST(LogTest, RandomRead) {
const int N = 500;
Random write_rnd(301);
@@ -445,6 +486,22 @@ TEST(LogTest, PartialLastIsIgnored) {
ASSERT_EQ(0, DroppedBytes());
}
+TEST(LogTest, SkipIntoMultiRecord) {
+ // Consider a fragmented record:
+ // first(R1), middle(R1), last(R1), first(R2)
+ // If initial_offset points to a record after first(R1) but before first(R2)
+ // incomplete fragment errors are not actual errors, and must be suppressed
+ // until a new first or full record is encountered.
+ Write(BigString("foo", 3*kBlockSize));
+ Write("correct");
+ StartReadingAt(kBlockSize);
+
+ ASSERT_EQ("correct", Read());
+ ASSERT_EQ("", ReportMessage());
+ ASSERT_EQ(0, DroppedBytes());
+ ASSERT_EQ("EOF", Read());
+}
+
TEST(LogTest, ErrorJoinsRecords) {
// Consider two fragmented records:
// first(R1) last(R1) first(R2) last(R2)
@@ -514,6 +571,10 @@ TEST(LogTest, ReadFourthStart) {
3);
}
+TEST(LogTest, ReadInitialOffsetIntoBlockPadding) {
+ CheckInitialOffsetRecord(3 * log::kBlockSize - 3, 5);
+}
+
TEST(LogTest, ReadEnd) {
CheckOffsetPastEndReturnsNoRecords(0);
}
diff --git a/src/leveldb/db/log_writer.cc b/src/leveldb/db/log_writer.cc
index 2da99ac088..74a03270da 100644
--- a/src/leveldb/db/log_writer.cc
+++ b/src/leveldb/db/log_writer.cc
@@ -12,15 +12,24 @@
namespace leveldb {
namespace log {
-Writer::Writer(WritableFile* dest)
- : dest_(dest),
- block_offset_(0) {
+static void InitTypeCrc(uint32_t* type_crc) {
for (int i = 0; i <= kMaxRecordType; i++) {
char t = static_cast<char>(i);
- type_crc_[i] = crc32c::Value(&t, 1);
+ type_crc[i] = crc32c::Value(&t, 1);
}
}
+Writer::Writer(WritableFile* dest)
+ : dest_(dest),
+ block_offset_(0) {
+ InitTypeCrc(type_crc_);
+}
+
+Writer::Writer(WritableFile* dest, uint64_t dest_length)
+ : dest_(dest), block_offset_(dest_length % kBlockSize) {
+ InitTypeCrc(type_crc_);
+}
+
Writer::~Writer() {
}
diff --git a/src/leveldb/db/log_writer.h b/src/leveldb/db/log_writer.h
index a3a954d967..9e7cc4705b 100644
--- a/src/leveldb/db/log_writer.h
+++ b/src/leveldb/db/log_writer.h
@@ -22,6 +22,12 @@ class Writer {
// "*dest" must be initially empty.
// "*dest" must remain live while this Writer is in use.
explicit Writer(WritableFile* dest);
+
+ // Create a writer that will append data to "*dest".
+ // "*dest" must have initial length "dest_length".
+ // "*dest" must remain live while this Writer is in use.
+ Writer(WritableFile* dest, uint64_t dest_length);
+
~Writer();
Status AddRecord(const Slice& slice);
diff --git a/src/leveldb/db/memtable.h b/src/leveldb/db/memtable.h
index 92e90bb099..9f41567cde 100644
--- a/src/leveldb/db/memtable.h
+++ b/src/leveldb/db/memtable.h
@@ -36,10 +36,7 @@ class MemTable {
}
// Returns an estimate of the number of bytes of data in use by this
- // data structure.
- //
- // REQUIRES: external synchronization to prevent simultaneous
- // operations on the same MemTable.
+ // data structure. It is safe to call when MemTable is being modified.
size_t ApproximateMemoryUsage();
// Return an iterator that yields the contents of the memtable.
diff --git a/src/leveldb/db/recovery_test.cc b/src/leveldb/db/recovery_test.cc
new file mode 100644
index 0000000000..9596f4288a
--- /dev/null
+++ b/src/leveldb/db/recovery_test.cc
@@ -0,0 +1,324 @@
+// Copyright (c) 2014 The LevelDB Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file. See the AUTHORS file for names of contributors.
+
+#include "db/db_impl.h"
+#include "db/filename.h"
+#include "db/version_set.h"
+#include "db/write_batch_internal.h"
+#include "leveldb/db.h"
+#include "leveldb/env.h"
+#include "leveldb/write_batch.h"
+#include "util/logging.h"
+#include "util/testharness.h"
+#include "util/testutil.h"
+
+namespace leveldb {
+
+class RecoveryTest {
+ public:
+ RecoveryTest() : env_(Env::Default()), db_(NULL) {
+ dbname_ = test::TmpDir() + "/recovery_test";
+ DestroyDB(dbname_, Options());
+ Open();
+ }
+
+ ~RecoveryTest() {
+ Close();
+ DestroyDB(dbname_, Options());
+ }
+
+ DBImpl* dbfull() const { return reinterpret_cast<DBImpl*>(db_); }
+ Env* env() const { return env_; }
+
+ bool CanAppend() {
+ WritableFile* tmp;
+ Status s = env_->NewAppendableFile(CurrentFileName(dbname_), &tmp);
+ delete tmp;
+ if (s.IsNotSupportedError()) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ void Close() {
+ delete db_;
+ db_ = NULL;
+ }
+
+ void Open(Options* options = NULL) {
+ Close();
+ Options opts;
+ if (options != NULL) {
+ opts = *options;
+ } else {
+ opts.reuse_logs = true; // TODO(sanjay): test both ways
+ opts.create_if_missing = true;
+ }
+ if (opts.env == NULL) {
+ opts.env = env_;
+ }
+ ASSERT_OK(DB::Open(opts, dbname_, &db_));
+ ASSERT_EQ(1, NumLogs());
+ }
+
+ Status Put(const std::string& k, const std::string& v) {
+ return db_->Put(WriteOptions(), k, v);
+ }
+
+ std::string Get(const std::string& k, const Snapshot* snapshot = NULL) {
+ std::string result;
+ Status s = db_->Get(ReadOptions(), k, &result);
+ if (s.IsNotFound()) {
+ result = "NOT_FOUND";
+ } else if (!s.ok()) {
+ result = s.ToString();
+ }
+ return result;
+ }
+
+ std::string ManifestFileName() {
+ std::string current;
+ ASSERT_OK(ReadFileToString(env_, CurrentFileName(dbname_), &current));
+ size_t len = current.size();
+ if (len > 0 && current[len-1] == '\n') {
+ current.resize(len - 1);
+ }
+ return dbname_ + "/" + current;
+ }
+
+ std::string LogName(uint64_t number) {
+ return LogFileName(dbname_, number);
+ }
+
+ size_t DeleteLogFiles() {
+ std::vector<uint64_t> logs = GetFiles(kLogFile);
+ for (size_t i = 0; i < logs.size(); i++) {
+ ASSERT_OK(env_->DeleteFile(LogName(logs[i]))) << LogName(logs[i]);
+ }
+ return logs.size();
+ }
+
+ uint64_t FirstLogFile() {
+ return GetFiles(kLogFile)[0];
+ }
+
+ std::vector<uint64_t> GetFiles(FileType t) {
+ std::vector<std::string> filenames;
+ ASSERT_OK(env_->GetChildren(dbname_, &filenames));
+ std::vector<uint64_t> result;
+ for (size_t i = 0; i < filenames.size(); i++) {
+ uint64_t number;
+ FileType type;
+ if (ParseFileName(filenames[i], &number, &type) && type == t) {
+ result.push_back(number);
+ }
+ }
+ return result;
+ }
+
+ int NumLogs() {
+ return GetFiles(kLogFile).size();
+ }
+
+ int NumTables() {
+ return GetFiles(kTableFile).size();
+ }
+
+ uint64_t FileSize(const std::string& fname) {
+ uint64_t result;
+ ASSERT_OK(env_->GetFileSize(fname, &result)) << fname;
+ return result;
+ }
+
+ void CompactMemTable() {
+ dbfull()->TEST_CompactMemTable();
+ }
+
+ // Directly construct a log file that sets key to val.
+ void MakeLogFile(uint64_t lognum, SequenceNumber seq, Slice key, Slice val) {
+ std::string fname = LogFileName(dbname_, lognum);
+ WritableFile* file;
+ ASSERT_OK(env_->NewWritableFile(fname, &file));
+ log::Writer writer(file);
+ WriteBatch batch;
+ batch.Put(key, val);
+ WriteBatchInternal::SetSequence(&batch, seq);
+ ASSERT_OK(writer.AddRecord(WriteBatchInternal::Contents(&batch)));
+ ASSERT_OK(file->Flush());
+ delete file;
+ }
+
+ private:
+ std::string dbname_;
+ Env* env_;
+ DB* db_;
+};
+
+TEST(RecoveryTest, ManifestReused) {
+ if (!CanAppend()) {
+ fprintf(stderr, "skipping test because env does not support appending\n");
+ return;
+ }
+ ASSERT_OK(Put("foo", "bar"));
+ Close();
+ std::string old_manifest = ManifestFileName();
+ Open();
+ ASSERT_EQ(old_manifest, ManifestFileName());
+ ASSERT_EQ("bar", Get("foo"));
+ Open();
+ ASSERT_EQ(old_manifest, ManifestFileName());
+ ASSERT_EQ("bar", Get("foo"));
+}
+
+TEST(RecoveryTest, LargeManifestCompacted) {
+ if (!CanAppend()) {
+ fprintf(stderr, "skipping test because env does not support appending\n");
+ return;
+ }
+ ASSERT_OK(Put("foo", "bar"));
+ Close();
+ std::string old_manifest = ManifestFileName();
+
+ // Pad with zeroes to make manifest file very big.
+ {
+ uint64_t len = FileSize(old_manifest);
+ WritableFile* file;
+ ASSERT_OK(env()->NewAppendableFile(old_manifest, &file));
+ std::string zeroes(3*1048576 - static_cast<size_t>(len), 0);
+ ASSERT_OK(file->Append(zeroes));
+ ASSERT_OK(file->Flush());
+ delete file;
+ }
+
+ Open();
+ std::string new_manifest = ManifestFileName();
+ ASSERT_NE(old_manifest, new_manifest);
+ ASSERT_GT(10000, FileSize(new_manifest));
+ ASSERT_EQ("bar", Get("foo"));
+
+ Open();
+ ASSERT_EQ(new_manifest, ManifestFileName());
+ ASSERT_EQ("bar", Get("foo"));
+}
+
+TEST(RecoveryTest, NoLogFiles) {
+ ASSERT_OK(Put("foo", "bar"));
+ ASSERT_EQ(1, DeleteLogFiles());
+ Open();
+ ASSERT_EQ("NOT_FOUND", Get("foo"));
+ Open();
+ ASSERT_EQ("NOT_FOUND", Get("foo"));
+}
+
+TEST(RecoveryTest, LogFileReuse) {
+ if (!CanAppend()) {
+ fprintf(stderr, "skipping test because env does not support appending\n");
+ return;
+ }
+ for (int i = 0; i < 2; i++) {
+ ASSERT_OK(Put("foo", "bar"));
+ if (i == 0) {
+ // Compact to ensure current log is empty
+ CompactMemTable();
+ }
+ Close();
+ ASSERT_EQ(1, NumLogs());
+ uint64_t number = FirstLogFile();
+ if (i == 0) {
+ ASSERT_EQ(0, FileSize(LogName(number)));
+ } else {
+ ASSERT_LT(0, FileSize(LogName(number)));
+ }
+ Open();
+ ASSERT_EQ(1, NumLogs());
+ ASSERT_EQ(number, FirstLogFile()) << "did not reuse log file";
+ ASSERT_EQ("bar", Get("foo"));
+ Open();
+ ASSERT_EQ(1, NumLogs());
+ ASSERT_EQ(number, FirstLogFile()) << "did not reuse log file";
+ ASSERT_EQ("bar", Get("foo"));
+ }
+}
+
+TEST(RecoveryTest, MultipleMemTables) {
+ // Make a large log.
+ const int kNum = 1000;
+ for (int i = 0; i < kNum; i++) {
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%050d", i);
+ ASSERT_OK(Put(buf, buf));
+ }
+ ASSERT_EQ(0, NumTables());
+ Close();
+ ASSERT_EQ(0, NumTables());
+ ASSERT_EQ(1, NumLogs());
+ uint64_t old_log_file = FirstLogFile();
+
+ // Force creation of multiple memtables by reducing the write buffer size.
+ Options opt;
+ opt.reuse_logs = true;
+ opt.write_buffer_size = (kNum*100) / 2;
+ Open(&opt);
+ ASSERT_LE(2, NumTables());
+ ASSERT_EQ(1, NumLogs());
+ ASSERT_NE(old_log_file, FirstLogFile()) << "must not reuse log";
+ for (int i = 0; i < kNum; i++) {
+ char buf[100];
+ snprintf(buf, sizeof(buf), "%050d", i);
+ ASSERT_EQ(buf, Get(buf));
+ }
+}
+
+TEST(RecoveryTest, MultipleLogFiles) {
+ ASSERT_OK(Put("foo", "bar"));
+ Close();
+ ASSERT_EQ(1, NumLogs());
+
+ // Make a bunch of uncompacted log files.
+ uint64_t old_log = FirstLogFile();
+ MakeLogFile(old_log+1, 1000, "hello", "world");
+ MakeLogFile(old_log+2, 1001, "hi", "there");
+ MakeLogFile(old_log+3, 1002, "foo", "bar2");
+
+ // Recover and check that all log files were processed.
+ Open();
+ ASSERT_LE(1, NumTables());
+ ASSERT_EQ(1, NumLogs());
+ uint64_t new_log = FirstLogFile();
+ ASSERT_LE(old_log+3, new_log);
+ ASSERT_EQ("bar2", Get("foo"));
+ ASSERT_EQ("world", Get("hello"));
+ ASSERT_EQ("there", Get("hi"));
+
+ // Test that previous recovery produced recoverable state.
+ Open();
+ ASSERT_LE(1, NumTables());
+ ASSERT_EQ(1, NumLogs());
+ if (CanAppend()) {
+ ASSERT_EQ(new_log, FirstLogFile());
+ }
+ ASSERT_EQ("bar2", Get("foo"));
+ ASSERT_EQ("world", Get("hello"));
+ ASSERT_EQ("there", Get("hi"));
+
+ // Check that introducing an older log file does not cause it to be re-read.
+ Close();
+ MakeLogFile(old_log+1, 2000, "hello", "stale write");
+ Open();
+ ASSERT_LE(1, NumTables());
+ ASSERT_EQ(1, NumLogs());
+ if (CanAppend()) {
+ ASSERT_EQ(new_log, FirstLogFile());
+ }
+ ASSERT_EQ("bar2", Get("foo"));
+ ASSERT_EQ("world", Get("hello"));
+ ASSERT_EQ("there", Get("hi"));
+}
+
+} // namespace leveldb
+
+int main(int argc, char** argv) {
+ return leveldb::test::RunAllTests();
+}
diff --git a/src/leveldb/db/skiplist.h b/src/leveldb/db/skiplist.h
index ed8b092203..8bd77764d8 100644
--- a/src/leveldb/db/skiplist.h
+++ b/src/leveldb/db/skiplist.h
@@ -1,10 +1,10 @@
-#ifndef STORAGE_LEVELDB_DB_SKIPLIST_H_
-#define STORAGE_LEVELDB_DB_SKIPLIST_H_
-
// Copyright (c) 2011 The LevelDB Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. See the AUTHORS file for names of contributors.
-//
+
+#ifndef STORAGE_LEVELDB_DB_SKIPLIST_H_
+#define STORAGE_LEVELDB_DB_SKIPLIST_H_
+
// Thread safety
// -------------
//
diff --git a/src/leveldb/db/skiplist_test.cc b/src/leveldb/db/skiplist_test.cc
index c78f4b4fb1..aee1461e1b 100644
--- a/src/leveldb/db/skiplist_test.cc
+++ b/src/leveldb/db/skiplist_test.cc
@@ -250,7 +250,7 @@ class ConcurrentTest {
// Note that generation 0 is never inserted, so it is ok if
// <*,0,*> is missing.
ASSERT_TRUE((gen(pos) == 0) ||
- (gen(pos) > initial_state.Get(key(pos)))
+ (gen(pos) > static_cast<Key>(initial_state.Get(key(pos))))
) << "key: " << key(pos)
<< "; gen: " << gen(pos)
<< "; initgen: "
diff --git a/src/leveldb/db/snapshot.h b/src/leveldb/db/snapshot.h
index e7f8fd2c37..6ed413c42d 100644
--- a/src/leveldb/db/snapshot.h
+++ b/src/leveldb/db/snapshot.h
@@ -5,6 +5,7 @@
#ifndef STORAGE_LEVELDB_DB_SNAPSHOT_H_
#define STORAGE_LEVELDB_DB_SNAPSHOT_H_
+#include "db/dbformat.h"
#include "leveldb/db.h"
namespace leveldb {
diff --git a/src/leveldb/db/version_set.cc b/src/leveldb/db/version_set.cc
index aa83df55e4..a5e0f77a6a 100644
--- a/src/leveldb/db/version_set.cc
+++ b/src/leveldb/db/version_set.cc
@@ -893,7 +893,7 @@ Status VersionSet::LogAndApply(VersionEdit* edit, port::Mutex* mu) {
return s;
}
-Status VersionSet::Recover() {
+Status VersionSet::Recover(bool *save_manifest) {
struct LogReporter : public log::Reader::Reporter {
Status* status;
virtual void Corruption(size_t bytes, const Status& s) {
@@ -1003,11 +1003,49 @@ Status VersionSet::Recover() {
last_sequence_ = last_sequence;
log_number_ = log_number;
prev_log_number_ = prev_log_number;
+
+ // See if we can reuse the existing MANIFEST file.
+ if (ReuseManifest(dscname, current)) {
+ // No need to save new manifest
+ } else {
+ *save_manifest = true;
+ }
}
return s;
}
+bool VersionSet::ReuseManifest(const std::string& dscname,
+ const std::string& dscbase) {
+ if (!options_->reuse_logs) {
+ return false;
+ }
+ FileType manifest_type;
+ uint64_t manifest_number;
+ uint64_t manifest_size;
+ if (!ParseFileName(dscbase, &manifest_number, &manifest_type) ||
+ manifest_type != kDescriptorFile ||
+ !env_->GetFileSize(dscname, &manifest_size).ok() ||
+ // Make new compacted MANIFEST if old one is too big
+ manifest_size >= kTargetFileSize) {
+ return false;
+ }
+
+ assert(descriptor_file_ == NULL);
+ assert(descriptor_log_ == NULL);
+ Status r = env_->NewAppendableFile(dscname, &descriptor_file_);
+ if (!r.ok()) {
+ Log(options_->info_log, "Reuse MANIFEST: %s\n", r.ToString().c_str());
+ assert(descriptor_file_ == NULL);
+ return false;
+ }
+
+ Log(options_->info_log, "Reusing MANIFEST %s\n", dscname.c_str());
+ descriptor_log_ = new log::Writer(descriptor_file_, manifest_size);
+ manifest_file_number_ = manifest_number;
+ return true;
+}
+
void VersionSet::MarkFileNumberUsed(uint64_t number) {
if (next_file_number_ <= number) {
next_file_number_ = number + 1;
diff --git a/src/leveldb/db/version_set.h b/src/leveldb/db/version_set.h
index 8dc14b8e01..1dec745673 100644
--- a/src/leveldb/db/version_set.h
+++ b/src/leveldb/db/version_set.h
@@ -179,7 +179,7 @@ class VersionSet {
EXCLUSIVE_LOCKS_REQUIRED(mu);
// Recover the last saved descriptor from persistent storage.
- Status Recover();
+ Status Recover(bool *save_manifest);
// Return the current version.
Version* current() const { return current_; }
@@ -274,6 +274,8 @@ class VersionSet {
friend class Compaction;
friend class Version;
+ bool ReuseManifest(const std::string& dscname, const std::string& dscbase);
+
void Finalize(Version* v);
void GetRange(const std::vector<FileMetaData*>& inputs,
diff --git a/src/leveldb/db/write_batch_internal.h b/src/leveldb/db/write_batch_internal.h
index 310a3c8912..9448ef7b21 100644
--- a/src/leveldb/db/write_batch_internal.h
+++ b/src/leveldb/db/write_batch_internal.h
@@ -5,6 +5,7 @@
#ifndef STORAGE_LEVELDB_DB_WRITE_BATCH_INTERNAL_H_
#define STORAGE_LEVELDB_DB_WRITE_BATCH_INTERNAL_H_
+#include "db/dbformat.h"
#include "leveldb/write_batch.h"
namespace leveldb {
diff --git a/src/leveldb/doc/index.html b/src/leveldb/doc/index.html
index 3ed0ed9d9e..2155192581 100644
--- a/src/leveldb/doc/index.html
+++ b/src/leveldb/doc/index.html
@@ -22,7 +22,7 @@ directory. The following example shows how to open a database,
creating it if necessary:
<p>
<pre>
- #include &lt;assert&gt;
+ #include &lt;cassert&gt;
#include "leveldb/db.h"
leveldb::DB* db;
diff --git a/src/leveldb/helpers/memenv/memenv.cc b/src/leveldb/helpers/memenv/memenv.cc
index 43ef2e0729..9a98884daf 100644
--- a/src/leveldb/helpers/memenv/memenv.cc
+++ b/src/leveldb/helpers/memenv/memenv.cc
@@ -277,6 +277,19 @@ class InMemoryEnv : public EnvWrapper {
return Status::OK();
}
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result) {
+ MutexLock lock(&mutex_);
+ FileState** sptr = &file_map_[fname];
+ FileState* file = *sptr;
+ if (file == NULL) {
+ file = new FileState();
+ file->Ref();
+ }
+ *result = new WritableFileImpl(file);
+ return Status::OK();
+ }
+
virtual bool FileExists(const std::string& fname) {
MutexLock lock(&mutex_);
return file_map_.find(fname) != file_map_.end();
diff --git a/src/leveldb/helpers/memenv/memenv_test.cc b/src/leveldb/helpers/memenv/memenv_test.cc
index a44310fed8..5cff77613f 100644
--- a/src/leveldb/helpers/memenv/memenv_test.cc
+++ b/src/leveldb/helpers/memenv/memenv_test.cc
@@ -40,6 +40,8 @@ TEST(MemEnvTest, Basics) {
// Create a file.
ASSERT_OK(env_->NewWritableFile("/dir/f", &writable_file));
+ ASSERT_OK(env_->GetFileSize("/dir/f", &file_size));
+ ASSERT_EQ(0, file_size);
delete writable_file;
// Check that the file exists.
@@ -55,9 +57,16 @@ TEST(MemEnvTest, Basics) {
ASSERT_OK(writable_file->Append("abc"));
delete writable_file;
- // Check for expected size.
+ // Check that append works.
+ ASSERT_OK(env_->NewAppendableFile("/dir/f", &writable_file));
ASSERT_OK(env_->GetFileSize("/dir/f", &file_size));
ASSERT_EQ(3, file_size);
+ ASSERT_OK(writable_file->Append("hello"));
+ delete writable_file;
+
+ // Check for expected size.
+ ASSERT_OK(env_->GetFileSize("/dir/f", &file_size));
+ ASSERT_EQ(8, file_size);
// Check that renaming works.
ASSERT_TRUE(!env_->RenameFile("/dir/non_existent", "/dir/g").ok());
@@ -65,7 +74,7 @@ TEST(MemEnvTest, Basics) {
ASSERT_TRUE(!env_->FileExists("/dir/f"));
ASSERT_TRUE(env_->FileExists("/dir/g"));
ASSERT_OK(env_->GetFileSize("/dir/g", &file_size));
- ASSERT_EQ(3, file_size);
+ ASSERT_EQ(8, file_size);
// Check that opening non-existent file fails.
SequentialFile* seq_file;
diff --git a/src/leveldb/include/leveldb/cache.h b/src/leveldb/include/leveldb/cache.h
index 1a201e5e0a..6819d5bc49 100644
--- a/src/leveldb/include/leveldb/cache.h
+++ b/src/leveldb/include/leveldb/cache.h
@@ -81,6 +81,17 @@ class Cache {
// its cache keys.
virtual uint64_t NewId() = 0;
+ // Remove all cache entries that are not actively in use. Memory-constrained
+ // applications may wish to call this method to reduce memory usage.
+ // Default implementation of Prune() does nothing. Subclasses are strongly
+ // encouraged to override the default implementation. A future release of
+ // leveldb may change Prune() to a pure abstract method.
+ virtual void Prune() {}
+
+ // Return an estimate of the combined charges of all elements stored in the
+ // cache.
+ virtual size_t TotalCharge() const = 0;
+
private:
void LRU_Remove(Handle* e);
void LRU_Append(Handle* e);
diff --git a/src/leveldb/include/leveldb/db.h b/src/leveldb/include/leveldb/db.h
index 4c169bf22e..9752cbad51 100644
--- a/src/leveldb/include/leveldb/db.h
+++ b/src/leveldb/include/leveldb/db.h
@@ -14,7 +14,7 @@ namespace leveldb {
// Update Makefile if you change these
static const int kMajorVersion = 1;
-static const int kMinorVersion = 18;
+static const int kMinorVersion = 19;
struct Options;
struct ReadOptions;
@@ -115,6 +115,8 @@ class DB {
// about the internal operation of the DB.
// "leveldb.sstables" - returns a multi-line string that describes all
// of the sstables that make up the db contents.
+ // "leveldb.approximate-memory-usage" - returns the approximate number of
+ // bytes of memory in use by the DB.
virtual bool GetProperty(const Slice& property, std::string* value) = 0;
// For each i in [0,n-1], store in "sizes[i]", the approximate
diff --git a/src/leveldb/include/leveldb/env.h b/src/leveldb/include/leveldb/env.h
index f709514da6..99b6c21414 100644
--- a/src/leveldb/include/leveldb/env.h
+++ b/src/leveldb/include/leveldb/env.h
@@ -69,6 +69,21 @@ class Env {
virtual Status NewWritableFile(const std::string& fname,
WritableFile** result) = 0;
+ // Create an object that either appends to an existing file, or
+ // writes to a new file (if the file does not exist to begin with).
+ // On success, stores a pointer to the new file in *result and
+ // returns OK. On failure stores NULL in *result and returns
+ // non-OK.
+ //
+ // The returned file will only be accessed by one thread at a time.
+ //
+ // May return an IsNotSupportedError error if this Env does
+ // not allow appending to an existing file. Users of Env (including
+ // the leveldb implementation) must be prepared to deal with
+ // an Env that does not support appending.
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result);
+
// Returns true iff the named file exists.
virtual bool FileExists(const std::string& fname) = 0;
@@ -289,6 +304,9 @@ class EnvWrapper : public Env {
Status NewWritableFile(const std::string& f, WritableFile** r) {
return target_->NewWritableFile(f, r);
}
+ Status NewAppendableFile(const std::string& f, WritableFile** r) {
+ return target_->NewAppendableFile(f, r);
+ }
bool FileExists(const std::string& f) { return target_->FileExists(f); }
Status GetChildren(const std::string& dir, std::vector<std::string>* r) {
return target_->GetChildren(dir, r);
diff --git a/src/leveldb/include/leveldb/iterator.h b/src/leveldb/include/leveldb/iterator.h
index 76aced04bd..da631ed9d8 100644
--- a/src/leveldb/include/leveldb/iterator.h
+++ b/src/leveldb/include/leveldb/iterator.h
@@ -37,7 +37,7 @@ class Iterator {
// Valid() after this call iff the source is not empty.
virtual void SeekToLast() = 0;
- // Position at the first key in the source that at or past target
+ // Position at the first key in the source that is at or past target.
// The iterator is Valid() after this call iff the source contains
// an entry that comes at or past target.
virtual void Seek(const Slice& target) = 0;
diff --git a/src/leveldb/include/leveldb/options.h b/src/leveldb/include/leveldb/options.h
index 7c9b973454..83a1ef39a4 100644
--- a/src/leveldb/include/leveldb/options.h
+++ b/src/leveldb/include/leveldb/options.h
@@ -128,6 +128,12 @@ struct Options {
// efficiently detect that and will switch to uncompressed mode.
CompressionType compression;
+ // EXPERIMENTAL: If true, append to existing MANIFEST and log files
+ // when a database is opened. This can significantly speed up open.
+ //
+ // Default: currently false, but may become true later.
+ bool reuse_logs;
+
// If non-NULL, use the specified filter policy to reduce disk reads.
// Many applications will benefit from passing the result of
// NewBloomFilterPolicy() here.
diff --git a/src/leveldb/include/leveldb/status.h b/src/leveldb/include/leveldb/status.h
index 11dbd4b47e..d9575f9753 100644
--- a/src/leveldb/include/leveldb/status.h
+++ b/src/leveldb/include/leveldb/status.h
@@ -60,6 +60,12 @@ class Status {
// Returns true iff the status indicates an IOError.
bool IsIOError() const { return code() == kIOError; }
+ // Returns true iff the status indicates a NotSupportedError.
+ bool IsNotSupportedError() const { return code() == kNotSupported; }
+
+ // Returns true iff the status indicates an InvalidArgument.
+ bool IsInvalidArgument() const { return code() == kInvalidArgument; }
+
// Return a string representation of this status suitable for printing.
// Returns the string "OK" for success.
std::string ToString() const;
diff --git a/src/leveldb/port/atomic_pointer.h b/src/leveldb/port/atomic_pointer.h
index 9bf091f757..1c4c7aafc6 100644
--- a/src/leveldb/port/atomic_pointer.h
+++ b/src/leveldb/port/atomic_pointer.h
@@ -35,8 +35,12 @@
#define ARCH_CPU_X86_FAMILY 1
#elif defined(__ARMEL__)
#define ARCH_CPU_ARM_FAMILY 1
+#elif defined(__aarch64__)
+#define ARCH_CPU_ARM64_FAMILY 1
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
#define ARCH_CPU_PPC_FAMILY 1
+#elif defined(__mips__)
+#define ARCH_CPU_MIPS_FAMILY 1
#endif
namespace leveldb {
@@ -92,6 +96,13 @@ inline void MemoryBarrier() {
}
#define LEVELDB_HAVE_MEMORY_BARRIER
+// ARM64
+#elif defined(ARCH_CPU_ARM64_FAMILY)
+inline void MemoryBarrier() {
+ asm volatile("dmb sy" : : : "memory");
+}
+#define LEVELDB_HAVE_MEMORY_BARRIER
+
// PPC
#elif defined(ARCH_CPU_PPC_FAMILY) && defined(__GNUC__)
inline void MemoryBarrier() {
@@ -101,6 +112,13 @@ inline void MemoryBarrier() {
}
#define LEVELDB_HAVE_MEMORY_BARRIER
+// MIPS
+#elif defined(ARCH_CPU_MIPS_FAMILY) && defined(__GNUC__)
+inline void MemoryBarrier() {
+ __asm__ __volatile__("sync" : : : "memory");
+}
+#define LEVELDB_HAVE_MEMORY_BARRIER
+
#endif
// AtomicPointer built using platform-specific MemoryBarrier()
@@ -215,6 +233,7 @@ class AtomicPointer {
#undef LEVELDB_HAVE_MEMORY_BARRIER
#undef ARCH_CPU_X86_FAMILY
#undef ARCH_CPU_ARM_FAMILY
+#undef ARCH_CPU_ARM64_FAMILY
#undef ARCH_CPU_PPC_FAMILY
} // namespace port
diff --git a/src/leveldb/port/port_posix.cc b/src/leveldb/port/port_posix.cc
index 5ba127a5b9..30e8007ae3 100644
--- a/src/leveldb/port/port_posix.cc
+++ b/src/leveldb/port/port_posix.cc
@@ -7,7 +7,6 @@
#include <cstdlib>
#include <stdio.h>
#include <string.h>
-#include "util/logging.h"
namespace leveldb {
namespace port {
diff --git a/src/leveldb/table/filter_block.cc b/src/leveldb/table/filter_block.cc
index 203e15c8bc..4e78b954f8 100644
--- a/src/leveldb/table/filter_block.cc
+++ b/src/leveldb/table/filter_block.cc
@@ -68,7 +68,7 @@ void FilterBlockBuilder::GenerateFilter() {
// Generate filter for current set of keys and append to result_.
filter_offsets_.push_back(result_.size());
- policy_->CreateFilter(&tmp_keys_[0], num_keys, &result_);
+ policy_->CreateFilter(&tmp_keys_[0], static_cast<int>(num_keys), &result_);
tmp_keys_.clear();
keys_.clear();
@@ -97,7 +97,7 @@ bool FilterBlockReader::KeyMayMatch(uint64_t block_offset, const Slice& key) {
if (index < num_) {
uint32_t start = DecodeFixed32(offset_ + index*4);
uint32_t limit = DecodeFixed32(offset_ + index*4 + 4);
- if (start <= limit && limit <= (offset_ - data_)) {
+ if (start <= limit && limit <= static_cast<size_t>(offset_ - data_)) {
Slice filter = Slice(data_ + start, limit - start);
return policy_->KeyMayMatch(key, filter);
} else if (start == limit) {
diff --git a/src/leveldb/table/format.cc b/src/leveldb/table/format.cc
index aa63144c9e..24e4e02445 100644
--- a/src/leveldb/table/format.cc
+++ b/src/leveldb/table/format.cc
@@ -30,15 +30,14 @@ Status BlockHandle::DecodeFrom(Slice* input) {
}
void Footer::EncodeTo(std::string* dst) const {
-#ifndef NDEBUG
const size_t original_size = dst->size();
-#endif
metaindex_handle_.EncodeTo(dst);
index_handle_.EncodeTo(dst);
dst->resize(2 * BlockHandle::kMaxEncodedLength); // Padding
PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber & 0xffffffffu));
PutFixed32(dst, static_cast<uint32_t>(kTableMagicNumber >> 32));
assert(dst->size() == original_size + kEncodedLength);
+ (void)original_size; // Disable unused variable warning.
}
Status Footer::DecodeFrom(Slice* input) {
diff --git a/src/leveldb/table/iterator_wrapper.h b/src/leveldb/table/iterator_wrapper.h
index 9e16b3dbed..f410c3fabe 100644
--- a/src/leveldb/table/iterator_wrapper.h
+++ b/src/leveldb/table/iterator_wrapper.h
@@ -5,6 +5,9 @@
#ifndef STORAGE_LEVELDB_TABLE_ITERATOR_WRAPPER_H_
#define STORAGE_LEVELDB_TABLE_ITERATOR_WRAPPER_H_
+#include "leveldb/iterator.h"
+#include "leveldb/slice.h"
+
namespace leveldb {
// A internal wrapper class with an interface similar to Iterator that
diff --git a/src/leveldb/table/table.cc b/src/leveldb/table/table.cc
index dff8a82590..decf8082cc 100644
--- a/src/leveldb/table/table.cc
+++ b/src/leveldb/table/table.cc
@@ -82,7 +82,7 @@ Status Table::Open(const Options& options,
*table = new Table(rep);
(*table)->ReadMeta(footer);
} else {
- if (index_block) delete index_block;
+ delete index_block;
}
return s;
diff --git a/src/leveldb/table/table_test.cc b/src/leveldb/table/table_test.cc
index c723bf84cf..abf6e246ff 100644
--- a/src/leveldb/table/table_test.cc
+++ b/src/leveldb/table/table_test.cc
@@ -853,12 +853,20 @@ TEST(TableTest, ApproximateOffsetOfCompressed) {
options.compression = kSnappyCompression;
c.Finish(options, &keys, &kvmap);
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"), 0, 0));
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"), 0, 0));
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"), 0, 0));
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), 2000, 3000));
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), 2000, 3000));
- ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 4000, 6000));
+ // Expected upper and lower bounds of space used by compressible strings.
+ static const int kSlop = 1000; // Compressor effectiveness varies.
+ const int expected = 2500; // 10000 * compression ratio (0.25)
+ const int min_z = expected - kSlop;
+ const int max_z = expected + kSlop;
+
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("abc"), 0, kSlop));
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("k01"), 0, kSlop));
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("k02"), 0, kSlop));
+ // Have now emitted a large compressible string, so adjust expected offset.
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("k03"), min_z, max_z));
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("k04"), min_z, max_z));
+ // Have now emitted two large compressible strings, so adjust expected offset.
+ ASSERT_TRUE(Between(c.ApproximateOffsetOf("xyz"), 2 * min_z, 2 * max_z));
}
} // namespace leveldb
diff --git a/src/leveldb/util/arena.cc b/src/leveldb/util/arena.cc
index 9367f71492..74078213ee 100644
--- a/src/leveldb/util/arena.cc
+++ b/src/leveldb/util/arena.cc
@@ -9,8 +9,7 @@ namespace leveldb {
static const int kBlockSize = 4096;
-Arena::Arena() {
- blocks_memory_ = 0;
+Arena::Arena() : memory_usage_(0) {
alloc_ptr_ = NULL; // First allocation will allocate a block
alloc_bytes_remaining_ = 0;
}
@@ -60,8 +59,9 @@ char* Arena::AllocateAligned(size_t bytes) {
char* Arena::AllocateNewBlock(size_t block_bytes) {
char* result = new char[block_bytes];
- blocks_memory_ += block_bytes;
blocks_.push_back(result);
+ memory_usage_.NoBarrier_Store(
+ reinterpret_cast<void*>(MemoryUsage() + block_bytes + sizeof(char*)));
return result;
}
diff --git a/src/leveldb/util/arena.h b/src/leveldb/util/arena.h
index 73bbf1cb9b..48bab33741 100644
--- a/src/leveldb/util/arena.h
+++ b/src/leveldb/util/arena.h
@@ -9,6 +9,7 @@
#include <assert.h>
#include <stddef.h>
#include <stdint.h>
+#include "port/port.h"
namespace leveldb {
@@ -24,10 +25,9 @@ class Arena {
char* AllocateAligned(size_t bytes);
// Returns an estimate of the total memory usage of data allocated
- // by the arena (including space allocated but not yet used for user
- // allocations).
+ // by the arena.
size_t MemoryUsage() const {
- return blocks_memory_ + blocks_.capacity() * sizeof(char*);
+ return reinterpret_cast<uintptr_t>(memory_usage_.NoBarrier_Load());
}
private:
@@ -41,8 +41,8 @@ class Arena {
// Array of new[] allocated memory blocks
std::vector<char*> blocks_;
- // Bytes of memory in blocks allocated so far
- size_t blocks_memory_;
+ // Total memory usage of the arena.
+ port::AtomicPointer memory_usage_;
// No copying allowed
Arena(const Arena&);
diff --git a/src/leveldb/util/bloom.cc b/src/leveldb/util/bloom.cc
index a27a2ace28..bf3e4ca6e9 100644
--- a/src/leveldb/util/bloom.cc
+++ b/src/leveldb/util/bloom.cc
@@ -47,7 +47,7 @@ class BloomFilterPolicy : public FilterPolicy {
dst->resize(init_size + bytes, 0);
dst->push_back(static_cast<char>(k_)); // Remember # of probes in filter
char* array = &(*dst)[init_size];
- for (size_t i = 0; i < n; i++) {
+ for (int i = 0; i < n; i++) {
// Use double-hashing to generate a sequence of hash values.
// See analysis in [Kirsch,Mitzenmacher 2006].
uint32_t h = BloomHash(keys[i]);
diff --git a/src/leveldb/util/bloom_test.cc b/src/leveldb/util/bloom_test.cc
index 77fb1b3159..1b87a2be3f 100644
--- a/src/leveldb/util/bloom_test.cc
+++ b/src/leveldb/util/bloom_test.cc
@@ -46,7 +46,8 @@ class BloomTest {
key_slices.push_back(Slice(keys_[i]));
}
filter_.clear();
- policy_->CreateFilter(&key_slices[0], key_slices.size(), &filter_);
+ policy_->CreateFilter(&key_slices[0], static_cast<int>(key_slices.size()),
+ &filter_);
keys_.clear();
if (kVerbose >= 2) DumpFilter();
}
diff --git a/src/leveldb/util/cache.cc b/src/leveldb/util/cache.cc
index 8b197bc02a..ce46886171 100644
--- a/src/leveldb/util/cache.cc
+++ b/src/leveldb/util/cache.cc
@@ -19,6 +19,23 @@ Cache::~Cache() {
namespace {
// LRU cache implementation
+//
+// Cache entries have an "in_cache" boolean indicating whether the cache has a
+// reference on the entry. The only ways that this can become false without the
+// entry being passed to its "deleter" are via Erase(), via Insert() when
+// an element with a duplicate key is inserted, or on destruction of the cache.
+//
+// The cache keeps two linked lists of items in the cache. All items in the
+// cache are in one list or the other, and never both. Items still referenced
+// by clients but erased from the cache are in neither list. The lists are:
+// - in-use: contains the items currently referenced by clients, in no
+// particular order. (This list is used for invariant checking. If we
+// removed the check, elements that would otherwise be on this list could be
+// left as disconnected singleton lists.)
+// - LRU: contains the items not currently referenced by clients, in LRU order
+// Elements are moved between these lists by the Ref() and Unref() methods,
+// when they detect an element in the cache acquiring or losing its only
+// external reference.
// An entry is a variable length heap-allocated structure. Entries
// are kept in a circular doubly linked list ordered by access time.
@@ -30,7 +47,8 @@ struct LRUHandle {
LRUHandle* prev;
size_t charge; // TODO(opt): Only allow uint32_t?
size_t key_length;
- uint32_t refs;
+ bool in_cache; // Whether entry is in the cache.
+ uint32_t refs; // References, including cache reference, if present.
uint32_t hash; // Hash of key(); used for fast sharding and comparisons
char key_data[1]; // Beginning of key
@@ -147,49 +165,77 @@ class LRUCache {
Cache::Handle* Lookup(const Slice& key, uint32_t hash);
void Release(Cache::Handle* handle);
void Erase(const Slice& key, uint32_t hash);
+ void Prune();
+ size_t TotalCharge() const {
+ MutexLock l(&mutex_);
+ return usage_;
+ }
private:
void LRU_Remove(LRUHandle* e);
- void LRU_Append(LRUHandle* e);
+ void LRU_Append(LRUHandle*list, LRUHandle* e);
+ void Ref(LRUHandle* e);
void Unref(LRUHandle* e);
+ bool FinishErase(LRUHandle* e);
// Initialized before use.
size_t capacity_;
// mutex_ protects the following state.
- port::Mutex mutex_;
+ mutable port::Mutex mutex_;
size_t usage_;
// Dummy head of LRU list.
// lru.prev is newest entry, lru.next is oldest entry.
+ // Entries have refs==1 and in_cache==true.
LRUHandle lru_;
+ // Dummy head of in-use list.
+ // Entries are in use by clients, and have refs >= 2 and in_cache==true.
+ LRUHandle in_use_;
+
HandleTable table_;
};
LRUCache::LRUCache()
: usage_(0) {
- // Make empty circular linked list
+ // Make empty circular linked lists.
lru_.next = &lru_;
lru_.prev = &lru_;
+ in_use_.next = &in_use_;
+ in_use_.prev = &in_use_;
}
LRUCache::~LRUCache() {
+ assert(in_use_.next == &in_use_); // Error if caller has an unreleased handle
for (LRUHandle* e = lru_.next; e != &lru_; ) {
LRUHandle* next = e->next;
- assert(e->refs == 1); // Error if caller has an unreleased handle
+ assert(e->in_cache);
+ e->in_cache = false;
+ assert(e->refs == 1); // Invariant of lru_ list.
Unref(e);
e = next;
}
}
+void LRUCache::Ref(LRUHandle* e) {
+ if (e->refs == 1 && e->in_cache) { // If on lru_ list, move to in_use_ list.
+ LRU_Remove(e);
+ LRU_Append(&in_use_, e);
+ }
+ e->refs++;
+}
+
void LRUCache::Unref(LRUHandle* e) {
assert(e->refs > 0);
e->refs--;
- if (e->refs <= 0) {
- usage_ -= e->charge;
+ if (e->refs == 0) { // Deallocate.
+ assert(!e->in_cache);
(*e->deleter)(e->key(), e->value);
free(e);
+ } else if (e->in_cache && e->refs == 1) { // No longer in use; move to lru_ list.
+ LRU_Remove(e);
+ LRU_Append(&lru_, e);
}
}
@@ -198,10 +244,10 @@ void LRUCache::LRU_Remove(LRUHandle* e) {
e->prev->next = e->next;
}
-void LRUCache::LRU_Append(LRUHandle* e) {
- // Make "e" newest entry by inserting just before lru_
- e->next = &lru_;
- e->prev = lru_.prev;
+void LRUCache::LRU_Append(LRUHandle* list, LRUHandle* e) {
+ // Make "e" newest entry by inserting just before *list
+ e->next = list;
+ e->prev = list->prev;
e->prev->next = e;
e->next->prev = e;
}
@@ -210,9 +256,7 @@ Cache::Handle* LRUCache::Lookup(const Slice& key, uint32_t hash) {
MutexLock l(&mutex_);
LRUHandle* e = table_.Lookup(key, hash);
if (e != NULL) {
- e->refs++;
- LRU_Remove(e);
- LRU_Append(e);
+ Ref(e);
}
return reinterpret_cast<Cache::Handle*>(e);
}
@@ -234,34 +278,58 @@ Cache::Handle* LRUCache::Insert(
e->charge = charge;
e->key_length = key.size();
e->hash = hash;
- e->refs = 2; // One from LRUCache, one for the returned handle
+ e->in_cache = false;
+ e->refs = 1; // for the returned handle.
memcpy(e->key_data, key.data(), key.size());
- LRU_Append(e);
- usage_ += charge;
- LRUHandle* old = table_.Insert(e);
- if (old != NULL) {
- LRU_Remove(old);
- Unref(old);
- }
+ if (capacity_ > 0) {
+ e->refs++; // for the cache's reference.
+ e->in_cache = true;
+ LRU_Append(&in_use_, e);
+ usage_ += charge;
+ FinishErase(table_.Insert(e));
+ } // else don't cache. (Tests use capacity_==0 to turn off caching.)
while (usage_ > capacity_ && lru_.next != &lru_) {
LRUHandle* old = lru_.next;
- LRU_Remove(old);
- table_.Remove(old->key(), old->hash);
- Unref(old);
+ assert(old->refs == 1);
+ bool erased = FinishErase(table_.Remove(old->key(), old->hash));
+ if (!erased) { // to avoid unused variable when compiled NDEBUG
+ assert(erased);
+ }
}
return reinterpret_cast<Cache::Handle*>(e);
}
-void LRUCache::Erase(const Slice& key, uint32_t hash) {
- MutexLock l(&mutex_);
- LRUHandle* e = table_.Remove(key, hash);
+// If e != NULL, finish removing *e from the cache; it has already been removed
+// from the hash table. Return whether e != NULL. Requires mutex_ held.
+bool LRUCache::FinishErase(LRUHandle* e) {
if (e != NULL) {
+ assert(e->in_cache);
LRU_Remove(e);
+ e->in_cache = false;
+ usage_ -= e->charge;
Unref(e);
}
+ return e != NULL;
+}
+
+void LRUCache::Erase(const Slice& key, uint32_t hash) {
+ MutexLock l(&mutex_);
+ FinishErase(table_.Remove(key, hash));
+}
+
+void LRUCache::Prune() {
+ MutexLock l(&mutex_);
+ while (lru_.next != &lru_) {
+ LRUHandle* e = lru_.next;
+ assert(e->refs == 1);
+ bool erased = FinishErase(table_.Remove(e->key(), e->hash));
+ if (!erased) { // to avoid unused variable when compiled NDEBUG
+ assert(erased);
+ }
+ }
}
static const int kNumShardBits = 4;
@@ -314,6 +382,18 @@ class ShardedLRUCache : public Cache {
MutexLock l(&id_mutex_);
return ++(last_id_);
}
+ virtual void Prune() {
+ for (int s = 0; s < kNumShards; s++) {
+ shard_[s].Prune();
+ }
+ }
+ virtual size_t TotalCharge() const {
+ size_t total = 0;
+ for (int s = 0; s < kNumShards; s++) {
+ total += shard_[s].TotalCharge();
+ }
+ return total;
+ }
};
} // end anonymous namespace
diff --git a/src/leveldb/util/cache_test.cc b/src/leveldb/util/cache_test.cc
index 43716715a8..468f7a6425 100644
--- a/src/leveldb/util/cache_test.cc
+++ b/src/leveldb/util/cache_test.cc
@@ -59,6 +59,11 @@ class CacheTest {
&CacheTest::Deleter));
}
+ Cache::Handle* InsertAndReturnHandle(int key, int value, int charge = 1) {
+ return cache_->Insert(EncodeKey(key), EncodeValue(value), charge,
+ &CacheTest::Deleter);
+ }
+
void Erase(int key) {
cache_->Erase(EncodeKey(key));
}
@@ -135,8 +140,11 @@ TEST(CacheTest, EntriesArePinned) {
TEST(CacheTest, EvictionPolicy) {
Insert(100, 101);
Insert(200, 201);
+ Insert(300, 301);
+ Cache::Handle* h = cache_->Lookup(EncodeKey(300));
- // Frequently used entry must be kept around
+ // Frequently used entry must be kept around,
+ // as must things that are still in use.
for (int i = 0; i < kCacheSize + 100; i++) {
Insert(1000+i, 2000+i);
ASSERT_EQ(2000+i, Lookup(1000+i));
@@ -144,6 +152,25 @@ TEST(CacheTest, EvictionPolicy) {
}
ASSERT_EQ(101, Lookup(100));
ASSERT_EQ(-1, Lookup(200));
+ ASSERT_EQ(301, Lookup(300));
+ cache_->Release(h);
+}
+
+TEST(CacheTest, UseExceedsCacheSize) {
+ // Overfill the cache, keeping handles on all inserted entries.
+ std::vector<Cache::Handle*> h;
+ for (int i = 0; i < kCacheSize + 100; i++) {
+ h.push_back(InsertAndReturnHandle(1000+i, 2000+i));
+ }
+
+ // Check that all the entries can be found in the cache.
+ for (int i = 0; i < h.size(); i++) {
+ ASSERT_EQ(2000+i, Lookup(1000+i));
+ }
+
+ for (int i = 0; i < h.size(); i++) {
+ cache_->Release(h[i]);
+ }
}
TEST(CacheTest, HeavyEntries) {
@@ -179,6 +206,19 @@ TEST(CacheTest, NewId) {
ASSERT_NE(a, b);
}
+TEST(CacheTest, Prune) {
+ Insert(1, 100);
+ Insert(2, 200);
+
+ Cache::Handle* handle = cache_->Lookup(EncodeKey(1));
+ ASSERT_TRUE(handle);
+ cache_->Prune();
+ cache_->Release(handle);
+
+ ASSERT_EQ(100, Lookup(1));
+ ASSERT_EQ(-1, Lookup(2));
+}
+
} // namespace leveldb
int main(int argc, char** argv) {
diff --git a/src/leveldb/util/env.cc b/src/leveldb/util/env.cc
index c2600e964a..c58a0821ef 100644
--- a/src/leveldb/util/env.cc
+++ b/src/leveldb/util/env.cc
@@ -9,6 +9,10 @@ namespace leveldb {
Env::~Env() {
}
+Status Env::NewAppendableFile(const std::string& fname, WritableFile** result) {
+ return Status::NotSupported("NewAppendableFile", fname);
+}
+
SequentialFile::~SequentialFile() {
}
diff --git a/src/leveldb/util/env_posix.cc b/src/leveldb/util/env_posix.cc
index ba2667864a..e0fca52f46 100644
--- a/src/leveldb/util/env_posix.cc
+++ b/src/leveldb/util/env_posix.cc
@@ -351,6 +351,19 @@ class PosixEnv : public Env {
return s;
}
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result) {
+ Status s;
+ FILE* f = fopen(fname.c_str(), "a");
+ if (f == NULL) {
+ *result = NULL;
+ s = IOError(fname, errno);
+ } else {
+ *result = new PosixWritableFile(fname, f);
+ }
+ return s;
+ }
+
virtual bool FileExists(const std::string& fname) {
return access(fname.c_str(), F_OK) == 0;
}
diff --git a/src/leveldb/util/env_win.cc b/src/leveldb/util/env_win.cc
index e11a96b791..b074b7579e 100644
--- a/src/leveldb/util/env_win.cc
+++ b/src/leveldb/util/env_win.cc
@@ -106,7 +106,7 @@ private:
class Win32WritableFile : public WritableFile
{
public:
- Win32WritableFile(const std::string& fname);
+ Win32WritableFile(const std::string& fname, bool append);
~Win32WritableFile();
virtual Status Append(const Slice& data);
@@ -158,6 +158,8 @@ public:
RandomAccessFile** result);
virtual Status NewWritableFile(const std::string& fname,
WritableFile** result);
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result);
virtual bool FileExists(const std::string& fname);
@@ -423,17 +425,23 @@ void Win32RandomAccessFile::_CleanUp()
}
}
-Win32WritableFile::Win32WritableFile(const std::string& fname)
+Win32WritableFile::Win32WritableFile(const std::string& fname, bool append)
: filename_(fname)
{
std::wstring path;
ToWidePath(fname, path);
- DWORD Flag = PathFileExistsW(path.c_str()) ? OPEN_EXISTING : CREATE_ALWAYS;
+ // NewAppendableFile: append to an existing file, or create a new one
+ // if none exists - this is OPEN_ALWAYS behavior, with
+ // FILE_APPEND_DATA to avoid having to manually position the file
+ // pointer at the end of the file.
+ // NewWritableFile: create a new file, delete if it exists - this is
+ // CREATE_ALWAYS behavior. This file is used for writing only so
+ // use GENERIC_WRITE.
_hFile = CreateFileW(path.c_str(),
- GENERIC_READ | GENERIC_WRITE,
+ append ? FILE_APPEND_DATA : GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_DELETE|FILE_SHARE_WRITE,
NULL,
- Flag,
+ append ? OPEN_ALWAYS : CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL,
NULL);
// CreateFileW returns INVALID_HANDLE_VALUE in case of error, always check isEnable() before use
@@ -823,7 +831,9 @@ Status Win32Env::NewLogger( const std::string& fname, Logger** result )
{
Status sRet;
std::string path = fname;
- Win32WritableFile* pMapFile = new Win32WritableFile(ModifyPath(path));
+ // Logs are opened with write semantics, not with append semantics
+ // (see PosixEnv::NewLogger)
+ Win32WritableFile* pMapFile = new Win32WritableFile(ModifyPath(path), false);
if(!pMapFile->isEnable()){
delete pMapFile;
*result = NULL;
@@ -837,7 +847,20 @@ Status Win32Env::NewWritableFile( const std::string& fname, WritableFile** resul
{
Status sRet;
std::string path = fname;
- Win32WritableFile* pFile = new Win32WritableFile(ModifyPath(path));
+ Win32WritableFile* pFile = new Win32WritableFile(ModifyPath(path), false);
+ if(!pFile->isEnable()){
+ *result = NULL;
+ sRet = Status::IOError(fname,Win32::GetLastErrSz());
+ }else
+ *result = pFile;
+ return sRet;
+}
+
+Status Win32Env::NewAppendableFile( const std::string& fname, WritableFile** result )
+{
+ Status sRet;
+ std::string path = fname;
+ Win32WritableFile* pFile = new Win32WritableFile(ModifyPath(path), true);
if(!pFile->isEnable()){
*result = NULL;
sRet = Status::IOError(fname,Win32::GetLastErrSz());
diff --git a/src/leveldb/util/options.cc b/src/leveldb/util/options.cc
index 76af5b9302..8b618fb1ae 100644
--- a/src/leveldb/util/options.cc
+++ b/src/leveldb/util/options.cc
@@ -22,8 +22,8 @@ Options::Options()
block_size(4096),
block_restart_interval(16),
compression(kSnappyCompression),
+ reuse_logs(false),
filter_policy(NULL) {
}
-
} // namespace leveldb
diff --git a/src/leveldb/util/testutil.h b/src/leveldb/util/testutil.h
index adad3fc1ea..d7e4583702 100644
--- a/src/leveldb/util/testutil.h
+++ b/src/leveldb/util/testutil.h
@@ -45,6 +45,16 @@ class ErrorEnv : public EnvWrapper {
}
return target()->NewWritableFile(fname, result);
}
+
+ virtual Status NewAppendableFile(const std::string& fname,
+ WritableFile** result) {
+ if (writable_file_error_) {
+ ++num_writable_file_errors_;
+ *result = NULL;
+ return Status::IOError(fname, "fake error");
+ }
+ return target()->NewAppendableFile(fname, result);
+ }
};
} // namespace test
diff --git a/src/limitedmap.h b/src/limitedmap.h
index 7841d7f4a4..e9dcb6defd 100644
--- a/src/limitedmap.h
+++ b/src/limitedmap.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/memusage.h b/src/memusage.h
index 3810bfad07..81e8702954 100644
--- a/src/memusage.h
+++ b/src/memusage.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/merkleblock.cpp b/src/merkleblock.cpp
index 31332526a9..86c8172a31 100644
--- a/src/merkleblock.cpp
+++ b/src/merkleblock.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -23,8 +23,8 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter)
for (unsigned int i = 0; i < block.vtx.size(); i++)
{
- const uint256& hash = block.vtx[i].GetHash();
- if (filter.IsRelevantAndUpdate(block.vtx[i]))
+ const uint256& hash = block.vtx[i]->GetHash();
+ if (filter.IsRelevantAndUpdate(*block.vtx[i]))
{
vMatch.push_back(true);
vMatchedTxn.push_back(make_pair(i, hash));
@@ -49,7 +49,7 @@ CMerkleBlock::CMerkleBlock(const CBlock& block, const std::set<uint256>& txids)
for (unsigned int i = 0; i < block.vtx.size(); i++)
{
- const uint256& hash = block.vtx[i].GetHash();
+ const uint256& hash = block.vtx[i]->GetHash();
if (txids.count(hash))
vMatch.push_back(true);
else
diff --git a/src/merkleblock.h b/src/merkleblock.h
index 835cbcce55..73cbf670ee 100644
--- a/src/merkleblock.h
+++ b/src/merkleblock.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -85,7 +85,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(nTransactions);
READWRITE(vHash);
std::vector<unsigned char> vBytes;
@@ -148,7 +148,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(header);
READWRITE(txn);
}
diff --git a/src/miner.cpp b/src/miner.cpp
index ebf2f21ffd..acded94168 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include "consensus/merkle.h"
#include "consensus/validation.h"
#include "hash.h"
-#include "main.h"
+#include "validation.h"
#include "net.h"
#include "policy/policy.h"
#include "pow.h"
@@ -84,23 +84,29 @@ BlockAssembler::BlockAssembler(const CChainParams& _chainparams)
nBlockMaxWeight = DEFAULT_BLOCK_MAX_WEIGHT;
nBlockMaxSize = DEFAULT_BLOCK_MAX_SIZE;
bool fWeightSet = false;
- if (mapArgs.count("-blockmaxweight")) {
+ if (IsArgSet("-blockmaxweight")) {
nBlockMaxWeight = GetArg("-blockmaxweight", DEFAULT_BLOCK_MAX_WEIGHT);
nBlockMaxSize = MAX_BLOCK_SERIALIZED_SIZE;
fWeightSet = true;
}
- if (mapArgs.count("-blockmaxsize")) {
+ if (IsArgSet("-blockmaxsize")) {
nBlockMaxSize = GetArg("-blockmaxsize", DEFAULT_BLOCK_MAX_SIZE);
if (!fWeightSet) {
nBlockMaxWeight = nBlockMaxSize * WITNESS_SCALE_FACTOR;
}
}
+ if (IsArgSet("-blockmintxfee")) {
+ CAmount n = 0;
+ ParseMoney(GetArg("-blockmintxfee", ""), n);
+ blockMinFeeRate = CFeeRate(n);
+ } else {
+ blockMinFeeRate = CFeeRate(DEFAULT_BLOCK_MIN_TX_FEE);
+ }
// Limit weight to between 4K and MAX_BLOCK_WEIGHT-4K for sanity:
nBlockMaxWeight = std::max((unsigned int)4000, std::min((unsigned int)(MAX_BLOCK_WEIGHT-4000), nBlockMaxWeight));
// Limit size to between 1K and MAX_BLOCK_SERIALIZED_SIZE-1K for sanity:
nBlockMaxSize = std::max((unsigned int)1000, std::min((unsigned int)(MAX_BLOCK_SERIALIZED_SIZE-1000), nBlockMaxSize));
-
// Whether we need to account for byte usage (in addition to weight usage)
fNeedSizeAccounting = (nBlockMaxSize < MAX_BLOCK_SERIALIZED_SIZE-1000);
}
@@ -134,7 +140,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
pblock = &pblocktemplate->block; // pointer for convenience
// Add dummy coinbase tx as first transaction
- pblock->vtx.push_back(CTransaction());
+ pblock->vtx.emplace_back();
pblocktemplate->vTxFees.push_back(-1); // updated at end
pblocktemplate->vTxSigOpsCost.push_back(-1); // updated at end
@@ -169,7 +175,6 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
nLastBlockTx = nBlockTx;
nLastBlockSize = nBlockSize;
nLastBlockWeight = nBlockWeight;
- LogPrintf("CreateNewBlock(): total size %u txs: %u fees: %ld sigops %d\n", nBlockSize, nBlockTx, nFees, nBlockSigOpsCost);
// Create coinbase transaction.
CMutableTransaction coinbaseTx;
@@ -179,16 +184,19 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc
coinbaseTx.vout[0].scriptPubKey = scriptPubKeyIn;
coinbaseTx.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
coinbaseTx.vin[0].scriptSig = CScript() << nHeight << OP_0;
- pblock->vtx[0] = coinbaseTx;
+ pblock->vtx[0] = MakeTransactionRef(std::move(coinbaseTx));
pblocktemplate->vchCoinbaseCommitment = GenerateCoinbaseCommitment(*pblock, pindexPrev, chainparams.GetConsensus());
pblocktemplate->vTxFees[0] = -nFees;
+ uint64_t nSerializeSize = GetSerializeSize(*pblock, SER_NETWORK, PROTOCOL_VERSION);
+ LogPrintf("CreateNewBlock(): total size: %u block weight: %u txs: %u fees: %ld sigops %d\n", nSerializeSize, GetBlockWeight(*pblock), nBlockTx, nFees, nBlockSigOpsCost);
+
// Fill in header
pblock->hashPrevBlock = pindexPrev->GetBlockHash();
UpdateTime(pblock, chainparams.GetConsensus(), pindexPrev);
pblock->nBits = GetNextWorkRequired(pindexPrev, pblock, chainparams.GetConsensus());
pblock->nNonce = 0;
- pblocktemplate->vTxSigOpsCost[0] = WITNESS_SCALE_FACTOR * GetLegacySigOpCount(pblock->vtx[0]);
+ pblocktemplate->vTxSigOpsCost[0] = WITNESS_SCALE_FACTOR * GetLegacySigOpCount(*pblock->vtx[0]);
CValidationState state;
if (!TestBlockValidity(state, chainparams, *pblock, pindexPrev, false, false)) {
@@ -243,7 +251,7 @@ bool BlockAssembler::TestPackageTransactions(const CTxMemPool::setEntries& packa
BOOST_FOREACH (const CTxMemPool::txiter it, package) {
if (!IsFinalTx(it->GetTx(), nHeight, nLockTimeCutoff))
return false;
- if (!fIncludeWitness && !it->GetTx().wit.IsNull())
+ if (!fIncludeWitness && it->GetTx().HasWitness())
return false;
if (fNeedSizeAccounting) {
uint64_t nTxSize = ::GetSerializeSize(it->GetTx(), SER_NETWORK, PROTOCOL_VERSION);
@@ -310,7 +318,7 @@ bool BlockAssembler::TestForBlock(CTxMemPool::txiter iter)
void BlockAssembler::AddToBlock(CTxMemPool::txiter iter)
{
- pblock->vtx.push_back(iter->GetTx());
+ pblock->vtx.emplace_back(iter->GetSharedTx());
pblocktemplate->vTxFees.push_back(iter->GetFee());
pblocktemplate->vTxSigOpsCost.push_back(iter->GetSigOpCost());
if (fNeedSizeAccounting) {
@@ -458,7 +466,7 @@ void BlockAssembler::addPackageTxs()
packageSigOpsCost = modit->nSigOpCostWithAncestors;
}
- if (packageFees < ::minRelayTxFee.GetFee(packageSize)) {
+ if (packageFees < blockMinFeeRate.GetFee(packageSize)) {
// Everything else we might consider has a lower fee rate
return;
}
@@ -552,7 +560,7 @@ void BlockAssembler::addPriorityTxs()
}
// cannot accept witness transactions into a non-witness block
- if (!fIncludeWitness && !iter->GetTx().wit.IsNull())
+ if (!fIncludeWitness && iter->GetTx().HasWitness())
continue;
// If tx is dependent on other mempool txs which haven't yet been included
@@ -599,10 +607,10 @@ void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned
}
++nExtraNonce;
unsigned int nHeight = pindexPrev->nHeight+1; // Height first in coinbase required for block.version=2
- CMutableTransaction txCoinbase(pblock->vtx[0]);
+ CMutableTransaction txCoinbase(*pblock->vtx[0]);
txCoinbase.vin[0].scriptSig = (CScript() << nHeight << CScriptNum(nExtraNonce)) + COINBASE_FLAGS;
assert(txCoinbase.vin[0].scriptSig.size() <= 100);
- pblock->vtx[0] = txCoinbase;
+ pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock);
}
diff --git a/src/miner.h b/src/miner.h
index bad443b82a..3ba92b16b8 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -143,6 +143,7 @@ private:
bool fIncludeWitness;
unsigned int nBlockMaxWeight, nBlockMaxSize;
bool fNeedSizeAccounting;
+ CFeeRate blockMinFeeRate;
// Information on the current status of the block
uint64_t nBlockWeight;
diff --git a/src/net.cpp b/src/net.cpp
index 18d25cbcd1..b275bdd809 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -35,8 +35,6 @@
#include <miniupnpc/upnperrors.h>
#endif
-#include <boost/filesystem.hpp>
-#include <boost/thread.hpp>
#include <math.h>
@@ -74,7 +72,6 @@ bool fRelayTxes = true;
CCriticalSection cs_mapLocalHost;
std::map<CNetAddr, LocalServiceInfo> mapLocalHost;
static bool vfLimited[NET_MAX] = {};
-static CNode* pnodeLocalHost = NULL;
std::string strSubVersion;
limitedmap<uint256, int64_t> mapAlreadyAskedFor(MAX_INV_SZ);
@@ -393,18 +390,15 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
NodeId id = GetNewNodeId();
uint64_t nonce = GetDeterministicRandomizer(RANDOMIZER_ID_LOCALHOSTNONCE).Write(id).Finalize();
CNode* pnode = new CNode(id, nLocalServices, GetBestHeight(), hSocket, addrConnect, CalculateKeyedNetGroup(addrConnect), nonce, pszDest ? pszDest : "", false);
-
- GetNodeSignals().InitializeNode(pnode->GetId(), pnode);
+ pnode->nServicesExpected = ServiceFlags(addrConnect.nServices & nRelevantServices);
+ pnode->nTimeConnected = GetTime();
pnode->AddRef();
-
+ GetNodeSignals().InitializeNode(pnode, *this);
{
LOCK(cs_vNodes);
vNodes.push_back(pnode);
}
- pnode->nServicesExpected = ServiceFlags(addrConnect.nServices & nRelevantServices);
- pnode->nTimeConnected = GetTime();
-
return pnode;
} else if (!proxyConnectionFailed) {
// If connecting to the node failed, and failure is not caused by a problem connecting to
@@ -443,30 +437,8 @@ void CNode::CloseSocketDisconnect()
LogPrint("net", "disconnecting peer=%d\n", id);
CloseSocket(hSocket);
}
-
- // in case this fails, we'll empty the recv buffer when the CNode is deleted
- TRY_LOCK(cs_vRecvMsg, lockRecv);
- if (lockRecv)
- vRecvMsg.clear();
}
-void CNode::PushVersion()
-{
- int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
- CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices));
- CAddress addrMe = CAddress(CService(), nLocalServices);
- if (fLogIPs)
- LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nMyStartingHeight, addrMe.ToString(), addrYou.ToString(), id);
- else
- LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nMyStartingHeight, addrMe.ToString(), id);
- PushMessage(NetMsgType::VERSION, PROTOCOL_VERSION, (uint64_t)nLocalServices, nTime, addrYou, addrMe,
- nLocalHostNonce, strSubVersion, nMyStartingHeight, ::fRelayTxes);
-}
-
-
-
-
-
void CConnman::ClearBanned()
{
{
@@ -644,6 +616,7 @@ void CNode::copyStats(CNodeStats &stats)
X(nVersion);
X(cleanSubVer);
X(fInbound);
+ X(fAddnode);
X(nStartingHeight);
X(nSendBytes);
X(mapSendBytesPerMsgCmd);
@@ -672,16 +645,18 @@ void CNode::copyStats(CNodeStats &stats)
}
#undef X
-// requires LOCK(cs_vRecvMsg)
bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete)
{
complete = false;
+ int64_t nTimeMicros = GetTimeMicros();
+ nLastRecv = nTimeMicros / 1000000;
+ nRecvBytes += nBytes;
while (nBytes > 0) {
// get current incomplete message, or create a new one
if (vRecvMsg.empty() ||
vRecvMsg.back().complete())
- vRecvMsg.push_back(CNetMessage(Params().MessageStart(), SER_NETWORK, nRecvVersion));
+ vRecvMsg.push_back(CNetMessage(Params().MessageStart(), SER_NETWORK, INIT_PROTO_VERSION));
CNetMessage& msg = vRecvMsg.back();
@@ -713,7 +688,7 @@ bool CNode::ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete
assert(i != mapRecvBytesPerMsgCmd.end());
i->second += msg.hdr.nMessageSize + CMessageHeader::HEADER_SIZE;
- msg.nTime = GetTimeMicros();
+ msg.nTime = nTimeMicros;
complete = true;
}
}
@@ -762,12 +737,21 @@ int CNetMessage::readData(const char *pch, unsigned int nBytes)
vRecv.resize(std::min(hdr.nMessageSize, nDataPos + nCopy + 256 * 1024));
}
+ hasher.Write((const unsigned char*)pch, nCopy);
memcpy(&vRecv[nDataPos], pch, nCopy);
nDataPos += nCopy;
return nCopy;
}
+const uint256& CNetMessage::GetMessageHash() const
+{
+ assert(complete());
+ if (data_hash.IsNull())
+ hasher.Finalize(data_hash.begin());
+ return data_hash;
+}
+
@@ -777,15 +761,15 @@ int CNetMessage::readData(const char *pch, unsigned int nBytes)
// requires LOCK(cs_vSend)
-size_t SocketSendData(CNode *pnode)
+size_t CConnman::SocketSendData(CNode *pnode)
{
- std::deque<CSerializeData>::iterator it = pnode->vSendMsg.begin();
+ auto it = pnode->vSendMsg.begin();
size_t nSentSize = 0;
while (it != pnode->vSendMsg.end()) {
- const CSerializeData &data = *it;
+ const auto &data = *it;
assert(data.size() > pnode->nSendOffset);
- int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT);
+ int nBytes = send(pnode->hSocket, reinterpret_cast<const char*>(data.data()) + pnode->nSendOffset, data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT);
if (nBytes > 0) {
pnode->nLastSend = GetTime();
pnode->nSendBytes += nBytes;
@@ -794,6 +778,7 @@ size_t SocketSendData(CNode *pnode)
if (pnode->nSendOffset == data.size()) {
pnode->nSendOffset = 0;
pnode->nSendSize -= data.size();
+ pnode->fPauseSend = pnode->nSendSize > nSendBufferMaxSize;
it++;
} else {
// could not send full message; stop sending more
@@ -829,7 +814,7 @@ struct NodeEvictionCandidate
int64_t nMinPingUsecTime;
int64_t nLastBlockTime;
int64_t nLastTXTime;
- bool fNetworkNode;
+ bool fRelevantServices;
bool fRelayTxes;
bool fBloomFilter;
CAddress addr;
@@ -854,7 +839,7 @@ static bool CompareNodeBlockTime(const NodeEvictionCandidate &a, const NodeEvict
{
// There is a fall-through here because it is common for a node to have many peers which have not yet relayed a block.
if (a.nLastBlockTime != b.nLastBlockTime) return a.nLastBlockTime < b.nLastBlockTime;
- if (a.fNetworkNode != b.fNetworkNode) return b.fNetworkNode;
+ if (a.fRelevantServices != b.fRelevantServices) return b.fRelevantServices;
return a.nTimeConnected > b.nTimeConnected;
}
@@ -889,7 +874,8 @@ bool CConnman::AttemptToEvictConnection()
if (node->fDisconnect)
continue;
NodeEvictionCandidate candidate = {node->id, node->nTimeConnected, node->nMinPingUsecTime,
- node->nLastBlockTime, node->nLastTXTime, node->fNetworkNode,
+ node->nLastBlockTime, node->nLastTXTime,
+ (node->nServices & nRelevantServices) == nRelevantServices,
node->fRelayTxes, node->pfilter != NULL, node->addr, node->nKeyedNetGroup};
vEvictionCandidates.push_back(candidate);
}
@@ -995,6 +981,12 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
return;
}
+ if (!fNetworkActive) {
+ LogPrintf("connection from %s dropped: not accepting new connections\n", addr.ToString());
+ CloseSocket(hSocket);
+ return;
+ }
+
if (!IsSelectableSocket(hSocket))
{
LogPrintf("connection from %s dropped: non-selectable socket\n", addr.ToString());
@@ -1032,9 +1024,9 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
uint64_t nonce = GetDeterministicRandomizer(RANDOMIZER_ID_LOCALHOSTNONCE).Write(id).Finalize();
CNode* pnode = new CNode(id, nLocalServices, GetBestHeight(), hSocket, addr, CalculateKeyedNetGroup(addr), nonce, "", true);
- GetNodeSignals().InitializeNode(pnode->GetId(), pnode);
pnode->AddRef();
pnode->fWhitelisted = whitelisted;
+ GetNodeSignals().InitializeNode(pnode, *this);
LogPrint("net", "connection from %s accepted\n", addr.ToString());
@@ -1047,7 +1039,7 @@ void CConnman::AcceptConnection(const ListenSocket& hListenSocket) {
void CConnman::ThreadSocketHandler()
{
unsigned int nPrevNodeCount = 0;
- while (true)
+ while (!interruptNet)
{
//
// Disconnect nodes
@@ -1058,8 +1050,7 @@ void CConnman::ThreadSocketHandler()
std::vector<CNode*> vNodesCopy = vNodes;
BOOST_FOREACH(CNode* pnode, vNodesCopy)
{
- if (pnode->fDisconnect ||
- (pnode->GetRefCount() <= 0 && pnode->vRecvMsg.empty() && pnode->nSendSize == 0 && pnode->ssSend.empty()))
+ if (pnode->fDisconnect)
{
// remove from vNodes
vNodes.erase(remove(vNodes.begin(), vNodes.end(), pnode), vNodes.end());
@@ -1071,8 +1062,7 @@ void CConnman::ThreadSocketHandler()
pnode->CloseSocketDisconnect();
// hold in disconnected pool until all refs are released
- if (pnode->fNetworkNode || pnode->fInbound)
- pnode->Release();
+ pnode->Release();
vNodesDisconnected.push_back(pnode);
}
}
@@ -1090,13 +1080,9 @@ void CConnman::ThreadSocketHandler()
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend)
{
- TRY_LOCK(pnode->cs_vRecvMsg, lockRecv);
- if (lockRecv)
- {
TRY_LOCK(pnode->cs_inventory, lockInv);
if (lockInv)
fDelete = true;
- }
}
}
if (fDelete)
@@ -1107,8 +1093,13 @@ void CConnman::ThreadSocketHandler()
}
}
}
- if(vNodes.size() != nPrevNodeCount) {
- nPrevNodeCount = vNodes.size();
+ size_t vNodesSize;
+ {
+ LOCK(cs_vNodes);
+ vNodesSize = vNodes.size();
+ }
+ if(vNodesSize != nPrevNodeCount) {
+ nPrevNodeCount = vNodesSize;
if(clientInterface)
clientInterface->NotifyNumConnectionsChanged(nPrevNodeCount);
}
@@ -1151,22 +1142,13 @@ void CConnman::ThreadSocketHandler()
// write buffer in this case before receiving more. This avoids
// needlessly queueing received data, if the remote peer is not themselves
// receiving data. This means properly utilizing TCP flow control signalling.
- // * Otherwise, if there is no (complete) message in the receive buffer,
- // or there is space left in the buffer, select() for receiving data.
- // * (if neither of the above applies, there is certainly one message
- // in the receiver buffer ready to be processed).
- // Together, that means that at least one of the following is always possible,
- // so we don't deadlock:
- // * We send some data.
- // * We wait for data to be received (and disconnect after timeout).
- // * We process a message in the buffer (message handler thread).
+ // * Otherwise, if there is space left in the receive buffer, select() for
+ // receiving data.
+ // * Hand off all complete messages to the processor, to be handled without
+ // blocking here.
{
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend) {
- if (pnode->nOptimisticBytesWritten) {
- RecordBytesSent(pnode->nOptimisticBytesWritten);
- pnode->nOptimisticBytesWritten = 0;
- }
if (!pnode->vSendMsg.empty()) {
FD_SET(pnode->hSocket, &fdsetSend);
continue;
@@ -1174,10 +1156,7 @@ void CConnman::ThreadSocketHandler()
}
}
{
- TRY_LOCK(pnode->cs_vRecvMsg, lockRecv);
- if (lockRecv && (
- pnode->vRecvMsg.empty() || !pnode->vRecvMsg.front().complete() ||
- pnode->GetTotalRecvSize() <= GetReceiveFloodSize()))
+ if (!pnode->fPauseRecv)
FD_SET(pnode->hSocket, &fdsetRecv);
}
}
@@ -1185,7 +1164,8 @@ void CConnman::ThreadSocketHandler()
int nSelect = select(have_fds ? hSocketMax + 1 : 0,
&fdsetRecv, &fdsetSend, &fdsetError, &timeout);
- boost::this_thread::interruption_point();
+ if (interruptNet)
+ return;
if (nSelect == SOCKET_ERROR)
{
@@ -1198,7 +1178,8 @@ void CConnman::ThreadSocketHandler()
}
FD_ZERO(&fdsetSend);
FD_ZERO(&fdsetError);
- MilliSleep(timeout.tv_usec/1000);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(timeout.tv_usec/1000)))
+ return;
}
//
@@ -1224,7 +1205,8 @@ void CConnman::ThreadSocketHandler()
}
BOOST_FOREACH(CNode* pnode, vNodesCopy)
{
- boost::this_thread::interruption_point();
+ if (interruptNet)
+ return;
//
// Receive
@@ -1233,8 +1215,6 @@ void CConnman::ThreadSocketHandler()
continue;
if (FD_ISSET(pnode->hSocket, &fdsetRecv) || FD_ISSET(pnode->hSocket, &fdsetError))
{
- TRY_LOCK(pnode->cs_vRecvMsg, lockRecv);
- if (lockRecv)
{
{
// typical socket buffer is 8K-64K
@@ -1245,11 +1225,23 @@ void CConnman::ThreadSocketHandler()
bool notify = false;
if (!pnode->ReceiveMsgBytes(pchBuf, nBytes, notify))
pnode->CloseSocketDisconnect();
- if(notify)
- messageHandlerCondition.notify_one();
- pnode->nLastRecv = GetTime();
- pnode->nRecvBytes += nBytes;
RecordBytesRecv(nBytes);
+ if (notify) {
+ size_t nSizeAdded = 0;
+ auto it(pnode->vRecvMsg.begin());
+ for (; it != pnode->vRecvMsg.end(); ++it) {
+ if (!it->complete())
+ break;
+ nSizeAdded += it->vRecv.size() + CMessageHeader::HEADER_SIZE;
+ }
+ {
+ LOCK(pnode->cs_vProcessMsg);
+ pnode->vProcessMsg.splice(pnode->vProcessMsg.end(), pnode->vRecvMsg, pnode->vRecvMsg.begin(), it);
+ pnode->nProcessQueueSize += nSizeAdded;
+ pnode->fPauseRecv = pnode->nProcessQueueSize > nReceiveFloodSize;
+ }
+ WakeMessageHandler();
+ }
}
else if (nBytes == 0)
{
@@ -1283,8 +1275,9 @@ void CConnman::ThreadSocketHandler()
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend) {
size_t nBytes = SocketSendData(pnode);
- if (nBytes)
+ if (nBytes) {
RecordBytesSent(nBytes);
+ }
}
}
@@ -1324,8 +1317,14 @@ void CConnman::ThreadSocketHandler()
}
}
-
-
+void CConnman::WakeMessageHandler()
+{
+ {
+ std::lock_guard<std::mutex> lock(mutexMsgProc);
+ fMsgProcWake = true;
+ }
+ condMsgProc.notify_one();
+}
@@ -1474,7 +1473,8 @@ void CConnman::ThreadDNSAddressSeed()
// less influence on the network topology, and reduces traffic to the seeds.
if ((addrman.size() > 0) &&
(!GetBoolArg("-forcednsseed", DEFAULT_FORCEDNSSEED))) {
- MilliSleep(11 * 1000);
+ if (!interruptNet.sleep_for(std::chrono::seconds(11)))
+ return;
LOCK(cs_vNodes);
int nRelevant = 0;
@@ -1574,21 +1574,23 @@ void CConnman::ProcessOneShot()
void CConnman::ThreadOpenConnections()
{
// Connect to specific addresses
- if (mapArgs.count("-connect") && mapMultiArgs["-connect"].size() > 0)
+ if (mapMultiArgs.count("-connect") && mapMultiArgs.at("-connect").size() > 0)
{
for (int64_t nLoop = 0;; nLoop++)
{
ProcessOneShot();
- BOOST_FOREACH(const std::string& strAddr, mapMultiArgs["-connect"])
+ BOOST_FOREACH(const std::string& strAddr, mapMultiArgs.at("-connect"))
{
CAddress addr(CService(), NODE_NONE);
OpenNetworkConnection(addr, false, NULL, strAddr.c_str());
for (int i = 0; i < 10 && i < nLoop; i++)
{
- MilliSleep(500);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
+ return;
}
}
- MilliSleep(500);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
+ return;
}
}
@@ -1597,14 +1599,16 @@ void CConnman::ThreadOpenConnections()
// Minimum time before next feeler connection (in microseconds).
int64_t nNextFeeler = PoissonNextSend(nStart*1000*1000, FEELER_INTERVAL);
- while (true)
+ while (!interruptNet)
{
ProcessOneShot();
- MilliSleep(500);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
+ return;
CSemaphoreGrant grant(*semOutbound);
- boost::this_thread::interruption_point();
+ if (interruptNet)
+ return;
// Add seed nodes if DNS seeds are all down (an infrastructure attack?).
if (addrman.size() == 0 && (GetTime() - nStart > 60)) {
@@ -1630,7 +1634,12 @@ void CConnman::ThreadOpenConnections()
{
LOCK(cs_vNodes);
BOOST_FOREACH(CNode* pnode, vNodes) {
- if (!pnode->fInbound) {
+ if (!pnode->fInbound && !pnode->fAddnode) {
+ // Netgroups for inbound and addnode peers are not excluded because our goal here
+ // is to not use multiple of our limited outbound slots on a single netgroup
+ // but inbound and addnode peers do not use our outbound slots. Inbound peers
+ // also have the added issue that they're attacker controlled and could be used
+ // to prevent us from connecting to particular hosts if we used them here.
setConnected.insert(pnode->addr.GetGroup());
nOutbound++;
}
@@ -1662,7 +1671,7 @@ void CConnman::ThreadOpenConnections()
int64_t nANow = GetAdjustedTime();
int nTries = 0;
- while (true)
+ while (!interruptNet)
{
CAddrInfo addr = addrman.Select(fFeeler);
@@ -1705,7 +1714,8 @@ void CConnman::ThreadOpenConnections()
if (fFeeler) {
// Add small amount of random noise before connection to avoid synchronization.
int randsleep = GetRandInt(FEELER_SLEEP_WINDOW * 1000);
- MilliSleep(randsleep);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(randsleep)))
+ return;
LogPrint("net", "Making feeler connection to %s\n", addrConnect.ToString());
}
@@ -1770,34 +1780,49 @@ void CConnman::ThreadOpenAddedConnections()
{
{
LOCK(cs_vAddedNodes);
- vAddedNodes = mapMultiArgs["-addnode"];
+ if (mapMultiArgs.count("-addnode"))
+ vAddedNodes = mapMultiArgs.at("-addnode");
}
- for (unsigned int i = 0; true; i++)
+ while (true)
{
+ CSemaphoreGrant grant(*semAddnode);
std::vector<AddedNodeInfo> vInfo = GetAddedNodeInfo();
+ bool tried = false;
for (const AddedNodeInfo& info : vInfo) {
if (!info.fConnected) {
- CSemaphoreGrant grant(*semOutbound);
+ if (!grant.TryAcquire()) {
+ // If we've used up our semaphore and need a new one, lets not wait here since while we are waiting
+ // the addednodeinfo state might change.
+ break;
+ }
// If strAddedNode is an IP/port, decode it immediately, so
// OpenNetworkConnection can detect existing connections to that IP/port.
+ tried = true;
CService service(LookupNumeric(info.strAddedNode.c_str(), Params().GetDefaultPort()));
- OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false);
- MilliSleep(500);
+ OpenNetworkConnection(CAddress(service, NODE_NONE), false, &grant, info.strAddedNode.c_str(), false, false, true);
+ if (!interruptNet.sleep_for(std::chrono::milliseconds(500)))
+ return;
}
}
-
- MilliSleep(120000); // Retry every 2 minutes
+ // Retry every 60 seconds if a connection was attempted, otherwise two seconds
+ if (!interruptNet.sleep_for(std::chrono::seconds(tried ? 60 : 2)))
+ return;
}
}
// if successful, this moves the passed grant to the constructed node
-bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler)
+bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound, const char *pszDest, bool fOneShot, bool fFeeler, bool fAddnode)
{
//
// Initiate outbound network connection
//
- boost::this_thread::interruption_point();
+ if (interruptNet) {
+ return false;
+ }
+ if (!fNetworkActive) {
+ return false;
+ }
if (!pszDest) {
if (IsLocal(addrConnect) ||
FindNode((CNetAddr)addrConnect) || IsBanned(addrConnect) ||
@@ -1807,28 +1832,24 @@ bool CConnman::OpenNetworkConnection(const CAddress& addrConnect, bool fCountFai
return false;
CNode* pnode = ConnectNode(addrConnect, pszDest, fCountFailure);
- boost::this_thread::interruption_point();
if (!pnode)
return false;
if (grantOutbound)
grantOutbound->MoveTo(pnode->grantOutbound);
- pnode->fNetworkNode = true;
if (fOneShot)
pnode->fOneShot = true;
if (fFeeler)
pnode->fFeeler = true;
+ if (fAddnode)
+ pnode->fAddnode = true;
return true;
}
-
void CConnman::ThreadMessageHandler()
{
- boost::mutex condition_mutex;
- boost::unique_lock<boost::mutex> lock(condition_mutex);
-
- while (true)
+ while (!flagInterruptMsgProc)
{
std::vector<CNode*> vNodesCopy;
{
@@ -1839,7 +1860,7 @@ void CConnman::ThreadMessageHandler()
}
}
- bool fSleep = true;
+ bool fMoreWork = false;
BOOST_FOREACH(CNode* pnode, vNodesCopy)
{
@@ -1847,31 +1868,19 @@ void CConnman::ThreadMessageHandler()
continue;
// Receive messages
- {
- TRY_LOCK(pnode->cs_vRecvMsg, lockRecv);
- if (lockRecv)
- {
- if (!GetNodeSignals().ProcessMessages(pnode, *this))
- pnode->CloseSocketDisconnect();
-
- if (pnode->nSendSize < GetSendBufferSize())
- {
- if (!pnode->vRecvGetData.empty() || (!pnode->vRecvMsg.empty() && pnode->vRecvMsg[0].complete()))
- {
- fSleep = false;
- }
- }
- }
- }
- boost::this_thread::interruption_point();
+ bool fMoreNodeWork = GetNodeSignals().ProcessMessages(pnode, *this, flagInterruptMsgProc);
+ fMoreWork |= (fMoreNodeWork && !pnode->fPauseSend);
+ if (flagInterruptMsgProc)
+ return;
// Send messages
{
TRY_LOCK(pnode->cs_vSend, lockSend);
if (lockSend)
- GetNodeSignals().SendMessages(pnode, *this);
+ GetNodeSignals().SendMessages(pnode, *this, flagInterruptMsgProc);
}
- boost::this_thread::interruption_point();
+ if (flagInterruptMsgProc)
+ return;
}
{
@@ -1880,8 +1889,11 @@ void CConnman::ThreadMessageHandler()
pnode->Release();
}
- if (fSleep)
- messageHandlerCondition.timed_wait(lock, boost::posix_time::microsec_clock::universal_time() + boost::posix_time::milliseconds(100));
+ std::unique_lock<std::mutex> lock(mutexMsgProc);
+ if (!fMoreWork) {
+ condMsgProc.wait_until(lock, std::chrono::steady_clock::now() + std::chrono::milliseconds(100), [this] { return fMsgProcWake; });
+ }
+ fMsgProcWake = false;
}
}
@@ -2039,18 +2051,43 @@ void Discover(boost::thread_group& threadGroup)
#endif
}
+void CConnman::SetNetworkActive(bool active)
+{
+ if (fDebug) {
+ LogPrint("net", "SetNetworkActive: %s\n", active);
+ }
+
+ if (!active) {
+ fNetworkActive = false;
+
+ LOCK(cs_vNodes);
+ // Close sockets to all nodes
+ BOOST_FOREACH(CNode* pnode, vNodes) {
+ pnode->CloseSocketDisconnect();
+ }
+ } else {
+ fNetworkActive = true;
+ }
+
+ uiInterface.NotifyNetworkActiveChanged(fNetworkActive);
+}
+
CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In) : nSeed0(nSeed0In), nSeed1(nSeed1In)
{
+ fNetworkActive = true;
setBannedIsDirty = false;
fAddressesInitialized = false;
nLastNodeId = 0;
nSendBufferMaxSize = 0;
nReceiveFloodSize = 0;
semOutbound = NULL;
+ semAddnode = NULL;
nMaxConnections = 0;
nMaxOutbound = 0;
+ nMaxAddnode = 0;
nBestHeight = 0;
clientInterface = NULL;
+ flagInterruptMsgProc = false;
}
NodeId CConnman::GetNewNodeId()
@@ -2058,7 +2095,7 @@ NodeId CConnman::GetNewNodeId()
return nLastNodeId.fetch_add(1, std::memory_order_relaxed);
}
-bool CConnman::Start(boost::thread_group& threadGroup, CScheduler& scheduler, std::string& strNodeError, Options connOptions)
+bool CConnman::Start(CScheduler& scheduler, std::string& strNodeError, Options connOptions)
{
nTotalBytesRecv = 0;
nTotalBytesSent = 0;
@@ -2069,10 +2106,11 @@ bool CConnman::Start(boost::thread_group& threadGroup, CScheduler& scheduler, st
nLocalServices = connOptions.nLocalServices;
nMaxConnections = connOptions.nMaxConnections;
nMaxOutbound = std::min((connOptions.nMaxOutbound), nMaxConnections);
+ nMaxAddnode = connOptions.nMaxAddnode;
nMaxFeeler = connOptions.nMaxFeeler;
nSendBufferMaxSize = connOptions.nSendBufferMaxSize;
- nReceiveFloodSize = connOptions.nSendBufferMaxSize;
+ nReceiveFloodSize = connOptions.nReceiveFloodSize;
nMaxOutboundLimit = connOptions.nMaxOutboundLimit;
nMaxOutboundTimeframe = connOptions.nMaxOutboundTimeframe;
@@ -2121,39 +2159,40 @@ bool CConnman::Start(boost::thread_group& threadGroup, CScheduler& scheduler, st
// initialize semaphore
semOutbound = new CSemaphore(std::min((nMaxOutbound + nMaxFeeler), nMaxConnections));
}
-
- if (pnodeLocalHost == NULL) {
- CNetAddr local;
- LookupHost("127.0.0.1", local, false);
-
- NodeId id = GetNewNodeId();
- uint64_t nonce = GetDeterministicRandomizer(RANDOMIZER_ID_LOCALHOSTNONCE).Write(id).Finalize();
-
- pnodeLocalHost = new CNode(id, nLocalServices, GetBestHeight(), INVALID_SOCKET, CAddress(CService(local, 0), nLocalServices), 0, nonce);
- GetNodeSignals().InitializeNode(pnodeLocalHost->GetId(), pnodeLocalHost);
+ if (semAddnode == NULL) {
+ // initialize semaphore
+ semAddnode = new CSemaphore(nMaxAddnode);
}
//
// Start threads
//
+ InterruptSocks5(false);
+ interruptNet.reset();
+ flagInterruptMsgProc = false;
+
+ {
+ std::unique_lock<std::mutex> lock(mutexMsgProc);
+ fMsgProcWake = false;
+ }
+
+ // Send and receive from sockets, accept connections
+ threadSocketHandler = std::thread(&TraceThread<std::function<void()> >, "net", std::function<void()>(std::bind(&CConnman::ThreadSocketHandler, this)));
if (!GetBoolArg("-dnsseed", true))
LogPrintf("DNS seeding disabled\n");
else
- threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "dnsseed", boost::function<void()>(boost::bind(&CConnman::ThreadDNSAddressSeed, this))));
-
- // Send and receive from sockets, accept connections
- threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "net", boost::function<void()>(boost::bind(&CConnman::ThreadSocketHandler, this))));
+ threadDNSAddressSeed = std::thread(&TraceThread<std::function<void()> >, "dnsseed", std::function<void()>(std::bind(&CConnman::ThreadDNSAddressSeed, this)));
// Initiate outbound connections from -addnode
- threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "addcon", boost::function<void()>(boost::bind(&CConnman::ThreadOpenAddedConnections, this))));
+ threadOpenAddedConnections = std::thread(&TraceThread<std::function<void()> >, "addcon", std::function<void()>(std::bind(&CConnman::ThreadOpenAddedConnections, this)));
// Initiate outbound connections unless connect=0
- if (!mapArgs.count("-connect") || mapMultiArgs["-connect"].size() != 1 || mapMultiArgs["-connect"][0] != "0")
- threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "opencon", boost::function<void()>(boost::bind(&CConnman::ThreadOpenConnections, this))));
+ if (!mapMultiArgs.count("-connect") || mapMultiArgs.at("-connect").size() != 1 || mapMultiArgs.at("-connect")[0] != "0")
+ threadOpenConnections = std::thread(&TraceThread<std::function<void()> >, "opencon", std::function<void()>(std::bind(&CConnman::ThreadOpenConnections, this)));
// Process messages
- threadGroup.create_thread(boost::bind(&TraceThread<boost::function<void()> >, "msghand", boost::function<void()>(boost::bind(&CConnman::ThreadMessageHandler, this))));
+ threadMessageHandler = std::thread(&TraceThread<std::function<void()> >, "msghand", std::function<void()>(std::bind(&CConnman::ThreadMessageHandler, this)));
// Dump network addresses
scheduler.scheduleEvery(boost::bind(&CConnman::DumpData, this), DUMP_ADDRESSES_INTERVAL);
@@ -2176,12 +2215,38 @@ public:
}
instance_of_cnetcleanup;
-void CConnman::Stop()
+void CConnman::Interrupt()
{
- LogPrintf("%s\n",__func__);
+ {
+ std::lock_guard<std::mutex> lock(mutexMsgProc);
+ flagInterruptMsgProc = true;
+ }
+ condMsgProc.notify_all();
+
+ interruptNet();
+ InterruptSocks5(true);
+
if (semOutbound)
for (int i=0; i<(nMaxOutbound + nMaxFeeler); i++)
semOutbound->post();
+}
+
+void CConnman::Stop()
+{
+ if (threadMessageHandler.joinable())
+ threadMessageHandler.join();
+ if (threadOpenConnections.joinable())
+ threadOpenConnections.join();
+ if (threadOpenAddedConnections.joinable())
+ threadOpenAddedConnections.join();
+ if (threadDNSAddressSeed.joinable())
+ threadDNSAddressSeed.join();
+ if (threadSocketHandler.joinable())
+ threadSocketHandler.join();
+
+ if (semAddnode)
+ for (int i=0; i<nMaxAddnode; i++)
+ semOutbound->post();
if (fAddressesInitialized)
{
@@ -2210,9 +2275,8 @@ void CConnman::Stop()
vhListenSocket.clear();
delete semOutbound;
semOutbound = NULL;
- if(pnodeLocalHost)
- DeleteNode(pnodeLocalHost);
- pnodeLocalHost = NULL;
+ delete semAddnode;
+ semAddnode = NULL;
}
void CConnman::DeleteNode(CNode* pnode)
@@ -2227,6 +2291,7 @@ void CConnman::DeleteNode(CNode* pnode)
CConnman::~CConnman()
{
+ Interrupt();
Stop();
}
@@ -2482,46 +2547,10 @@ int CConnman::GetBestHeight() const
return nBestHeight.load(std::memory_order_acquire);
}
-void CNode::Fuzz(int nChance)
-{
- if (!fSuccessfullyConnected) return; // Don't fuzz initial handshake
- if (GetRand(nChance) != 0) return; // Fuzz 1 of every nChance messages
-
- switch (GetRand(3))
- {
- case 0:
- // xor a random byte with a random value:
- if (!ssSend.empty()) {
- CDataStream::size_type pos = GetRand(ssSend.size());
- ssSend[pos] ^= (unsigned char)(GetRand(256));
- }
- break;
- case 1:
- // delete a random byte:
- if (!ssSend.empty()) {
- CDataStream::size_type pos = GetRand(ssSend.size());
- ssSend.erase(ssSend.begin()+pos);
- }
- break;
- case 2:
- // insert a random byte at a random position
- {
- CDataStream::size_type pos = GetRand(ssSend.size());
- char ch = (char)GetRand(256);
- ssSend.insert(ssSend.begin()+pos, ch);
- }
- break;
- }
- // Chance of more than one change half the time:
- // (more changes exponentially less likely):
- Fuzz(2);
-}
-
unsigned int CConnman::GetReceiveFloodSize() const { return nReceiveFloodSize; }
unsigned int CConnman::GetSendBufferSize() const{ return nSendBufferMaxSize; }
CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn, SOCKET hSocketIn, const CAddress& addrIn, uint64_t nKeyedNetGroupIn, uint64_t nLocalHostNonceIn, const std::string& addrNameIn, bool fInboundIn) :
- ssSend(SER_NETWORK, INIT_PROTO_VERSION),
addr(addrIn),
fInbound(fInboundIn),
id(idIn),
@@ -2530,7 +2559,8 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
filterInventoryKnown(50000, 0.000001),
nLocalHostNonce(nLocalHostNonceIn),
nLocalServices(nLocalServicesIn),
- nMyStartingHeight(nMyStartingHeightIn)
+ nMyStartingHeight(nMyStartingHeightIn),
+ nSendVersion(0)
{
nServices = NODE_NONE;
nServicesExpected = NODE_NONE;
@@ -2547,9 +2577,9 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
strSubVer = "";
fWhitelisted = false;
fOneShot = false;
+ fAddnode = false;
fClient = false; // set by version message
fFeeler = false;
- fNetworkNode = false;
fSuccessfullyConnected = false;
fDisconnect = false;
nRefCount = 0;
@@ -2577,7 +2607,9 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
minFeeFilter = 0;
lastSentFeeFilter = 0;
nextSendTimeFeeFilter = 0;
- nOptimisticBytesWritten = 0;
+ fPauseRecv = false;
+ fPauseSend = false;
+ nProcessQueueSize = 0;
BOOST_FOREACH(const std::string &msg, getAllNetMessageTypes())
mapRecvBytesPerMsgCmd[msg] = 0;
@@ -2587,10 +2619,6 @@ CNode::CNode(NodeId idIn, ServiceFlags nLocalServicesIn, int nMyStartingHeightIn
LogPrint("net", "Added connection to %s peer=%d\n", addrName, id);
else
LogPrint("net", "Added connection peer=%d\n", id);
-
- // Be shy and don't send version until we hear
- if (hSocket != INVALID_SOCKET && !fInbound)
- PushVersion();
}
CNode::~CNode()
@@ -2635,65 +2663,44 @@ void CNode::AskFor(const CInv& inv)
mapAskFor.insert(std::make_pair(nRequestTime, inv));
}
-void CNode::BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend)
-{
- ENTER_CRITICAL_SECTION(cs_vSend);
- assert(ssSend.size() == 0);
- ssSend << CMessageHeader(Params().MessageStart(), pszCommand, 0);
- LogPrint("net", "sending: %s ", SanitizeString(pszCommand));
-}
-
-void CNode::AbortMessage() UNLOCK_FUNCTION(cs_vSend)
+void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
{
- ssSend.clear();
+ size_t nMessageSize = msg.data.size();
+ size_t nTotalSize = nMessageSize + CMessageHeader::HEADER_SIZE;
+ LogPrint("net", "sending %s (%d bytes) peer=%d\n", SanitizeString(msg.command.c_str()), nMessageSize, pnode->id);
- LEAVE_CRITICAL_SECTION(cs_vSend);
-
- LogPrint("net", "(aborted)\n");
-}
+ std::vector<unsigned char> serializedHeader;
+ serializedHeader.reserve(CMessageHeader::HEADER_SIZE);
+ uint256 hash = Hash(msg.data.data(), msg.data.data() + nMessageSize);
+ CMessageHeader hdr(Params().MessageStart(), msg.command.c_str(), nMessageSize);
+ memcpy(hdr.pchChecksum, hash.begin(), CMessageHeader::CHECKSUM_SIZE);
-void CNode::EndMessage(const char* pszCommand) UNLOCK_FUNCTION(cs_vSend)
-{
- // The -*messagestest options are intentionally not documented in the help message,
- // since they are only used during development to debug the networking code and are
- // not intended for end-users.
- if (mapArgs.count("-dropmessagestest") && GetRand(GetArg("-dropmessagestest", 2)) == 0)
- {
- LogPrint("net", "dropmessages DROPPING SEND MESSAGE\n");
- AbortMessage();
- return;
- }
- if (mapArgs.count("-fuzzmessagestest"))
- Fuzz(GetArg("-fuzzmessagestest", 10));
+ CVectorWriter{SER_NETWORK, INIT_PROTO_VERSION, serializedHeader, 0, hdr};
- if (ssSend.size() == 0)
+ size_t nBytesSent = 0;
{
- LEAVE_CRITICAL_SECTION(cs_vSend);
- return;
- }
- // Set the size
- unsigned int nSize = ssSend.size() - CMessageHeader::HEADER_SIZE;
- WriteLE32((uint8_t*)&ssSend[CMessageHeader::MESSAGE_SIZE_OFFSET], nSize);
-
- //log total amount of bytes per command
- mapSendBytesPerMsgCmd[std::string(pszCommand)] += nSize + CMessageHeader::HEADER_SIZE;
-
- // Set the checksum
- uint256 hash = Hash(ssSend.begin() + CMessageHeader::HEADER_SIZE, ssSend.end());
- assert(ssSend.size () >= CMessageHeader::CHECKSUM_OFFSET + CMessageHeader::CHECKSUM_SIZE);
- memcpy((char*)&ssSend[CMessageHeader::CHECKSUM_OFFSET], hash.begin(), CMessageHeader::CHECKSUM_SIZE);
-
- LogPrint("net", "(%d bytes) peer=%d\n", nSize, id);
+ LOCK(pnode->cs_vSend);
+ if(pnode->hSocket == INVALID_SOCKET) {
+ return;
+ }
+ bool optimisticSend(pnode->vSendMsg.empty());
- std::deque<CSerializeData>::iterator it = vSendMsg.insert(vSendMsg.end(), CSerializeData());
- ssSend.GetAndClear(*it);
- nSendSize += (*it).size();
+ //log total amount of bytes per command
+ pnode->mapSendBytesPerMsgCmd[msg.command] += nTotalSize;
+ pnode->nSendSize += nTotalSize;
- // If write queue empty, attempt "optimistic write"
- if (it == vSendMsg.begin())
- nOptimisticBytesWritten += SocketSendData(this);
+ if (pnode->nSendSize > nSendBufferMaxSize)
+ pnode->fPauseSend = true;
+ pnode->vSendMsg.push_back(std::move(serializedHeader));
+ if (nMessageSize)
+ pnode->vSendMsg.push_back(std::move(msg.data));
- LEAVE_CRITICAL_SECTION(cs_vSend);
+ // If write queue empty, attempt "optimistic write"
+ if (optimisticSend == true)
+ nBytesSent = SocketSendData(pnode);
+ }
+ if (nBytesSent)
+ RecordBytesSent(nBytesSent);
}
bool CConnman::ForNode(NodeId id, std::function<bool(CNode* pnode)> func)
diff --git a/src/net.h b/src/net.h
index bfce516237..a9da38146b 100644
--- a/src/net.h
+++ b/src/net.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,11 +19,14 @@
#include "streams.h"
#include "sync.h"
#include "uint256.h"
+#include "threadinterrupt.h"
#include <atomic>
#include <deque>
#include <stdint.h>
+#include <thread>
#include <memory>
+#include <condition_variable>
#ifndef WIN32
#include <arpa/inet.h>
@@ -55,8 +58,10 @@ static const unsigned int MAX_ADDR_TO_SEND = 1000;
static const unsigned int MAX_PROTOCOL_MESSAGE_LENGTH = 4 * 1000 * 1000;
/** Maximum length of strSubVer in `version` message */
static const unsigned int MAX_SUBVERSION_LENGTH = 256;
-/** Maximum number of outgoing nodes */
+/** Maximum number of automatic outgoing nodes */
static const int MAX_OUTBOUND_CONNECTIONS = 8;
+/** Maximum number of addnode outgoing nodes */
+static const int MAX_ADDNODE_CONNECTIONS = 8;
/** -listen default */
static const bool DEFAULT_LISTEN = true;
/** -upnp default */
@@ -101,6 +106,20 @@ class CTransaction;
class CNodeStats;
class CClientUIInterface;
+struct CSerializedNetMsg
+{
+ CSerializedNetMsg() = default;
+ CSerializedNetMsg(CSerializedNetMsg&&) = default;
+ CSerializedNetMsg& operator=(CSerializedNetMsg&&) = default;
+ // No copying, only moves.
+ CSerializedNetMsg(const CSerializedNetMsg& msg) = delete;
+ CSerializedNetMsg& operator=(const CSerializedNetMsg&) = delete;
+
+ std::vector<unsigned char> data;
+ std::string command;
+};
+
+
class CConnman
{
public:
@@ -118,6 +137,7 @@ public:
ServiceFlags nRelevantServices = NODE_NONE;
int nMaxConnections = 0;
int nMaxOutbound = 0;
+ int nMaxAddnode = 0;
int nMaxFeeler = 0;
int nBestHeight = 0;
CClientUIInterface* uiInterface = nullptr;
@@ -128,14 +148,19 @@ public:
};
CConnman(uint64_t seed0, uint64_t seed1);
~CConnman();
- bool Start(boost::thread_group& threadGroup, CScheduler& scheduler, std::string& strNodeError, Options options);
+ bool Start(CScheduler& scheduler, std::string& strNodeError, Options options);
void Stop();
+ void Interrupt();
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
- bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false);
+ bool GetNetworkActive() const { return fNetworkActive; };
+ void SetNetworkActive(bool active);
+ bool OpenNetworkConnection(const CAddress& addrConnect, bool fCountFailure, CSemaphoreGrant *grantOutbound = NULL, const char *strDest = NULL, bool fOneShot = false, bool fFeeler = false, bool fAddnode = false);
bool CheckIncomingNonce(uint64_t nonce);
bool ForNode(NodeId id, std::function<bool(CNode* pnode)> func);
+ void PushMessage(CNode* pnode, CSerializedNetMsg&& msg);
+
template<typename Callable>
bool ForEachNodeContinueIf(Callable&& func)
{
@@ -302,6 +327,9 @@ public:
/** Get a unique deterministic randomizer. */
CSipHasher GetDeterministicRandomizer(uint64_t id);
+ unsigned int GetReceiveFloodSize() const;
+
+ void WakeMessageHandler();
private:
struct ListenSocket {
SOCKET socket;
@@ -333,6 +361,7 @@ private:
NodeId GetNewNodeId();
+ size_t SocketSendData(CNode *pnode);
//!check is the banlist has unwritten changes
bool BannedSetIsDirty();
//!set the "dirty" flag for the banlist
@@ -343,8 +372,6 @@ private:
void DumpData();
void DumpBanlist();
- unsigned int GetReceiveFloodSize() const;
-
// Network stats
void RecordBytesRecv(uint64_t bytes);
void RecordBytesSent(uint64_t bytes);
@@ -370,6 +397,7 @@ private:
unsigned int nReceiveFloodSize;
std::vector<ListenSocket> vhListenSocket;
+ std::atomic<bool> fNetworkActive;
banmap_t setBanned;
CCriticalSection cs_setBanned;
bool setBannedIsDirty;
@@ -383,7 +411,6 @@ private:
std::list<CNode*> vNodesDisconnected;
mutable CCriticalSection cs_vNodes;
std::atomic<NodeId> nLastNodeId;
- boost::condition_variable messageHandlerCondition;
/** Services this instance offers */
ServiceFlags nLocalServices;
@@ -392,21 +419,37 @@ private:
ServiceFlags nRelevantServices;
CSemaphore *semOutbound;
+ CSemaphore *semAddnode;
int nMaxConnections;
int nMaxOutbound;
+ int nMaxAddnode;
int nMaxFeeler;
std::atomic<int> nBestHeight;
CClientUIInterface* clientInterface;
/** SipHasher seeds for deterministic randomness */
const uint64_t nSeed0, nSeed1;
+
+ /** flag for waking the message processor. */
+ bool fMsgProcWake;
+
+ std::condition_variable condMsgProc;
+ std::mutex mutexMsgProc;
+ std::atomic<bool> flagInterruptMsgProc;
+
+ CThreadInterrupt interruptNet;
+
+ std::thread threadDNSAddressSeed;
+ std::thread threadSocketHandler;
+ std::thread threadOpenAddedConnections;
+ std::thread threadOpenConnections;
+ std::thread threadMessageHandler;
};
extern std::unique_ptr<CConnman> g_connman;
void Discover(boost::thread_group& threadGroup);
void MapPort(bool fUseUPnP);
unsigned short GetListenPort();
bool BindListenPort(const CService &bindAddr, std::string& strError, bool fWhitelisted = false);
-size_t SocketSendData(CNode *pnode);
struct CombinerAll
{
@@ -426,9 +469,9 @@ struct CombinerAll
// Signals for message handling
struct CNodeSignals
{
- boost::signals2::signal<bool (CNode*, CConnman&), CombinerAll> ProcessMessages;
- boost::signals2::signal<bool (CNode*, CConnman&), CombinerAll> SendMessages;
- boost::signals2::signal<void (NodeId, const CNode*)> InitializeNode;
+ boost::signals2::signal<bool (CNode*, CConnman&, std::atomic<bool>&), CombinerAll> ProcessMessages;
+ boost::signals2::signal<bool (CNode*, CConnman&, std::atomic<bool>&), CombinerAll> SendMessages;
+ boost::signals2::signal<void (CNode*, CConnman&)> InitializeNode;
boost::signals2::signal<void (NodeId, bool&)> FinalizeNode;
};
@@ -495,6 +538,7 @@ public:
int nVersion;
std::string cleanSubVer;
bool fInbound;
+ bool fAddnode;
int nStartingHeight;
uint64_t nSendBytes;
mapMsgCmdSize mapSendBytesPerMsgCmd;
@@ -512,6 +556,9 @@ public:
class CNetMessage {
+private:
+ mutable CHash256 hasher;
+ mutable uint256 data_hash;
public:
bool in_data; // parsing header (false) or data (true)
@@ -539,6 +586,8 @@ public:
return (hdr.nMessageSize == nDataPos);
}
+ const uint256& GetMessageHash() const;
+
void SetVersion(int nVersionIn)
{
hdrbuf.SetVersion(nVersionIn);
@@ -553,24 +602,25 @@ public:
/** Information about a peer */
class CNode
{
+ friend class CConnman;
public:
// socket
ServiceFlags nServices;
ServiceFlags nServicesExpected;
SOCKET hSocket;
- CDataStream ssSend;
size_t nSendSize; // total size of all vSendMsg entries
size_t nSendOffset; // offset inside the first vSendMsg already sent
- uint64_t nOptimisticBytesWritten;
uint64_t nSendBytes;
- std::deque<CSerializeData> vSendMsg;
+ std::deque<std::vector<unsigned char>> vSendMsg;
CCriticalSection cs_vSend;
+ CCriticalSection cs_vProcessMsg;
+ std::list<CNetMessage> vProcessMsg;
+ size_t nProcessQueueSize;
+
std::deque<CInv> vRecvGetData;
- std::deque<CNetMessage> vRecvMsg;
- CCriticalSection cs_vRecvMsg;
uint64_t nRecvBytes;
- int nRecvVersion;
+ std::atomic<int> nRecvVersion;
int64_t nLastSend;
int64_t nLastRecv;
@@ -588,11 +638,11 @@ public:
bool fWhitelisted; // This peer can bypass DoS banning.
bool fFeeler; // If true this node is being used as a short lived feeler.
bool fOneShot;
+ bool fAddnode;
bool fClient;
const bool fInbound;
- bool fNetworkNode;
bool fSuccessfullyConnected;
- bool fDisconnect;
+ std::atomic_bool fDisconnect;
// We use fRelayTxes for two purposes -
// a) it allows us to not relay tx invs before receiving the peer's version message
// b) the peer may tell us in its version message that we should not relay tx invs
@@ -606,14 +656,13 @@ public:
const NodeId id;
const uint64_t nKeyedNetGroup;
+ std::atomic_bool fPauseRecv;
+ std::atomic_bool fPauseSend;
protected:
mapMsgCmdSize mapSendBytesPerMsgCmd;
mapMsgCmdSize mapRecvBytesPerMsgCmd;
- // Basic fuzz-testing
- void Fuzz(int nChance); // modifies ssSend
-
public:
uint256 hashContinue;
int nStartingHeight;
@@ -681,6 +730,8 @@ private:
// Services offered to this peer
const ServiceFlags nLocalServices;
const int nMyStartingHeight;
+ int nSendVersion;
+ std::list<CNetMessage> vRecvMsg; // Used only by SocketHandler thread
public:
NodeId GetId() const {
@@ -691,30 +742,44 @@ public:
return nLocalHostNonce;
}
+ int GetMyStartingHeight() const {
+ return nMyStartingHeight;
+ }
+
int GetRefCount()
{
assert(nRefCount >= 0);
return nRefCount;
}
- // requires LOCK(cs_vRecvMsg)
- unsigned int GetTotalRecvSize()
- {
- unsigned int total = 0;
- BOOST_FOREACH(const CNetMessage &msg, vRecvMsg)
- total += msg.vRecv.size() + 24;
- return total;
- }
-
- // requires LOCK(cs_vRecvMsg)
bool ReceiveMsgBytes(const char *pch, unsigned int nBytes, bool& complete);
- // requires LOCK(cs_vRecvMsg)
void SetRecvVersion(int nVersionIn)
{
nRecvVersion = nVersionIn;
- BOOST_FOREACH(CNetMessage &msg, vRecvMsg)
- msg.SetVersion(nVersionIn);
+ }
+ int GetRecvVersion()
+ {
+ return nRecvVersion;
+ }
+ void SetSendVersion(int nVersionIn)
+ {
+ // Send version may only be changed in the version message, and
+ // only one version message is allowed per session. We can therefore
+ // treat this value as const and even atomic as long as it's only used
+ // once the handshake is complete. Any attempt to set this twice is an
+ // error.
+ assert(nSendVersion == 0);
+ nSendVersion = nVersionIn;
+ }
+
+ int GetSendVersion() const
+ {
+ // The send version should always be explicitly set to
+ // INIT_PROTO_VERSION rather than using this value until the handshake
+ // is complete.
+ assert(nSendVersion != 0);
+ return nSendVersion;
}
CNode* AddRef()
@@ -778,193 +843,6 @@ public:
void AskFor(const CInv& inv);
- // TODO: Document the postcondition of this function. Is cs_vSend locked?
- void BeginMessage(const char* pszCommand) EXCLUSIVE_LOCK_FUNCTION(cs_vSend);
-
- // TODO: Document the precondition of this function. Is cs_vSend locked?
- void AbortMessage() UNLOCK_FUNCTION(cs_vSend);
-
- // TODO: Document the precondition of this function. Is cs_vSend locked?
- void EndMessage(const char* pszCommand) UNLOCK_FUNCTION(cs_vSend);
-
- void PushVersion();
-
-
- void PushMessage(const char* pszCommand)
- {
- try
- {
- BeginMessage(pszCommand);
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1>
- void PushMessage(const char* pszCommand, const T1& a1)
- {
- try
- {
- BeginMessage(pszCommand);
- ssSend << a1;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- /** Send a message containing a1, serialized with flag flag. */
- template<typename T1>
- void PushMessageWithFlag(int flag, const char* pszCommand, const T1& a1)
- {
- try
- {
- BeginMessage(pszCommand);
- WithOrVersion(&ssSend, flag) << a1;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2>
- void PushMessage(const char* pszCommand, const T1& a1, const T2& a2)
- {
- try
- {
- BeginMessage(pszCommand);
- ssSend << a1 << a2;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3>
- void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3)
- {
- try
- {
- BeginMessage(pszCommand);
- ssSend << a1 << a2 << a3;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4>
- void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4)
- {
- try
- {
- BeginMessage(pszCommand);
- ssSend << a1 << a2 << a3 << a4;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5>
- void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5)
- {
- try
- {
- BeginMessage(pszCommand);
- ssSend << a1 << a2 << a3 << a4 << a5;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
- 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);
- ssSend << a1 << a2 << a3 << a4 << a5 << a6;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
- 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);
- ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
- 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);
- ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
- template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
- 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);
- ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8 << a9;
- EndMessage(pszCommand);
- }
- catch (...)
- {
- AbortMessage();
- throw;
- }
- }
-
void CloseSocketDisconnect();
void copyStats(CNodeStats &stats);
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
new file mode 100644
index 0000000000..36a5257635
--- /dev/null
+++ b/src/net_processing.cpp
@@ -0,0 +1,3236 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "net_processing.h"
+
+#include "addrman.h"
+#include "arith_uint256.h"
+#include "blockencodings.h"
+#include "chainparams.h"
+#include "consensus/validation.h"
+#include "hash.h"
+#include "init.h"
+#include "validation.h"
+#include "merkleblock.h"
+#include "net.h"
+#include "netmessagemaker.h"
+#include "netbase.h"
+#include "policy/fees.h"
+#include "policy/policy.h"
+#include "primitives/block.h"
+#include "primitives/transaction.h"
+#include "random.h"
+#include "tinyformat.h"
+#include "txmempool.h"
+#include "ui_interface.h"
+#include "util.h"
+#include "utilmoneystr.h"
+#include "utilstrencodings.h"
+#include "validationinterface.h"
+
+#include <boost/thread.hpp>
+
+using namespace std;
+
+#if defined(NDEBUG)
+# error "Bitcoin cannot be compiled without assertions."
+#endif
+
+int64_t nTimeBestReceived = 0; // Used only to inform the wallet of when we last received a block
+
+struct IteratorComparator
+{
+ template<typename I>
+ bool operator()(const I& a, const I& b)
+ {
+ return &(*a) < &(*b);
+ }
+};
+
+struct COrphanTx {
+ // When modifying, adapt the copy of this definition in tests/DoS_tests.
+ CTransactionRef tx;
+ NodeId fromPeer;
+ int64_t nTimeExpire;
+};
+map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(cs_main);
+map<COutPoint, set<map<uint256, COrphanTx>::iterator, IteratorComparator>> mapOrphanTransactionsByPrev GUARDED_BY(cs_main);
+void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+
+static size_t vExtraTxnForCompactIt = 0;
+static std::vector<std::pair<uint256, CTransactionRef>> vExtraTxnForCompact GUARDED_BY(cs_main);
+
+static const uint64_t RANDOMIZER_ID_ADDRESS_RELAY = 0x3cac0035b5866b90ULL; // SHA256("main address relay")[0:8]
+
+// Internal stuff
+namespace {
+ /** Number of nodes with fSyncStarted. */
+ int nSyncStarted = 0;
+
+ /**
+ * Sources of received blocks, saved to be able to send them reject
+ * messages or ban them when processing happens afterwards. Protected by
+ * cs_main.
+ * Set mapBlockSource[hash].second to false if the node should not be
+ * punished if the block is invalid.
+ */
+ map<uint256, std::pair<NodeId, bool>> mapBlockSource;
+
+ /**
+ * Filter for transactions that were recently rejected by
+ * AcceptToMemoryPool. These are not rerequested until the chain tip
+ * changes, at which point the entire filter is reset. Protected by
+ * cs_main.
+ *
+ * Without this filter we'd be re-requesting txs from each of our peers,
+ * increasing bandwidth consumption considerably. For instance, with 100
+ * peers, half of which relay a tx we don't accept, that might be a 50x
+ * bandwidth increase. A flooding attacker attempting to roll-over the
+ * filter using minimum-sized, 60byte, transactions might manage to send
+ * 1000/sec if we have fast peers, so we pick 120,000 to give our peers a
+ * two minute window to send invs to us.
+ *
+ * Decreasing the false positive rate is fairly cheap, so we pick one in a
+ * million to make it highly unlikely for users to have issues with this
+ * filter.
+ *
+ * Memory used: 1.3 MB
+ */
+ std::unique_ptr<CRollingBloomFilter> recentRejects;
+ uint256 hashRecentRejectsChainTip;
+
+ /** Blocks that are in flight, and that are in the queue to be downloaded. Protected by cs_main. */
+ struct QueuedBlock {
+ uint256 hash;
+ const CBlockIndex* pindex; //!< Optional.
+ bool fValidatedHeaders; //!< Whether this block has validated headers at the time of request.
+ std::unique_ptr<PartiallyDownloadedBlock> partialBlock; //!< Optional, used for CMPCTBLOCK downloads
+ };
+ map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
+
+ /** Stack of nodes which we have set to announce using compact blocks */
+ list<NodeId> lNodesAnnouncingHeaderAndIDs;
+
+ /** Number of preferable block download peers. */
+ int nPreferredDownload = 0;
+
+ /** Number of peers from which we're downloading blocks. */
+ int nPeersWithValidatedDownloads = 0;
+
+ /** Relay map, protected by cs_main. */
+ typedef std::map<uint256, CTransactionRef> MapRelay;
+ MapRelay mapRelay;
+ /** Expiration-time ordered list of (expire time, relay map entry) pairs, protected by cs_main). */
+ std::deque<std::pair<int64_t, MapRelay::iterator>> vRelayExpiration;
+} // anon namespace
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Registration of network node signals.
+//
+
+namespace {
+
+struct CBlockReject {
+ unsigned char chRejectCode;
+ string strRejectReason;
+ uint256 hashBlock;
+};
+
+/**
+ * Maintain validation-specific state about nodes, protected by cs_main, instead
+ * by CNode's own locks. This simplifies asynchronous operation, where
+ * processing of incoming data is done after the ProcessMessage call returns,
+ * and we're no longer holding the node's locks.
+ */
+struct CNodeState {
+ //! The peer's address
+ const CService address;
+ //! Whether we have a fully established connection.
+ bool fCurrentlyConnected;
+ //! Accumulated misbehaviour score for this peer.
+ int nMisbehavior;
+ //! Whether this peer should be disconnected and banned (unless whitelisted).
+ bool fShouldBan;
+ //! String name of this peer (debugging/logging purposes).
+ const std::string name;
+ //! List of asynchronously-determined block rejections to notify this peer about.
+ std::vector<CBlockReject> rejects;
+ //! The best known block we know this peer has announced.
+ const CBlockIndex *pindexBestKnownBlock;
+ //! The hash of the last unknown block this peer has announced.
+ uint256 hashLastUnknownBlock;
+ //! The last full block we both have.
+ const CBlockIndex *pindexLastCommonBlock;
+ //! The best header we have sent our peer.
+ const CBlockIndex *pindexBestHeaderSent;
+ //! Length of current-streak of unconnecting headers announcements
+ int nUnconnectingHeaders;
+ //! Whether we've started headers synchronization with this peer.
+ bool fSyncStarted;
+ //! Since when we're stalling block download progress (in microseconds), or 0.
+ int64_t nStallingSince;
+ list<QueuedBlock> vBlocksInFlight;
+ //! When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty.
+ int64_t nDownloadingSince;
+ int nBlocksInFlight;
+ int nBlocksInFlightValidHeaders;
+ //! Whether we consider this a preferred download peer.
+ bool fPreferredDownload;
+ //! Whether this peer wants invs or headers (when possible) for block announcements.
+ bool fPreferHeaders;
+ //! Whether this peer wants invs or cmpctblocks (when possible) for block announcements.
+ bool fPreferHeaderAndIDs;
+ /**
+ * Whether this peer will send us cmpctblocks if we request them.
+ * This is not used to gate request logic, as we really only care about fSupportsDesiredCmpctVersion,
+ * but is used as a flag to "lock in" the version of compact blocks (fWantsCmpctWitness) we send.
+ */
+ bool fProvidesHeaderAndIDs;
+ //! Whether this peer can give us witnesses
+ bool fHaveWitness;
+ //! Whether this peer wants witnesses in cmpctblocks/blocktxns
+ bool fWantsCmpctWitness;
+ /**
+ * If we've announced NODE_WITNESS to this peer: whether the peer sends witnesses in cmpctblocks/blocktxns,
+ * otherwise: whether this peer sends non-witnesses in cmpctblocks/blocktxns.
+ */
+ bool fSupportsDesiredCmpctVersion;
+
+ CNodeState(CAddress addrIn, std::string addrNameIn) : address(addrIn), name(addrNameIn) {
+ fCurrentlyConnected = false;
+ nMisbehavior = 0;
+ fShouldBan = false;
+ pindexBestKnownBlock = NULL;
+ hashLastUnknownBlock.SetNull();
+ pindexLastCommonBlock = NULL;
+ pindexBestHeaderSent = NULL;
+ nUnconnectingHeaders = 0;
+ fSyncStarted = false;
+ nStallingSince = 0;
+ nDownloadingSince = 0;
+ nBlocksInFlight = 0;
+ nBlocksInFlightValidHeaders = 0;
+ fPreferredDownload = false;
+ fPreferHeaders = false;
+ fPreferHeaderAndIDs = false;
+ fProvidesHeaderAndIDs = false;
+ fHaveWitness = false;
+ fWantsCmpctWitness = false;
+ fSupportsDesiredCmpctVersion = false;
+ }
+};
+
+/** Map maintaining per-node state. Requires cs_main. */
+map<NodeId, CNodeState> mapNodeState;
+
+// Requires cs_main.
+CNodeState *State(NodeId pnode) {
+ map<NodeId, CNodeState>::iterator it = mapNodeState.find(pnode);
+ if (it == mapNodeState.end())
+ return NULL;
+ return &it->second;
+}
+
+void UpdatePreferredDownload(CNode* node, CNodeState* state)
+{
+ nPreferredDownload -= state->fPreferredDownload;
+
+ // Whether this node should be marked as a preferred download node.
+ state->fPreferredDownload = (!node->fInbound || node->fWhitelisted) && !node->fOneShot && !node->fClient;
+
+ nPreferredDownload += state->fPreferredDownload;
+}
+
+void PushNodeVersion(CNode *pnode, CConnman& connman, int64_t nTime)
+{
+ ServiceFlags nLocalNodeServices = pnode->GetLocalServices();
+ uint64_t nonce = pnode->GetLocalNonce();
+ int nNodeStartingHeight = pnode->GetMyStartingHeight();
+ NodeId nodeid = pnode->GetId();
+ CAddress addr = pnode->addr;
+
+ CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService(), addr.nServices));
+ CAddress addrMe = CAddress(CService(), nLocalNodeServices);
+
+ connman.PushMessage(pnode, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERSION, PROTOCOL_VERSION, (uint64_t)nLocalNodeServices, nTime, addrYou, addrMe,
+ nonce, strSubVersion, nNodeStartingHeight, ::fRelayTxes));
+
+ if (fLogIPs)
+ LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nNodeStartingHeight, addrMe.ToString(), addrYou.ToString(), nodeid);
+ else
+ LogPrint("net", "send version message: version %d, blocks=%d, us=%s, peer=%d\n", PROTOCOL_VERSION, nNodeStartingHeight, addrMe.ToString(), nodeid);
+}
+
+void InitializeNode(CNode *pnode, CConnman& connman) {
+ CAddress addr = pnode->addr;
+ std::string addrName = pnode->addrName;
+ NodeId nodeid = pnode->GetId();
+ {
+ LOCK(cs_main);
+ mapNodeState.emplace_hint(mapNodeState.end(), std::piecewise_construct, std::forward_as_tuple(nodeid), std::forward_as_tuple(addr, std::move(addrName)));
+ }
+ if(!pnode->fInbound)
+ PushNodeVersion(pnode, connman, GetTime());
+}
+
+void FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) {
+ fUpdateConnectionTime = false;
+ LOCK(cs_main);
+ CNodeState *state = State(nodeid);
+
+ if (state->fSyncStarted)
+ nSyncStarted--;
+
+ if (state->nMisbehavior == 0 && state->fCurrentlyConnected) {
+ fUpdateConnectionTime = true;
+ }
+
+ BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) {
+ mapBlocksInFlight.erase(entry.hash);
+ }
+ EraseOrphansFor(nodeid);
+ nPreferredDownload -= state->fPreferredDownload;
+ nPeersWithValidatedDownloads -= (state->nBlocksInFlightValidHeaders != 0);
+ assert(nPeersWithValidatedDownloads >= 0);
+
+ mapNodeState.erase(nodeid);
+
+ if (mapNodeState.empty()) {
+ // Do a consistency check after the last peer is removed.
+ assert(mapBlocksInFlight.empty());
+ assert(nPreferredDownload == 0);
+ assert(nPeersWithValidatedDownloads == 0);
+ }
+}
+
+// Requires cs_main.
+// Returns a bool indicating whether we requested this block.
+// Also used if a block was /not/ received and timed out or started with another peer
+bool MarkBlockAsReceived(const uint256& hash) {
+ map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
+ if (itInFlight != mapBlocksInFlight.end()) {
+ CNodeState *state = State(itInFlight->second.first);
+ state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders;
+ if (state->nBlocksInFlightValidHeaders == 0 && itInFlight->second.second->fValidatedHeaders) {
+ // Last validated block on the queue was received.
+ nPeersWithValidatedDownloads--;
+ }
+ if (state->vBlocksInFlight.begin() == itInFlight->second.second) {
+ // First block on the queue was received, update the start download time for the next one
+ state->nDownloadingSince = std::max(state->nDownloadingSince, GetTimeMicros());
+ }
+ state->vBlocksInFlight.erase(itInFlight->second.second);
+ state->nBlocksInFlight--;
+ state->nStallingSince = 0;
+ mapBlocksInFlight.erase(itInFlight);
+ return true;
+ }
+ return false;
+}
+
+// Requires cs_main.
+// returns false, still setting pit, if the block was already in flight from the same peer
+// pit will only be valid as long as the same cs_main lock is being held
+bool MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, const CBlockIndex *pindex = NULL, list<QueuedBlock>::iterator **pit = NULL) {
+ CNodeState *state = State(nodeid);
+ assert(state != NULL);
+
+ // Short-circuit most stuff in case its from the same node
+ map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
+ if (itInFlight != mapBlocksInFlight.end() && itInFlight->second.first == nodeid) {
+ *pit = &itInFlight->second.second;
+ return false;
+ }
+
+ // Make sure it's not listed somewhere already.
+ MarkBlockAsReceived(hash);
+
+ list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(),
+ {hash, pindex, pindex != NULL, std::unique_ptr<PartiallyDownloadedBlock>(pit ? new PartiallyDownloadedBlock(&mempool) : NULL)});
+ state->nBlocksInFlight++;
+ state->nBlocksInFlightValidHeaders += it->fValidatedHeaders;
+ if (state->nBlocksInFlight == 1) {
+ // We're starting a block download (batch) from this peer.
+ state->nDownloadingSince = GetTimeMicros();
+ }
+ if (state->nBlocksInFlightValidHeaders == 1 && pindex != NULL) {
+ nPeersWithValidatedDownloads++;
+ }
+ itInFlight = mapBlocksInFlight.insert(std::make_pair(hash, std::make_pair(nodeid, it))).first;
+ if (pit)
+ *pit = &itInFlight->second.second;
+ return true;
+}
+
+/** Check whether the last unknown block a peer advertised is not yet known. */
+void ProcessBlockAvailability(NodeId nodeid) {
+ CNodeState *state = State(nodeid);
+ assert(state != NULL);
+
+ if (!state->hashLastUnknownBlock.IsNull()) {
+ BlockMap::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock);
+ if (itOld != mapBlockIndex.end() && itOld->second->nChainWork > 0) {
+ if (state->pindexBestKnownBlock == NULL || itOld->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
+ state->pindexBestKnownBlock = itOld->second;
+ state->hashLastUnknownBlock.SetNull();
+ }
+ }
+}
+
+/** Update tracking information about which blocks a peer is assumed to have. */
+void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
+ CNodeState *state = State(nodeid);
+ assert(state != NULL);
+
+ ProcessBlockAvailability(nodeid);
+
+ BlockMap::iterator it = mapBlockIndex.find(hash);
+ if (it != mapBlockIndex.end() && it->second->nChainWork > 0) {
+ // An actually better block was announced.
+ if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
+ state->pindexBestKnownBlock = it->second;
+ } else {
+ // An unknown block was announced; just assume that the latest one is the best one.
+ state->hashLastUnknownBlock = hash;
+ }
+}
+
+void MaybeSetPeerAsAnnouncingHeaderAndIDs(NodeId nodeid, CConnman& connman) {
+ AssertLockHeld(cs_main);
+ CNodeState* nodestate = State(nodeid);
+ if (!nodestate || !nodestate->fSupportsDesiredCmpctVersion) {
+ // Never ask from peers who can't provide witnesses.
+ return;
+ }
+ if (nodestate->fProvidesHeaderAndIDs) {
+ for (std::list<NodeId>::iterator it = lNodesAnnouncingHeaderAndIDs.begin(); it != lNodesAnnouncingHeaderAndIDs.end(); it++) {
+ if (*it == nodeid) {
+ lNodesAnnouncingHeaderAndIDs.erase(it);
+ lNodesAnnouncingHeaderAndIDs.push_back(nodeid);
+ return;
+ }
+ }
+ connman.ForNode(nodeid, [&connman](CNode* pfrom){
+ bool fAnnounceUsingCMPCTBLOCK = false;
+ uint64_t nCMPCTBLOCKVersion = (pfrom->GetLocalServices() & NODE_WITNESS) ? 2 : 1;
+ if (lNodesAnnouncingHeaderAndIDs.size() >= 3) {
+ // As per BIP152, we only get 3 of our peers to announce
+ // blocks using compact encodings.
+ connman.ForNode(lNodesAnnouncingHeaderAndIDs.front(), [&connman, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion](CNode* pnodeStop){
+ connman.PushMessage(pnodeStop, CNetMsgMaker(pnodeStop->GetSendVersion()).Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
+ return true;
+ });
+ lNodesAnnouncingHeaderAndIDs.pop_front();
+ }
+ fAnnounceUsingCMPCTBLOCK = true;
+ connman.PushMessage(pfrom, CNetMsgMaker(pfrom->GetSendVersion()).Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
+ lNodesAnnouncingHeaderAndIDs.push_back(pfrom->GetId());
+ return true;
+ });
+ }
+}
+
+// Requires cs_main
+bool CanDirectFetch(const Consensus::Params &consensusParams)
+{
+ return chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - consensusParams.nPowTargetSpacing * 20;
+}
+
+// Requires cs_main
+bool PeerHasHeader(CNodeState *state, const CBlockIndex *pindex)
+{
+ if (state->pindexBestKnownBlock && pindex == state->pindexBestKnownBlock->GetAncestor(pindex->nHeight))
+ return true;
+ if (state->pindexBestHeaderSent && pindex == state->pindexBestHeaderSent->GetAncestor(pindex->nHeight))
+ return true;
+ return false;
+}
+
+/** Find the last common ancestor two blocks have.
+ * Both pa and pb must be non-NULL. */
+const CBlockIndex* LastCommonAncestor(const CBlockIndex* pa, const CBlockIndex* pb) {
+ if (pa->nHeight > pb->nHeight) {
+ pa = pa->GetAncestor(pb->nHeight);
+ } else if (pb->nHeight > pa->nHeight) {
+ pb = pb->GetAncestor(pa->nHeight);
+ }
+
+ while (pa != pb && pa && pb) {
+ pa = pa->pprev;
+ pb = pb->pprev;
+ }
+
+ // Eventually all chain branches meet at the genesis block.
+ assert(pa == pb);
+ return pa;
+}
+
+/** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has
+ * at most count entries. */
+void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<const CBlockIndex*>& vBlocks, NodeId& nodeStaller, const Consensus::Params& consensusParams) {
+ if (count == 0)
+ return;
+
+ vBlocks.reserve(vBlocks.size() + count);
+ CNodeState *state = State(nodeid);
+ assert(state != NULL);
+
+ // Make sure pindexBestKnownBlock is up to date, we'll need it.
+ ProcessBlockAvailability(nodeid);
+
+ if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork) {
+ // This peer has nothing interesting.
+ return;
+ }
+
+ if (state->pindexLastCommonBlock == NULL) {
+ // Bootstrap quickly by guessing a parent of our best tip is the forking point.
+ // Guessing wrong in either direction is not a problem.
+ state->pindexLastCommonBlock = chainActive[std::min(state->pindexBestKnownBlock->nHeight, chainActive.Height())];
+ }
+
+ // If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor
+ // of its current tip anymore. Go back enough to fix that.
+ state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock);
+ if (state->pindexLastCommonBlock == state->pindexBestKnownBlock)
+ return;
+
+ std::vector<const CBlockIndex*> vToFetch;
+ const CBlockIndex *pindexWalk = state->pindexLastCommonBlock;
+ // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond the last
+ // linked block we have in common with this peer. The +1 is so we can detect stalling, namely if we would be able to
+ // download that next block if the window were 1 larger.
+ int nWindowEnd = state->pindexLastCommonBlock->nHeight + BLOCK_DOWNLOAD_WINDOW;
+ int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, nWindowEnd + 1);
+ NodeId waitingfor = -1;
+ while (pindexWalk->nHeight < nMaxHeight) {
+ // Read up to 128 (or more, if more blocks than that are needed) successors of pindexWalk (towards
+ // pindexBestKnownBlock) into vToFetch. We fetch 128, because CBlockIndex::GetAncestor may be as expensive
+ // as iterating over ~100 CBlockIndex* entries anyway.
+ int nToFetch = std::min(nMaxHeight - pindexWalk->nHeight, std::max<int>(count - vBlocks.size(), 128));
+ vToFetch.resize(nToFetch);
+ pindexWalk = state->pindexBestKnownBlock->GetAncestor(pindexWalk->nHeight + nToFetch);
+ vToFetch[nToFetch - 1] = pindexWalk;
+ for (unsigned int i = nToFetch - 1; i > 0; i--) {
+ vToFetch[i - 1] = vToFetch[i]->pprev;
+ }
+
+ // Iterate over those blocks in vToFetch (in forward direction), adding the ones that
+ // are not yet downloaded and not in flight to vBlocks. In the mean time, update
+ // pindexLastCommonBlock as long as all ancestors are already downloaded, or if it's
+ // already part of our chain (and therefore don't need it even if pruned).
+ BOOST_FOREACH(const CBlockIndex* pindex, vToFetch) {
+ if (!pindex->IsValid(BLOCK_VALID_TREE)) {
+ // We consider the chain that this peer is on invalid.
+ return;
+ }
+ if (!State(nodeid)->fHaveWitness && IsWitnessEnabled(pindex->pprev, consensusParams)) {
+ // We wouldn't download this block or its descendants from this peer.
+ return;
+ }
+ if (pindex->nStatus & BLOCK_HAVE_DATA || chainActive.Contains(pindex)) {
+ if (pindex->nChainTx)
+ state->pindexLastCommonBlock = pindex;
+ } else if (mapBlocksInFlight.count(pindex->GetBlockHash()) == 0) {
+ // The block is not already downloaded, and not yet in flight.
+ if (pindex->nHeight > nWindowEnd) {
+ // We reached the end of the window.
+ if (vBlocks.size() == 0 && waitingfor != nodeid) {
+ // We aren't able to fetch anything, but we would be if the download window was one larger.
+ nodeStaller = waitingfor;
+ }
+ return;
+ }
+ vBlocks.push_back(pindex);
+ if (vBlocks.size() == count) {
+ return;
+ }
+ } else if (waitingfor == -1) {
+ // This is the first already-in-flight block.
+ waitingfor = mapBlocksInFlight[pindex->GetBlockHash()].first;
+ }
+ }
+ }
+}
+
+} // anon namespace
+
+bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
+ LOCK(cs_main);
+ CNodeState *state = State(nodeid);
+ if (state == NULL)
+ return false;
+ stats.nMisbehavior = state->nMisbehavior;
+ stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1;
+ stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock->nHeight : -1;
+ BOOST_FOREACH(const QueuedBlock& queue, state->vBlocksInFlight) {
+ if (queue.pindex)
+ stats.vHeightInFlight.push_back(queue.pindex->nHeight);
+ }
+ return true;
+}
+
+void RegisterNodeSignals(CNodeSignals& nodeSignals)
+{
+ nodeSignals.ProcessMessages.connect(&ProcessMessages);
+ nodeSignals.SendMessages.connect(&SendMessages);
+ nodeSignals.InitializeNode.connect(&InitializeNode);
+ nodeSignals.FinalizeNode.connect(&FinalizeNode);
+}
+
+void UnregisterNodeSignals(CNodeSignals& nodeSignals)
+{
+ nodeSignals.ProcessMessages.disconnect(&ProcessMessages);
+ nodeSignals.SendMessages.disconnect(&SendMessages);
+ nodeSignals.InitializeNode.disconnect(&InitializeNode);
+ nodeSignals.FinalizeNode.disconnect(&FinalizeNode);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// mapOrphanTransactions
+//
+
+void AddToCompactExtraTransactions(const CTransactionRef& tx)
+{
+ size_t max_extra_txn = GetArg("-blockreconstructionextratxn", DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN);
+ if (max_extra_txn <= 0)
+ return;
+ if (!vExtraTxnForCompact.size())
+ vExtraTxnForCompact.resize(max_extra_txn);
+ vExtraTxnForCompact[vExtraTxnForCompactIt] = std::make_pair(tx->GetWitnessHash(), tx);
+ vExtraTxnForCompactIt = (vExtraTxnForCompactIt + 1) % max_extra_txn;
+}
+
+bool AddOrphanTx(const CTransactionRef& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
+{
+ const uint256& hash = tx->GetHash();
+ if (mapOrphanTransactions.count(hash))
+ return false;
+
+ // 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.
+ // 100 orphans, each of which is at most 99,999 bytes big is
+ // at most 10 megabytes of orphans and somewhat more byprev index (in the worst case):
+ unsigned int sz = GetTransactionWeight(*tx);
+ if (sz >= MAX_STANDARD_TX_WEIGHT)
+ {
+ LogPrint("mempool", "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString());
+ return false;
+ }
+
+ auto ret = mapOrphanTransactions.emplace(hash, COrphanTx{tx, peer, GetTime() + ORPHAN_TX_EXPIRE_TIME});
+ assert(ret.second);
+ BOOST_FOREACH(const CTxIn& txin, tx->vin) {
+ mapOrphanTransactionsByPrev[txin.prevout].insert(ret.first);
+ }
+
+ AddToCompactExtraTransactions(tx);
+
+ LogPrint("mempool", "stored orphan tx %s (mapsz %u outsz %u)\n", hash.ToString(),
+ mapOrphanTransactions.size(), mapOrphanTransactionsByPrev.size());
+ return true;
+}
+
+int static EraseOrphanTx(uint256 hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
+{
+ map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.find(hash);
+ if (it == mapOrphanTransactions.end())
+ return 0;
+ BOOST_FOREACH(const CTxIn& txin, it->second.tx->vin)
+ {
+ auto itPrev = mapOrphanTransactionsByPrev.find(txin.prevout);
+ if (itPrev == mapOrphanTransactionsByPrev.end())
+ continue;
+ itPrev->second.erase(it);
+ if (itPrev->second.empty())
+ mapOrphanTransactionsByPrev.erase(itPrev);
+ }
+ mapOrphanTransactions.erase(it);
+ return 1;
+}
+
+void EraseOrphansFor(NodeId peer)
+{
+ int nErased = 0;
+ map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin();
+ while (iter != mapOrphanTransactions.end())
+ {
+ map<uint256, COrphanTx>::iterator maybeErase = iter++; // increment to avoid iterator becoming invalid
+ if (maybeErase->second.fromPeer == peer)
+ {
+ nErased += EraseOrphanTx(maybeErase->second.tx->GetHash());
+ }
+ }
+ if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx from peer=%d\n", nErased, peer);
+}
+
+
+unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
+{
+ unsigned int nEvicted = 0;
+ static int64_t nNextSweep;
+ int64_t nNow = GetTime();
+ if (nNextSweep <= nNow) {
+ // Sweep out expired orphan pool entries:
+ int nErased = 0;
+ int64_t nMinExpTime = nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL;
+ map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin();
+ while (iter != mapOrphanTransactions.end())
+ {
+ map<uint256, COrphanTx>::iterator maybeErase = iter++;
+ if (maybeErase->second.nTimeExpire <= nNow) {
+ nErased += EraseOrphanTx(maybeErase->second.tx->GetHash());
+ } else {
+ nMinExpTime = std::min(maybeErase->second.nTimeExpire, nMinExpTime);
+ }
+ }
+ // Sweep again 5 minutes after the next entry that expires in order to batch the linear scan.
+ nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
+ if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx due to expiration\n", nErased);
+ }
+ while (mapOrphanTransactions.size() > nMaxOrphans)
+ {
+ // Evict a random orphan:
+ uint256 randomhash = GetRandHash();
+ map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
+ if (it == mapOrphanTransactions.end())
+ it = mapOrphanTransactions.begin();
+ EraseOrphanTx(it->first);
+ ++nEvicted;
+ }
+ return nEvicted;
+}
+
+// Requires cs_main.
+void Misbehaving(NodeId pnode, int howmuch)
+{
+ if (howmuch == 0)
+ return;
+
+ CNodeState *state = State(pnode);
+ if (state == NULL)
+ return;
+
+ state->nMisbehavior += howmuch;
+ int banscore = GetArg("-banscore", DEFAULT_BANSCORE_THRESHOLD);
+ if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
+ {
+ LogPrintf("%s: %s peer=%d (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior);
+ state->fShouldBan = true;
+ } else
+ LogPrintf("%s: %s peer=%d (%d -> %d)\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior);
+}
+
+
+
+
+
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// blockchain -> download logic notification
+//
+
+PeerLogicValidation::PeerLogicValidation(CConnman* connmanIn) : connman(connmanIn) {
+ // Initialize global variables that cannot be constructed at startup.
+ recentRejects.reset(new CRollingBloomFilter(120000, 0.000001));
+}
+
+void PeerLogicValidation::SyncTransaction(const CTransaction& tx, const CBlockIndex* pindex, int nPosInBlock) {
+ if (nPosInBlock == CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK)
+ return;
+
+ LOCK(cs_main);
+
+ std::vector<uint256> vOrphanErase;
+ // Which orphan pool entries must we evict?
+ for (size_t j = 0; j < tx.vin.size(); j++) {
+ auto itByPrev = mapOrphanTransactionsByPrev.find(tx.vin[j].prevout);
+ if (itByPrev == mapOrphanTransactionsByPrev.end()) continue;
+ for (auto mi = itByPrev->second.begin(); mi != itByPrev->second.end(); ++mi) {
+ const CTransaction& orphanTx = *(*mi)->second.tx;
+ const uint256& orphanHash = orphanTx.GetHash();
+ vOrphanErase.push_back(orphanHash);
+ }
+ }
+
+ // Erase orphan transactions include or precluded by this block
+ if (vOrphanErase.size()) {
+ int nErased = 0;
+ BOOST_FOREACH(uint256 &orphanHash, vOrphanErase) {
+ nErased += EraseOrphanTx(orphanHash);
+ }
+ LogPrint("mempool", "Erased %d orphan tx included or conflicted by block\n", nErased);
+ }
+}
+
+static CCriticalSection cs_most_recent_block;
+static std::shared_ptr<const CBlock> most_recent_block;
+static std::shared_ptr<const CBlockHeaderAndShortTxIDs> most_recent_compact_block;
+static uint256 most_recent_block_hash;
+
+void PeerLogicValidation::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) {
+ std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true);
+ CNetMsgMaker msgMaker(PROTOCOL_VERSION);
+
+ LOCK(cs_main);
+
+ static int nHighestFastAnnounce = 0;
+ if (pindex->nHeight <= nHighestFastAnnounce)
+ return;
+ nHighestFastAnnounce = pindex->nHeight;
+
+ bool fWitnessEnabled = IsWitnessEnabled(pindex->pprev, Params().GetConsensus());
+ uint256 hashBlock(pblock->GetHash());
+
+ {
+ LOCK(cs_most_recent_block);
+ most_recent_block_hash = hashBlock;
+ most_recent_block = pblock;
+ most_recent_compact_block = pcmpctblock;
+ }
+
+ connman->ForEachNode([this, &pcmpctblock, pindex, &msgMaker, fWitnessEnabled, &hashBlock](CNode* pnode) {
+ // TODO: Avoid the repeated-serialization here
+ if (pnode->nVersion < INVALID_CB_NO_BAN_VERSION || pnode->fDisconnect)
+ return;
+ ProcessBlockAvailability(pnode->GetId());
+ CNodeState &state = *State(pnode->GetId());
+ // If the peer has, or we announced to them the previous block already,
+ // but we don't think they have this one, go ahead and announce it
+ if (state.fPreferHeaderAndIDs && (!fWitnessEnabled || state.fWantsCmpctWitness) &&
+ !PeerHasHeader(&state, pindex) && PeerHasHeader(&state, pindex->pprev)) {
+
+ LogPrint("net", "%s sending header-and-ids %s to peer=%d\n", "PeerLogicValidation::NewPoWValidBlock",
+ hashBlock.ToString(), pnode->id);
+ connman->PushMessage(pnode, msgMaker.Make(NetMsgType::CMPCTBLOCK, *pcmpctblock));
+ state.pindexBestHeaderSent = pindex;
+ }
+ });
+}
+
+void PeerLogicValidation::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
+ const int nNewHeight = pindexNew->nHeight;
+ connman->SetBestHeight(nNewHeight);
+
+ if (!fInitialDownload) {
+ // Find the hashes of all blocks that weren't previously in the best chain.
+ std::vector<uint256> vHashes;
+ const CBlockIndex *pindexToAnnounce = pindexNew;
+ while (pindexToAnnounce != pindexFork) {
+ vHashes.push_back(pindexToAnnounce->GetBlockHash());
+ pindexToAnnounce = pindexToAnnounce->pprev;
+ if (vHashes.size() == MAX_BLOCKS_TO_ANNOUNCE) {
+ // Limit announcements in case of a huge reorganization.
+ // Rely on the peer's synchronization mechanism in that case.
+ break;
+ }
+ }
+ // Relay inventory, but don't relay old inventory during initial block download.
+ connman->ForEachNode([nNewHeight, &vHashes](CNode* pnode) {
+ if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
+ BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
+ pnode->PushBlockHash(hash);
+ }
+ }
+ });
+ connman->WakeMessageHandler();
+ }
+
+ nTimeBestReceived = GetTime();
+}
+
+void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationState& state) {
+ LOCK(cs_main);
+
+ const uint256 hash(block.GetHash());
+ std::map<uint256, std::pair<NodeId, bool>>::iterator it = mapBlockSource.find(hash);
+
+ int nDoS = 0;
+ if (state.IsInvalid(nDoS)) {
+ if (it != mapBlockSource.end() && State(it->second.first)) {
+ assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
+ CBlockReject reject = {(unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), hash};
+ State(it->second.first)->rejects.push_back(reject);
+ if (nDoS > 0 && it->second.second)
+ Misbehaving(it->second.first, nDoS);
+ }
+ }
+ else if (state.IsValid() && !IsInitialBlockDownload() && mapBlocksInFlight.count(hash) == mapBlocksInFlight.size()) {
+ if (it != mapBlockSource.end()) {
+ MaybeSetPeerAsAnnouncingHeaderAndIDs(it->second.first, *connman);
+ }
+ }
+ if (it != mapBlockSource.end())
+ mapBlockSource.erase(it);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Messages
+//
+
+
+bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
+{
+ switch (inv.type)
+ {
+ case MSG_TX:
+ case MSG_WITNESS_TX:
+ {
+ assert(recentRejects);
+ if (chainActive.Tip()->GetBlockHash() != hashRecentRejectsChainTip)
+ {
+ // If the chain tip has changed previously rejected transactions
+ // might be now valid, e.g. due to a nLockTime'd tx becoming valid,
+ // or a double-spend. Reset the rejects filter and give those
+ // txs a second chance.
+ hashRecentRejectsChainTip = chainActive.Tip()->GetBlockHash();
+ recentRejects->reset();
+ }
+
+ // Use pcoinsTip->HaveCoinsInCache as a quick approximation to exclude
+ // requesting or processing some txs which have already been included in a block
+ return recentRejects->contains(inv.hash) ||
+ mempool.exists(inv.hash) ||
+ mapOrphanTransactions.count(inv.hash) ||
+ pcoinsTip->HaveCoinsInCache(inv.hash);
+ }
+ case MSG_BLOCK:
+ case MSG_WITNESS_BLOCK:
+ return mapBlockIndex.count(inv.hash);
+ }
+ // Don't know what it is, just say we already got one
+ return true;
+}
+
+static void RelayTransaction(const CTransaction& tx, CConnman& connman)
+{
+ CInv inv(MSG_TX, tx.GetHash());
+ connman.ForEachNode([&inv](CNode* pnode)
+ {
+ pnode->PushInventory(inv);
+ });
+}
+
+static void RelayAddress(const CAddress& addr, bool fReachable, CConnman& connman)
+{
+ unsigned int nRelayNodes = fReachable ? 2 : 1; // limited relaying of addresses outside our network(s)
+
+ // Relay to a limited number of other nodes
+ // Use deterministic randomness to send to the same nodes for 24 hours
+ // at a time so the addrKnowns of the chosen nodes prevent repeats
+ uint64_t hashAddr = addr.GetHash();
+ const CSipHasher hasher = connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr << 32).Write((GetTime() + hashAddr) / (24*60*60));
+ FastRandomContext insecure_rand;
+
+ std::array<std::pair<uint64_t, CNode*>,2> best{{{0, nullptr}, {0, nullptr}}};
+ assert(nRelayNodes <= best.size());
+
+ auto sortfunc = [&best, &hasher, nRelayNodes](CNode* pnode) {
+ if (pnode->nVersion >= CADDR_TIME_VERSION) {
+ uint64_t hashKey = CSipHasher(hasher).Write(pnode->id).Finalize();
+ for (unsigned int i = 0; i < nRelayNodes; i++) {
+ if (hashKey > best[i].first) {
+ std::copy(best.begin() + i, best.begin() + nRelayNodes - 1, best.begin() + i + 1);
+ best[i] = std::make_pair(hashKey, pnode);
+ break;
+ }
+ }
+ }
+ };
+
+ auto pushfunc = [&addr, &best, nRelayNodes, &insecure_rand] {
+ for (unsigned int i = 0; i < nRelayNodes && best[i].first != 0; i++) {
+ best[i].second->PushAddress(addr, insecure_rand);
+ }
+ };
+
+ connman.ForEachNodeThen(std::move(sortfunc), std::move(pushfunc));
+}
+
+void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParams, CConnman& connman, std::atomic<bool>& interruptMsgProc)
+{
+ std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin();
+ vector<CInv> vNotFound;
+ CNetMsgMaker msgMaker(pfrom->GetSendVersion());
+ LOCK(cs_main);
+
+ while (it != pfrom->vRecvGetData.end()) {
+ // Don't bother if send buffer is too full to respond anyway
+ if (pfrom->fPauseSend)
+ break;
+
+ const CInv &inv = *it;
+ {
+ if (interruptMsgProc)
+ return;
+
+ it++;
+
+ if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK || inv.type == MSG_CMPCT_BLOCK || inv.type == MSG_WITNESS_BLOCK)
+ {
+ bool send = false;
+ BlockMap::iterator mi = mapBlockIndex.find(inv.hash);
+ if (mi != mapBlockIndex.end())
+ {
+ if (mi->second->nChainTx && !mi->second->IsValid(BLOCK_VALID_SCRIPTS) &&
+ mi->second->IsValid(BLOCK_VALID_TREE)) {
+ // If we have the block and all of its parents, but have not yet validated it,
+ // we might be in the middle of connecting it (ie in the unlock of cs_main
+ // before ActivateBestChain but after AcceptBlock).
+ // In this case, we need to run ActivateBestChain prior to checking the relay
+ // conditions below.
+ std::shared_ptr<const CBlock> a_recent_block;
+ {
+ LOCK(cs_most_recent_block);
+ a_recent_block = most_recent_block;
+ }
+ CValidationState dummy;
+ ActivateBestChain(dummy, Params(), a_recent_block);
+ }
+ if (chainActive.Contains(mi->second)) {
+ send = true;
+ } else {
+ static const int nOneMonth = 30 * 24 * 60 * 60;
+ // To prevent fingerprinting attacks, only send blocks outside of the active
+ // chain if they are valid, and no more than a month older (both in time, and in
+ // best equivalent proof of work) than the best header chain we know about.
+ send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) &&
+ (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() < nOneMonth) &&
+ (GetBlockProofEquivalentTime(*pindexBestHeader, *mi->second, *pindexBestHeader, consensusParams) < nOneMonth);
+ if (!send) {
+ LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId());
+ }
+ }
+ }
+ // disconnect node in case we have reached the outbound limit for serving historical blocks
+ // never disconnect whitelisted nodes
+ static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical
+ if (send && connman.OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted)
+ {
+ LogPrint("net", "historical block serving limit reached, disconnect peer=%d\n", pfrom->GetId());
+
+ //disconnect node
+ pfrom->fDisconnect = true;
+ send = false;
+ }
+ // Pruned nodes may have deleted the block, so check whether
+ // it's available before trying to send.
+ if (send && (mi->second->nStatus & BLOCK_HAVE_DATA))
+ {
+ // Send block from disk
+ CBlock block;
+ if (!ReadBlockFromDisk(block, (*mi).second, consensusParams))
+ assert(!"cannot load block from disk");
+ if (inv.type == MSG_BLOCK)
+ connman.PushMessage(pfrom, msgMaker.Make(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCK, block));
+ else if (inv.type == MSG_WITNESS_BLOCK)
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::BLOCK, block));
+ else if (inv.type == MSG_FILTERED_BLOCK)
+ {
+ bool sendMerkleBlock = false;
+ CMerkleBlock merkleBlock;
+ {
+ LOCK(pfrom->cs_filter);
+ if (pfrom->pfilter) {
+ sendMerkleBlock = true;
+ merkleBlock = CMerkleBlock(block, *pfrom->pfilter);
+ }
+ }
+ if (sendMerkleBlock) {
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::MERKLEBLOCK, merkleBlock));
+ // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see
+ // This avoids hurting performance by pointlessly requiring a round-trip
+ // Note that there is currently no way for a node to request any single transactions we didn't send here -
+ // they must either disconnect and retry or request the full block.
+ // Thus, the protocol spec specified allows for us to provide duplicate txn here,
+ // however we MUST always provide at least what the remote peer needs
+ typedef std::pair<unsigned int, uint256> PairType;
+ BOOST_FOREACH(PairType& pair, merkleBlock.vMatchedTxn)
+ connman.PushMessage(pfrom, msgMaker.Make(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::TX, *block.vtx[pair.first]));
+ }
+ // else
+ // no response
+ }
+ else if (inv.type == MSG_CMPCT_BLOCK)
+ {
+ // If a peer is asking for old blocks, we're almost guaranteed
+ // they won't have a useful mempool to match against a compact block,
+ // and we don't feel like constructing the object for them, so
+ // instead we respond with the full, non-compact block.
+ bool fPeerWantsWitness = State(pfrom->GetId())->fWantsCmpctWitness;
+ int nSendFlags = fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
+ if (CanDirectFetch(consensusParams) && mi->second->nHeight >= chainActive.Height() - MAX_CMPCTBLOCK_DEPTH) {
+ CBlockHeaderAndShortTxIDs cmpctblock(block, fPeerWantsWitness);
+ connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::CMPCTBLOCK, cmpctblock));
+ } else
+ connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::BLOCK, block));
+ }
+
+ // Trigger the peer node to send a getblocks request for the next batch of inventory
+ if (inv.hash == pfrom->hashContinue)
+ {
+ // Bypass PushInventory, this must send even if redundant,
+ // and we want it right after the last block so they don't
+ // wait for other stuff first.
+ vector<CInv> vInv;
+ vInv.push_back(CInv(MSG_BLOCK, chainActive.Tip()->GetBlockHash()));
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::INV, vInv));
+ pfrom->hashContinue.SetNull();
+ }
+ }
+ }
+ else if (inv.type == MSG_TX || inv.type == MSG_WITNESS_TX)
+ {
+ // Send stream from relay memory
+ bool push = false;
+ auto mi = mapRelay.find(inv.hash);
+ int nSendFlags = (inv.type == MSG_TX ? SERIALIZE_TRANSACTION_NO_WITNESS : 0);
+ if (mi != mapRelay.end()) {
+ connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::TX, *mi->second));
+ push = true;
+ } else if (pfrom->timeLastMempoolReq) {
+ auto txinfo = mempool.info(inv.hash);
+ // To protect privacy, do not answer getdata using the mempool when
+ // that TX couldn't have been INVed in reply to a MEMPOOL request.
+ if (txinfo.tx && txinfo.nTime <= pfrom->timeLastMempoolReq) {
+ connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::TX, *txinfo.tx));
+ push = true;
+ }
+ }
+ if (!push) {
+ vNotFound.push_back(inv);
+ }
+ }
+
+ // Track requests for our stuff.
+ GetMainSignals().Inventory(inv.hash);
+
+ if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK || inv.type == MSG_CMPCT_BLOCK || inv.type == MSG_WITNESS_BLOCK)
+ break;
+ }
+ }
+
+ pfrom->vRecvGetData.erase(pfrom->vRecvGetData.begin(), it);
+
+ if (!vNotFound.empty()) {
+ // Let the peer know that we didn't find what it asked for, so it doesn't
+ // have to wait around forever. Currently only SPV clients actually care
+ // about this message: it's needed when they are recursively walking the
+ // dependencies of relevant unconfirmed transactions. SPV clients want to
+ // do that because they want to know about (and store and rebroadcast and
+ // risk analyze) the dependencies of transactions relevant to them, without
+ // having to download the entire memory pool.
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::NOTFOUND, vNotFound));
+ }
+}
+
+uint32_t GetFetchFlags(CNode* pfrom, const CBlockIndex* pprev, const Consensus::Params& chainparams) {
+ uint32_t nFetchFlags = 0;
+ if ((pfrom->GetLocalServices() & NODE_WITNESS) && State(pfrom->GetId())->fHaveWitness) {
+ nFetchFlags |= MSG_WITNESS_FLAG;
+ }
+ return nFetchFlags;
+}
+
+inline void static SendBlockTransactions(const CBlock& block, const BlockTransactionsRequest& req, CNode* pfrom, CConnman& connman) {
+ BlockTransactions resp(req);
+ for (size_t i = 0; i < req.indexes.size(); i++) {
+ if (req.indexes[i] >= block.vtx.size()) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 100);
+ LogPrintf("Peer %d sent us a getblocktxn with out-of-bounds tx indices", pfrom->id);
+ return;
+ }
+ resp.txn[i] = block.vtx[req.indexes[i]];
+ }
+ LOCK(cs_main);
+ CNetMsgMaker msgMaker(pfrom->GetSendVersion());
+ int nSendFlags = State(pfrom->GetId())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
+ connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::BLOCKTXN, resp));
+}
+
+bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman& connman, std::atomic<bool>& interruptMsgProc)
+{
+ LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id);
+ if (IsArgSet("-dropmessagestest") && GetRand(GetArg("-dropmessagestest", 0)) == 0)
+ {
+ LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n");
+ return true;
+ }
+
+
+ if (!(pfrom->GetLocalServices() & NODE_BLOOM) &&
+ (strCommand == NetMsgType::FILTERLOAD ||
+ strCommand == NetMsgType::FILTERADD))
+ {
+ if (pfrom->nVersion >= NO_BLOOM_VERSION) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 100);
+ return false;
+ } else {
+ pfrom->fDisconnect = true;
+ return false;
+ }
+ }
+
+
+ if (strCommand == NetMsgType::VERSION)
+ {
+ // Each connection can only send one version message
+ if (pfrom->nVersion != 0)
+ {
+ connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_DUPLICATE, string("Duplicate version message")));
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 1);
+ return false;
+ }
+
+ int64_t nTime;
+ CAddress addrMe;
+ CAddress addrFrom;
+ uint64_t nNonce = 1;
+ uint64_t nServiceInt;
+ vRecv >> pfrom->nVersion >> nServiceInt >> nTime >> addrMe;
+ pfrom->nServices = ServiceFlags(nServiceInt);
+ if (!pfrom->fInbound)
+ {
+ connman.SetServices(pfrom->addr, pfrom->nServices);
+ }
+ if (pfrom->nServicesExpected & ~pfrom->nServices)
+ {
+ LogPrint("net", "peer=%d does not offer the expected services (%08x offered, %08x expected); disconnecting\n", pfrom->id, pfrom->nServices, pfrom->nServicesExpected);
+ connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_NONSTANDARD,
+ strprintf("Expected to offer services %08x", pfrom->nServicesExpected)));
+ pfrom->fDisconnect = true;
+ return false;
+ }
+
+ if (pfrom->nVersion < MIN_PEER_PROTO_VERSION)
+ {
+ // disconnect from peers older than this proto version
+ LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, pfrom->nVersion);
+ connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE,
+ strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION)));
+ pfrom->fDisconnect = true;
+ return false;
+ }
+
+ if (pfrom->nVersion == 10300)
+ pfrom->nVersion = 300;
+ if (!vRecv.empty())
+ vRecv >> addrFrom >> nNonce;
+ if (!vRecv.empty()) {
+ vRecv >> LIMITED_STRING(pfrom->strSubVer, MAX_SUBVERSION_LENGTH);
+ pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer);
+ }
+ if (!vRecv.empty()) {
+ vRecv >> pfrom->nStartingHeight;
+ }
+ {
+ LOCK(pfrom->cs_filter);
+ if (!vRecv.empty())
+ vRecv >> pfrom->fRelayTxes; // set to true after we get the first filter* message
+ else
+ pfrom->fRelayTxes = true;
+ }
+
+ // Disconnect if we connected to ourself
+ if (pfrom->fInbound && !connman.CheckIncomingNonce(nNonce))
+ {
+ LogPrintf("connected to self at %s, disconnecting\n", pfrom->addr.ToString());
+ pfrom->fDisconnect = true;
+ return true;
+ }
+
+ pfrom->addrLocal = addrMe;
+ if (pfrom->fInbound && addrMe.IsRoutable())
+ {
+ SeenLocal(addrMe);
+ }
+
+ // Be shy and don't send version until we hear
+ if (pfrom->fInbound)
+ PushNodeVersion(pfrom, connman, GetAdjustedTime());
+
+ pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
+
+ if((pfrom->nServices & NODE_WITNESS))
+ {
+ LOCK(cs_main);
+ State(pfrom->GetId())->fHaveWitness = true;
+ }
+
+ // Potentially mark this peer as a preferred download peer.
+ {
+ LOCK(cs_main);
+ UpdatePreferredDownload(pfrom, State(pfrom->GetId()));
+ }
+
+ // Change version
+ connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::VERACK));
+ int nSendVersion = std::min(pfrom->nVersion, PROTOCOL_VERSION);
+ pfrom->SetSendVersion(nSendVersion);
+
+ if (!pfrom->fInbound)
+ {
+ // Advertise our address
+ if (fListen && !IsInitialBlockDownload())
+ {
+ CAddress addr = GetLocalAddress(&pfrom->addr, pfrom->GetLocalServices());
+ FastRandomContext insecure_rand;
+ if (addr.IsRoutable())
+ {
+ LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
+ pfrom->PushAddress(addr, insecure_rand);
+ } else if (IsPeerAddrLocalGood(pfrom)) {
+ addr.SetIP(pfrom->addrLocal);
+ LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
+ pfrom->PushAddress(addr, insecure_rand);
+ }
+ }
+
+ // Get recent addresses
+ if (pfrom->fOneShot || pfrom->nVersion >= CADDR_TIME_VERSION || connman.GetAddressCount() < 1000)
+ {
+ connman.PushMessage(pfrom, CNetMsgMaker(nSendVersion).Make(NetMsgType::GETADDR));
+ pfrom->fGetAddr = true;
+ }
+ connman.MarkAddressGood(pfrom->addr);
+ }
+
+ pfrom->fSuccessfullyConnected = true;
+
+ string remoteAddr;
+ if (fLogIPs)
+ remoteAddr = ", peeraddr=" + pfrom->addr.ToString();
+
+ LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
+ pfrom->cleanSubVer, pfrom->nVersion,
+ pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
+ remoteAddr);
+
+ int64_t nTimeOffset = nTime - GetTime();
+ pfrom->nTimeOffset = nTimeOffset;
+ AddTimeData(pfrom->addr, nTimeOffset);
+
+ // Feeler connections exist only to verify if address is online.
+ if (pfrom->fFeeler) {
+ assert(pfrom->fInbound == false);
+ pfrom->fDisconnect = true;
+ }
+ return true;
+ }
+
+
+ else if (pfrom->nVersion == 0)
+ {
+ // Must have a version message before anything else
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 1);
+ return false;
+ }
+
+ // At this point, the outgoing message serialization version can't change.
+ CNetMsgMaker msgMaker(pfrom->GetSendVersion());
+
+ if (strCommand == NetMsgType::VERACK)
+ {
+ pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION));
+
+ if (!pfrom->fInbound) {
+ // Mark this node as currently connected, so we update its timestamp later.
+ LOCK(cs_main);
+ State(pfrom->GetId())->fCurrentlyConnected = true;
+ }
+
+ if (pfrom->nVersion >= SENDHEADERS_VERSION) {
+ // Tell our peer we prefer to receive headers rather than inv's
+ // We send this to non-NODE NETWORK peers as well, because even
+ // non-NODE NETWORK peers can announce blocks (such as pruning
+ // nodes)
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDHEADERS));
+ }
+ if (pfrom->nVersion >= SHORT_IDS_BLOCKS_VERSION) {
+ // Tell our peer we are willing to provide version 1 or 2 cmpctblocks
+ // However, we do not request new block announcements using
+ // cmpctblock messages.
+ // We send this to non-NODE NETWORK peers as well, because
+ // they may wish to request compact blocks from us
+ bool fAnnounceUsingCMPCTBLOCK = false;
+ uint64_t nCMPCTBLOCKVersion = 2;
+ if (pfrom->GetLocalServices() & NODE_WITNESS)
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
+ nCMPCTBLOCKVersion = 1;
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion));
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::ADDR)
+ {
+ vector<CAddress> vAddr;
+ vRecv >> vAddr;
+
+ // Don't want addr from older versions unless seeding
+ if (pfrom->nVersion < CADDR_TIME_VERSION && connman.GetAddressCount() > 1000)
+ return true;
+ if (vAddr.size() > 1000)
+ {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 20);
+ return error("message addr size() = %u", vAddr.size());
+ }
+
+ // Store the new addresses
+ vector<CAddress> vAddrOk;
+ int64_t nNow = GetAdjustedTime();
+ int64_t nSince = nNow - 10 * 60;
+ BOOST_FOREACH(CAddress& addr, vAddr)
+ {
+ if (interruptMsgProc)
+ return true;
+
+ if ((addr.nServices & REQUIRED_SERVICES) != REQUIRED_SERVICES)
+ continue;
+
+ 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
+ RelayAddress(addr, fReachable, connman);
+ }
+ // Do not store addresses outside our network
+ if (fReachable)
+ vAddrOk.push_back(addr);
+ }
+ connman.AddNewAddresses(vAddrOk, pfrom->addr, 2 * 60 * 60);
+ if (vAddr.size() < 1000)
+ pfrom->fGetAddr = false;
+ if (pfrom->fOneShot)
+ pfrom->fDisconnect = true;
+ }
+
+ else if (strCommand == NetMsgType::SENDHEADERS)
+ {
+ LOCK(cs_main);
+ State(pfrom->GetId())->fPreferHeaders = true;
+ }
+
+ else if (strCommand == NetMsgType::SENDCMPCT)
+ {
+ bool fAnnounceUsingCMPCTBLOCK = false;
+ uint64_t nCMPCTBLOCKVersion = 0;
+ vRecv >> fAnnounceUsingCMPCTBLOCK >> nCMPCTBLOCKVersion;
+ if (nCMPCTBLOCKVersion == 1 || ((pfrom->GetLocalServices() & NODE_WITNESS) && nCMPCTBLOCKVersion == 2)) {
+ LOCK(cs_main);
+ // fProvidesHeaderAndIDs is used to "lock in" version of compact blocks we send (fWantsCmpctWitness)
+ if (!State(pfrom->GetId())->fProvidesHeaderAndIDs) {
+ State(pfrom->GetId())->fProvidesHeaderAndIDs = true;
+ State(pfrom->GetId())->fWantsCmpctWitness = nCMPCTBLOCKVersion == 2;
+ }
+ if (State(pfrom->GetId())->fWantsCmpctWitness == (nCMPCTBLOCKVersion == 2)) // ignore later version announces
+ State(pfrom->GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK;
+ if (!State(pfrom->GetId())->fSupportsDesiredCmpctVersion) {
+ if (pfrom->GetLocalServices() & NODE_WITNESS)
+ State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 2);
+ else
+ State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 1);
+ }
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::INV)
+ {
+ vector<CInv> vInv;
+ vRecv >> vInv;
+ if (vInv.size() > MAX_INV_SZ)
+ {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 20);
+ return error("message inv size() = %u", vInv.size());
+ }
+
+ bool fBlocksOnly = !fRelayTxes;
+
+ // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))
+ fBlocksOnly = false;
+
+ LOCK(cs_main);
+
+ uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus());
+
+ std::vector<CInv> vToFetch;
+
+ for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
+ {
+ CInv &inv = vInv[nInv];
+
+ if (interruptMsgProc)
+ return true;
+
+ bool fAlreadyHave = AlreadyHave(inv);
+ LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
+
+ if (inv.type == MSG_TX) {
+ inv.type |= nFetchFlags;
+ }
+
+ if (inv.type == MSG_BLOCK) {
+ UpdateBlockAvailability(pfrom->GetId(), inv.hash);
+ if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
+ // We used to request the full block here, but since headers-announcements are now the
+ // primary method of announcement on the network, and since, in the case that a node
+ // fell back to inv we probably have a reorg which we should get the headers for first,
+ // we now only provide a getheaders response here. When we receive the headers, we will
+ // then ask for the blocks we need.
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), inv.hash));
+ LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
+ }
+ }
+ else
+ {
+ pfrom->AddInventoryKnown(inv);
+ if (fBlocksOnly)
+ LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);
+ else if (!fAlreadyHave && !fImporting && !fReindex && !IsInitialBlockDownload())
+ pfrom->AskFor(inv);
+ }
+
+ // Track requests for our stuff
+ GetMainSignals().Inventory(inv.hash);
+ }
+
+ if (!vToFetch.empty())
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vToFetch));
+ }
+
+
+ else if (strCommand == NetMsgType::GETDATA)
+ {
+ vector<CInv> vInv;
+ vRecv >> vInv;
+ if (vInv.size() > MAX_INV_SZ)
+ {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 20);
+ return error("message getdata size() = %u", vInv.size());
+ }
+
+ if (fDebug || (vInv.size() != 1))
+ LogPrint("net", "received getdata (%u invsz) peer=%d\n", vInv.size(), pfrom->id);
+
+ if ((fDebug && vInv.size() > 0) || (vInv.size() == 1))
+ LogPrint("net", "received getdata for: %s peer=%d\n", vInv[0].ToString(), pfrom->id);
+
+ pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end());
+ ProcessGetData(pfrom, chainparams.GetConsensus(), connman, interruptMsgProc);
+ }
+
+
+ else if (strCommand == NetMsgType::GETBLOCKS)
+ {
+ CBlockLocator locator;
+ uint256 hashStop;
+ vRecv >> locator >> hashStop;
+
+ // We might have announced the currently-being-connected tip using a
+ // compact block, which resulted in the peer sending a getblocks
+ // request, which we would otherwise respond to without the new block.
+ // To avoid this situation we simply verify that we are on our best
+ // known chain now. This is super overkill, but we handle it better
+ // for getheaders requests, and there are no known nodes which support
+ // compact blocks but still use getblocks to request blocks.
+ {
+ std::shared_ptr<const CBlock> a_recent_block;
+ {
+ LOCK(cs_most_recent_block);
+ a_recent_block = most_recent_block;
+ }
+ CValidationState dummy;
+ ActivateBestChain(dummy, Params(), a_recent_block);
+ }
+
+ LOCK(cs_main);
+
+ // Find the last block the caller has in the main chain
+ const CBlockIndex* pindex = FindForkInGlobalIndex(chainActive, locator);
+
+ // Send the rest of the chain
+ if (pindex)
+ pindex = chainActive.Next(pindex);
+ int nLimit = 500;
+ LogPrint("net", "getblocks %d to %s limit %d from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), nLimit, pfrom->id);
+ for (; pindex; pindex = chainActive.Next(pindex))
+ {
+ if (pindex->GetBlockHash() == hashStop)
+ {
+ LogPrint("net", " getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
+ break;
+ }
+ // If pruning, don't inv blocks unless we have on disk and are likely to still have
+ // for some reasonable time window (1 hour) that block relay might require.
+ const int nPrunedBlocksLikelyToHave = MIN_BLOCKS_TO_KEEP - 3600 / chainparams.GetConsensus().nPowTargetSpacing;
+ if (fPruneMode && (!(pindex->nStatus & BLOCK_HAVE_DATA) || pindex->nHeight <= chainActive.Tip()->nHeight - nPrunedBlocksLikelyToHave))
+ {
+ LogPrint("net", " getblocks stopping, pruned or too old block at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
+ break;
+ }
+ pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash()));
+ if (--nLimit <= 0)
+ {
+ // When this block is requested, we'll send an inv that'll
+ // trigger the peer to getblocks the next batch of inventory.
+ LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
+ pfrom->hashContinue = pindex->GetBlockHash();
+ break;
+ }
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::GETBLOCKTXN)
+ {
+ BlockTransactionsRequest req;
+ vRecv >> req;
+
+ std::shared_ptr<const CBlock> recent_block;
+ {
+ LOCK(cs_most_recent_block);
+ if (most_recent_block_hash == req.blockhash)
+ recent_block = most_recent_block;
+ // Unlock cs_most_recent_block to avoid cs_main lock inversion
+ }
+ if (recent_block) {
+ SendBlockTransactions(*recent_block, req, pfrom, connman);
+ return true;
+ }
+
+ LOCK(cs_main);
+
+ BlockMap::iterator it = mapBlockIndex.find(req.blockhash);
+ if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) {
+ LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id);
+ return true;
+ }
+
+ if (it->second->nHeight < chainActive.Height() - MAX_BLOCKTXN_DEPTH) {
+ // If an older block is requested (should never happen in practice,
+ // but can happen in tests) send a block response instead of a
+ // blocktxn response. Sending a full block response instead of a
+ // small blocktxn response is preferable in the case where a peer
+ // might maliciously send lots of getblocktxn requests to trigger
+ // expensive disk reads, because it will require the peer to
+ // actually receive all the data read from disk over the network.
+ LogPrint("net", "Peer %d sent us a getblocktxn for a block > %i deep", pfrom->id, MAX_BLOCKTXN_DEPTH);
+ CInv inv;
+ inv.type = State(pfrom->GetId())->fWantsCmpctWitness ? MSG_WITNESS_BLOCK : MSG_BLOCK;
+ inv.hash = req.blockhash;
+ pfrom->vRecvGetData.push_back(inv);
+ ProcessGetData(pfrom, chainparams.GetConsensus(), connman, interruptMsgProc);
+ return true;
+ }
+
+ CBlock block;
+ bool ret = ReadBlockFromDisk(block, it->second, chainparams.GetConsensus());
+ assert(ret);
+
+ SendBlockTransactions(block, req, pfrom, connman);
+ }
+
+
+ else if (strCommand == NetMsgType::GETHEADERS)
+ {
+ CBlockLocator locator;
+ uint256 hashStop;
+ vRecv >> locator >> hashStop;
+
+ LOCK(cs_main);
+ if (IsInitialBlockDownload() && !pfrom->fWhitelisted) {
+ LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id);
+ return true;
+ }
+
+ CNodeState *nodestate = State(pfrom->GetId());
+ const CBlockIndex* pindex = NULL;
+ if (locator.IsNull())
+ {
+ // If locator is null, return the hashStop block
+ BlockMap::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 = FindForkInGlobalIndex(chainActive, locator);
+ if (pindex)
+ pindex = chainActive.Next(pindex);
+ }
+
+ // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
+ vector<CBlock> vHeaders;
+ int nLimit = MAX_HEADERS_RESULTS;
+ LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), pfrom->id);
+ for (; pindex; pindex = chainActive.Next(pindex))
+ {
+ vHeaders.push_back(pindex->GetBlockHeader());
+ if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop)
+ break;
+ }
+ // pindex can be NULL either if we sent chainActive.Tip() OR
+ // if our peer has chainActive.Tip() (and thus we are sending an empty
+ // headers message). In both cases it's safe to update
+ // pindexBestHeaderSent to be our tip.
+ //
+ // It is important that we simply reset the BestHeaderSent value here,
+ // and not max(BestHeaderSent, newHeaderSent). We might have announced
+ // the currently-being-connected tip using a compact block, which
+ // resulted in the peer sending a headers request, which we respond to
+ // without the new block. By resetting the BestHeaderSent, we ensure we
+ // will re-announce the new block via headers (or compact blocks again)
+ // in the SendMessages logic.
+ nodestate->pindexBestHeaderSent = pindex ? pindex : chainActive.Tip();
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::HEADERS, vHeaders));
+ }
+
+
+ else if (strCommand == NetMsgType::TX)
+ {
+ // Stop processing the transaction early if
+ // We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off
+ if (!fRelayTxes && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
+ {
+ LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
+ return true;
+ }
+
+ deque<COutPoint> vWorkQueue;
+ vector<uint256> vEraseQueue;
+ CTransactionRef ptx;
+ vRecv >> ptx;
+ const CTransaction& tx = *ptx;
+
+ CInv inv(MSG_TX, tx.GetHash());
+ pfrom->AddInventoryKnown(inv);
+
+ LOCK(cs_main);
+
+ bool fMissingInputs = false;
+ CValidationState state;
+
+ pfrom->setAskFor.erase(inv.hash);
+ mapAlreadyAskedFor.erase(inv.hash);
+
+ std::list<CTransactionRef> lRemovedTxn;
+
+ if (!AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, ptx, true, &fMissingInputs, &lRemovedTxn)) {
+ mempool.check(pcoinsTip);
+ RelayTransaction(tx, connman);
+ for (unsigned int i = 0; i < tx.vout.size(); i++) {
+ vWorkQueue.emplace_back(inv.hash, i);
+ }
+
+ pfrom->nLastTXTime = GetTime();
+
+ LogPrint("mempool", "AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)\n",
+ pfrom->id,
+ tx.GetHash().ToString(),
+ mempool.size(), mempool.DynamicMemoryUsage() / 1000);
+
+ // Recursively process any orphan transactions that depended on this one
+ set<NodeId> setMisbehaving;
+ while (!vWorkQueue.empty()) {
+ auto itByPrev = mapOrphanTransactionsByPrev.find(vWorkQueue.front());
+ vWorkQueue.pop_front();
+ if (itByPrev == mapOrphanTransactionsByPrev.end())
+ continue;
+ for (auto mi = itByPrev->second.begin();
+ mi != itByPrev->second.end();
+ ++mi)
+ {
+ const CTransactionRef& porphanTx = (*mi)->second.tx;
+ const CTransaction& orphanTx = *porphanTx;
+ const uint256& orphanHash = orphanTx.GetHash();
+ NodeId fromPeer = (*mi)->second.fromPeer;
+ bool fMissingInputs2 = false;
+ // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan
+ // resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get
+ // anyone relaying LegitTxX banned)
+ CValidationState stateDummy;
+
+
+ if (setMisbehaving.count(fromPeer))
+ continue;
+ if (AcceptToMemoryPool(mempool, stateDummy, porphanTx, true, &fMissingInputs2, &lRemovedTxn)) {
+ LogPrint("mempool", " accepted orphan tx %s\n", orphanHash.ToString());
+ RelayTransaction(orphanTx, connman);
+ for (unsigned int i = 0; i < orphanTx.vout.size(); i++) {
+ vWorkQueue.emplace_back(orphanHash, i);
+ }
+ vEraseQueue.push_back(orphanHash);
+ }
+ else if (!fMissingInputs2)
+ {
+ int nDos = 0;
+ if (stateDummy.IsInvalid(nDos) && nDos > 0)
+ {
+ // Punish peer that gave us an invalid orphan tx
+ Misbehaving(fromPeer, nDos);
+ setMisbehaving.insert(fromPeer);
+ LogPrint("mempool", " invalid orphan tx %s\n", orphanHash.ToString());
+ }
+ // Has inputs but not accepted to mempool
+ // Probably non-standard or insufficient fee/priority
+ LogPrint("mempool", " removed orphan tx %s\n", orphanHash.ToString());
+ vEraseQueue.push_back(orphanHash);
+ if (!orphanTx.HasWitness() && !stateDummy.CorruptionPossible()) {
+ // Do not use rejection cache for witness transactions or
+ // witness-stripped transactions, as they can have been malleated.
+ // See https://github.com/bitcoin/bitcoin/issues/8279 for details.
+ assert(recentRejects);
+ recentRejects->insert(orphanHash);
+ }
+ }
+ mempool.check(pcoinsTip);
+ }
+ }
+
+ BOOST_FOREACH(uint256 hash, vEraseQueue)
+ EraseOrphanTx(hash);
+ }
+ else if (fMissingInputs)
+ {
+ bool fRejectedParents = false; // It may be the case that the orphans parents have all been rejected
+ BOOST_FOREACH(const CTxIn& txin, tx.vin) {
+ if (recentRejects->contains(txin.prevout.hash)) {
+ fRejectedParents = true;
+ break;
+ }
+ }
+ if (!fRejectedParents) {
+ uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus());
+ BOOST_FOREACH(const CTxIn& txin, tx.vin) {
+ CInv _inv(MSG_TX | nFetchFlags, txin.prevout.hash);
+ pfrom->AddInventoryKnown(_inv);
+ if (!AlreadyHave(_inv)) pfrom->AskFor(_inv);
+ }
+ AddOrphanTx(ptx, pfrom->GetId());
+
+ // DoS prevention: do not allow mapOrphanTransactions to grow unbounded
+ unsigned int nMaxOrphanTx = (unsigned int)std::max((int64_t)0, GetArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS));
+ unsigned int nEvicted = LimitOrphanTxSize(nMaxOrphanTx);
+ if (nEvicted > 0)
+ LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
+ } else {
+ LogPrint("mempool", "not keeping orphan with rejected parents %s\n",tx.GetHash().ToString());
+ // We will continue to reject this tx since it has rejected
+ // parents so avoid re-requesting it from other peers.
+ recentRejects->insert(tx.GetHash());
+ }
+ } else {
+ if (!tx.HasWitness() && !state.CorruptionPossible()) {
+ // Do not use rejection cache for witness transactions or
+ // witness-stripped transactions, as they can have been malleated.
+ // See https://github.com/bitcoin/bitcoin/issues/8279 for details.
+ assert(recentRejects);
+ recentRejects->insert(tx.GetHash());
+ if (RecursiveDynamicUsage(*ptx) < 100000) {
+ AddToCompactExtraTransactions(ptx);
+ }
+ } else if (tx.HasWitness() && RecursiveDynamicUsage(*ptx) < 100000) {
+ AddToCompactExtraTransactions(ptx);
+ }
+
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) {
+ // Always relay transactions received from whitelisted peers, even
+ // if they were already in the mempool or rejected from it due
+ // to policy, allowing the node to function as a gateway for
+ // nodes hidden behind it.
+ //
+ // Never relay transactions that we would assign a non-zero DoS
+ // score for, as we expect peers to do the same with us in that
+ // case.
+ int nDoS = 0;
+ if (!state.IsInvalid(nDoS) || nDoS == 0) {
+ LogPrintf("Force relaying tx %s from whitelisted peer=%d\n", tx.GetHash().ToString(), pfrom->id);
+ RelayTransaction(tx, connman);
+ } else {
+ LogPrintf("Not relaying invalid transaction %s from whitelisted peer=%d (%s)\n", tx.GetHash().ToString(), pfrom->id, FormatStateMessage(state));
+ }
+ }
+ }
+
+ for (const CTransactionRef& tx : lRemovedTxn)
+ AddToCompactExtraTransactions(tx);
+
+ int nDoS = 0;
+ if (state.IsInvalid(nDoS))
+ {
+ LogPrint("mempoolrej", "%s from peer=%d was not accepted: %s\n", tx.GetHash().ToString(),
+ pfrom->id,
+ FormatStateMessage(state));
+ if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(),
+ state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash));
+ if (nDoS > 0) {
+ Misbehaving(pfrom->GetId(), nDoS);
+ }
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::CMPCTBLOCK && !fImporting && !fReindex) // Ignore blocks received while importing
+ {
+ CBlockHeaderAndShortTxIDs cmpctblock;
+ vRecv >> cmpctblock;
+
+ {
+ LOCK(cs_main);
+
+ if (mapBlockIndex.find(cmpctblock.header.hashPrevBlock) == mapBlockIndex.end()) {
+ // Doesn't connect (or is genesis), instead of DoSing in AcceptBlockHeader, request deeper headers
+ if (!IsInitialBlockDownload())
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), uint256()));
+ return true;
+ }
+ }
+
+ const CBlockIndex *pindex = NULL;
+ CValidationState state;
+ if (!ProcessNewBlockHeaders({cmpctblock.header}, state, chainparams, &pindex)) {
+ int nDoS;
+ if (state.IsInvalid(nDoS)) {
+ if (nDoS > 0) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), nDoS);
+ }
+ LogPrintf("Peer %d sent us invalid header via cmpctblock\n", pfrom->id);
+ return true;
+ }
+ }
+
+ // When we succeed in decoding a block's txids from a cmpctblock
+ // message we typically jump to the BLOCKTXN handling code, with a
+ // dummy (empty) BLOCKTXN message, to re-use the logic there in
+ // completing processing of the putative block (without cs_main).
+ bool fProcessBLOCKTXN = false;
+ CDataStream blockTxnMsg(SER_NETWORK, PROTOCOL_VERSION);
+
+ // If we end up treating this as a plain headers message, call that as well
+ // without cs_main.
+ bool fRevertToHeaderProcessing = false;
+ CDataStream vHeadersMsg(SER_NETWORK, PROTOCOL_VERSION);
+
+ // Keep a CBlock for "optimistic" compactblock reconstructions (see
+ // below)
+ std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
+ bool fBlockReconstructed = false;
+
+ {
+ LOCK(cs_main);
+ // If AcceptBlockHeader returned true, it set pindex
+ assert(pindex);
+ UpdateBlockAvailability(pfrom->GetId(), pindex->GetBlockHash());
+
+ std::map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator blockInFlightIt = mapBlocksInFlight.find(pindex->GetBlockHash());
+ bool fAlreadyInFlight = blockInFlightIt != mapBlocksInFlight.end();
+
+ if (pindex->nStatus & BLOCK_HAVE_DATA) // Nothing to do here
+ return true;
+
+ if (pindex->nChainWork <= chainActive.Tip()->nChainWork || // We know something better
+ pindex->nTx != 0) { // We had this block at some point, but pruned it
+ if (fAlreadyInFlight) {
+ // We requested this block for some reason, but our mempool will probably be useless
+ // so we just grab the block via normal getdata
+ std::vector<CInv> vInv(1);
+ vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vInv));
+ }
+ return true;
+ }
+
+ // If we're not close to tip yet, give up and let parallel block fetch work its magic
+ if (!fAlreadyInFlight && !CanDirectFetch(chainparams.GetConsensus()))
+ return true;
+
+ CNodeState *nodestate = State(pfrom->GetId());
+
+ if (IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus()) && !nodestate->fSupportsDesiredCmpctVersion) {
+ // Don't bother trying to process compact blocks from v1 peers
+ // after segwit activates.
+ return true;
+ }
+
+ // We want to be a bit conservative just to be extra careful about DoS
+ // possibilities in compact block processing...
+ if (pindex->nHeight <= chainActive.Height() + 2) {
+ if ((!fAlreadyInFlight && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) ||
+ (fAlreadyInFlight && blockInFlightIt->second.first == pfrom->GetId())) {
+ list<QueuedBlock>::iterator *queuedBlockIt = NULL;
+ if (!MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), chainparams.GetConsensus(), pindex, &queuedBlockIt)) {
+ if (!(*queuedBlockIt)->partialBlock)
+ (*queuedBlockIt)->partialBlock.reset(new PartiallyDownloadedBlock(&mempool));
+ else {
+ // The block was already in flight using compact blocks from the same peer
+ LogPrint("net", "Peer sent us compact block we were already syncing!\n");
+ return true;
+ }
+ }
+
+ PartiallyDownloadedBlock& partialBlock = *(*queuedBlockIt)->partialBlock;
+ ReadStatus status = partialBlock.InitData(cmpctblock, vExtraTxnForCompact);
+ if (status == READ_STATUS_INVALID) {
+ MarkBlockAsReceived(pindex->GetBlockHash()); // Reset in-flight state in case of whitelist
+ Misbehaving(pfrom->GetId(), 100);
+ LogPrintf("Peer %d sent us invalid compact block\n", pfrom->id);
+ return true;
+ } else if (status == READ_STATUS_FAILED) {
+ // Duplicate txindexes, the block is now in-flight, so just request it
+ std::vector<CInv> vInv(1);
+ vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vInv));
+ return true;
+ }
+
+ BlockTransactionsRequest req;
+ for (size_t i = 0; i < cmpctblock.BlockTxCount(); i++) {
+ if (!partialBlock.IsTxAvailable(i))
+ req.indexes.push_back(i);
+ }
+ if (req.indexes.empty()) {
+ // Dirty hack to jump to BLOCKTXN code (TODO: move message handling into their own functions)
+ BlockTransactions txn;
+ txn.blockhash = cmpctblock.header.GetHash();
+ blockTxnMsg << txn;
+ fProcessBLOCKTXN = true;
+ } else {
+ req.blockhash = pindex->GetBlockHash();
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETBLOCKTXN, req));
+ }
+ } else {
+ // This block is either already in flight from a different
+ // peer, or this peer has too many blocks outstanding to
+ // download from.
+ // Optimistically try to reconstruct anyway since we might be
+ // able to without any round trips.
+ PartiallyDownloadedBlock tempBlock(&mempool);
+ ReadStatus status = tempBlock.InitData(cmpctblock, vExtraTxnForCompact);
+ if (status != READ_STATUS_OK) {
+ // TODO: don't ignore failures
+ return true;
+ }
+ std::vector<CTransactionRef> dummy;
+ status = tempBlock.FillBlock(*pblock, dummy);
+ if (status == READ_STATUS_OK) {
+ fBlockReconstructed = true;
+ }
+ }
+ } else {
+ if (fAlreadyInFlight) {
+ // We requested this block, but its far into the future, so our
+ // mempool will probably be useless - request the block normally
+ std::vector<CInv> vInv(1);
+ vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vInv));
+ return true;
+ } else {
+ // If this was an announce-cmpctblock, we want the same treatment as a header message
+ // Dirty hack to process as if it were just a headers message (TODO: move message handling into their own functions)
+ std::vector<CBlock> headers;
+ headers.push_back(cmpctblock.header);
+ vHeadersMsg << headers;
+ fRevertToHeaderProcessing = true;
+ }
+ }
+ } // cs_main
+
+ if (fProcessBLOCKTXN)
+ return ProcessMessage(pfrom, NetMsgType::BLOCKTXN, blockTxnMsg, nTimeReceived, chainparams, connman, interruptMsgProc);
+
+ if (fRevertToHeaderProcessing)
+ return ProcessMessage(pfrom, NetMsgType::HEADERS, vHeadersMsg, nTimeReceived, chainparams, connman, interruptMsgProc);
+
+ if (fBlockReconstructed) {
+ // If we got here, we were able to optimistically reconstruct a
+ // block that is in flight from some other peer.
+ {
+ LOCK(cs_main);
+ mapBlockSource.emplace(pblock->GetHash(), std::make_pair(pfrom->GetId(), false));
+ }
+ bool fNewBlock = false;
+ ProcessNewBlock(chainparams, pblock, true, &fNewBlock);
+ if (fNewBlock)
+ pfrom->nLastBlockTime = GetTime();
+
+ LOCK(cs_main); // hold cs_main for CBlockIndex::IsValid()
+ if (pindex->IsValid(BLOCK_VALID_TRANSACTIONS)) {
+ // Clear download state for this block, which is in
+ // process from some other peer. We do this after calling
+ // ProcessNewBlock so that a malleated cmpctblock announcement
+ // can't be used to interfere with block relay.
+ MarkBlockAsReceived(pblock->GetHash());
+ }
+ }
+
+ }
+
+ else if (strCommand == NetMsgType::BLOCKTXN && !fImporting && !fReindex) // Ignore blocks received while importing
+ {
+ BlockTransactions resp;
+ vRecv >> resp;
+
+ std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
+ bool fBlockRead = false;
+ {
+ LOCK(cs_main);
+
+ map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator it = mapBlocksInFlight.find(resp.blockhash);
+ if (it == mapBlocksInFlight.end() || !it->second.second->partialBlock ||
+ it->second.first != pfrom->GetId()) {
+ LogPrint("net", "Peer %d sent us block transactions for block we weren't expecting\n", pfrom->id);
+ return true;
+ }
+
+ PartiallyDownloadedBlock& partialBlock = *it->second.second->partialBlock;
+ ReadStatus status = partialBlock.FillBlock(*pblock, resp.txn);
+ if (status == READ_STATUS_INVALID) {
+ MarkBlockAsReceived(resp.blockhash); // Reset in-flight state in case of whitelist
+ Misbehaving(pfrom->GetId(), 100);
+ LogPrintf("Peer %d sent us invalid compact block/non-matching block transactions\n", pfrom->id);
+ return true;
+ } else if (status == READ_STATUS_FAILED) {
+ // Might have collided, fall back to getdata now :(
+ std::vector<CInv> invs;
+ invs.push_back(CInv(MSG_BLOCK | GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus()), resp.blockhash));
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, invs));
+ } else {
+ // Block is either okay, or possibly we received
+ // READ_STATUS_CHECKBLOCK_FAILED.
+ // Note that CheckBlock can only fail for one of a few reasons:
+ // 1. bad-proof-of-work (impossible here, because we've already
+ // accepted the header)
+ // 2. merkleroot doesn't match the transactions given (already
+ // caught in FillBlock with READ_STATUS_FAILED, so
+ // impossible here)
+ // 3. the block is otherwise invalid (eg invalid coinbase,
+ // block is too big, too many legacy sigops, etc).
+ // So if CheckBlock failed, #3 is the only possibility.
+ // Under BIP 152, we don't DoS-ban unless proof of work is
+ // invalid (we don't require all the stateless checks to have
+ // been run). This is handled below, so just treat this as
+ // though the block was successfully read, and rely on the
+ // handling in ProcessNewBlock to ensure the block index is
+ // updated, reject messages go out, etc.
+ MarkBlockAsReceived(resp.blockhash); // it is now an empty pointer
+ fBlockRead = true;
+ // mapBlockSource is only used for sending reject messages and DoS scores,
+ // so the race between here and cs_main in ProcessNewBlock is fine.
+ // BIP 152 permits peers to relay compact blocks after validating
+ // the header only; we should not punish peers if the block turns
+ // out to be invalid.
+ mapBlockSource.emplace(resp.blockhash, std::make_pair(pfrom->GetId(), false));
+ }
+ } // Don't hold cs_main when we call into ProcessNewBlock
+ if (fBlockRead) {
+ bool fNewBlock = false;
+ // Since we requested this block (it was in mapBlocksInFlight), force it to be processed,
+ // even if it would not be a candidate for new tip (missing previous block, chain not long enough, etc)
+ ProcessNewBlock(chainparams, pblock, true, &fNewBlock);
+ if (fNewBlock)
+ pfrom->nLastBlockTime = GetTime();
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::HEADERS && !fImporting && !fReindex) // Ignore headers received while importing
+ {
+ std::vector<CBlockHeader> headers;
+
+ // Bypass the normal CBlock deserialization, as we don't want to risk deserializing 2000 full blocks.
+ unsigned int nCount = ReadCompactSize(vRecv);
+ if (nCount > MAX_HEADERS_RESULTS) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 20);
+ return error("headers message size = %u", nCount);
+ }
+ headers.resize(nCount);
+ for (unsigned int n = 0; n < nCount; n++) {
+ vRecv >> headers[n];
+ ReadCompactSize(vRecv); // ignore tx count; assume it is 0.
+ }
+
+ if (nCount == 0) {
+ // Nothing interesting. Stop asking this peers for more headers.
+ return true;
+ }
+
+ const CBlockIndex *pindexLast = NULL;
+ {
+ LOCK(cs_main);
+ CNodeState *nodestate = State(pfrom->GetId());
+
+ // If this looks like it could be a block announcement (nCount <
+ // MAX_BLOCKS_TO_ANNOUNCE), use special logic for handling headers that
+ // don't connect:
+ // - Send a getheaders message in response to try to connect the chain.
+ // - The peer can send up to MAX_UNCONNECTING_HEADERS in a row that
+ // don't connect before giving DoS points
+ // - Once a headers message is received that is valid and does connect,
+ // nUnconnectingHeaders gets reset back to 0.
+ if (mapBlockIndex.find(headers[0].hashPrevBlock) == mapBlockIndex.end() && nCount < MAX_BLOCKS_TO_ANNOUNCE) {
+ nodestate->nUnconnectingHeaders++;
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), uint256()));
+ LogPrint("net", "received header %s: missing prev block %s, sending getheaders (%d) to end (peer=%d, nUnconnectingHeaders=%d)\n",
+ headers[0].GetHash().ToString(),
+ headers[0].hashPrevBlock.ToString(),
+ pindexBestHeader->nHeight,
+ pfrom->id, nodestate->nUnconnectingHeaders);
+ // Set hashLastUnknownBlock for this peer, so that if we
+ // eventually get the headers - even from a different peer -
+ // we can use this peer to download.
+ UpdateBlockAvailability(pfrom->GetId(), headers.back().GetHash());
+
+ if (nodestate->nUnconnectingHeaders % MAX_UNCONNECTING_HEADERS == 0) {
+ Misbehaving(pfrom->GetId(), 20);
+ }
+ return true;
+ }
+
+ uint256 hashLastBlock;
+ for (const CBlockHeader& header : headers) {
+ if (!hashLastBlock.IsNull() && header.hashPrevBlock != hashLastBlock) {
+ Misbehaving(pfrom->GetId(), 20);
+ return error("non-continuous headers sequence");
+ }
+ hashLastBlock = header.GetHash();
+ }
+ }
+
+ CValidationState state;
+ if (!ProcessNewBlockHeaders(headers, state, chainparams, &pindexLast)) {
+ int nDoS;
+ if (state.IsInvalid(nDoS)) {
+ if (nDoS > 0) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), nDoS);
+ }
+ return error("invalid header received");
+ }
+ }
+
+ {
+ LOCK(cs_main);
+ CNodeState *nodestate = State(pfrom->GetId());
+ if (nodestate->nUnconnectingHeaders > 0) {
+ LogPrint("net", "peer=%d: resetting nUnconnectingHeaders (%d -> 0)\n", pfrom->id, nodestate->nUnconnectingHeaders);
+ }
+ nodestate->nUnconnectingHeaders = 0;
+
+ assert(pindexLast);
+ UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash());
+
+ if (nCount == MAX_HEADERS_RESULTS) {
+ // Headers message had its maximum size; the peer may have more headers.
+ // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue
+ // from there instead.
+ LogPrint("net", "more getheaders (%d) to end to peer=%d (startheight:%d)\n", pindexLast->nHeight, pfrom->id, pfrom->nStartingHeight);
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexLast), uint256()));
+ }
+
+ bool fCanDirectFetch = CanDirectFetch(chainparams.GetConsensus());
+ // If this set of headers is valid and ends in a block with at least as
+ // much work as our tip, download as much as possible.
+ if (fCanDirectFetch && pindexLast->IsValid(BLOCK_VALID_TREE) && chainActive.Tip()->nChainWork <= pindexLast->nChainWork) {
+ vector<const CBlockIndex *> vToFetch;
+ const CBlockIndex *pindexWalk = pindexLast;
+ // Calculate all the blocks we'd need to switch to pindexLast, up to a limit.
+ while (pindexWalk && !chainActive.Contains(pindexWalk) && vToFetch.size() <= MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
+ if (!(pindexWalk->nStatus & BLOCK_HAVE_DATA) &&
+ !mapBlocksInFlight.count(pindexWalk->GetBlockHash()) &&
+ (!IsWitnessEnabled(pindexWalk->pprev, chainparams.GetConsensus()) || State(pfrom->GetId())->fHaveWitness)) {
+ // We don't have this block, and it's not yet in flight.
+ vToFetch.push_back(pindexWalk);
+ }
+ pindexWalk = pindexWalk->pprev;
+ }
+ // If pindexWalk still isn't on our main chain, we're looking at a
+ // very large reorg at a time we think we're close to caught up to
+ // the main chain -- this shouldn't really happen. Bail out on the
+ // direct fetch and rely on parallel download instead.
+ if (!chainActive.Contains(pindexWalk)) {
+ LogPrint("net", "Large reorg, won't direct fetch to %s (%d)\n",
+ pindexLast->GetBlockHash().ToString(),
+ pindexLast->nHeight);
+ } else {
+ vector<CInv> vGetData;
+ // Download as much as possible, from earliest to latest.
+ BOOST_REVERSE_FOREACH(const CBlockIndex *pindex, vToFetch) {
+ if (nodestate->nBlocksInFlight >= MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
+ // Can't download any more from this peer
+ break;
+ }
+ uint32_t nFetchFlags = GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus());
+ vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
+ MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), chainparams.GetConsensus(), pindex);
+ LogPrint("net", "Requesting block %s from peer=%d\n",
+ pindex->GetBlockHash().ToString(), pfrom->id);
+ }
+ if (vGetData.size() > 1) {
+ LogPrint("net", "Downloading blocks toward %s (%d) via headers direct fetch\n",
+ pindexLast->GetBlockHash().ToString(), pindexLast->nHeight);
+ }
+ if (vGetData.size() > 0) {
+ if (nodestate->fSupportsDesiredCmpctVersion && vGetData.size() == 1 && mapBlocksInFlight.size() == 1 && pindexLast->pprev->IsValid(BLOCK_VALID_CHAIN)) {
+ // In any case, we want to download using a compact block, not a regular one
+ vGetData[0] = CInv(MSG_CMPCT_BLOCK, vGetData[0].hash);
+ }
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::GETDATA, vGetData));
+ }
+ }
+ }
+ }
+ }
+
+ else if (strCommand == NetMsgType::BLOCK && !fImporting && !fReindex) // Ignore blocks received while importing
+ {
+ std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
+ vRecv >> *pblock;
+
+ LogPrint("net", "received block %s peer=%d\n", pblock->GetHash().ToString(), pfrom->id);
+
+ // Process all blocks from whitelisted peers, even if not requested,
+ // unless we're still syncing with the network.
+ // Such an unrequested block may still be processed, subject to the
+ // conditions in AcceptBlock().
+ bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload();
+ const uint256 hash(pblock->GetHash());
+ {
+ LOCK(cs_main);
+ // Also always process if we requested the block explicitly, as we may
+ // need it even though it is not a candidate for a new best tip.
+ forceProcessing |= MarkBlockAsReceived(hash);
+ // mapBlockSource is only used for sending reject messages and DoS scores,
+ // so the race between here and cs_main in ProcessNewBlock is fine.
+ mapBlockSource.emplace(hash, std::make_pair(pfrom->GetId(), true));
+ }
+ bool fNewBlock = false;
+ ProcessNewBlock(chainparams, pblock, forceProcessing, &fNewBlock);
+ if (fNewBlock)
+ pfrom->nLastBlockTime = GetTime();
+ }
+
+
+ else if (strCommand == NetMsgType::GETADDR)
+ {
+ // This asymmetric behavior for inbound and outbound connections was introduced
+ // to prevent a fingerprinting attack: an attacker can send specific fake addresses
+ // to users' AddrMan and later request them by sending getaddr messages.
+ // Making nodes which are behind NAT and can only make outgoing connections ignore
+ // the getaddr message mitigates the attack.
+ if (!pfrom->fInbound) {
+ LogPrint("net", "Ignoring \"getaddr\" from outbound connection. peer=%d\n", pfrom->id);
+ return true;
+ }
+
+ // Only send one GetAddr response per connection to reduce resource waste
+ // and discourage addr stamping of INV announcements.
+ if (pfrom->fSentAddr) {
+ LogPrint("net", "Ignoring repeated \"getaddr\". peer=%d\n", pfrom->id);
+ return true;
+ }
+ pfrom->fSentAddr = true;
+
+ pfrom->vAddrToSend.clear();
+ vector<CAddress> vAddr = connman.GetAddresses();
+ FastRandomContext insecure_rand;
+ BOOST_FOREACH(const CAddress &addr, vAddr)
+ pfrom->PushAddress(addr, insecure_rand);
+ }
+
+
+ else if (strCommand == NetMsgType::MEMPOOL)
+ {
+ if (!(pfrom->GetLocalServices() & NODE_BLOOM) && !pfrom->fWhitelisted)
+ {
+ LogPrint("net", "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
+ pfrom->fDisconnect = true;
+ return true;
+ }
+
+ if (connman.OutboundTargetReached(false) && !pfrom->fWhitelisted)
+ {
+ LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
+ pfrom->fDisconnect = true;
+ return true;
+ }
+
+ LOCK(pfrom->cs_inventory);
+ pfrom->fSendMempool = true;
+ }
+
+
+ else if (strCommand == NetMsgType::PING)
+ {
+ if (pfrom->nVersion > BIP0031_VERSION)
+ {
+ uint64_t 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.
+ connman.PushMessage(pfrom, msgMaker.Make(NetMsgType::PONG, nonce));
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::PONG)
+ {
+ int64_t pingUsecEnd = nTimeReceived;
+ uint64_t nonce = 0;
+ size_t nAvail = vRecv.in_avail();
+ bool bPingFinished = false;
+ std::string sProblem;
+
+ if (nAvail >= sizeof(nonce)) {
+ vRecv >> nonce;
+
+ // Only process pong message if there is an outstanding ping (old ping without nonce should never pong)
+ if (pfrom->nPingNonceSent != 0) {
+ if (nonce == pfrom->nPingNonceSent) {
+ // Matching pong received, this ping is no longer outstanding
+ bPingFinished = true;
+ int64_t pingUsecTime = pingUsecEnd - pfrom->nPingUsecStart;
+ if (pingUsecTime > 0) {
+ // Successful ping time measurement, replace previous
+ pfrom->nPingUsecTime = pingUsecTime;
+ pfrom->nMinPingUsecTime = std::min(pfrom->nMinPingUsecTime, pingUsecTime);
+ } else {
+ // This should never happen
+ sProblem = "Timing mishap";
+ }
+ } else {
+ // Nonce mismatches are normal when pings are overlapping
+ sProblem = "Nonce mismatch";
+ if (nonce == 0) {
+ // This is most likely a bug in another implementation somewhere; cancel this ping
+ bPingFinished = true;
+ sProblem = "Nonce zero";
+ }
+ }
+ } else {
+ sProblem = "Unsolicited pong without ping";
+ }
+ } else {
+ // This is most likely a bug in another implementation somewhere; cancel this ping
+ bPingFinished = true;
+ sProblem = "Short payload";
+ }
+
+ if (!(sProblem.empty())) {
+ LogPrint("net", "pong peer=%d: %s, %x expected, %x received, %u bytes\n",
+ pfrom->id,
+ sProblem,
+ pfrom->nPingNonceSent,
+ nonce,
+ nAvail);
+ }
+ if (bPingFinished) {
+ pfrom->nPingNonceSent = 0;
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::FILTERLOAD)
+ {
+ CBloomFilter filter;
+ vRecv >> filter;
+
+ if (!filter.IsWithinSizeConstraints())
+ {
+ // There is no excuse for sending a too-large filter
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 100);
+ }
+ else
+ {
+ LOCK(pfrom->cs_filter);
+ delete pfrom->pfilter;
+ pfrom->pfilter = new CBloomFilter(filter);
+ pfrom->pfilter->UpdateEmptyFull();
+ pfrom->fRelayTxes = true;
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::FILTERADD)
+ {
+ vector<unsigned char> vData;
+ vRecv >> vData;
+
+ // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object,
+ // and thus, the maximum size any matched object can have) in a filteradd message
+ bool bad = false;
+ if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) {
+ bad = true;
+ } else {
+ LOCK(pfrom->cs_filter);
+ if (pfrom->pfilter) {
+ pfrom->pfilter->insert(vData);
+ } else {
+ bad = true;
+ }
+ }
+ if (bad) {
+ LOCK(cs_main);
+ Misbehaving(pfrom->GetId(), 100);
+ }
+ }
+
+
+ else if (strCommand == NetMsgType::FILTERCLEAR)
+ {
+ LOCK(pfrom->cs_filter);
+ if (pfrom->GetLocalServices() & NODE_BLOOM) {
+ delete pfrom->pfilter;
+ pfrom->pfilter = new CBloomFilter();
+ }
+ pfrom->fRelayTxes = true;
+ }
+
+
+ else if (strCommand == NetMsgType::REJECT)
+ {
+ if (fDebug) {
+ try {
+ string strMsg; unsigned char ccode; string strReason;
+ vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH);
+
+ ostringstream ss;
+ ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
+
+ if (strMsg == NetMsgType::BLOCK || strMsg == NetMsgType::TX)
+ {
+ uint256 hash;
+ vRecv >> hash;
+ ss << ": hash " << hash.ToString();
+ }
+ LogPrint("net", "Reject %s\n", SanitizeString(ss.str()));
+ } catch (const std::ios_base::failure&) {
+ // Avoid feedback loops by preventing reject messages from triggering a new reject message.
+ LogPrint("net", "Unparseable reject message received\n");
+ }
+ }
+ }
+
+ else if (strCommand == NetMsgType::FEEFILTER) {
+ CAmount newFeeFilter = 0;
+ vRecv >> newFeeFilter;
+ if (MoneyRange(newFeeFilter)) {
+ {
+ LOCK(pfrom->cs_feeFilter);
+ pfrom->minFeeFilter = newFeeFilter;
+ }
+ LogPrint("net", "received: feefilter of %s from peer=%d\n", CFeeRate(newFeeFilter).ToString(), pfrom->id);
+ }
+ }
+
+ else if (strCommand == NetMsgType::NOTFOUND) {
+ // We do not care about the NOTFOUND message, but logging an Unknown Command
+ // message would be undesirable as we transmit it ourselves.
+ }
+
+ else {
+ // Ignore unknown commands for extensibility
+ LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id);
+ }
+
+
+
+ return true;
+}
+
+bool ProcessMessages(CNode* pfrom, CConnman& connman, std::atomic<bool>& interruptMsgProc)
+{
+ const CChainParams& chainparams = Params();
+ //
+ // Message format
+ // (4) message start
+ // (12) command
+ // (4) size
+ // (4) checksum
+ // (x) data
+ //
+ bool fMoreWork = false;
+
+ if (!pfrom->vRecvGetData.empty())
+ ProcessGetData(pfrom, chainparams.GetConsensus(), connman, interruptMsgProc);
+
+ if (pfrom->fDisconnect)
+ return false;
+
+ // this maintains the order of responses
+ if (!pfrom->vRecvGetData.empty()) return true;
+
+ // Don't bother if send buffer is too full to respond anyway
+ if (pfrom->fPauseSend)
+ return false;
+
+ std::list<CNetMessage> msgs;
+ {
+ LOCK(pfrom->cs_vProcessMsg);
+ if (pfrom->vProcessMsg.empty())
+ return false;
+ // Just take one message
+ msgs.splice(msgs.begin(), pfrom->vProcessMsg, pfrom->vProcessMsg.begin());
+ pfrom->nProcessQueueSize -= msgs.front().vRecv.size() + CMessageHeader::HEADER_SIZE;
+ pfrom->fPauseRecv = pfrom->nProcessQueueSize > connman.GetReceiveFloodSize();
+ fMoreWork = !pfrom->vProcessMsg.empty();
+ }
+ CNetMessage& msg(msgs.front());
+
+ msg.SetVersion(pfrom->GetRecvVersion());
+ // Scan for message start
+ if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) {
+ LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id);
+ pfrom->fDisconnect = true;
+ return false;
+ }
+
+ // Read header
+ CMessageHeader& hdr = msg.hdr;
+ if (!hdr.IsValid(chainparams.MessageStart()))
+ {
+ LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->id);
+ return fMoreWork;
+ }
+ string strCommand = hdr.GetCommand();
+
+ // Message size
+ unsigned int nMessageSize = hdr.nMessageSize;
+
+ // Checksum
+ CDataStream& vRecv = msg.vRecv;
+ const uint256& hash = msg.GetMessageHash();
+ if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0)
+ {
+ LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR expected %s was %s\n", __func__,
+ SanitizeString(strCommand), nMessageSize,
+ HexStr(hash.begin(), hash.begin()+CMessageHeader::CHECKSUM_SIZE),
+ HexStr(hdr.pchChecksum, hdr.pchChecksum+CMessageHeader::CHECKSUM_SIZE));
+ return fMoreWork;
+ }
+
+ // Process message
+ bool fRet = false;
+ try
+ {
+ fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime, chainparams, connman, interruptMsgProc);
+ if (interruptMsgProc)
+ return false;
+ if (!pfrom->vRecvGetData.empty())
+ fMoreWork = true;
+ }
+ catch (const std::ios_base::failure& e)
+ {
+ connman.PushMessage(pfrom, CNetMsgMaker(INIT_PROTO_VERSION).Make(NetMsgType::REJECT, strCommand, REJECT_MALFORMED, string("error parsing message")));
+ if (strstr(e.what(), "end of data"))
+ {
+ // Allow exceptions from under-length message on vRecv
+ LogPrintf("%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
+ }
+ else if (strstr(e.what(), "size too large"))
+ {
+ // Allow exceptions from over-long size
+ LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
+ }
+ else if (strstr(e.what(), "non-canonical ReadCompactSize()"))
+ {
+ // Allow exceptions from non-canonical encoding
+ LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
+ }
+ else
+ {
+ PrintExceptionContinue(&e, "ProcessMessages()");
+ }
+ }
+ catch (const std::exception& e) {
+ PrintExceptionContinue(&e, "ProcessMessages()");
+ } catch (...) {
+ PrintExceptionContinue(NULL, "ProcessMessages()");
+ }
+
+ if (!fRet)
+ LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id);
+
+ return fMoreWork;
+}
+
+class CompareInvMempoolOrder
+{
+ CTxMemPool *mp;
+public:
+ CompareInvMempoolOrder(CTxMemPool *_mempool)
+ {
+ mp = _mempool;
+ }
+
+ bool operator()(std::set<uint256>::iterator a, std::set<uint256>::iterator b)
+ {
+ /* As std::make_heap produces a max-heap, we want the entries with the
+ * fewest ancestors/highest fee to sort later. */
+ return mp->CompareDepthAndScore(*b, *a);
+ }
+};
+
+bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interruptMsgProc)
+{
+ const Consensus::Params& consensusParams = Params().GetConsensus();
+ {
+ // Don't send anything until we get its version message
+ if (pto->nVersion == 0 || pto->fDisconnect)
+ return true;
+
+ // If we get here, the outgoing message serialization version is set and can't change.
+ CNetMsgMaker msgMaker(pto->GetSendVersion());
+
+ //
+ // Message: ping
+ //
+ bool pingSend = false;
+ if (pto->fPingQueued) {
+ // RPC ping request by user
+ pingSend = true;
+ }
+ if (pto->nPingNonceSent == 0 && pto->nPingUsecStart + PING_INTERVAL * 1000000 < GetTimeMicros()) {
+ // Ping automatically sent as a latency probe & keepalive.
+ pingSend = true;
+ }
+ if (pingSend) {
+ uint64_t nonce = 0;
+ while (nonce == 0) {
+ GetRandBytes((unsigned char*)&nonce, sizeof(nonce));
+ }
+ pto->fPingQueued = false;
+ pto->nPingUsecStart = GetTimeMicros();
+ if (pto->nVersion > BIP0031_VERSION) {
+ pto->nPingNonceSent = nonce;
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::PING, nonce));
+ } else {
+ // Peer is too old to support ping command with nonce, pong will never arrive.
+ pto->nPingNonceSent = 0;
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::PING));
+ }
+ }
+
+ TRY_LOCK(cs_main, lockMain); // Acquire cs_main for IsInitialBlockDownload() and CNodeState()
+ if (!lockMain)
+ return true;
+
+ CNodeState &state = *State(pto->GetId());
+
+ BOOST_FOREACH(const CBlockReject& reject, state.rejects)
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::REJECT, (string)NetMsgType::BLOCK, reject.chRejectCode, reject.strRejectReason, reject.hashBlock));
+ state.rejects.clear();
+
+ if (state.fShouldBan) {
+ state.fShouldBan = false;
+ if (pto->fWhitelisted)
+ LogPrintf("Warning: not punishing whitelisted peer %s!\n", pto->addr.ToString());
+ else if (pto->fAddnode)
+ LogPrintf("Warning: not punishing addnoded peer %s!\n", pto->addr.ToString());
+ else {
+ pto->fDisconnect = true;
+ if (pto->addr.IsLocal())
+ LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString());
+ else
+ {
+ connman.Ban(pto->addr, BanReasonNodeMisbehaving);
+ }
+ return true;
+ }
+ }
+
+ // Address refresh broadcast
+ int64_t nNow = GetTimeMicros();
+ if (!IsInitialBlockDownload() && pto->nNextLocalAddrSend < nNow) {
+ AdvertiseLocal(pto);
+ pto->nNextLocalAddrSend = PoissonNextSend(nNow, AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL);
+ }
+
+ //
+ // Message: addr
+ //
+ if (pto->nNextAddrSend < nNow) {
+ pto->nNextAddrSend = PoissonNextSend(nNow, AVG_ADDRESS_BROADCAST_INTERVAL);
+ vector<CAddress> vAddr;
+ vAddr.reserve(pto->vAddrToSend.size());
+ BOOST_FOREACH(const CAddress& addr, pto->vAddrToSend)
+ {
+ if (!pto->addrKnown.contains(addr.GetKey()))
+ {
+ pto->addrKnown.insert(addr.GetKey());
+ vAddr.push_back(addr);
+ // receiver rejects addr messages larger than 1000
+ if (vAddr.size() >= 1000)
+ {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::ADDR, vAddr));
+ vAddr.clear();
+ }
+ }
+ }
+ pto->vAddrToSend.clear();
+ if (!vAddr.empty())
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::ADDR, vAddr));
+ // we only send the big addr message once
+ if (pto->vAddrToSend.capacity() > 40)
+ pto->vAddrToSend.shrink_to_fit();
+ }
+
+ // Start block sync
+ if (pindexBestHeader == NULL)
+ pindexBestHeader = chainActive.Tip();
+ bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do.
+ if (!state.fSyncStarted && !pto->fClient && !fImporting && !fReindex) {
+ // Only actively request headers from a single peer, unless we're close to today.
+ if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) {
+ state.fSyncStarted = true;
+ nSyncStarted++;
+ const CBlockIndex *pindexStart = pindexBestHeader;
+ /* If possible, start at the block preceding the currently
+ best known header. This ensures that we always get a
+ non-empty list of headers back as long as the peer
+ is up-to-date. With a non-empty response, we can initialise
+ the peer's known best block. This wouldn't be possible
+ if we requested starting at pindexBestHeader and
+ got back an empty response. */
+ if (pindexStart->pprev)
+ pindexStart = pindexStart->pprev;
+ LogPrint("net", "initial getheaders (%d) to peer=%d (startheight:%d)\n", pindexStart->nHeight, pto->id, pto->nStartingHeight);
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexStart), uint256()));
+ }
+ }
+
+ // Resend wallet transactions that haven't gotten in a block yet
+ // Except during reindex, importing and IBD, when old wallet
+ // transactions become unconfirmed and spams other nodes.
+ if (!fReindex && !fImporting && !IsInitialBlockDownload())
+ {
+ GetMainSignals().Broadcast(nTimeBestReceived, &connman);
+ }
+
+ //
+ // Try sending block announcements via headers
+ //
+ {
+ // If we have less than MAX_BLOCKS_TO_ANNOUNCE in our
+ // list of block hashes we're relaying, and our peer wants
+ // headers announcements, then find the first header
+ // not yet known to our peer but would connect, and send.
+ // If no header would connect, or if we have too many
+ // blocks, or if the peer doesn't want headers, just
+ // add all to the inv queue.
+ LOCK(pto->cs_inventory);
+ vector<CBlock> vHeaders;
+ bool fRevertToInv = ((!state.fPreferHeaders &&
+ (!state.fPreferHeaderAndIDs || pto->vBlockHashesToAnnounce.size() > 1)) ||
+ pto->vBlockHashesToAnnounce.size() > MAX_BLOCKS_TO_ANNOUNCE);
+ const CBlockIndex *pBestIndex = NULL; // last header queued for delivery
+ ProcessBlockAvailability(pto->id); // ensure pindexBestKnownBlock is up-to-date
+
+ if (!fRevertToInv) {
+ bool fFoundStartingHeader = false;
+ // Try to find first header that our peer doesn't have, and
+ // then send all headers past that one. If we come across any
+ // headers that aren't on chainActive, give up.
+ BOOST_FOREACH(const uint256 &hash, pto->vBlockHashesToAnnounce) {
+ BlockMap::iterator mi = mapBlockIndex.find(hash);
+ assert(mi != mapBlockIndex.end());
+ const CBlockIndex *pindex = mi->second;
+ if (chainActive[pindex->nHeight] != pindex) {
+ // Bail out if we reorged away from this block
+ fRevertToInv = true;
+ break;
+ }
+ if (pBestIndex != NULL && pindex->pprev != pBestIndex) {
+ // This means that the list of blocks to announce don't
+ // connect to each other.
+ // This shouldn't really be possible to hit during
+ // regular operation (because reorgs should take us to
+ // a chain that has some block not on the prior chain,
+ // which should be caught by the prior check), but one
+ // way this could happen is by using invalidateblock /
+ // reconsiderblock repeatedly on the tip, causing it to
+ // be added multiple times to vBlockHashesToAnnounce.
+ // Robustly deal with this rare situation by reverting
+ // to an inv.
+ fRevertToInv = true;
+ break;
+ }
+ pBestIndex = pindex;
+ if (fFoundStartingHeader) {
+ // add this to the headers message
+ vHeaders.push_back(pindex->GetBlockHeader());
+ } else if (PeerHasHeader(&state, pindex)) {
+ continue; // keep looking for the first new block
+ } else if (pindex->pprev == NULL || PeerHasHeader(&state, pindex->pprev)) {
+ // Peer doesn't have this header but they do have the prior one.
+ // Start sending headers.
+ fFoundStartingHeader = true;
+ vHeaders.push_back(pindex->GetBlockHeader());
+ } else {
+ // Peer doesn't have this header or the prior one -- nothing will
+ // connect, so bail out.
+ fRevertToInv = true;
+ break;
+ }
+ }
+ }
+ if (!fRevertToInv && !vHeaders.empty()) {
+ if (vHeaders.size() == 1 && state.fPreferHeaderAndIDs) {
+ // We only send up to 1 block as header-and-ids, as otherwise
+ // probably means we're doing an initial-ish-sync or they're slow
+ LogPrint("net", "%s sending header-and-ids %s to peer=%d\n", __func__,
+ vHeaders.front().GetHash().ToString(), pto->id);
+
+ int nSendFlags = state.fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
+
+ bool fGotBlockFromCache = false;
+ {
+ LOCK(cs_most_recent_block);
+ if (most_recent_block_hash == pBestIndex->GetBlockHash()) {
+ if (state.fWantsCmpctWitness)
+ connman.PushMessage(pto, msgMaker.Make(nSendFlags, NetMsgType::CMPCTBLOCK, *most_recent_compact_block));
+ else {
+ CBlockHeaderAndShortTxIDs cmpctblock(*most_recent_block, state.fWantsCmpctWitness);
+ connman.PushMessage(pto, msgMaker.Make(nSendFlags, NetMsgType::CMPCTBLOCK, cmpctblock));
+ }
+ fGotBlockFromCache = true;
+ }
+ }
+ if (!fGotBlockFromCache) {
+ CBlock block;
+ bool ret = ReadBlockFromDisk(block, pBestIndex, consensusParams);
+ assert(ret);
+ CBlockHeaderAndShortTxIDs cmpctblock(block, state.fWantsCmpctWitness);
+ connman.PushMessage(pto, msgMaker.Make(nSendFlags, NetMsgType::CMPCTBLOCK, cmpctblock));
+ }
+ state.pindexBestHeaderSent = pBestIndex;
+ } else if (state.fPreferHeaders) {
+ if (vHeaders.size() > 1) {
+ LogPrint("net", "%s: %u headers, range (%s, %s), to peer=%d\n", __func__,
+ vHeaders.size(),
+ vHeaders.front().GetHash().ToString(),
+ vHeaders.back().GetHash().ToString(), pto->id);
+ } else {
+ LogPrint("net", "%s: sending header %s to peer=%d\n", __func__,
+ vHeaders.front().GetHash().ToString(), pto->id);
+ }
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::HEADERS, vHeaders));
+ state.pindexBestHeaderSent = pBestIndex;
+ } else
+ fRevertToInv = true;
+ }
+ if (fRevertToInv) {
+ // If falling back to using an inv, just try to inv the tip.
+ // The last entry in vBlockHashesToAnnounce was our tip at some point
+ // in the past.
+ if (!pto->vBlockHashesToAnnounce.empty()) {
+ const uint256 &hashToAnnounce = pto->vBlockHashesToAnnounce.back();
+ BlockMap::iterator mi = mapBlockIndex.find(hashToAnnounce);
+ assert(mi != mapBlockIndex.end());
+ const CBlockIndex *pindex = mi->second;
+
+ // Warn if we're announcing a block that is not on the main chain.
+ // This should be very rare and could be optimized out.
+ // Just log for now.
+ if (chainActive[pindex->nHeight] != pindex) {
+ LogPrint("net", "Announcing block %s not on main chain (tip=%s)\n",
+ hashToAnnounce.ToString(), chainActive.Tip()->GetBlockHash().ToString());
+ }
+
+ // If the peer's chain has this block, don't inv it back.
+ if (!PeerHasHeader(&state, pindex)) {
+ pto->PushInventory(CInv(MSG_BLOCK, hashToAnnounce));
+ LogPrint("net", "%s: sending inv peer=%d hash=%s\n", __func__,
+ pto->id, hashToAnnounce.ToString());
+ }
+ }
+ }
+ pto->vBlockHashesToAnnounce.clear();
+ }
+
+ //
+ // Message: inventory
+ //
+ vector<CInv> vInv;
+ {
+ LOCK(pto->cs_inventory);
+ vInv.reserve(std::max<size_t>(pto->vInventoryBlockToSend.size(), INVENTORY_BROADCAST_MAX));
+
+ // Add blocks
+ BOOST_FOREACH(const uint256& hash, pto->vInventoryBlockToSend) {
+ vInv.push_back(CInv(MSG_BLOCK, hash));
+ if (vInv.size() == MAX_INV_SZ) {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::INV, vInv));
+ vInv.clear();
+ }
+ }
+ pto->vInventoryBlockToSend.clear();
+
+ // Check whether periodic sends should happen
+ bool fSendTrickle = pto->fWhitelisted;
+ if (pto->nNextInvSend < nNow) {
+ fSendTrickle = true;
+ // Use half the delay for outbound peers, as there is less privacy concern for them.
+ pto->nNextInvSend = PoissonNextSend(nNow, INVENTORY_BROADCAST_INTERVAL >> !pto->fInbound);
+ }
+
+ // Time to send but the peer has requested we not relay transactions.
+ if (fSendTrickle) {
+ LOCK(pto->cs_filter);
+ if (!pto->fRelayTxes) pto->setInventoryTxToSend.clear();
+ }
+
+ // Respond to BIP35 mempool requests
+ if (fSendTrickle && pto->fSendMempool) {
+ auto vtxinfo = mempool.infoAll();
+ pto->fSendMempool = false;
+ CAmount filterrate = 0;
+ {
+ LOCK(pto->cs_feeFilter);
+ filterrate = pto->minFeeFilter;
+ }
+
+ LOCK(pto->cs_filter);
+
+ for (const auto& txinfo : vtxinfo) {
+ const uint256& hash = txinfo.tx->GetHash();
+ CInv inv(MSG_TX, hash);
+ pto->setInventoryTxToSend.erase(hash);
+ if (filterrate) {
+ if (txinfo.feeRate.GetFeePerK() < filterrate)
+ continue;
+ }
+ if (pto->pfilter) {
+ if (!pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) continue;
+ }
+ pto->filterInventoryKnown.insert(hash);
+ vInv.push_back(inv);
+ if (vInv.size() == MAX_INV_SZ) {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::INV, vInv));
+ vInv.clear();
+ }
+ }
+ pto->timeLastMempoolReq = GetTime();
+ }
+
+ // Determine transactions to relay
+ if (fSendTrickle) {
+ // Produce a vector with all candidates for sending
+ vector<std::set<uint256>::iterator> vInvTx;
+ vInvTx.reserve(pto->setInventoryTxToSend.size());
+ for (std::set<uint256>::iterator it = pto->setInventoryTxToSend.begin(); it != pto->setInventoryTxToSend.end(); it++) {
+ vInvTx.push_back(it);
+ }
+ CAmount filterrate = 0;
+ {
+ LOCK(pto->cs_feeFilter);
+ filterrate = pto->minFeeFilter;
+ }
+ // Topologically and fee-rate sort the inventory we send for privacy and priority reasons.
+ // A heap is used so that not all items need sorting if only a few are being sent.
+ CompareInvMempoolOrder compareInvMempoolOrder(&mempool);
+ std::make_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
+ // No reason to drain out at many times the network's capacity,
+ // especially since we have many peers and some will draw much shorter delays.
+ unsigned int nRelayedTransactions = 0;
+ LOCK(pto->cs_filter);
+ while (!vInvTx.empty() && nRelayedTransactions < INVENTORY_BROADCAST_MAX) {
+ // Fetch the top element from the heap
+ std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
+ std::set<uint256>::iterator it = vInvTx.back();
+ vInvTx.pop_back();
+ uint256 hash = *it;
+ // Remove it from the to-be-sent set
+ pto->setInventoryTxToSend.erase(it);
+ // Check if not in the filter already
+ if (pto->filterInventoryKnown.contains(hash)) {
+ continue;
+ }
+ // Not in the mempool anymore? don't bother sending it.
+ auto txinfo = mempool.info(hash);
+ if (!txinfo.tx) {
+ continue;
+ }
+ if (filterrate && txinfo.feeRate.GetFeePerK() < filterrate) {
+ continue;
+ }
+ if (pto->pfilter && !pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) continue;
+ // Send
+ vInv.push_back(CInv(MSG_TX, hash));
+ nRelayedTransactions++;
+ {
+ // Expire old relay messages
+ while (!vRelayExpiration.empty() && vRelayExpiration.front().first < nNow)
+ {
+ mapRelay.erase(vRelayExpiration.front().second);
+ vRelayExpiration.pop_front();
+ }
+
+ auto ret = mapRelay.insert(std::make_pair(hash, std::move(txinfo.tx)));
+ if (ret.second) {
+ vRelayExpiration.push_back(std::make_pair(nNow + 15 * 60 * 1000000, ret.first));
+ }
+ }
+ if (vInv.size() == MAX_INV_SZ) {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::INV, vInv));
+ vInv.clear();
+ }
+ pto->filterInventoryKnown.insert(hash);
+ }
+ }
+ }
+ if (!vInv.empty())
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::INV, vInv));
+
+ // Detect whether we're stalling
+ nNow = GetTimeMicros();
+ if (state.nStallingSince && state.nStallingSince < nNow - 1000000 * BLOCK_STALLING_TIMEOUT) {
+ // Stalling only triggers when the block download window cannot move. During normal steady state,
+ // the download window should be much larger than the to-be-downloaded set of blocks, so disconnection
+ // should only happen during initial block download.
+ LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id);
+ pto->fDisconnect = true;
+ return true;
+ }
+ // In case there is a block that has been in flight from this peer for 2 + 0.5 * N times the block interval
+ // (with N the number of peers from which we're downloading validated blocks), disconnect due to timeout.
+ // We compensate for other peers to prevent killing off peers due to our own downstream link
+ // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
+ // to unreasonably increase our timeout.
+ if (state.vBlocksInFlight.size() > 0) {
+ QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
+ int nOtherPeersWithValidatedDownloads = nPeersWithValidatedDownloads - (state.nBlocksInFlightValidHeaders > 0);
+ if (nNow > state.nDownloadingSince + consensusParams.nPowTargetSpacing * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) {
+ LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id);
+ pto->fDisconnect = true;
+ return true;
+ }
+ }
+
+ //
+ // Message: getdata (blocks)
+ //
+ vector<CInv> vGetData;
+ if (!pto->fClient && (fFetch || !IsInitialBlockDownload()) && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
+ vector<const CBlockIndex*> vToDownload;
+ NodeId staller = -1;
+ FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller, consensusParams);
+ BOOST_FOREACH(const CBlockIndex *pindex, vToDownload) {
+ uint32_t nFetchFlags = GetFetchFlags(pto, pindex->pprev, consensusParams);
+ vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
+ MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex);
+ LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
+ pindex->nHeight, pto->id);
+ }
+ if (state.nBlocksInFlight == 0 && staller != -1) {
+ if (State(staller)->nStallingSince == 0) {
+ State(staller)->nStallingSince = nNow;
+ LogPrint("net", "Stall started peer=%d\n", staller);
+ }
+ }
+ }
+
+ //
+ // Message: getdata (non-blocks)
+ //
+ while (!pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow)
+ {
+ const CInv& inv = (*pto->mapAskFor.begin()).second;
+ if (!AlreadyHave(inv))
+ {
+ if (fDebug)
+ LogPrint("net", "Requesting %s peer=%d\n", inv.ToString(), pto->id);
+ vGetData.push_back(inv);
+ if (vGetData.size() >= 1000)
+ {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::GETDATA, vGetData));
+ vGetData.clear();
+ }
+ } else {
+ //If we're not going to ask, don't expect a response.
+ pto->setAskFor.erase(inv.hash);
+ }
+ pto->mapAskFor.erase(pto->mapAskFor.begin());
+ }
+ if (!vGetData.empty())
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::GETDATA, vGetData));
+
+ //
+ // Message: feefilter
+ //
+ // We don't want white listed peers to filter txs to us if we have -whitelistforcerelay
+ if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
+ !(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) {
+ CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
+ int64_t timeNow = GetTimeMicros();
+ if (timeNow > pto->nextSendTimeFeeFilter) {
+ static CFeeRate default_feerate(DEFAULT_MIN_RELAY_TX_FEE);
+ static FeeFilterRounder filterRounder(default_feerate);
+ CAmount filterToSend = filterRounder.round(currentFilter);
+ // If we don't allow free transactions, then we always have a fee filter of at least minRelayTxFee
+ if (GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
+ filterToSend = std::max(filterToSend, ::minRelayTxFee.GetFeePerK());
+ if (filterToSend != pto->lastSentFeeFilter) {
+ connman.PushMessage(pto, msgMaker.Make(NetMsgType::FEEFILTER, filterToSend));
+ pto->lastSentFeeFilter = filterToSend;
+ }
+ pto->nextSendTimeFeeFilter = PoissonNextSend(timeNow, AVG_FEEFILTER_BROADCAST_INTERVAL);
+ }
+ // If the fee filter has changed substantially and it's still more than MAX_FEEFILTER_CHANGE_DELAY
+ // until scheduled broadcast, then move the broadcast to within MAX_FEEFILTER_CHANGE_DELAY.
+ else if (timeNow + MAX_FEEFILTER_CHANGE_DELAY * 1000000 < pto->nextSendTimeFeeFilter &&
+ (currentFilter < 3 * pto->lastSentFeeFilter / 4 || currentFilter > 4 * pto->lastSentFeeFilter / 3)) {
+ pto->nextSendTimeFeeFilter = timeNow + GetRandInt(MAX_FEEFILTER_CHANGE_DELAY) * 1000000;
+ }
+ }
+ }
+ return true;
+}
+
+class CNetProcessingCleanup
+{
+public:
+ CNetProcessingCleanup() {}
+ ~CNetProcessingCleanup() {
+ // orphan transactions
+ mapOrphanTransactions.clear();
+ mapOrphanTransactionsByPrev.clear();
+ }
+} instance_of_cnetprocessingcleanup;
diff --git a/src/net_processing.h b/src/net_processing.h
new file mode 100644
index 0000000000..7351c0e99c
--- /dev/null
+++ b/src/net_processing.h
@@ -0,0 +1,63 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_NET_PROCESSING_H
+#define BITCOIN_NET_PROCESSING_H
+
+#include "net.h"
+#include "validationinterface.h"
+
+/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
+static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
+/** Expiration time for orphan transactions in seconds */
+static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
+/** Minimum time between orphan transactions expire time checks in seconds */
+static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
+/** Default number of orphan+recently-replaced txn to keep around for block reconstruction */
+static const unsigned int DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN = 100;
+
+/** Register with a network node to receive its signals */
+void RegisterNodeSignals(CNodeSignals& nodeSignals);
+/** Unregister a network node */
+void UnregisterNodeSignals(CNodeSignals& nodeSignals);
+
+class PeerLogicValidation : public CValidationInterface {
+private:
+ CConnman* connman;
+
+public:
+ PeerLogicValidation(CConnman* connmanIn);
+
+ virtual void SyncTransaction(const CTransaction& tx, const CBlockIndex* pindex, int nPosInBlock);
+ virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload);
+ virtual void BlockChecked(const CBlock& block, const CValidationState& state);
+ virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock);
+};
+
+struct CNodeStateStats {
+ int nMisbehavior;
+ int nSyncHeight;
+ int nCommonHeight;
+ std::vector<int> vHeightInFlight;
+};
+
+/** Get statistics from node state */
+bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
+/** Increase a node's misbehavior score. */
+void Misbehaving(NodeId nodeid, int howmuch);
+
+/** Process protocol messages received from a given node */
+bool ProcessMessages(CNode* pfrom, CConnman& connman, std::atomic<bool>& interrupt);
+/**
+ * Send queued protocol messages to be sent to a give node.
+ *
+ * @param[in] pto The node which we are sending messages to.
+ * @param[in] connman The connection manager for that node.
+ * @param[in] interrupt Interrupt condition for processing threads
+ * @return True if there is more work to be done
+ */
+bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interrupt);
+
+#endif // BITCOIN_NET_PROCESSING_H
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index db5cc3bc20..ab07270f3f 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/netaddress.h b/src/netaddress.h
index 9330fe3328..bc430dd823 100644
--- a/src/netaddress.h
+++ b/src/netaddress.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -85,7 +85,7 @@ class CNetAddr
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(FLATDATA(ip));
}
@@ -122,7 +122,7 @@ class CSubNet
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(network);
READWRITE(FLATDATA(netmask));
READWRITE(FLATDATA(valid));
@@ -159,7 +159,7 @@ class CService : public CNetAddr
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(FLATDATA(ip));
unsigned short portN = htons(port);
READWRITE(FLATDATA(portN));
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 9fe34108f5..8fd2a8efd2 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -16,20 +16,14 @@
#include "util.h"
#include "utilstrencodings.h"
-#ifdef HAVE_GETADDRINFO_A
-#include <netdb.h>
-#endif
+#include <atomic>
#ifndef WIN32
-#if HAVE_INET_PTON
-#include <arpa/inet.h>
-#endif
#include <fcntl.h>
#endif
#include <boost/algorithm/string/case_conv.hpp> // for to_lower()
#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith()
-#include <boost/thread.hpp>
#if !defined(HAVE_MSG_NOSIGNAL) && !defined(MSG_NOSIGNAL)
#define MSG_NOSIGNAL 0
@@ -44,6 +38,7 @@ bool fNameLookup = DEFAULT_NAME_LOOKUP;
// Need ample time for negotiation for very slow proxies such as Tor (milliseconds)
static const int SOCKS5_RECV_TIMEOUT = 20 * 1000;
+static std::atomic<bool> interruptSocks5Recv(false);
enum Network ParseNetwork(std::string net) {
boost::to_lower(net);
@@ -94,30 +89,9 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
}
}
-#ifdef HAVE_GETADDRINFO_A
- struct in_addr ipv4_addr;
-#ifdef HAVE_INET_PTON
- if (inet_pton(AF_INET, pszName, &ipv4_addr) > 0) {
- vIP.push_back(CNetAddr(ipv4_addr));
- return true;
- }
-
- struct in6_addr ipv6_addr;
- if (inet_pton(AF_INET6, pszName, &ipv6_addr) > 0) {
- vIP.push_back(CNetAddr(ipv6_addr));
- return true;
- }
-#else
- ipv4_addr.s_addr = inet_addr(pszName);
- if (ipv4_addr.s_addr != INADDR_NONE) {
- vIP.push_back(CNetAddr(ipv4_addr));
- return true;
- }
-#endif
-#endif
-
struct addrinfo aiHint;
memset(&aiHint, 0, sizeof(struct addrinfo));
+
aiHint.ai_socktype = SOCK_STREAM;
aiHint.ai_protocol = IPPROTO_TCP;
aiHint.ai_family = AF_UNSPEC;
@@ -126,33 +100,8 @@ bool static LookupIntern(const char *pszName, std::vector<CNetAddr>& vIP, unsign
#else
aiHint.ai_flags = fAllowLookup ? AI_ADDRCONFIG : AI_NUMERICHOST;
#endif
-
struct addrinfo *aiRes = NULL;
-#ifdef HAVE_GETADDRINFO_A
- struct gaicb gcb, *query = &gcb;
- memset(query, 0, sizeof(struct gaicb));
- gcb.ar_name = pszName;
- gcb.ar_request = &aiHint;
- int nErr = getaddrinfo_a(GAI_NOWAIT, &query, 1, NULL);
- if (nErr)
- return false;
-
- do {
- // Should set the timeout limit to a reasonable value to avoid
- // generating unnecessary checking call during the polling loop,
- // while it can still response to stop request quick enough.
- // 2 seconds looks fine in our situation.
- struct timespec ts = { 2, 0 };
- gai_suspend(&query, 1, &ts);
- boost::this_thread::interruption_point();
-
- nErr = gai_error(query);
- if (0 == nErr)
- aiRes = query->ar_result;
- } while (nErr == EAI_INPROGRESS);
-#else
int nErr = getaddrinfo(pszName, NULL, &aiHint, &aiRes);
-#endif
if (nErr)
return false;
@@ -252,7 +201,7 @@ struct timeval MillisToTimeval(int64_t nTimeout)
/**
* Read bytes from socket. This will either read the full number of bytes requested
* or return False on error or timeout.
- * This function can be interrupted by boost thread interrupt.
+ * This function can be interrupted by calling InterruptSocks5()
*
* @param data Buffer to receive into
* @param len Length of data to receive
@@ -292,7 +241,8 @@ bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSock
return false;
}
}
- boost::this_thread::interruption_point();
+ if (interruptSocks5Recv)
+ return false;
curTime = GetTimeMillis();
}
return len == 0;
@@ -338,7 +288,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
vSocks5Init.push_back(0x01); // # METHODS
vSocks5Init.push_back(0x00); // X'00' NO AUTHENTICATION REQUIRED
}
- ssize_t ret = send(hSocket, (const char*)begin_ptr(vSocks5Init), vSocks5Init.size(), MSG_NOSIGNAL);
+ ssize_t ret = send(hSocket, (const char*)vSocks5Init.data(), vSocks5Init.size(), MSG_NOSIGNAL);
if (ret != (ssize_t)vSocks5Init.size()) {
CloseSocket(hSocket);
return error("Error sending to proxy");
@@ -363,7 +313,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
vAuth.insert(vAuth.end(), auth->username.begin(), auth->username.end());
vAuth.push_back(auth->password.size());
vAuth.insert(vAuth.end(), auth->password.begin(), auth->password.end());
- ret = send(hSocket, (const char*)begin_ptr(vAuth), vAuth.size(), MSG_NOSIGNAL);
+ ret = send(hSocket, (const char*)vAuth.data(), vAuth.size(), MSG_NOSIGNAL);
if (ret != (ssize_t)vAuth.size()) {
CloseSocket(hSocket);
return error("Error sending authentication to proxy");
@@ -393,7 +343,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
vSocks5.insert(vSocks5.end(), strDest.begin(), strDest.end());
vSocks5.push_back((port >> 8) & 0xFF);
vSocks5.push_back((port >> 0) & 0xFF);
- ret = send(hSocket, (const char*)begin_ptr(vSocks5), vSocks5.size(), MSG_NOSIGNAL);
+ ret = send(hSocket, (const char*)vSocks5.data(), vSocks5.size(), MSG_NOSIGNAL);
if (ret != (ssize_t)vSocks5.size()) {
CloseSocket(hSocket);
return error("Error sending to proxy");
@@ -761,3 +711,8 @@ bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking)
return true;
}
+
+void InterruptSocks5(bool interrupt)
+{
+ interruptSocks5Recv = interrupt;
+}
diff --git a/src/netbase.h b/src/netbase.h
index eb39d16578..dd33b6e47e 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -63,5 +63,6 @@ bool SetSocketNonBlocking(SOCKET& hSocket, bool fNonBlocking);
* Convert milliseconds to a struct timeval for e.g. select.
*/
struct timeval MillisToTimeval(int64_t nTimeout);
+void InterruptSocks5(bool interrupt);
#endif // BITCOIN_NETBASE_H
diff --git a/src/netmessagemaker.h b/src/netmessagemaker.h
new file mode 100644
index 0000000000..7167434a19
--- /dev/null
+++ b/src/netmessagemaker.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_NETMESSAGEMAKER_H
+#define BITCOIN_NETMESSAGEMAKER_H
+
+#include "net.h"
+#include "serialize.h"
+
+class CNetMsgMaker
+{
+public:
+ CNetMsgMaker(int nVersionIn) : nVersion(nVersionIn){}
+
+ template <typename... Args>
+ CSerializedNetMsg Make(int nFlags, std::string sCommand, Args&&... args)
+ {
+ CSerializedNetMsg msg;
+ msg.command = std::move(sCommand);
+ CVectorWriter{ SER_NETWORK, nFlags | nVersion, msg.data, 0, std::forward<Args>(args)... };
+ return msg;
+ }
+
+ template <typename... Args>
+ CSerializedNetMsg Make(std::string sCommand, Args&&... args)
+ {
+ return Make(0, std::move(sCommand), std::forward<Args>(args)...);
+ }
+
+private:
+ const int nVersion;
+};
+
+#endif // BITCOIN_NETMESSAGEMAKER_H
diff --git a/src/noui.cpp b/src/noui.cpp
index 0d9207c11a..4bfb75fa29 100644
--- a/src/noui.cpp
+++ b/src/noui.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp
index c07cd2eff8..5407aefb45 100644
--- a/src/policy/fees.cpp
+++ b/src/policy/fees.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,10 +14,9 @@
#include "util.h"
void TxConfirmStats::Initialize(std::vector<double>& defaultBuckets,
- unsigned int maxConfirms, double _decay, std::string _dataTypeString)
+ unsigned int maxConfirms, double _decay)
{
decay = _decay;
- dataTypeString = _dataTypeString;
for (unsigned int i = 0; i < defaultBuckets.size(); i++) {
buckets.push_back(defaultBuckets[i]);
bucketMap[defaultBuckets[i]] = i;
@@ -87,10 +86,10 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
int maxbucketindex = buckets.size() - 1;
- // requireGreater means we are looking for the lowest fee/priority such that all higher
- // values pass, so we start at maxbucketindex (highest fee) and look at successively
+ // requireGreater means we are looking for the lowest feerate such that all higher
+ // values pass, so we start at maxbucketindex (highest feerate) and look at successively
// smaller buckets until we reach failure. Otherwise, we are looking for the highest
- // fee/priority such that all lower values fail, and we go in the opposite direction.
+ // feerate such that all lower values fail, and we go in the opposite direction.
unsigned int startbucket = requireGreater ? maxbucketindex : 0;
int step = requireGreater ? -1 : 1;
@@ -107,7 +106,7 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
bool foundAnswer = false;
unsigned int bins = unconfTxs.size();
- // Start counting from highest(default) or lowest fee/pri transactions
+ // Start counting from highest(default) or lowest feerate transactions
for (int bucket = startbucket; bucket >= 0 && bucket <= maxbucketindex; bucket += step) {
curFarBucket = bucket;
nConf += confAvg[confTarget - 1][bucket];
@@ -145,8 +144,8 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
double median = -1;
double txSum = 0;
- // Calculate the "average" fee of the best bucket range that met success conditions
- // Find the bucket with the median transaction and then report the average fee from that bucket
+ // Calculate the "average" feerate of the best bucket range that met success conditions
+ // Find the bucket with the median transaction and then report the average feerate from that bucket
// This is a compromise between finding the median which we can't since we don't save all tx's
// and reporting the average which is less accurate
unsigned int minBucket = bestNearBucket < bestFarBucket ? bestNearBucket : bestFarBucket;
@@ -166,8 +165,8 @@ double TxConfirmStats::EstimateMedianVal(int confTarget, double sufficientTxVal,
}
}
- LogPrint("estimatefee", "%3d: For conf success %s %4.2f need %s %s: %12.5g from buckets %8g - %8g Cur Bucket stats %6.2f%% %8.1f/(%.1f+%d mempool)\n",
- confTarget, requireGreater ? ">" : "<", successBreakPoint, dataTypeString,
+ LogPrint("estimatefee", "%3d: For conf success %s %4.2f need feerate %s: %12.5g from buckets %8g - %8g Cur Bucket stats %6.2f%% %8.1f/(%.1f+%d mempool)\n",
+ confTarget, requireGreater ? ">" : "<", successBreakPoint,
requireGreater ? ">" : "<", median, buckets[minBucket], buckets[maxBucket],
100 * nConf / (totalNum + extraNum), nConf, totalNum, extraNum);
@@ -200,10 +199,10 @@ void TxConfirmStats::Read(CAutoFile& filein)
filein >> fileBuckets;
numBuckets = fileBuckets.size();
if (numBuckets <= 1 || numBuckets > 1000)
- throw std::runtime_error("Corrupt estimates file. Must have between 2 and 1000 fee/pri buckets");
+ throw std::runtime_error("Corrupt estimates file. Must have between 2 and 1000 feerate buckets");
filein >> fileAvg;
if (fileAvg.size() != numBuckets)
- throw std::runtime_error("Corrupt estimates file. Mismatch in fee/pri average bucket count");
+ throw std::runtime_error("Corrupt estimates file. Mismatch in feerate average bucket count");
filein >> fileTxCtAvg;
if (fileTxCtAvg.size() != numBuckets)
throw std::runtime_error("Corrupt estimates file. Mismatch in tx count bucket count");
@@ -213,9 +212,9 @@ void TxConfirmStats::Read(CAutoFile& filein)
throw std::runtime_error("Corrupt estimates file. Must maintain estimates for between 1 and 1008 (one week) confirms");
for (unsigned int i = 0; i < maxConfirms; i++) {
if (fileConfAvg[i].size() != numBuckets)
- throw std::runtime_error("Corrupt estimates file. Mismatch in fee/pri conf average bucket count");
+ throw std::runtime_error("Corrupt estimates file. Mismatch in feerate conf average bucket count");
}
- // Now that we've processed the entire fee estimate data file and not
+ // Now that we've processed the entire feerate estimate data file and not
// thrown any errors, we can copy it to our data structures
decay = fileDecay;
buckets = fileBuckets;
@@ -242,8 +241,8 @@ void TxConfirmStats::Read(CAutoFile& filein)
for (unsigned int i = 0; i < buckets.size(); i++)
bucketMap[buckets[i]] = i;
- LogPrint("estimatefee", "Reading estimates: %u %s buckets counting confirms up to %u blocks\n",
- numBuckets, dataTypeString, maxConfirms);
+ LogPrint("estimatefee", "Reading estimates: %u buckets counting confirms up to %u blocks\n",
+ numBuckets, maxConfirms);
}
unsigned int TxConfirmStats::NewTx(unsigned int nBlockHeight, double val)
@@ -251,7 +250,6 @@ unsigned int TxConfirmStats::NewTx(unsigned int nBlockHeight, double val)
unsigned int bucketindex = bucketMap.lower_bound(val)->second;
unsigned int blockIndex = nBlockHeight % unconfTxs.size();
unconfTxs[blockIndex][bucketindex]++;
- LogPrint("estimatefee", "adding to %s", dataTypeString);
return bucketindex;
}
@@ -283,159 +281,96 @@ void TxConfirmStats::removeTx(unsigned int entryHeight, unsigned int nBestSeenHe
}
}
-void CBlockPolicyEstimator::removeTx(uint256 hash)
+// This function is called from CTxMemPool::removeUnchecked to ensure
+// txs removed from the mempool for any reason are no longer
+// tracked. Txs that were part of a block have already been removed in
+// processBlockTx to ensure they are never double tracked, but it is
+// of no harm to try to remove them again.
+bool CBlockPolicyEstimator::removeTx(uint256 hash)
{
std::map<uint256, TxStatsInfo>::iterator pos = mapMemPoolTxs.find(hash);
- if (pos == mapMemPoolTxs.end()) {
- LogPrint("estimatefee", "Blockpolicy error mempool tx %s not found for removeTx\n",
- hash.ToString().c_str());
- return;
+ if (pos != mapMemPoolTxs.end()) {
+ feeStats.removeTx(pos->second.blockHeight, nBestSeenHeight, pos->second.bucketIndex);
+ mapMemPoolTxs.erase(hash);
+ return true;
+ } else {
+ return false;
}
- TxConfirmStats *stats = pos->second.stats;
- unsigned int entryHeight = pos->second.blockHeight;
- unsigned int bucketIndex = pos->second.bucketIndex;
-
- if (stats != NULL)
- stats->removeTx(entryHeight, nBestSeenHeight, bucketIndex);
- mapMemPoolTxs.erase(hash);
}
CBlockPolicyEstimator::CBlockPolicyEstimator(const CFeeRate& _minRelayFee)
- : nBestSeenHeight(0)
+ : nBestSeenHeight(0), trackedTxs(0), untrackedTxs(0)
{
+ static_assert(MIN_FEERATE > 0, "Min feerate must be nonzero");
minTrackedFee = _minRelayFee < CFeeRate(MIN_FEERATE) ? CFeeRate(MIN_FEERATE) : _minRelayFee;
std::vector<double> vfeelist;
for (double bucketBoundary = minTrackedFee.GetFeePerK(); bucketBoundary <= MAX_FEERATE; bucketBoundary *= FEE_SPACING) {
vfeelist.push_back(bucketBoundary);
}
vfeelist.push_back(INF_FEERATE);
- feeStats.Initialize(vfeelist, MAX_BLOCK_CONFIRMS, DEFAULT_DECAY, "FeeRate");
-
- minTrackedPriority = AllowFreeThreshold() < MIN_PRIORITY ? MIN_PRIORITY : AllowFreeThreshold();
- std::vector<double> vprilist;
- for (double bucketBoundary = minTrackedPriority; bucketBoundary <= MAX_PRIORITY; bucketBoundary *= PRI_SPACING) {
- vprilist.push_back(bucketBoundary);
- }
- vprilist.push_back(INF_PRIORITY);
- priStats.Initialize(vprilist, MAX_BLOCK_CONFIRMS, DEFAULT_DECAY, "Priority");
-
- feeUnlikely = CFeeRate(0);
- feeLikely = CFeeRate(INF_FEERATE);
- priUnlikely = 0;
- priLikely = INF_PRIORITY;
+ feeStats.Initialize(vfeelist, MAX_BLOCK_CONFIRMS, DEFAULT_DECAY);
}
-bool CBlockPolicyEstimator::isFeeDataPoint(const CFeeRate &fee, double pri)
-{
- if ((pri < minTrackedPriority && fee >= minTrackedFee) ||
- (pri < priUnlikely && fee > feeLikely)) {
- return true;
- }
- return false;
-}
-
-bool CBlockPolicyEstimator::isPriDataPoint(const CFeeRate &fee, double pri)
-{
- if ((fee < minTrackedFee && pri >= minTrackedPriority) ||
- (fee < feeUnlikely && pri > priLikely)) {
- return true;
- }
- return false;
-}
-
-void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate)
+void CBlockPolicyEstimator::processTransaction(const CTxMemPoolEntry& entry, bool validFeeEstimate)
{
unsigned int txHeight = entry.GetHeight();
uint256 hash = entry.GetTx().GetHash();
- if (mapMemPoolTxs[hash].stats != NULL) {
+ if (mapMemPoolTxs.count(hash)) {
LogPrint("estimatefee", "Blockpolicy error mempool tx %s already being tracked\n",
hash.ToString().c_str());
return;
}
- if (txHeight < nBestSeenHeight) {
+ if (txHeight != nBestSeenHeight) {
// Ignore side chains and re-orgs; assuming they are random they don't
// affect the estimate. We'll potentially double count transactions in 1-block reorgs.
+ // Ignore txs if BlockPolicyEstimator is not in sync with chainActive.Tip().
+ // It will be synced next time a block is processed.
return;
}
// Only want to be updating estimates when our blockchain is synced,
// otherwise we'll miscalculate how many blocks its taking to get included.
- if (!fCurrentEstimate)
- return;
-
- if (!entry.WasClearAtEntry()) {
- // This transaction depends on other transactions in the mempool to
- // be included in a block before it will be able to be included, so
- // we shouldn't include it in our calculations
+ if (!validFeeEstimate) {
+ untrackedTxs++;
return;
}
+ trackedTxs++;
- // Fees are stored and reported as BTC-per-kb:
+ // Feerates are stored and reported as BTC-per-kb:
CFeeRate feeRate(entry.GetFee(), entry.GetTxSize());
- // Want the priority of the tx at confirmation. However we don't know
- // what that will be and its too hard to continue updating it
- // so use starting priority as a proxy
- double curPri = entry.GetPriority(txHeight);
mapMemPoolTxs[hash].blockHeight = txHeight;
-
- LogPrint("estimatefee", "Blockpolicy mempool tx %s ", hash.ToString().substr(0,10));
- // Record this as a priority estimate
- if (entry.GetFee() == 0 || isPriDataPoint(feeRate, curPri)) {
- mapMemPoolTxs[hash].stats = &priStats;
- mapMemPoolTxs[hash].bucketIndex = priStats.NewTx(txHeight, curPri);
- }
- // Record this as a fee estimate
- else if (isFeeDataPoint(feeRate, curPri)) {
- mapMemPoolTxs[hash].stats = &feeStats;
- mapMemPoolTxs[hash].bucketIndex = feeStats.NewTx(txHeight, (double)feeRate.GetFeePerK());
- }
- else {
- LogPrint("estimatefee", "not adding");
- }
- LogPrint("estimatefee", "\n");
+ mapMemPoolTxs[hash].bucketIndex = feeStats.NewTx(txHeight, (double)feeRate.GetFeePerK());
}
-void CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry& entry)
+bool CBlockPolicyEstimator::processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry* entry)
{
- if (!entry.WasClearAtEntry()) {
- // This transaction depended on other transactions in the mempool to
- // be included in a block before it was able to be included, so
- // we shouldn't include it in our calculations
- return;
+ if (!removeTx(entry->GetTx().GetHash())) {
+ // This transaction wasn't being tracked for fee estimation
+ return false;
}
// How many blocks did it take for miners to include this transaction?
// blocksToConfirm is 1-based, so a transaction included in the earliest
// possible block has confirmation count of 1
- int blocksToConfirm = nBlockHeight - entry.GetHeight();
+ int blocksToConfirm = nBlockHeight - entry->GetHeight();
if (blocksToConfirm <= 0) {
// This can't happen because we don't process transactions from a block with a height
// lower than our greatest seen height
LogPrint("estimatefee", "Blockpolicy error Transaction had negative blocksToConfirm\n");
- return;
+ return false;
}
- // Fees are stored and reported as BTC-per-kb:
- CFeeRate feeRate(entry.GetFee(), entry.GetTxSize());
-
- // Want the priority of the tx at confirmation. The priority when it
- // entered the mempool could easily be very small and change quickly
- double curPri = entry.GetPriority(nBlockHeight);
+ // Feerates are stored and reported as BTC-per-kb:
+ CFeeRate feeRate(entry->GetFee(), entry->GetTxSize());
- // Record this as a priority estimate
- if (entry.GetFee() == 0 || isPriDataPoint(feeRate, curPri)) {
- priStats.Record(blocksToConfirm, curPri);
- }
- // Record this as a fee estimate
- else if (isFeeDataPoint(feeRate, curPri)) {
- feeStats.Record(blocksToConfirm, (double)feeRate.GetFeePerK());
- }
+ feeStats.Record(blocksToConfirm, (double)feeRate.GetFeePerK());
+ return true;
}
void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight,
- std::vector<CTxMemPoolEntry>& entries, bool fCurrentEstimate)
+ std::vector<const CTxMemPoolEntry*>& entries)
{
if (nBlockHeight <= nBestSeenHeight) {
// Ignore side chains and re-orgs; assuming they are random
@@ -445,57 +380,37 @@ void CBlockPolicyEstimator::processBlock(unsigned int nBlockHeight,
// transaction fees."
return;
}
- nBestSeenHeight = nBlockHeight;
- // Only want to be updating estimates when our blockchain is synced,
- // otherwise we'll miscalculate how many blocks its taking to get included.
- if (!fCurrentEstimate)
- return;
+ // Must update nBestSeenHeight in sync with ClearCurrent so that
+ // calls to removeTx (via processBlockTx) correctly calculate age
+ // of unconfirmed txs to remove from tracking.
+ nBestSeenHeight = nBlockHeight;
- // Update the dynamic cutoffs
- // a fee/priority is "likely" the reason your tx was included in a block if >85% of such tx's
- // were confirmed in 2 blocks and is "unlikely" if <50% were confirmed in 10 blocks
- LogPrint("estimatefee", "Blockpolicy recalculating dynamic cutoffs:\n");
- priLikely = priStats.EstimateMedianVal(2, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBlockHeight);
- if (priLikely == -1)
- priLikely = INF_PRIORITY;
-
- double feeLikelyEst = feeStats.EstimateMedianVal(2, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBlockHeight);
- if (feeLikelyEst == -1)
- feeLikely = CFeeRate(INF_FEERATE);
- else
- feeLikely = CFeeRate(feeLikelyEst);
-
- priUnlikely = priStats.EstimateMedianVal(10, SUFFICIENT_PRITXS, UNLIKELY_PCT, false, nBlockHeight);
- if (priUnlikely == -1)
- priUnlikely = 0;
-
- double feeUnlikelyEst = feeStats.EstimateMedianVal(10, SUFFICIENT_FEETXS, UNLIKELY_PCT, false, nBlockHeight);
- if (feeUnlikelyEst == -1)
- feeUnlikely = CFeeRate(0);
- else
- feeUnlikely = CFeeRate(feeUnlikelyEst);
-
- // Clear the current block states
+ // Clear the current block state and update unconfirmed circular buffer
feeStats.ClearCurrent(nBlockHeight);
- priStats.ClearCurrent(nBlockHeight);
+ unsigned int countedTxs = 0;
// Repopulate the current block states
- for (unsigned int i = 0; i < entries.size(); i++)
- processBlockTx(nBlockHeight, entries[i]);
+ for (unsigned int i = 0; i < entries.size(); i++) {
+ if (processBlockTx(nBlockHeight, entries[i]))
+ countedTxs++;
+ }
- // Update all exponential averages with the current block states
+ // Update all exponential averages with the current block state
feeStats.UpdateMovingAverages();
- priStats.UpdateMovingAverages();
- LogPrint("estimatefee", "Blockpolicy after updating estimates for %u confirmed entries, new mempool map size %u\n",
- entries.size(), mapMemPoolTxs.size());
+ LogPrint("estimatefee", "Blockpolicy after updating estimates for %u of %u txs in block, since last block %u of %u tracked, new mempool map size %u\n",
+ countedTxs, entries.size(), trackedTxs, trackedTxs + untrackedTxs, mapMemPoolTxs.size());
+
+ trackedTxs = 0;
+ untrackedTxs = 0;
}
CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget)
{
// Return failure if trying to analyze a target we're not tracking
- if (confTarget <= 0 || (unsigned int)confTarget > feeStats.GetMaxConfirms())
+ // It's not possible to get reasonable estimates for confTarget of 1
+ if (confTarget <= 1 || (unsigned int)confTarget > feeStats.GetMaxConfirms())
return CFeeRate(0);
double median = feeStats.EstimateMedianVal(confTarget, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
@@ -514,6 +429,10 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoun
if (confTarget <= 0 || (unsigned int)confTarget > feeStats.GetMaxConfirms())
return CFeeRate(0);
+ // It's not possible to get reasonable estimates for confTarget of 1
+ if (confTarget == 1)
+ confTarget = 2;
+
double median = -1;
while (median < 0 && (unsigned int)confTarget <= feeStats.GetMaxConfirms()) {
median = feeStats.EstimateMedianVal(confTarget++, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
@@ -522,7 +441,7 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoun
if (answerFoundAtTarget)
*answerFoundAtTarget = confTarget - 1;
- // If mempool is limiting txs , return at least the min fee from the mempool
+ // If mempool is limiting txs , return at least the min feerate from the mempool
CAmount minPoolFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
if (minPoolFee > 0 && minPoolFee > median)
return CFeeRate(minPoolFee);
@@ -535,56 +454,43 @@ CFeeRate CBlockPolicyEstimator::estimateSmartFee(int confTarget, int *answerFoun
double CBlockPolicyEstimator::estimatePriority(int confTarget)
{
- // Return failure if trying to analyze a target we're not tracking
- if (confTarget <= 0 || (unsigned int)confTarget > priStats.GetMaxConfirms())
- return -1;
-
- return priStats.EstimateMedianVal(confTarget, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
+ return -1;
}
double CBlockPolicyEstimator::estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool)
{
if (answerFoundAtTarget)
*answerFoundAtTarget = confTarget;
- // Return failure if trying to analyze a target we're not tracking
- if (confTarget <= 0 || (unsigned int)confTarget > priStats.GetMaxConfirms())
- return -1;
// If mempool is limiting txs, no priority txs are allowed
CAmount minPoolFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
if (minPoolFee > 0)
return INF_PRIORITY;
- double median = -1;
- while (median < 0 && (unsigned int)confTarget <= priStats.GetMaxConfirms()) {
- median = priStats.EstimateMedianVal(confTarget++, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
- }
-
- if (answerFoundAtTarget)
- *answerFoundAtTarget = confTarget - 1;
-
- return median;
+ return -1;
}
void CBlockPolicyEstimator::Write(CAutoFile& fileout)
{
fileout << nBestSeenHeight;
feeStats.Write(fileout);
- priStats.Write(fileout);
}
-void CBlockPolicyEstimator::Read(CAutoFile& filein)
+void CBlockPolicyEstimator::Read(CAutoFile& filein, int nFileVersion)
{
int nFileBestSeenHeight;
filein >> nFileBestSeenHeight;
feeStats.Read(filein);
- priStats.Read(filein);
nBestSeenHeight = nFileBestSeenHeight;
+ if (nFileVersion < 139900) {
+ TxConfirmStats priStats;
+ priStats.Read(filein);
+ }
}
FeeFilterRounder::FeeFilterRounder(const CFeeRate& minIncrementalFee)
{
- CAmount minFeeLimit = minIncrementalFee.GetFeePerK() / 2;
+ CAmount minFeeLimit = std::max(CAmount(1), minIncrementalFee.GetFeePerK() / 2);
feeset.insert(0);
for (double bucketBoundary = minFeeLimit; bucketBoundary <= MAX_FEERATE; bucketBoundary *= FEE_SPACING) {
feeset.insert(bucketBoundary);
diff --git a/src/policy/fees.h b/src/policy/fees.h
index 2c1ac3b934..064466afe4 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_POLICYESTIMATOR_H
@@ -19,60 +19,50 @@ class CTxMemPoolEntry;
class CTxMemPool;
/** \class CBlockPolicyEstimator
- * The BlockPolicyEstimator is used for estimating the fee or priority needed
+ * The BlockPolicyEstimator is used for estimating the feerate needed
* for a transaction to be included in a block within a certain number of
* blocks.
*
* At a high level the algorithm works by grouping transactions into buckets
- * based on having similar priorities or fees and then tracking how long it
+ * based on having similar feerates and then tracking how long it
* takes transactions in the various buckets to be mined. It operates under
- * the assumption that in general transactions of higher fee/priority will be
- * included in blocks before transactions of lower fee/priority. So for
- * example if you wanted to know what fee you should put on a transaction to
+ * the assumption that in general transactions of higher feerate will be
+ * included in blocks before transactions of lower feerate. So for
+ * example if you wanted to know what feerate you should put on a transaction to
* be included in a block within the next 5 blocks, you would start by looking
- * at the bucket with the highest fee transactions and verifying that a
+ * at the bucket with the highest feerate transactions and verifying that a
* sufficiently high percentage of them were confirmed within 5 blocks and
- * then you would look at the next highest fee bucket, and so on, stopping at
- * the last bucket to pass the test. The average fee of transactions in this
- * bucket will give you an indication of the lowest fee you can put on a
+ * then you would look at the next highest feerate bucket, and so on, stopping at
+ * the last bucket to pass the test. The average feerate of transactions in this
+ * bucket will give you an indication of the lowest feerate you can put on a
* transaction and still have a sufficiently high chance of being confirmed
* within your desired 5 blocks.
*
- * When a transaction enters the mempool or is included within a block we
- * decide whether it can be used as a data point for fee estimation, priority
- * estimation or neither. If the value of exactly one of those properties was
- * below the required minimum it can be used to estimate the other. In
- * addition, if a priori our estimation code would indicate that the
- * transaction would be much more quickly included in a block because of one
- * of the properties compared to the other, we can also decide to use it as
- * an estimate for that property.
- *
- * Here is a brief description of the implementation for fee estimation.
- * When a transaction that counts for fee estimation enters the mempool, we
+ * Here is a brief description of the implementation:
+ * When a transaction enters the mempool, we
* track the height of the block chain at entry. Whenever a block comes in,
- * we count the number of transactions in each bucket and the total amount of fee
+ * we count the number of transactions in each bucket and the total amount of feerate
* paid in each bucket. Then we calculate how many blocks Y it took each
* transaction to be mined and we track an array of counters in each bucket
* for how long it to took transactions to get confirmed from 1 to a max of 25
* and we increment all the counters from Y up to 25. This is because for any
* number Z>=Y the transaction was successfully mined within Z blocks. We
* want to save a history of this information, so at any time we have a
- * counter of the total number of transactions that happened in a given fee
+ * counter of the total number of transactions that happened in a given feerate
* bucket and the total number that were confirmed in each number 1-25 blocks
* or less for any bucket. We save this history by keeping an exponentially
* decaying moving average of each one of these stats. Furthermore we also
* keep track of the number unmined (in mempool) transactions in each bucket
* and for how many blocks they have been outstanding and use that to increase
- * the number of transactions we've seen in that fee bucket when calculating
+ * the number of transactions we've seen in that feerate bucket when calculating
* an estimate for any number of confirmations below the number of blocks
* they've been outstanding.
*/
/**
- * We will instantiate two instances of this class, one to track transactions
- * that were included in a block due to fee, and one for tx's included due to
- * priority. We will lump transactions into a bucket according to their approximate
- * fee or priority and then track how long it took for those txs to be included in a block
+ * We will instantiate an instance of this class to track transactions that were
+ * included in a block. We will lump transactions into a bucket according to their
+ * approximate feerate and then track how long it took for those txs to be included in a block
*
* The tracking of unconfirmed (mempool) transactions is completely independent of the
* historical tracking of transactions that have been confirmed in a block.
@@ -80,7 +70,7 @@ class CTxMemPool;
class TxConfirmStats
{
private:
- //Define the buckets we will group transactions into (both fee buckets and priority buckets)
+ //Define the buckets we will group transactions into
std::vector<double> buckets; // The upper-bound of the range for the bucket (inclusive)
std::map<double, unsigned int> bucketMap; // Map of bucket upper-bound to index into all vectors by bucket
@@ -97,16 +87,15 @@ private:
// and calculate the totals for the current block to update the moving averages
std::vector<std::vector<int> > curBlockConf; // curBlockConf[Y][X]
- // Sum the total priority/fee of all tx's in each bucket
+ // Sum the total feerate of all tx's in each bucket
// Track the historical moving average of this total over blocks
std::vector<double> avg;
// and calculate the total for the current block to update the moving average
std::vector<double> curBlockVal;
// Combine the conf counts with tx counts to calculate the confirmation % for each Y,X
- // Combine the total value with the tx counts to calculate the avg fee/priority per bucket
+ // Combine the total value with the tx counts to calculate the avg feerate per bucket
- std::string dataTypeString;
double decay;
// Mempool counts of outstanding transactions
@@ -123,9 +112,8 @@ public:
* @param defaultBuckets contains the upper limits for the bucket boundaries
* @param maxConfirms max number of confirms to track
* @param decay how much to decay the historical moving average per block
- * @param dataTypeString for logging purposes
*/
- void Initialize(std::vector<double>& defaultBuckets, unsigned int maxConfirms, double decay, std::string dataTypeString);
+ void Initialize(std::vector<double>& defaultBuckets, unsigned int maxConfirms, double decay);
/** Clear the state of the curBlock variables to start counting for the new block */
void ClearCurrent(unsigned int nBlockHeight);
@@ -133,7 +121,7 @@ public:
/**
* Record a new transaction data point in the current block stats
* @param blocksToConfirm the number of blocks it took this transaction to confirm
- * @param val either the fee or the priority when entered of the transaction
+ * @param val the feerate of the transaction
* @warning blocksToConfirm is 1-based and has to be >= 1
*/
void Record(int blocksToConfirm, double val);
@@ -150,14 +138,14 @@ public:
void UpdateMovingAverages();
/**
- * Calculate a fee or priority estimate. Find the lowest value bucket (or range of buckets
+ * Calculate a feerate estimate. Find the lowest value bucket (or range of buckets
* to make sure we have enough data points) whose transactions still have sufficient likelihood
* of being confirmed within the target number of confirmations
* @param confTarget target number of confirmations
* @param sufficientTxVal required average number of transactions per block in a bucket range
* @param minSuccess the success probability we require
- * @param requireGreater return the lowest fee/pri such that all higher values pass minSuccess OR
- * return the highest fee/pri such that all lower values fail minSuccess
+ * @param requireGreater return the lowest feerate such that all higher values pass minSuccess OR
+ * return the highest feerate such that all lower values fail minSuccess
* @param nBlockHeight the current block height
*/
double EstimateMedianVal(int confTarget, double sufficientTxVal,
@@ -184,35 +172,26 @@ static const unsigned int MAX_BLOCK_CONFIRMS = 25;
/** Decay of .998 is a half-life of 346 blocks or about 2.4 days */
static const double DEFAULT_DECAY = .998;
-/** Require greater than 95% of X fee transactions to be confirmed within Y blocks for X to be big enough */
+/** Require greater than 95% of X feerate transactions to be confirmed within Y blocks for X to be big enough */
static const double MIN_SUCCESS_PCT = .95;
-static const double UNLIKELY_PCT = .5;
-/** Require an avg of 1 tx in the combined fee bucket per block to have stat significance */
+/** Require an avg of 1 tx in the combined feerate bucket per block to have stat significance */
static const double SUFFICIENT_FEETXS = 1;
-/** Require only an avg of 1 tx every 5 blocks in the combined pri bucket (way less pri txs) */
-static const double SUFFICIENT_PRITXS = .2;
-
-// Minimum and Maximum values for tracking fees and priorities
-static const double MIN_FEERATE = 10;
+// Minimum and Maximum values for tracking feerates
+static constexpr double MIN_FEERATE = 10;
static const double MAX_FEERATE = 1e7;
static const double INF_FEERATE = MAX_MONEY;
-static const double MIN_PRIORITY = 10;
-static const double MAX_PRIORITY = 1e16;
static const double INF_PRIORITY = 1e9 * MAX_MONEY;
-// We have to lump transactions into buckets based on fee or priority, but we want to be able
-// to give accurate estimates over a large range of potential fees and priorities
+// We have to lump transactions into buckets based on feerate, but we want to be able
+// to give accurate estimates over a large range of potential feerates
// Therefore it makes sense to exponentially space the buckets
/** Spacing of FeeRate buckets */
static const double FEE_SPACING = 1.1;
-/** Spacing of Priority buckets */
-static const double PRI_SPACING = 2;
-
/**
- * We want to be able to estimate fees or priorities that are needed on tx's to be included in
+ * We want to be able to estimate feerates that are needed on tx's to be included in
* a certain number of blocks. Every time a block is added to the best chain, this class records
* stats on the transactions included in that block
*/
@@ -224,38 +203,37 @@ public:
/** Process all the transactions that have been included in a block */
void processBlock(unsigned int nBlockHeight,
- std::vector<CTxMemPoolEntry>& entries, bool fCurrentEstimate);
+ std::vector<const CTxMemPoolEntry*>& entries);
/** Process a transaction confirmed in a block*/
- void processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry& entry);
+ bool processBlockTx(unsigned int nBlockHeight, const CTxMemPoolEntry* entry);
/** Process a transaction accepted to the mempool*/
- void processTransaction(const CTxMemPoolEntry& entry, bool fCurrentEstimate);
+ void processTransaction(const CTxMemPoolEntry& entry, bool validFeeEstimate);
/** Remove a transaction from the mempool tracking stats*/
- void removeTx(uint256 hash);
-
- /** Is this transaction likely included in a block because of its fee?*/
- bool isFeeDataPoint(const CFeeRate &fee, double pri);
-
- /** Is this transaction likely included in a block because of its priority?*/
- bool isPriDataPoint(const CFeeRate &fee, double pri);
+ bool removeTx(uint256 hash);
- /** Return a fee estimate */
+ /** Return a feerate estimate */
CFeeRate estimateFee(int confTarget);
- /** Estimate fee rate needed to get be included in a block within
+ /** Estimate feerate needed to get be included in a block within
* confTarget blocks. If no answer can be given at confTarget, return an
* estimate at the lowest target where one can be given.
*/
CFeeRate estimateSmartFee(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool);
- /** Return a priority estimate */
+ /** Return a priority estimate.
+ * DEPRECATED
+ * Returns -1
+ */
double estimatePriority(int confTarget);
/** Estimate priority needed to get be included in a block within
- * confTarget blocks. If no answer can be given at confTarget, return an
- * estimate at the lowest target where one can be given.
+ * confTarget blocks.
+ * DEPRECATED
+ * Returns -1 unless mempool is currently limited then returns INF_PRIORITY
+ * answerFoundAtTarget is set to confTarget
*/
double estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool);
@@ -263,29 +241,26 @@ public:
void Write(CAutoFile& fileout);
/** Read estimation data from a file */
- void Read(CAutoFile& filein);
+ void Read(CAutoFile& filein, int nFileVersion);
private:
CFeeRate minTrackedFee; //!< Passed to constructor to avoid dependency on main
- double minTrackedPriority; //!< Set to AllowFreeThreshold
unsigned int nBestSeenHeight;
struct TxStatsInfo
{
- TxConfirmStats *stats;
unsigned int blockHeight;
unsigned int bucketIndex;
- TxStatsInfo() : stats(NULL), blockHeight(0), bucketIndex(0) {}
+ TxStatsInfo() : blockHeight(0), bucketIndex(0) {}
};
// map of txids to information about that transaction
std::map<uint256, TxStatsInfo> mapMemPoolTxs;
/** Classes to track historical data on transaction confirmations */
- TxConfirmStats feeStats, priStats;
+ TxConfirmStats feeStats;
- /** Breakpoints to help determine whether a transaction was confirmed by priority or Fee */
- CFeeRate feeLikely, feeUnlikely;
- double priLikely, priUnlikely;
+ unsigned int trackedTxs;
+ unsigned int untrackedTxs;
};
class FeeFilterRounder
diff --git a/src/policy/policy.cpp b/src/policy/policy.cpp
index ae42b2bd74..ec398f6627 100644
--- a/src/policy/policy.cpp
+++ b/src/policy/policy.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2016 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,7 +7,7 @@
#include "policy/policy.h"
-#include "main.h"
+#include "validation.h"
#include "tinyformat.h"
#include "util.h"
#include "utilstrencodings.h"
@@ -66,7 +66,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
// Extremely large transactions with lots of inputs can cost the network
// almost as much to process as they cost the sender in fees, because
// computing signature hashes is O(ninputs*txsize). Limiting transactions
- // to MAX_STANDARD_TX_SIZE mitigates CPU exhaustion attacks.
+ // to MAX_STANDARD_TX_WEIGHT mitigates CPU exhaustion attacks.
unsigned int sz = GetTransactionWeight(tx);
if (sz >= MAX_STANDARD_TX_WEIGHT) {
reason = "tx-size";
@@ -105,7 +105,7 @@ bool IsStandardTx(const CTransaction& tx, std::string& reason, const bool witnes
else if ((whichType == TX_MULTISIG) && (!fIsBareMultisigStd)) {
reason = "bare-multisig";
return false;
- } else if (txout.IsDust(::minRelayTxFee)) {
+ } else if (txout.IsDust(dustRelayFee)) {
reason = "dust";
return false;
}
@@ -163,7 +163,7 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
{
// We don't care if witness for this input is empty, since it must not be bloated.
// If the script is invalid without witness, it would be caught sooner or later during validation.
- if (tx.wit.vtxinwit[i].IsNull())
+ if (tx.vin[i].scriptWitness.IsNull())
continue;
const CTxOut &prev = mapInputs.GetOutputFor(tx.vin[i]);
@@ -192,13 +192,13 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
// Check P2WSH standard limits
if (witnessversion == 0 && witnessprogram.size() == 32) {
- if (tx.wit.vtxinwit[i].scriptWitness.stack.back().size() > MAX_STANDARD_P2WSH_SCRIPT_SIZE)
+ if (tx.vin[i].scriptWitness.stack.back().size() > MAX_STANDARD_P2WSH_SCRIPT_SIZE)
return false;
- size_t sizeWitnessStack = tx.wit.vtxinwit[i].scriptWitness.stack.size() - 1;
+ size_t sizeWitnessStack = tx.vin[i].scriptWitness.stack.size() - 1;
if (sizeWitnessStack > MAX_STANDARD_P2WSH_STACK_ITEMS)
return false;
for (unsigned int j = 0; j < sizeWitnessStack; j++) {
- if (tx.wit.vtxinwit[i].scriptWitness.stack[j].size() > MAX_STANDARD_P2WSH_STACK_ITEM_SIZE)
+ if (tx.vin[i].scriptWitness.stack[j].size() > MAX_STANDARD_P2WSH_STACK_ITEM_SIZE)
return false;
}
}
@@ -206,6 +206,8 @@ bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
return true;
}
+CFeeRate incrementalRelayFee = CFeeRate(DEFAULT_INCREMENTAL_RELAY_FEE);
+CFeeRate dustRelayFee = CFeeRate(DUST_RELAY_TX_FEE);
unsigned int nBytesPerSigOp = DEFAULT_BYTES_PER_SIGOP;
int64_t GetVirtualTransactionSize(int64_t nWeight, int64_t nSigOpCost)
diff --git a/src/policy/policy.h b/src/policy/policy.h
index 814e6c0b6f..9b1323ac26 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2016 The Bitcoin developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -20,6 +20,8 @@ static const unsigned int DEFAULT_BLOCK_MAX_SIZE = 750000;
static const unsigned int DEFAULT_BLOCK_PRIORITY_SIZE = 0;
/** Default for -blockmaxweight, which controls the range of block weights the mining code will create **/
static const unsigned int DEFAULT_BLOCK_MAX_WEIGHT = 3000000;
+/** Default for -blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code **/
+static const unsigned int DEFAULT_BLOCK_MIN_TX_FEE = 1000;
/** The maximum weight for transactions we're willing to relay/mine */
static const unsigned int MAX_STANDARD_TX_WEIGHT = 400000;
/** Maximum number of signature check operations in an IsStandard() P2SH script */
@@ -28,6 +30,8 @@ static const unsigned int MAX_P2SH_SIGOPS = 15;
static const unsigned int MAX_STANDARD_TX_SIGOPS_COST = MAX_BLOCK_SIGOPS_COST/5;
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
+/** Default for -incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or BIP 125 replacement **/
+static const unsigned int DEFAULT_INCREMENTAL_RELAY_FEE = 1000;
/** Default for -bytespersigop */
static const unsigned int DEFAULT_BYTES_PER_SIGOP = 20;
/** The maximum number of witness stack items in a standard P2WSH script */
@@ -36,6 +40,12 @@ static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEMS = 100;
static const unsigned int MAX_STANDARD_P2WSH_STACK_ITEM_SIZE = 80;
/** The maximum size of a standard witnessScript */
static const unsigned int MAX_STANDARD_P2WSH_SCRIPT_SIZE = 3600;
+/** Min feerate for defining dust. Historically this has been the same as the
+ * minRelayTxFee, however changing the dust limit changes which transactions are
+ * standard and should be done with care and ideally rarely. It makes sense to
+ * only increase the dust limit after prior releases were already not creating
+ * outputs below the new threshold */
+static const unsigned int DUST_RELAY_TX_FEE = 1000;
/**
* Standard script verification flags that standard transactions will comply
* with. However scripts violating these flags may still be present in valid
@@ -83,6 +93,8 @@ bool AreInputsStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs)
*/
bool IsWitnessStandard(const CTransaction& tx, const CCoinsViewCache& mapInputs);
+extern CFeeRate incrementalRelayFee;
+extern CFeeRate dustRelayFee;
extern unsigned int nBytesPerSigOp;
/** Compute the virtual transaction size (weight reinterpreted as bytes). */
diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp
index 133cff611d..d9b47e71bb 100644
--- a/src/policy/rbf.cpp
+++ b/src/policy/rbf.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2016 The Bitcoin developers
+// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/policy/rbf.h b/src/policy/rbf.h
index 5a711dba07..139aec5760 100644
--- a/src/policy/rbf.h
+++ b/src/policy/rbf.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2016 The Bitcoin developers
+// Copyright (c) 2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/pow.cpp b/src/pow.cpp
index 1db3b69293..e57fd866f8 100644
--- a/src/pow.cpp
+++ b/src/pow.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/pow.h b/src/pow.h
index 23e9c1c351..e203f492a1 100644
--- a/src/pow.h
+++ b/src/pow.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/prevector.h b/src/prevector.h
index 25bce522dc..6b2f578f5c 100644
--- a/src/prevector.h
+++ b/src/prevector.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -248,6 +248,10 @@ public:
}
}
+ prevector(prevector<N, T, Size, Diff>&& other) : _size(0) {
+ swap(other);
+ }
+
prevector& operator=(const prevector<N, T, Size, Diff>& other) {
if (&other == this) {
return *this;
@@ -263,6 +267,11 @@ public:
return *this;
}
+ prevector& operator=(prevector<N, T, Size, Diff>&& other) {
+ swap(other);
+ return *this;
+ }
+
size_type size() const {
return is_direct() ? _size : _size - N - 1;
}
diff --git a/src/primitives/block.cpp b/src/primitives/block.cpp
index 0e6ab4dd71..9a979094cc 100644
--- a/src/primitives/block.cpp
+++ b/src/primitives/block.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -27,7 +27,7 @@ std::string CBlock::ToString() const
vtx.size());
for (unsigned int i = 0; i < vtx.size(); i++)
{
- s << " " << vtx[i].ToString() << "\n";
+ s << " " << vtx[i]->ToString() << "\n";
}
return s.str();
}
diff --git a/src/primitives/block.h b/src/primitives/block.h
index 72dfed985a..4c6eb20ad5 100644
--- a/src/primitives/block.h
+++ b/src/primitives/block.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -36,7 +36,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(this->nVersion);
READWRITE(hashPrevBlock);
READWRITE(hashMerkleRoot);
@@ -73,7 +73,7 @@ class CBlock : public CBlockHeader
{
public:
// network and disk
- std::vector<CTransaction> vtx;
+ std::vector<CTransactionRef> vtx;
// memory only
mutable bool fChecked;
@@ -92,7 +92,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(*(CBlockHeader*)this);
READWRITE(vtx);
}
@@ -137,8 +137,9 @@ struct CBlockLocator
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(nVersion);
READWRITE(vHave);
}
diff --git a/src/primitives/transaction.cpp b/src/primitives/transaction.cpp
index 4afbe99fd3..790bc71d14 100644
--- a/src/primitives/transaction.cpp
+++ b/src/primitives/transaction.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -49,27 +49,22 @@ CTxOut::CTxOut(const CAmount& nValueIn, CScript scriptPubKeyIn)
scriptPubKey = scriptPubKeyIn;
}
-uint256 CTxOut::GetHash() const
-{
- return SerializeHash(*this);
-}
-
std::string CTxOut::ToString() const
{
return strprintf("CTxOut(nValue=%d.%08d, scriptPubKey=%s)", nValue / COIN, nValue % COIN, HexStr(scriptPubKey).substr(0, 30));
}
CMutableTransaction::CMutableTransaction() : nVersion(CTransaction::CURRENT_VERSION), nLockTime(0) {}
-CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), wit(tx.wit), nLockTime(tx.nLockTime) {}
+CMutableTransaction::CMutableTransaction(const CTransaction& tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime) {}
uint256 CMutableTransaction::GetHash() const
{
return SerializeHash(*this, SER_GETHASH, SERIALIZE_TRANSACTION_NO_WITNESS);
}
-void CTransaction::UpdateHash() const
+uint256 CTransaction::ComputeHash() const
{
- *const_cast<uint256*>(&hash) = SerializeHash(*this, SER_GETHASH, SERIALIZE_TRANSACTION_NO_WITNESS);
+ return SerializeHash(*this, SER_GETHASH, SERIALIZE_TRANSACTION_NO_WITNESS);
}
uint256 CTransaction::GetWitnessHash() const
@@ -77,21 +72,10 @@ uint256 CTransaction::GetWitnessHash() const
return SerializeHash(*this, SER_GETHASH, 0);
}
-CTransaction::CTransaction() : nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0) { }
-
-CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), wit(tx.wit), nLockTime(tx.nLockTime) {
- UpdateHash();
-}
-
-CTransaction& CTransaction::operator=(const CTransaction &tx) {
- *const_cast<int*>(&nVersion) = tx.nVersion;
- *const_cast<std::vector<CTxIn>*>(&vin) = tx.vin;
- *const_cast<std::vector<CTxOut>*>(&vout) = tx.vout;
- *const_cast<CTxWitness*>(&wit) = tx.wit;
- *const_cast<unsigned int*>(&nLockTime) = tx.nLockTime;
- *const_cast<uint256*>(&hash) = tx.hash;
- return *this;
-}
+/* For backward compatibility, the hash is initialized to 0. TODO: remove the need for this default constructor entirely. */
+CTransaction::CTransaction() : nVersion(CTransaction::CURRENT_VERSION), vin(), vout(), nLockTime(0), hash() {}
+CTransaction::CTransaction(const CMutableTransaction &tx) : nVersion(tx.nVersion), vin(tx.vin), vout(tx.vout), nLockTime(tx.nLockTime), hash(ComputeHash()) {}
+CTransaction::CTransaction(CMutableTransaction &&tx) : nVersion(tx.nVersion), vin(std::move(tx.vin)), vout(std::move(tx.vout)), nLockTime(tx.nLockTime), hash(ComputeHash()) {}
CAmount CTransaction::GetValueOut() const
{
@@ -147,8 +131,8 @@ std::string CTransaction::ToString() const
nLockTime);
for (unsigned int i = 0; i < vin.size(); i++)
str += " " + vin[i].ToString() + "\n";
- for (unsigned int i = 0; i < wit.vtxinwit.size(); i++)
- str += " " + wit.vtxinwit[i].scriptWitness.ToString() + "\n";
+ for (unsigned int i = 0; i < vin.size(); i++)
+ str += " " + vin[i].scriptWitness.ToString() + "\n";
for (unsigned int i = 0; i < vout.size(); i++)
str += " " + vout[i].ToString() + "\n";
return str;
diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h
index 16c2e5c454..af2986a41b 100644
--- a/src/primitives/transaction.h
+++ b/src/primitives/transaction.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -28,7 +28,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(hash);
READWRITE(n);
}
@@ -65,6 +65,7 @@ public:
COutPoint prevout;
CScript scriptSig;
uint32_t nSequence;
+ CScriptWitness scriptWitness; //! Only serialized through CTransaction
/* Setting nSequence to this value for every input in a transaction
* disables nLockTime. */
@@ -104,7 +105,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(prevout);
READWRITE(*(CScriptBase*)(&scriptSig));
READWRITE(nSequence);
@@ -144,7 +145,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(nValue);
READWRITE(*(CScriptBase*)(&scriptPubKey));
}
@@ -160,8 +161,6 @@ public:
return (nValue == -1);
}
- uint256 GetHash() const;
-
CAmount GetDustThreshold(const CFeeRate &minRelayTxFee) const
{
// "Dust" is defined in terms of CTransaction::minRelayTxFee,
@@ -179,7 +178,7 @@ public:
if (scriptPubKey.IsUnspendable())
return 0;
- size_t nSize = GetSerializeSize(SER_DISK, 0);
+ size_t nSize = GetSerializeSize(*this, SER_DISK, 0);
int witnessversion = 0;
std::vector<unsigned char> witnessprogram;
@@ -213,62 +212,6 @@ public:
std::string ToString() const;
};
-class CTxInWitness
-{
-public:
- CScriptWitness scriptWitness;
-
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
- {
- READWRITE(scriptWitness.stack);
- }
-
- bool IsNull() const { return scriptWitness.IsNull(); }
-
- CTxInWitness() { }
-};
-
-class CTxWitness
-{
-public:
- /** In case vtxinwit is missing, all entries are treated as if they were empty CTxInWitnesses */
- std::vector<CTxInWitness> vtxinwit;
-
- ADD_SERIALIZE_METHODS;
-
- bool IsEmpty() const { return vtxinwit.empty(); }
-
- bool IsNull() const
- {
- for (size_t n = 0; n < vtxinwit.size(); n++) {
- if (!vtxinwit[n].IsNull()) {
- return false;
- }
- }
- return true;
- }
-
- void SetNull()
- {
- vtxinwit.clear();
- }
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
- {
- for (size_t n = 0; n < vtxinwit.size(); n++) {
- READWRITE(vtxinwit[n]);
- }
- if (IsNull()) {
- /* It's illegal to encode a witness when all vtxinwit entries are empty. */
- throw std::ios_base::failure("Superfluous witness record");
- }
- }
-};
-
struct CMutableTransaction;
/**
@@ -288,76 +231,79 @@ struct CMutableTransaction;
* - CTxWitness wit;
* - uint32_t nLockTime
*/
-template<typename Stream, typename Operation, typename TxType>
-inline void SerializeTransaction(TxType& tx, Stream& s, Operation ser_action, int nType, int nVersion) {
- const bool fAllowWitness = !(nVersion & SERIALIZE_TRANSACTION_NO_WITNESS);
+template<typename Stream, typename TxType>
+inline void UnserializeTransaction(TxType& tx, Stream& s) {
+ const bool fAllowWitness = !(s.GetVersion() & SERIALIZE_TRANSACTION_NO_WITNESS);
- READWRITE(*const_cast<int32_t*>(&tx.nVersion));
+ s >> tx.nVersion;
unsigned char flags = 0;
- if (ser_action.ForRead()) {
- const_cast<std::vector<CTxIn>*>(&tx.vin)->clear();
- const_cast<std::vector<CTxOut>*>(&tx.vout)->clear();
- const_cast<CTxWitness*>(&tx.wit)->SetNull();
- /* Try to read the vin. In case the dummy is there, this will be read as an empty vector. */
- READWRITE(*const_cast<std::vector<CTxIn>*>(&tx.vin));
- if (tx.vin.size() == 0 && fAllowWitness) {
- /* We read a dummy or an empty vin. */
- READWRITE(flags);
- if (flags != 0) {
- READWRITE(*const_cast<std::vector<CTxIn>*>(&tx.vin));
- READWRITE(*const_cast<std::vector<CTxOut>*>(&tx.vout));
- }
- } else {
- /* We read a non-empty vin. Assume a normal vout follows. */
- READWRITE(*const_cast<std::vector<CTxOut>*>(&tx.vout));
- }
- if ((flags & 1) && fAllowWitness) {
- /* The witness flag is present, and we support witnesses. */
- flags ^= 1;
- const_cast<CTxWitness*>(&tx.wit)->vtxinwit.resize(tx.vin.size());
- READWRITE(tx.wit);
- }
- if (flags) {
- /* Unknown flag in the serialization */
- throw std::ios_base::failure("Unknown transaction optional data");
+ tx.vin.clear();
+ tx.vout.clear();
+ /* Try to read the vin. In case the dummy is there, this will be read as an empty vector. */
+ s >> tx.vin;
+ if (tx.vin.size() == 0 && fAllowWitness) {
+ /* We read a dummy or an empty vin. */
+ s >> flags;
+ if (flags != 0) {
+ s >> tx.vin;
+ s >> tx.vout;
}
} else {
- // Consistency check
- assert(tx.wit.vtxinwit.size() <= tx.vin.size());
- if (fAllowWitness) {
- /* Check whether witnesses need to be serialized. */
- if (!tx.wit.IsNull()) {
- flags |= 1;
- }
+ /* We read a non-empty vin. Assume a normal vout follows. */
+ s >> tx.vout;
+ }
+ if ((flags & 1) && fAllowWitness) {
+ /* The witness flag is present, and we support witnesses. */
+ flags ^= 1;
+ for (size_t i = 0; i < tx.vin.size(); i++) {
+ s >> tx.vin[i].scriptWitness.stack;
}
- if (flags) {
- /* Use extended format in case witnesses are to be serialized. */
- std::vector<CTxIn> vinDummy;
- READWRITE(vinDummy);
- READWRITE(flags);
+ }
+ if (flags) {
+ /* Unknown flag in the serialization */
+ throw std::ios_base::failure("Unknown transaction optional data");
+ }
+ s >> tx.nLockTime;
+}
+
+template<typename Stream, typename TxType>
+inline void SerializeTransaction(const TxType& tx, Stream& s) {
+ const bool fAllowWitness = !(s.GetVersion() & SERIALIZE_TRANSACTION_NO_WITNESS);
+
+ s << tx.nVersion;
+ unsigned char flags = 0;
+ // Consistency check
+ if (fAllowWitness) {
+ /* Check whether witnesses need to be serialized. */
+ if (tx.HasWitness()) {
+ flags |= 1;
}
- READWRITE(*const_cast<std::vector<CTxIn>*>(&tx.vin));
- READWRITE(*const_cast<std::vector<CTxOut>*>(&tx.vout));
- if (flags & 1) {
- const_cast<CTxWitness*>(&tx.wit)->vtxinwit.resize(tx.vin.size());
- READWRITE(tx.wit);
+ }
+ if (flags) {
+ /* Use extended format in case witnesses are to be serialized. */
+ std::vector<CTxIn> vinDummy;
+ s << vinDummy;
+ s << flags;
+ }
+ s << tx.vin;
+ s << tx.vout;
+ if (flags & 1) {
+ for (size_t i = 0; i < tx.vin.size(); i++) {
+ s << tx.vin[i].scriptWitness.stack;
}
}
- READWRITE(*const_cast<uint32_t*>(&tx.nLockTime));
+ s << tx.nLockTime;
}
+
/** The basic transaction that is broadcasted on the network and contained in
* blocks. A transaction can contain multiple inputs and outputs.
*/
class CTransaction
{
-private:
- /** Memory only. */
- const uint256 hash;
-
public:
// Default transaction version.
- static const int32_t CURRENT_VERSION=1;
+ static const int32_t CURRENT_VERSION=2;
// Changing the default transaction version requires a two step process: first
// adapting relay policy by bumping MAX_STANDARD_VERSION, and then later date
@@ -373,27 +319,32 @@ public:
const int32_t nVersion;
const std::vector<CTxIn> vin;
const std::vector<CTxOut> vout;
- CTxWitness wit; // Not const: can change without invalidating the txid cache
const uint32_t nLockTime;
+private:
+ /** Memory only. */
+ const uint256 hash;
+
+ uint256 ComputeHash() const;
+
+public:
/** Construct a CTransaction that qualifies as IsNull() */
CTransaction();
/** Convert a CMutableTransaction into a CTransaction. */
CTransaction(const CMutableTransaction &tx);
+ CTransaction(CMutableTransaction &&tx);
- CTransaction& operator=(const CTransaction& tx);
-
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- SerializeTransaction(*this, s, ser_action, nType, nVersion);
- if (ser_action.ForRead()) {
- UpdateHash();
- }
+ template <typename Stream>
+ inline void Serialize(Stream& s) const {
+ SerializeTransaction(*this, s);
}
+ /** This deserializing constructor is provided instead of an Unserialize method.
+ * Unserialize is not possible, since it would require overwriting const fields. */
+ template <typename Stream>
+ CTransaction(deserialize_type, Stream& s) : CTransaction(CMutableTransaction(deserialize, s)) {}
+
bool IsNull() const {
return vin.empty() && vout.empty();
}
@@ -415,7 +366,7 @@ public:
// Compute modified tx size for priority calculation (optionally given tx size)
unsigned int CalculateModifiedSize(unsigned int nTxSize=0) const;
-
+
/**
* Get the total transaction size in bytes, including witness data.
* "Total Size" defined in BIP141 and BIP144.
@@ -440,7 +391,15 @@ public:
std::string ToString() const;
- void UpdateHash() const;
+ bool HasWitness() const
+ {
+ for (size_t i = 0; i < vin.size(); i++) {
+ if (!vin[i].scriptWitness.IsNull()) {
+ return true;
+ }
+ }
+ return false;
+ }
};
/** A mutable version of CTransaction. */
@@ -449,25 +408,52 @@ struct CMutableTransaction
int32_t nVersion;
std::vector<CTxIn> vin;
std::vector<CTxOut> vout;
- CTxWitness wit;
uint32_t nLockTime;
CMutableTransaction();
CMutableTransaction(const CTransaction& tx);
- ADD_SERIALIZE_METHODS;
+ template <typename Stream>
+ inline void Serialize(Stream& s) const {
+ SerializeTransaction(*this, s);
+ }
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- SerializeTransaction(*this, s, ser_action, nType, nVersion);
+
+ template <typename Stream>
+ inline void Unserialize(Stream& s) {
+ UnserializeTransaction(*this, s);
+ }
+
+ template <typename Stream>
+ CMutableTransaction(deserialize_type, Stream& s) {
+ Unserialize(s);
}
/** Compute the hash of this CMutableTransaction. This is computed on the
* fly, as opposed to GetHash() in CTransaction, which uses a cached result.
*/
uint256 GetHash() const;
+
+ friend bool operator==(const CMutableTransaction& a, const CMutableTransaction& b)
+ {
+ return a.GetHash() == b.GetHash();
+ }
+
+ bool HasWitness() const
+ {
+ for (size_t i = 0; i < vin.size(); i++) {
+ if (!vin[i].scriptWitness.IsNull()) {
+ return true;
+ }
+ }
+ return false;
+ }
};
+typedef std::shared_ptr<const CTransaction> CTransactionRef;
+static inline CTransactionRef MakeTransactionRef() { return std::make_shared<const CTransaction>(); }
+template <typename Tx> static inline CTransactionRef MakeTransactionRef(Tx&& txIn) { return std::make_shared<const CTransaction>(std::forward<Tx>(txIn)); }
+
/** Compute the weight of a transaction, as defined by BIP 141 */
int64_t GetTransactionWeight(const CTransaction &tx);
diff --git a/src/protocol.cpp b/src/protocol.cpp
index 54ad62b1a2..28d1d0eeb4 100644
--- a/src/protocol.cpp
+++ b/src/protocol.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -181,7 +181,11 @@ std::string CInv::GetCommand() const
std::string CInv::ToString() const
{
- return strprintf("%s %s", GetCommand(), hash.ToString());
+ try {
+ return strprintf("%s %s", GetCommand(), hash.ToString());
+ } catch(const std::out_of_range &) {
+ return strprintf("0x%08x %s", type, hash.ToString());
+ }
}
const std::vector<std::string> &getAllNetMessageTypes()
diff --git a/src/protocol.h b/src/protocol.h
index d19e0d3a5e..eba39ab1e5 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -48,7 +48,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+ inline void SerializationOp(Stream& s, Operation ser_action)
{
READWRITE(FLATDATA(pchMessageStart));
READWRITE(FLATDATA(pchCommand));
@@ -261,7 +261,7 @@ enum ServiceFlags : uint64_t {
// Bitcoin Core nodes used to support this by default, without advertising this bit,
// but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION)
NODE_BLOOM = (1 << 2),
- // Indicates that a node can be asked for blocks and transactions including
+ // NODE_WITNESS indicates that a node can be asked for blocks and transactions including
// witness data.
NODE_WITNESS = (1 << 3),
// NODE_XTHIN means the node supports Xtreme Thinblocks
@@ -289,14 +289,15 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+ inline void SerializationOp(Stream& s, Operation ser_action)
{
if (ser_action.ForRead())
Init();
- if (nType & SER_DISK)
+ int nVersion = s.GetVersion();
+ if (s.GetType() & SER_DISK)
READWRITE(nVersion);
- if ((nType & SER_DISK) ||
- (nVersion >= CADDR_TIME_VERSION && !(nType & SER_GETHASH)))
+ if ((s.GetType() & SER_DISK) ||
+ (nVersion >= CADDR_TIME_VERSION && !(s.GetType() & SER_GETHASH)))
READWRITE(nTime);
uint64_t nServicesInt = nServices;
READWRITE(nServicesInt);
@@ -343,7 +344,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+ inline void SerializationOp(Stream& s, Operation ser_action)
{
READWRITE(type);
READWRITE(hash);
diff --git a/src/pubkey.cpp b/src/pubkey.cpp
index 91a657593a..e57fa238cb 100644
--- a/src/pubkey.cpp
+++ b/src/pubkey.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/pubkey.h b/src/pubkey.h
index 3a554877f8..dbf0e23f20 100644
--- a/src/pubkey.h
+++ b/src/pubkey.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -116,19 +116,15 @@ public:
}
//! Implement serialization, as if this was a byte vector.
- unsigned int GetSerializeSize(int nType, int nVersion) const
- {
- return size() + 1;
- }
template <typename Stream>
- void Serialize(Stream& s, int nType, int nVersion) const
+ void Serialize(Stream& s) const
{
unsigned int len = size();
::WriteCompactSize(s, len);
s.write((char*)vch, len);
}
template <typename Stream>
- void Unserialize(Stream& s, int nType, int nVersion)
+ void Unserialize(Stream& s)
{
unsigned int len = ::ReadCompactSize(s);
if (len <= 65) {
@@ -214,12 +210,13 @@ struct CExtPubKey {
void Decode(const unsigned char code[BIP32_EXTKEY_SIZE]);
bool Derive(CExtPubKey& out, unsigned int nChild) const;
- unsigned int GetSerializeSize(int nType, int nVersion) const
+ void Serialize(CSizeComputer& s) const
{
- return BIP32_EXTKEY_SIZE+1; //add one byte for the size (compact int)
+ // Optimized implementation for ::GetSerializeSize that avoids copying.
+ s.seek(BIP32_EXTKEY_SIZE + 1); // add one byte for the size (compact int)
}
template <typename Stream>
- void Serialize(Stream& s, int nType, int nVersion) const
+ void Serialize(Stream& s) const
{
unsigned int len = BIP32_EXTKEY_SIZE;
::WriteCompactSize(s, len);
@@ -228,7 +225,7 @@ struct CExtPubKey {
s.write((const char *)&code[0], len);
}
template <typename Stream>
- void Unserialize(Stream& s, int nType, int nVersion)
+ void Unserialize(Stream& s)
{
unsigned int len = ::ReadCompactSize(s);
unsigned char code[BIP32_EXTKEY_SIZE];
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 58cf4dede0..b1253a9f17 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -83,7 +83,7 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
deleteAction = new QAction(ui->deleteAddress->text(), this);
// Build context menu
- contextMenu = new QMenu();
+ contextMenu = new QMenu(this);
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(editAction);
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index 830c9cdf19..93120de1ea 100644
--- a/src/qt/addresstablemodel.cpp
+++ b/src/qt/addresstablemodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp
index 129ea1efa4..e9f5c77a5b 100644
--- a/src/qt/askpassphrasedialog.cpp
+++ b/src/qt/askpassphrasedialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/bantablemodel.cpp b/src/qt/bantablemodel.cpp
index 6e11e23904..00a915dd8d 100644
--- a/src/qt/bantablemodel.cpp
+++ b/src/qt/bantablemodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -87,7 +87,7 @@ BanTableModel::BanTableModel(ClientModel *parent) :
clientModel(parent)
{
columns << tr("IP/Netmask") << tr("Banned Until");
- priv = new BanTablePriv();
+ priv.reset(new BanTablePriv());
// default to unsorted
priv->sortColumn = -1;
@@ -95,6 +95,11 @@ BanTableModel::BanTableModel(ClientModel *parent) :
refresh();
}
+BanTableModel::~BanTableModel()
+{
+ // Intentionally left empty
+}
+
int BanTableModel::rowCount(const QModelIndex &parent) const
{
Q_UNUSED(parent);
diff --git a/src/qt/bantablemodel.h b/src/qt/bantablemodel.h
index fe9600ac0b..062cfdc931 100644
--- a/src/qt/bantablemodel.h
+++ b/src/qt/bantablemodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -40,6 +40,7 @@ class BanTableModel : public QAbstractTableModel
public:
explicit BanTableModel(ClientModel *parent = 0);
+ ~BanTableModel();
void startAutoRefresh();
void stopAutoRefresh();
@@ -66,7 +67,7 @@ public Q_SLOTS:
private:
ClientModel *clientModel;
QStringList columns;
- BanTablePriv *priv;
+ std::unique_ptr<BanTablePriv> priv;
};
#endif // BITCOIN_QT_BANTABLEMODEL_H
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 9986af4957..72f5f4aac9 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -30,6 +30,7 @@
#include "scheduler.h"
#include "ui_interface.h"
#include "util.h"
+#include "warnings.h"
#ifdef ENABLE_WALLET
#include "wallet/wallet.h"
@@ -245,6 +246,7 @@ private:
#endif
int returnValue;
const PlatformStyle *platformStyle;
+ std::unique_ptr<QWidget> shutdownWindow;
void startThread();
};
@@ -259,7 +261,7 @@ BitcoinCore::BitcoinCore():
void BitcoinCore::handleRunawayException(const std::exception *e)
{
PrintExceptionContinue(e, "Runaway exception");
- Q_EMIT runawayException(QString::fromStdString(strMiscWarning));
+ Q_EMIT runawayException(QString::fromStdString(GetWarnings("gui")));
}
void BitcoinCore::initialize()
@@ -267,7 +269,22 @@ void BitcoinCore::initialize()
try
{
qDebug() << __func__ << ": Running AppInit2 in thread";
- int rv = AppInit2(threadGroup, scheduler);
+ if (!AppInitBasicSetup())
+ {
+ Q_EMIT initializeResult(false);
+ return;
+ }
+ if (!AppInitParameterInteraction())
+ {
+ Q_EMIT initializeResult(false);
+ return;
+ }
+ if (!AppInitSanityChecks())
+ {
+ Q_EMIT initializeResult(false);
+ return;
+ }
+ int rv = AppInitMain(threadGroup, scheduler);
Q_EMIT initializeResult(rv);
} catch (const std::exception& e) {
handleRunawayException(&e);
@@ -365,9 +382,8 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
{
SplashScreen *splash = new SplashScreen(0, networkStyle);
- // We don't hold a direct pointer to the splash screen after creation, so use
- // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
- splash->setAttribute(Qt::WA_DeleteOnClose);
+ // We don't hold a direct pointer to the splash screen after creation, but the splash
+ // screen will take care of deleting itself when slotFinish happens.
splash->show();
connect(this, SIGNAL(splashFinished(QWidget*)), splash, SLOT(slotFinish(QWidget*)));
connect(this, SIGNAL(requestedShutdown()), splash, SLOT(close()));
@@ -409,6 +425,11 @@ void BitcoinApplication::requestInitialize()
void BitcoinApplication::requestShutdown()
{
+ // Show a simple window indicating shutdown status
+ // Do this first as some of the steps may take some time below,
+ // for example the RPC console may still be executing a command.
+ shutdownWindow.reset(ShutdownWindow::showShutdownWindow(window));
+
qDebug() << __func__ << ": Requesting shutdown";
startThread();
window->hide();
@@ -423,8 +444,7 @@ void BitcoinApplication::requestShutdown()
delete clientModel;
clientModel = 0;
- // Show a simple window indicating shutdown status
- ShutdownWindow::showShutdownWindow(window);
+ StartShutdown();
// Request shutdown from core thread
Q_EMIT requestedShutdown();
@@ -496,7 +516,7 @@ void BitcoinApplication::shutdownResult(int retval)
void BitcoinApplication::handleRunawayException(const QString &message)
{
QMessageBox::critical(0, "Runaway exception", BitcoinGUI::tr("A fatal error occurred. Bitcoin can no longer continue safely and will quit.") + QString("\n\n") + message);
- ::exit(1);
+ ::exit(EXIT_FAILURE);
}
WId BitcoinApplication::getMainWinId() const
@@ -569,32 +589,32 @@ int main(int argc, char *argv[])
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
// but before showing splash screen.
- if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
+ if (IsArgSet("-?") || IsArgSet("-h") || IsArgSet("-help") || IsArgSet("-version"))
{
- HelpMessageDialog help(NULL, mapArgs.count("-version"));
+ HelpMessageDialog help(NULL, IsArgSet("-version"));
help.showOrPrint();
- return 1;
+ return EXIT_SUCCESS;
}
/// 5. Now that settings and translations are available, ask user for data directory
// User language is set up: pick a data directory
if (!Intro::pickDataDirectory())
- return 0;
+ return EXIT_SUCCESS;
/// 6. Determine availability of data directory and parse bitcoin.conf
/// - Do not call GetDataDir(true) before this step finishes
if (!boost::filesystem::is_directory(GetDataDir(false)))
{
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
- QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(mapArgs["-datadir"])));
- return 1;
+ QObject::tr("Error: Specified data directory \"%1\" does not exist.").arg(QString::fromStdString(GetArg("-datadir", ""))));
+ return EXIT_FAILURE;
}
try {
- ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME), mapArgs, mapMultiArgs);
+ ReadConfigFile(GetArg("-conf", BITCOIN_CONF_FILENAME));
} catch (const std::exception& e) {
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME),
QObject::tr("Error: Cannot parse configuration file: %1. Only use key=value syntax.").arg(e.what()));
- return false;
+ return EXIT_FAILURE;
}
/// 7. Determine network (and switch to network specific options)
@@ -608,7 +628,7 @@ int main(int argc, char *argv[])
SelectParams(ChainNameFromCommandLine());
} catch(std::exception &e) {
QMessageBox::critical(0, QObject::tr(PACKAGE_NAME), QObject::tr("Error: %1").arg(e.what()));
- return 1;
+ return EXIT_FAILURE;
}
#ifdef ENABLE_WALLET
// Parse URIs on command line -- this can affect Params()
@@ -630,7 +650,7 @@ int main(int argc, char *argv[])
// - Do this after creating app and setting up translations, so errors are
// translated properly.
if (PaymentServer::ipcSendCommandLine())
- exit(0);
+ exit(EXIT_SUCCESS);
// Start up the payment server early, too, so impatient users that click on
// bitcoin: links repeatedly have their payment requests routed to this process:
@@ -654,7 +674,7 @@ int main(int argc, char *argv[])
// Allow parameter interaction before we create the options model
app.parameterSetup();
// Load GUI settings from QSettings
- app.createOptionsModel(mapArgs.count("-resetguisettings") != 0);
+ app.createOptionsModel(IsArgSet("-resetguisettings"));
// Subscribe to global signals from core
uiInterface.InitMessage.connect(InitMessage);
@@ -674,10 +694,10 @@ int main(int argc, char *argv[])
app.exec();
} catch (const std::exception& e) {
PrintExceptionContinue(&e, "Runaway exception");
- app.handleRunawayException(QString::fromStdString(strMiscWarning));
+ app.handleRunawayException(QString::fromStdString(GetWarnings("gui")));
} catch (...) {
PrintExceptionContinue(NULL, "Runaway exception");
- app.handleRunawayException(QString::fromStdString(strMiscWarning));
+ app.handleRunawayException(QString::fromStdString(GetWarnings("gui")));
}
return app.getReturnValue();
}
diff --git a/src/qt/bitcoin.qrc b/src/qt/bitcoin.qrc
index ca5b1fa673..451d391237 100644
--- a/src/qt/bitcoin.qrc
+++ b/src/qt/bitcoin.qrc
@@ -52,6 +52,7 @@
<file alias="transaction_abandoned">res/icons/transaction_abandoned.png</file>
<file alias="hd_enabled">res/icons/hd_enabled.png</file>
<file alias="hd_disabled">res/icons/hd_disabled.png</file>
+ <file alias="network_disabled">res/icons/network_disabled.png</file>
</qresource>
<qresource prefix="/movies">
<file alias="spinner-000">res/movies/spinner-000.png</file>
diff --git a/src/qt/bitcoin_locale.qrc b/src/qt/bitcoin_locale.qrc
index 8dd07c3d41..f195b23d81 100644
--- a/src/qt/bitcoin_locale.qrc
+++ b/src/qt/bitcoin_locale.qrc
@@ -4,12 +4,11 @@
<file alias="af_ZA">locale/bitcoin_af_ZA.qm</file>
<file alias="ar">locale/bitcoin_ar.qm</file>
<file alias="be_BY">locale/bitcoin_be_BY.qm</file>
- <file alias="bg">locale/bitcoin_bg.qm</file>
<file alias="bg_BG">locale/bitcoin_bg_BG.qm</file>
+ <file alias="bg">locale/bitcoin_bg.qm</file>
<file alias="ca_ES">locale/bitcoin_ca_ES.qm</file>
<file alias="ca">locale/bitcoin_ca.qm</file>
<file alias="ca@valencia">locale/bitcoin_ca@valencia.qm</file>
- <file alias="cs_CZ">locale/bitcoin_cs_CZ.qm</file>
<file alias="cs">locale/bitcoin_cs.qm</file>
<file alias="cy">locale/bitcoin_cy.qm</file>
<file alias="da">locale/bitcoin_da.qm</file>
@@ -28,6 +27,7 @@
<file alias="es">locale/bitcoin_es.qm</file>
<file alias="es_UY">locale/bitcoin_es_UY.qm</file>
<file alias="es_VE">locale/bitcoin_es_VE.qm</file>
+ <file alias="et_EE">locale/bitcoin_et_EE.qm</file>
<file alias="et">locale/bitcoin_et.qm</file>
<file alias="eu_ES">locale/bitcoin_eu_ES.qm</file>
<file alias="fa_IR">locale/bitcoin_fa_IR.qm</file>
@@ -57,6 +57,7 @@
<file alias="mn">locale/bitcoin_mn.qm</file>
<file alias="ms_MY">locale/bitcoin_ms_MY.qm</file>
<file alias="nb">locale/bitcoin_nb.qm</file>
+ <file alias="ne">locale/bitcoin_ne.qm</file>
<file alias="nl">locale/bitcoin_nl.qm</file>
<file alias="pam">locale/bitcoin_pam.qm</file>
<file alias="pl">locale/bitcoin_pl.qm</file>
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index ee5102c4f9..a3cb376bcf 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -46,7 +46,6 @@
#include <QMenuBar>
#include <QMessageBox>
#include <QMimeData>
-#include <QProgressBar>
#include <QProgressDialog>
#include <QSettings>
#include <QShortcut>
@@ -86,7 +85,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
unitDisplayControl(0),
labelWalletEncryptionIcon(0),
labelWalletHDStatusIcon(0),
- labelConnectionsIcon(0),
+ connectionsControl(0),
labelBlocksIcon(0),
progressBarLabel(0),
progressBar(0),
@@ -199,8 +198,8 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
unitDisplayControl = new UnitDisplayStatusBarControl(platformStyle);
labelWalletEncryptionIcon = new QLabel();
labelWalletHDStatusIcon = new QLabel();
- labelConnectionsIcon = new QLabel();
- labelBlocksIcon = new QLabel();
+ connectionsControl = new GUIUtil::ClickableLabel();
+ labelBlocksIcon = new GUIUtil::ClickableLabel();
if(enableWallet)
{
frameBlocksLayout->addStretch();
@@ -210,7 +209,7 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
frameBlocksLayout->addWidget(labelWalletHDStatusIcon);
}
frameBlocksLayout->addStretch();
- frameBlocksLayout->addWidget(labelConnectionsIcon);
+ frameBlocksLayout->addWidget(connectionsControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelBlocksIcon);
frameBlocksLayout->addStretch();
@@ -244,10 +243,15 @@ BitcoinGUI::BitcoinGUI(const PlatformStyle *_platformStyle, const NetworkStyle *
// Subscribe to notifications from core
subscribeToCoreSignals();
+ connect(connectionsControl, SIGNAL(clicked(QPoint)), this, SLOT(toggleNetworkActive()));
+
modalOverlay = new ModalOverlay(this->centralWidget());
#ifdef ENABLE_WALLET
- if(enableWallet)
+ if(enableWallet) {
connect(walletFrame, SIGNAL(requestedSyncWarningInfo()), this, SLOT(showModalOverlay()));
+ connect(labelBlocksIcon, SIGNAL(clicked(QPoint)), this, SLOT(showModalOverlay()));
+ connect(progressBar, SIGNAL(clicked(QPoint)), this, SLOT(showModalOverlay()));
+ }
#endif
}
@@ -469,8 +473,9 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
createTrayIconMenu();
// Keep up to date with client
- setNumConnections(_clientModel->getNumConnections());
+ updateNetworkState();
connect(_clientModel, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
+ connect(_clientModel, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));
setNumBlocks(_clientModel->getNumBlocks(), _clientModel->getLastBlockDate(), _clientModel->getVerificationProgress(NULL), false);
connect(_clientModel, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
@@ -509,6 +514,12 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
// Disable context menu on tray icon
trayIconMenu->clear();
}
+ // Propagate cleared model to child objects
+ rpcConsole->setClientModel(nullptr);
+#ifdef ENABLE_WALLET
+ walletFrame->setClientModel(nullptr);
+#endif // ENABLE_WALLET
+ unitDisplayControl->setOptionsModel(nullptr);
}
}
@@ -698,8 +709,9 @@ void BitcoinGUI::gotoVerifyMessageTab(QString addr)
}
#endif // ENABLE_WALLET
-void BitcoinGUI::setNumConnections(int count)
+void BitcoinGUI::updateNetworkState()
{
+ int count = clientModel->getNumConnections();
QString icon;
switch(count)
{
@@ -709,8 +721,31 @@ void BitcoinGUI::setNumConnections(int count)
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
default: icon = ":/icons/connect_4"; break;
}
- labelConnectionsIcon->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
- labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Bitcoin network", "", count));
+
+ QString tooltip;
+
+ if (clientModel->getNetworkActive()) {
+ tooltip = tr("%n active connection(s) to Bitcoin network", "", count) + QString(".<br>") + tr("Click to disable network activity.");
+ } else {
+ tooltip = tr("Network activity disabled.") + QString("<br>") + tr("Click to enable network activity again.");
+ icon = ":/icons/network_disabled";
+ }
+
+ // Don't word-wrap this (fixed-width) tooltip
+ tooltip = QString("<nobr>") + tooltip + QString("</nobr>");
+ connectionsControl->setToolTip(tooltip);
+
+ connectionsControl->setPixmap(platformStyle->SingleColorIcon(icon).pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
+}
+
+void BitcoinGUI::setNumConnections(int count)
+{
+ updateNetworkState();
+}
+
+void BitcoinGUI::setNetworkActive(bool networkActive)
+{
+ updateNetworkState();
}
void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool header)
@@ -782,7 +817,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
}
else
{
- QString timeBehindText = GUIUtil::formateNiceTimeOffset(secs);
+ QString timeBehindText = GUIUtil::formatNiceTimeOffset(secs);
progressBarLabel->setVisible(true);
progressBar->setFormat(tr("%1 behind").arg(timeBehindText));
@@ -1103,8 +1138,8 @@ void BitcoinGUI::setTrayIconVisible(bool fHideTrayIcon)
void BitcoinGUI::showModalOverlay()
{
- if (modalOverlay)
- modalOverlay->showHide(false, true);
+ if (modalOverlay && (progressBar->isVisible() || modalOverlay->isLayerVisible()))
+ modalOverlay->toggleVisibility();
}
static bool ThreadSafeMessageBox(BitcoinGUI *gui, const std::string& message, const std::string& caption, unsigned int style)
@@ -1138,6 +1173,13 @@ void BitcoinGUI::unsubscribeFromCoreSignals()
uiInterface.ThreadSafeQuestion.disconnect(boost::bind(ThreadSafeMessageBox, this, _1, _3, _4));
}
+void BitcoinGUI::toggleNetworkActive()
+{
+ if (clientModel) {
+ clientModel->setNetworkActive(!clientModel->getNetworkActive());
+ }
+}
+
UnitDisplayStatusBarControl::UnitDisplayStatusBarControl(const PlatformStyle *platformStyle) :
optionsModel(0),
menu(0)
@@ -1165,7 +1207,7 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
/** Creates context menu, its actions, and wires up all the relevant signals for mouse events. */
void UnitDisplayStatusBarControl::createContextMenu()
{
- menu = new QMenu();
+ menu = new QMenu(this);
Q_FOREACH(BitcoinUnits::Unit u, BitcoinUnits::availableUnits())
{
QAction *menuAction = new QAction(QString(BitcoinUnits::name(u)), this);
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 0eaa44b263..c8b6ce5474 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -85,7 +85,7 @@ private:
UnitDisplayStatusBarControl *unitDisplayControl;
QLabel *labelWalletEncryptionIcon;
QLabel *labelWalletHDStatusIcon;
- QLabel *labelConnectionsIcon;
+ QLabel *connectionsControl;
QLabel *labelBlocksIcon;
QLabel *progressBarLabel;
QProgressBar *progressBar;
@@ -146,6 +146,9 @@ private:
/** Disconnect core signals from GUI client */
void unsubscribeFromCoreSignals();
+ /** Update UI with latest network info from model. */
+ void updateNetworkState();
+
Q_SIGNALS:
/** Signal raised when a URI was entered or dragged to the GUI */
void receivedURI(const QString &uri);
@@ -153,6 +156,8 @@ Q_SIGNALS:
public Q_SLOTS:
/** Set number of connections shown in the UI */
void setNumConnections(int count);
+ /** Set network state shown in the UI */
+ void setNetworkActive(bool networkActive);
/** Set number of blocks and last block date shown in the UI */
void setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers);
@@ -232,6 +237,9 @@ private Q_SLOTS:
/** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */
void setTrayIconVisible(bool);
+ /** Toggle networking */
+ void toggleNetworkActive();
+
void showModalOverlay();
};
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index bca5b72827..64bc7dac03 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -15,18 +15,15 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"(1 = keep tx meta data e.g. account owner and payment request information, 2 "
"= drop tx meta data)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"-fallbackfee is set very high! This is the transaction fee you may pay when "
-"fee estimates are not available."),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
"-maxtxfee is set very high! Fees this large could be paid on a single "
"transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"-paytxfee is set very high! This is the transaction fee you will pay if you "
-"send a transaction."),
-QT_TRANSLATE_NOOP("bitcoin-core", ""
"A fee rate (in %s/kB) that will be used when fee estimation has insufficient "
"data (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Accept connections from outside (default: 1 if no -proxy or -connect/-"
+"noconnect)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Accept relayed transactions received from whitelisted peers even when not "
"relaying transactions (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -46,6 +43,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot obtain a lock on data directory %s. %s is probably already running."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Connect only to the specified node(s); -noconnect or -connect=0 alone to "
+"disable automatic connections"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Create new files with system default permissions, instead of umask 077 (only "
"effective with disabled wallet functionality)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -55,11 +55,13 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Discover own IP addresses (default: 1 when listening and no -externalip or -"
"proxy)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Distributed under the MIT software license, see the accompanying file "
-"COPYING or <http://www.opensource.org/licenses/mit-license.php>."),
+"Distributed under the MIT software license, see the accompanying file %s or "
+"%s"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Do not keep transactions in the mempool longer than <n> hours (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Equivalent bytes per sigop in transactions for relay and mining (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error loading %s: You can't enable HD on a already existing non-HD wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error reading %s! All keys read correctly, but transaction data or address "
@@ -82,8 +84,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Fees (in %s/kB) smaller than this are considered zero fee for transaction "
"creation (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Force relay of transactions from whitelisted peers even they violate local "
-"relay policy (default: %d)"),
+"Force relay of transactions from whitelisted peers even if they violate "
+"local relay policy (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"How thorough the block verification of -checkblocks is (0-4, default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -125,24 +127,34 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"reindex (download the whole blockchain again in case of pruned node)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Query for peer addresses via DNS lookup, if low on addresses (default: 1 "
-"unless -connect)"),
+"unless -connect/-noconnect)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Randomize credentials for every proxy connection. This enables Tor stream "
"isolation (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Reduce storage requirements by pruning (deleting) old blocks. This mode is "
-"incompatible with -txindex and -rescan. Warning: Reverting this setting "
-"requires re-downloading the entire blockchain. (default: 0 = disable pruning "
-"blocks, >%u = target size in MiB to use for block files)"),
+"Reduce storage requirements by enabling pruning (deleting) of old blocks. "
+"This allows the pruneblockchain RPC to be called to delete specific blocks, "
+"and enables automatic pruning of old blocks if a target size in MiB is "
+"provided. This mode is incompatible with -txindex and -rescan. Warning: "
+"Reverting this setting requires re-downloading the entire blockchain. "
+"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >%u "
+"= automatically prune block files to stay under the specified target size in "
+"MiB)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Rescans are not possible in pruned mode. You will need to use -reindex which "
"will download the whole blockchain again."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Set lowest fee rate (in %s/kB) for transactions to be included in block "
+"creation. (default: %s)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set maximum size of high-priority/low-fee transactions in bytes (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Set the number of script verification threads (%u to %d, 0 = auto, <0 = "
"leave that many cores free, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Sets the serialization of raw transaction or block hex returned in non-"
+"verbose mode, non-segwit(0) or segwit(1) (default: %d)"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Support filtering of blocks and transaction with bloom filters (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"The block database contains a block which appears to be from the future. "
@@ -155,9 +167,11 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"This is a pre-release test build - use at your own risk - do not use for "
"mining or merchant applications"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"This is the transaction fee you may pay when fee estimates are not available."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"This product includes software developed by the OpenSSL Project for use in "
-"the OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software "
-"written by Eric Young and UPnP software written by Thomas Bernard."),
+"the OpenSSL Toolkit %s and cryptographic software written by Eric Young and "
+"UPnP software written by Thomas Bernard."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Total length of network version string (%i) exceeds maximum length (%i). "
"Reduce the number or size of uacomments."),
@@ -184,7 +198,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Username and hashed password for JSON-RPC connections. The field <userpw> "
"comes in the format: <USERNAME>:<SALT>$<HASH>. A canonical python script is "
-"included in share/rpcuser. This option can be specified multiple times"),
+"included in share/rpcuser. The client then connects normally using the "
+"rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This option can "
+"be specified multiple times"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Wallet will not create transactions that violate mempool chain limits "
+"(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: The network does not appear to fully agree! Some miners appear to "
"be experiencing issues."),
@@ -199,8 +218,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: We do not appear to fully agree with our peers! You may need to "
"upgrade, or other nodes may need to upgrade."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Whitelist peers connecting from the given netmask or IP address. Can be "
-"specified multiple times."),
+"Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR "
+"notated network (e.g. 1.2.3.0/24). Can be specified multiple times."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Whitelisted peers cannot be DoS banned and their transactions are always "
"relayed, even if they are already in the mempool, useful e.g. for a gateway"),
@@ -210,12 +229,12 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
QT_TRANSLATE_NOOP("bitcoin-core", ""
"You need to rebuild the database using -reindex-chainstate to change -txindex"),
QT_TRANSLATE_NOOP("bitcoin-core", "%s corrupt, salvage failed"),
+QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high!"),
QT_TRANSLATE_NOOP("bitcoin-core", "(default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "(default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "-maxmempool must be at least %d MB"),
QT_TRANSLATE_NOOP("bitcoin-core", "<category> can be:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept command line and JSON-RPC commands"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Accept connections from outside (default: 1 if no -proxy or -connect)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Accept public REST requests (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
@@ -227,8 +246,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -%s address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write default address"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Chain selection options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Change index out of range"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Connect only to the specified node(s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect through SOCKS5 proxy"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connect to a node to retrieve peer addresses, and disconnect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Connection options:"),
@@ -273,6 +292,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Invalid amount for -paytxfee=<amount>: '%s' (
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid netmask specified in -whitelist: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Keep at most <n> unconnectable transactions in memory (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Keep the transaction memory pool below <n> megabytes (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Keypool ran out, please call keypoolrefill first"),
QT_TRANSLATE_NOOP("bitcoin-core", "Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Listen for connections on <port> (default: %u or testnet: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Loading addresses..."),
@@ -284,7 +304,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Maintain at most <n> connections to peers (de
QT_TRANSLATE_NOOP("bitcoin-core", "Make the wallet broadcast transactions"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Maximum per-connection send buffer, <n>*1000 bytes (default: %u)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Minimum bytes per sigop in transactions we relay and mine (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Node relay options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
@@ -309,9 +328,10 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Rewinding blocks..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Run in the background as a daemon and accept commands"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send trace/debug info to console instead of debug.log file"),
QT_TRANSLATE_NOOP("bitcoin-core", "Send transactions as zero-fee transactions if possible (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Send transactions with full-RBF opt-in enabled (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set database cache size in megabytes (%d to %d, default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set key pool size to <n> (default: %u)"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum BIP141 block cost (default: %d)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum BIP141 block weight (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set maximum block size in bytes (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Set the number of threads to service RPC calls (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Show all debugging options (usage: --help -help-debug)"),
@@ -324,14 +344,20 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Specify pid file (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify wallet file (within data directory)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Specify your own public address"),
QT_TRANSLATE_NOOP("bitcoin-core", "Spend unconfirmed change when sending transactions (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Starting network threads..."),
QT_TRANSLATE_NOOP("bitcoin-core", "The source code is available from %s."),
QT_TRANSLATE_NOOP("bitcoin-core", "The transaction amount is too small to pay the fee"),
+QT_TRANSLATE_NOOP("bitcoin-core", "The wallet will avoid paying less than the minimum relay fee."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
+QT_TRANSLATE_NOOP("bitcoin-core", "This is the minimum transaction fee you pay on every transaction."),
+QT_TRANSLATE_NOOP("bitcoin-core", "This is the transaction fee you will pay if you send a transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", "Threshold for disconnecting misbehaving peers (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Tor control port password (default: empty)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Tor control port to use if onion listening enabled (default: %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amount too small"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must be positive"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Transaction amounts must not be negative"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Transaction has too long of a mempool chain"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Transaction must have at least one recipient"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large for fee policy"),
QT_TRANSLATE_NOOP("bitcoin-core", "Transaction too large"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer (bind returned error %s)"),
@@ -343,6 +369,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported argument -debugnet ignored, use -
QT_TRANSLATE_NOOP("bitcoin-core", "Unsupported argument -tor found, use -onion."),
QT_TRANSLATE_NOOP("bitcoin-core", "Upgrade wallet to latest format on startup"),
QT_TRANSLATE_NOOP("bitcoin-core", "Use UPnP to map the listening port (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Use the test chain"),
QT_TRANSLATE_NOOP("bitcoin-core", "User Agent comment (%s) contains unsafe characters."),
QT_TRANSLATE_NOOP("bitcoin-core", "Username for JSON-RPC connections"),
QT_TRANSLATE_NOOP("bitcoin-core", "Verifying blocks..."),
diff --git a/src/qt/bitcoinunits.cpp b/src/qt/bitcoinunits.cpp
index 6490057897..4da414a4e3 100644
--- a/src/qt/bitcoinunits.cpp
+++ b/src/qt/bitcoinunits.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/bitcoinunits.h b/src/qt/bitcoinunits.h
index fda067b0b8..6ef37de380 100644
--- a/src/qt/bitcoinunits.h
+++ b/src/qt/bitcoinunits.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 87704c641d..bb10e49422 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,11 +6,13 @@
#include "bantablemodel.h"
#include "guiconstants.h"
+#include "guiutil.h"
#include "peertablemodel.h"
#include "chainparams.h"
#include "checkpoints.h"
#include "clientversion.h"
+#include "validation.h"
#include "net.h"
#include "txmempool.h"
#include "ui_interface.h"
@@ -128,7 +130,7 @@ double ClientModel::getVerificationProgress(const CBlockIndex *tipIn) const
LOCK(cs_main);
tip = chainActive.Tip();
}
- return Checkpoints::GuessVerificationProgress(Params().Checkpoints(), tip);
+ return GuessVerificationProgress(Params().TxData(), tip);
}
void ClientModel::updateTimer()
@@ -144,6 +146,11 @@ void ClientModel::updateNumConnections(int numConnections)
Q_EMIT numConnectionsChanged(numConnections);
}
+void ClientModel::updateNetworkActive(bool networkActive)
+{
+ Q_EMIT networkActiveChanged(networkActive);
+}
+
void ClientModel::updateAlert()
{
Q_EMIT alertsChanged(getStatusBarWarnings());
@@ -166,6 +173,21 @@ enum BlockSource ClientModel::getBlockSource() const
return BLOCK_SOURCE_NONE;
}
+void ClientModel::setNetworkActive(bool active)
+{
+ if (g_connman) {
+ g_connman->SetNetworkActive(active);
+ }
+}
+
+bool ClientModel::getNetworkActive() const
+{
+ if (g_connman) {
+ return g_connman->GetNetworkActive();
+ }
+ return false;
+}
+
QString ClientModel::getStatusBarWarnings() const
{
return QString::fromStdString(GetWarnings("gui"));
@@ -208,7 +230,7 @@ QString ClientModel::formatClientStartupTime() const
QString ClientModel::dataDir() const
{
- return QString::fromStdString(GetDataDir().string());
+ return GUIUtil::boostPathToQString(GetDataDir());
}
void ClientModel::updateBanlist()
@@ -232,6 +254,12 @@ static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConn
Q_ARG(int, newNumConnections));
}
+static void NotifyNetworkActiveChanged(ClientModel *clientmodel, bool networkActive)
+{
+ QMetaObject::invokeMethod(clientmodel, "updateNetworkActive", Qt::QueuedConnection,
+ Q_ARG(bool, networkActive));
+}
+
static void NotifyAlertChanged(ClientModel *clientmodel)
{
qDebug() << "NotifyAlertChanged";
@@ -272,6 +300,7 @@ void ClientModel::subscribeToCoreSignals()
// Connect signals to client
uiInterface.ShowProgress.connect(boost::bind(ShowProgress, this, _1, _2));
uiInterface.NotifyNumConnectionsChanged.connect(boost::bind(NotifyNumConnectionsChanged, this, _1));
+ uiInterface.NotifyNetworkActiveChanged.connect(boost::bind(NotifyNetworkActiveChanged, this, _1));
uiInterface.NotifyAlertChanged.connect(boost::bind(NotifyAlertChanged, this));
uiInterface.BannedListChanged.connect(boost::bind(BannedListChanged, this));
uiInterface.NotifyBlockTip.connect(boost::bind(BlockTipChanged, this, _1, _2, false));
@@ -283,6 +312,7 @@ void ClientModel::unsubscribeFromCoreSignals()
// Disconnect signals from client
uiInterface.ShowProgress.disconnect(boost::bind(ShowProgress, this, _1, _2));
uiInterface.NotifyNumConnectionsChanged.disconnect(boost::bind(NotifyNumConnectionsChanged, this, _1));
+ uiInterface.NotifyNetworkActiveChanged.disconnect(boost::bind(NotifyNetworkActiveChanged, this, _1));
uiInterface.NotifyAlertChanged.disconnect(boost::bind(NotifyAlertChanged, this));
uiInterface.BannedListChanged.disconnect(boost::bind(BannedListChanged, this));
uiInterface.NotifyBlockTip.disconnect(boost::bind(BlockTipChanged, this, _1, _2, false));
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 3fd8404cbb..c01c1a84cf 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -68,6 +68,10 @@ public:
bool inInitialBlockDownload() const;
//! Return true if core is importing blocks
enum BlockSource getBlockSource() const;
+ //! Return true if network activity in core is enabled
+ bool getNetworkActive() const;
+ //! Toggle network activity state in core
+ void setNetworkActive(bool active);
//! Return warnings to be displayed in status bar
QString getStatusBarWarnings() const;
@@ -91,6 +95,7 @@ Q_SIGNALS:
void numConnectionsChanged(int count);
void numBlocksChanged(int count, const QDateTime& blockDate, double nVerificationProgress, bool header);
void mempoolSizeChanged(long count, size_t mempoolSizeInBytes);
+ void networkActiveChanged(bool networkActive);
void alertsChanged(const QString &warnings);
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
@@ -103,6 +108,7 @@ Q_SIGNALS:
public Q_SLOTS:
void updateTimer();
void updateNumConnections(int numConnections);
+ void updateNetworkActive(bool networkActive);
void updateAlert();
void updateBanlist();
};
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 1a1671f0ee..f8aba70d92 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -15,7 +15,8 @@
#include "wallet/coincontrol.h"
#include "init.h"
-#include "main.h" // For minRelayTxFee
+#include "policy/policy.h"
+#include "validation.h" // For mempool
#include "wallet/wallet.h"
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
@@ -35,6 +36,13 @@ QList<CAmount> CoinControlDialog::payAmounts;
CCoinControl* CoinControlDialog::coinControl = new CCoinControl();
bool CoinControlDialog::fSubtractFeeFromAmount = false;
+bool CCoinControlWidgetItem::operator<(const QTreeWidgetItem &other) const {
+ int column = treeWidget()->sortColumn();
+ if (column == CoinControlDialog::COLUMN_AMOUNT || column == CoinControlDialog::COLUMN_DATE || column == CoinControlDialog::COLUMN_CONFIRMATIONS)
+ return data(column, Qt::UserRole).toLongLong() < other.data(column, Qt::UserRole).toLongLong();
+ return QTreeWidgetItem::operator<(other);
+}
+
CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
QDialog(parent),
ui(new Ui::CoinControlDialog),
@@ -52,7 +60,7 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge
unlockAction = new QAction(tr("Unlock unspent"), this); // we need to enable/disable this
// context menu
- contextMenu = new QMenu();
+ contextMenu = new QMenu(this);
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyAmountAction);
@@ -128,11 +136,9 @@ CoinControlDialog::CoinControlDialog(const PlatformStyle *_platformStyle, QWidge
ui->treeWidget->setColumnWidth(COLUMN_CONFIRMATIONS, 110);
ui->treeWidget->setColumnHidden(COLUMN_TXHASH, true); // store transaction hash in this column, but don't show it
ui->treeWidget->setColumnHidden(COLUMN_VOUT_INDEX, true); // store vout index in this column, but don't show it
- ui->treeWidget->setColumnHidden(COLUMN_AMOUNT_INT64, true); // store amount int64 in this column, but don't show it
- ui->treeWidget->setColumnHidden(COLUMN_DATE_INT64, true); // store date int64 in this column, but don't show it
// default view is sorted by amount desc
- sortView(COLUMN_AMOUNT_INT64, Qt::DescendingOrder);
+ sortView(COLUMN_AMOUNT, Qt::DescendingOrder);
// restore list mode and sortorder as a convenience feature
QSettings settings;
@@ -164,15 +170,6 @@ void CoinControlDialog::setModel(WalletModel *_model)
}
}
-// helper function str_pad
-QString CoinControlDialog::strPad(QString s, int nPadLength, QString sPadding)
-{
- while (s.length() < nPadLength)
- s = sPadding + s;
-
- return s;
-}
-
// ok button
void CoinControlDialog::buttonBoxClicked(QAbstractButton* button)
{
@@ -338,7 +335,7 @@ void CoinControlDialog::sortView(int column, Qt::SortOrder order)
sortColumn = column;
sortOrder = order;
ui->treeWidget->sortItems(column, order);
- ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder);
+ ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder);
}
// treeview: clicked on header
@@ -346,12 +343,10 @@ void CoinControlDialog::headerSectionClicked(int logicalIndex)
{
if (logicalIndex == COLUMN_CHECKBOX) // click on most left column -> do nothing
{
- ui->treeWidget->header()->setSortIndicator(getMappedColumn(sortColumn), sortOrder);
+ ui->treeWidget->header()->setSortIndicator(sortColumn, sortOrder);
}
else
{
- logicalIndex = getMappedColumn(logicalIndex, false);
-
if (sortColumn == logicalIndex)
sortOrder = ((sortOrder == Qt::AscendingOrder) ? Qt::DescendingOrder : Qt::AscendingOrder);
else
@@ -438,7 +433,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
{
CTxOut txout(amount, (CScript)std::vector<unsigned char>(24, 0));
txDummy.vout.push_back(txout);
- if (txout.IsDust(::minRelayTxFee))
+ if (txout.IsDust(dustRelayFee))
fDust = true;
}
}
@@ -476,21 +471,21 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
nQuantity++;
// Amount
- nAmount += out.tx->vout[out.i].nValue;
+ nAmount += out.tx->tx->vout[out.i].nValue;
// Priority
- dPriorityInputs += (double)out.tx->vout[out.i].nValue * (out.nDepth+1);
+ dPriorityInputs += (double)out.tx->tx->vout[out.i].nValue * (out.nDepth+1);
// Bytes
CTxDestination address;
int witnessversion = 0;
std::vector<unsigned char> witnessprogram;
- if (out.tx->vout[out.i].scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram))
+ if (out.tx->tx->vout[out.i].scriptPubKey.IsWitnessProgram(witnessversion, witnessprogram))
{
nBytesInputs += (32 + 4 + 1 + (107 / WITNESS_SCALE_FACTOR) + 4);
fWitness = true;
}
- else if(ExtractDestination(out.tx->vout[out.i].scriptPubKey, address))
+ else if(ExtractDestination(out.tx->tx->vout[out.i].scriptPubKey, address))
{
CPubKey pubkey;
CKeyID *keyid = boost::get<CKeyID>(&address);
@@ -551,10 +546,10 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
if (nChange > 0 && nChange < MIN_CHANGE)
{
CTxOut txout(nChange, (CScript)std::vector<unsigned char>(24, 0));
- if (txout.IsDust(::minRelayTxFee))
+ if (txout.IsDust(dustRelayFee))
{
if (CoinControlDialog::fSubtractFeeFromAmount) // dust-change will be raised until no dust
- nChange = txout.GetDustThreshold(::minRelayTxFee);
+ nChange = txout.GetDustThreshold(dustRelayFee);
else
{
nPayFee += nChange;
@@ -658,7 +653,7 @@ void CoinControlDialog::updateView()
model->listCoins(mapCoins);
BOOST_FOREACH(const PAIRTYPE(QString, std::vector<COutput>)& coins, mapCoins) {
- QTreeWidgetItem *itemWalletAddress = new QTreeWidgetItem();
+ CCoinControlWidgetItem *itemWalletAddress = new CCoinControlWidgetItem();
itemWalletAddress->setCheckState(COLUMN_CHECKBOX, Qt::Unchecked);
QString sWalletAddress = coins.first;
QString sWalletLabel = model->getAddressTableModel()->labelForAddress(sWalletAddress);
@@ -683,19 +678,19 @@ void CoinControlDialog::updateView()
CAmount nSum = 0;
int nChildren = 0;
BOOST_FOREACH(const COutput& out, coins.second) {
- nSum += out.tx->vout[out.i].nValue;
+ nSum += out.tx->tx->vout[out.i].nValue;
nChildren++;
- QTreeWidgetItem *itemOutput;
- if (treeMode) itemOutput = new QTreeWidgetItem(itemWalletAddress);
- else itemOutput = new QTreeWidgetItem(ui->treeWidget);
+ CCoinControlWidgetItem *itemOutput;
+ if (treeMode) itemOutput = new CCoinControlWidgetItem(itemWalletAddress);
+ else itemOutput = new CCoinControlWidgetItem(ui->treeWidget);
itemOutput->setFlags(flgCheckbox);
itemOutput->setCheckState(COLUMN_CHECKBOX,Qt::Unchecked);
// address
CTxDestination outputAddress;
QString sAddress = "";
- if(ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress))
+ if(ExtractDestination(out.tx->tx->vout[out.i].scriptPubKey, outputAddress))
{
sAddress = QString::fromStdString(CBitcoinAddress(outputAddress).ToString());
@@ -720,15 +715,16 @@ void CoinControlDialog::updateView()
}
// amount
- itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->vout[out.i].nValue));
- itemOutput->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(out.tx->vout[out.i].nValue), 15, " ")); // padding so that sorting works correctly
+ itemOutput->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, out.tx->tx->vout[out.i].nValue));
+ itemOutput->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong)out.tx->tx->vout[out.i].nValue)); // padding so that sorting works correctly
// date
itemOutput->setText(COLUMN_DATE, GUIUtil::dateTimeStr(out.tx->GetTxTime()));
- itemOutput->setText(COLUMN_DATE_INT64, strPad(QString::number(out.tx->GetTxTime()), 20, " "));
+ itemOutput->setData(COLUMN_DATE, Qt::UserRole, QVariant((qlonglong)out.tx->GetTxTime()));
// confirmations
- itemOutput->setText(COLUMN_CONFIRMATIONS, strPad(QString::number(out.nDepth), 8, " "));
+ itemOutput->setText(COLUMN_CONFIRMATIONS, QString::number(out.nDepth));
+ itemOutput->setData(COLUMN_CONFIRMATIONS, Qt::UserRole, QVariant((qlonglong)out.nDepth));
// transaction hash
uint256 txhash = out.tx->GetHash();
@@ -756,7 +752,7 @@ void CoinControlDialog::updateView()
{
itemWalletAddress->setText(COLUMN_CHECKBOX, "(" + QString::number(nChildren) + ")");
itemWalletAddress->setText(COLUMN_AMOUNT, BitcoinUnits::format(nDisplayUnit, nSum));
- itemWalletAddress->setText(COLUMN_AMOUNT_INT64, strPad(QString::number(nSum), 15, " "));
+ itemWalletAddress->setData(COLUMN_AMOUNT, Qt::UserRole, QVariant((qlonglong)nSum));
}
}
diff --git a/src/qt/coincontroldialog.h b/src/qt/coincontroldialog.h
index 7d73421e3a..0b8162f858 100644
--- a/src/qt/coincontroldialog.h
+++ b/src/qt/coincontroldialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -28,6 +28,17 @@ namespace Ui {
#define ASYMP_UTF8 "\xE2\x89\x88"
+class CCoinControlWidgetItem : public QTreeWidgetItem
+{
+public:
+ CCoinControlWidgetItem(QTreeWidget *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
+ CCoinControlWidgetItem(int type = Type) : QTreeWidgetItem(type) {}
+ CCoinControlWidgetItem(QTreeWidgetItem *parent, int type = Type) : QTreeWidgetItem(parent, type) {}
+
+ bool operator<(const QTreeWidgetItem &other) const;
+};
+
+
class CoinControlDialog : public QDialog
{
Q_OBJECT
@@ -59,13 +70,12 @@ private:
const PlatformStyle *platformStyle;
- QString strPad(QString, int, QString);
void sortView(int, Qt::SortOrder);
void updateView();
enum
{
- COLUMN_CHECKBOX,
+ COLUMN_CHECKBOX = 0,
COLUMN_AMOUNT,
COLUMN_LABEL,
COLUMN_ADDRESS,
@@ -73,30 +83,8 @@ private:
COLUMN_CONFIRMATIONS,
COLUMN_TXHASH,
COLUMN_VOUT_INDEX,
- COLUMN_AMOUNT_INT64,
- COLUMN_DATE_INT64
};
-
- // some columns have a hidden column containing the value used for sorting
- int getMappedColumn(int column, bool fVisibleColumn = true)
- {
- if (fVisibleColumn)
- {
- if (column == COLUMN_AMOUNT_INT64)
- return COLUMN_AMOUNT;
- else if (column == COLUMN_DATE_INT64)
- return COLUMN_DATE;
- }
- else
- {
- if (column == COLUMN_AMOUNT)
- return COLUMN_AMOUNT_INT64;
- else if (column == COLUMN_DATE)
- return COLUMN_DATE_INT64;
- }
-
- return column;
- }
+ friend class CCoinControlWidgetItem;
private Q_SLOTS:
void showMenu(const QPoint &);
diff --git a/src/qt/csvmodelwriter.cpp b/src/qt/csvmodelwriter.cpp
index f424e6cd98..df59927782 100644
--- a/src/qt/csvmodelwriter.cpp
+++ b/src/qt/csvmodelwriter.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/editaddressdialog.cpp b/src/qt/editaddressdialog.cpp
index a9ffe016fd..bb03c12f2d 100644
--- a/src/qt/editaddressdialog.cpp
+++ b/src/qt/editaddressdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/forms/modaloverlay.ui b/src/qt/forms/modaloverlay.ui
index 27998f90c5..65a7a6c77e 100644
--- a/src/qt/forms/modaloverlay.ui
+++ b/src/qt/forms/modaloverlay.ui
@@ -130,7 +130,7 @@ QLabel { color: rgb(40,40,40); }</string>
<item>
<widget class="QLabel" name="infoText">
<property name="text">
- <string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet. This means that recent transactions will not be visible, and the balance will not be up-to-date until this process has completed.</string>
+ <string>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
@@ -149,7 +149,7 @@ QLabel { color: rgb(40,40,40); }</string>
</font>
</property>
<property name="text">
- <string>Spending bitcoins may not be possible during that phase!</string>
+ <string>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
@@ -267,7 +267,7 @@ QLabel { color: rgb(40,40,40); }</string>
<item>
<widget class="QLabel" name="percentageProgress">
<property name="text">
- <string>~</string>
+ <string notr="true">~</string>
</property>
</widget>
</item>
diff --git a/src/qt/forms/sendcoinsdialog.ui b/src/qt/forms/sendcoinsdialog.ui
index 33db9f8938..ca8ecffafe 100644
--- a/src/qt/forms/sendcoinsdialog.ui
+++ b/src/qt/forms/sendcoinsdialog.ui
@@ -1064,7 +1064,7 @@
<number>0</number>
</property>
<property name="maximum">
- <number>24</number>
+ <number>23</number>
</property>
<property name="pageStep">
<number>1</number>
@@ -1111,7 +1111,7 @@
<item>
<widget class="QLabel" name="confirmationTargetLabel">
<property name="text">
- <string>(count)</string>
+ <string notr="true">(count)</string>
</property>
</widget>
</item>
diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h
index bab9923d20..1d21d8c766 100644
--- a/src/qt/guiconstants.h
+++ b/src/qt/guiconstants.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 42dafa1175..ea80a1f549 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,7 +11,7 @@
#include "primitives/transaction.h"
#include "init.h"
-#include "main.h" // For minRelayTxFee
+#include "policy/policy.h"
#include "protocol.h"
#include "script/script.h"
#include "script/standard.h"
@@ -55,6 +55,7 @@
#include <QSettings>
#include <QTextDocument> // for Qt::mightBeRichText
#include <QThread>
+#include <QMouseEvent>
#if QT_VERSION < 0x050000
#include <QUrl>
@@ -116,7 +117,7 @@ static std::string DummyAddress(const CChainParams &params)
std::vector<unsigned char> sourcedata = params.Base58Prefix(CChainParams::PUBKEY_ADDRESS);
sourcedata.insert(sourcedata.end(), dummydata, dummydata + sizeof(dummydata));
for(int i=0; i<256; ++i) { // Try every trailing byte
- std::string s = EncodeBase58(begin_ptr(sourcedata), end_ptr(sourcedata));
+ std::string s = EncodeBase58(sourcedata.data(), sourcedata.data() + sourcedata.size());
if (!CBitcoinAddress(s).IsValid())
return s;
sourcedata[sourcedata.size()-1] += 1;
@@ -256,7 +257,7 @@ bool isDust(const QString& address, const CAmount& amount)
CTxDestination dest = CBitcoinAddress(address.toStdString()).Get();
CScript script = GetScriptForDestination(dest);
CTxOut txOut(amount, script);
- return txOut.IsDust(::minRelayTxFee);
+ return txOut.IsDust(dustRelayFee);
}
QString HtmlEscape(const QString& str, bool fMultiLine)
@@ -291,17 +292,11 @@ void copyEntryData(QAbstractItemView *view, int column, int role)
}
}
-QVariant getEntryData(QAbstractItemView *view, int column, int role)
+QList<QModelIndex> getEntryData(QAbstractItemView *view, int column)
{
if(!view || !view->selectionModel())
- return QVariant();
- QModelIndexList selection = view->selectionModel()->selectedRows(column);
-
- if(!selection.isEmpty()) {
- // Return first item
- return (selection.at(0).data(role));
- }
- return QVariant();
+ return QList<QModelIndex>();
+ return view->selectionModel()->selectedRows(column);
}
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir,
@@ -591,7 +586,8 @@ void TableViewLastColumnResizingFixer::on_geometriesChanged()
* Initializes all internal variables and prepares the
* the resize modes of the last 2 columns of the table and
*/
-TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth) :
+TableViewLastColumnResizingFixer::TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent) :
+ QObject(parent),
tableView(table),
lastColumnMinimumWidth(lastColMinimumWidth),
allColumnsMinimumWidth(allColsMinimumWidth)
@@ -955,7 +951,7 @@ QString formatTimeOffset(int64_t nTimeOffset)
return QString(QObject::tr("%1 s")).arg(QString::number((int)nTimeOffset, 10));
}
-QString formateNiceTimeOffset(qint64 secs)
+QString formatNiceTimeOffset(qint64 secs)
{
// Represent time from last generated block in human readable text
QString timeBehindText;
@@ -965,11 +961,11 @@ QString formateNiceTimeOffset(qint64 secs)
const int YEAR_IN_SECONDS = 31556952; // Average length of year in Gregorian calendar
if(secs < 60)
{
- timeBehindText = QObject::tr("%n seconds(s)","",secs);
+ timeBehindText = QObject::tr("%n second(s)","",secs);
}
else if(secs < 2*HOUR_IN_SECONDS)
{
- timeBehindText = QObject::tr("%n minutes(s)","",secs/60);
+ timeBehindText = QObject::tr("%n minute(s)","",secs/60);
}
else if(secs < 2*DAY_IN_SECONDS)
{
@@ -991,4 +987,15 @@ QString formateNiceTimeOffset(qint64 secs)
}
return timeBehindText;
}
+
+void ClickableLabel::mouseReleaseEvent(QMouseEvent *event)
+{
+ Q_EMIT clicked(event->pos());
+}
+
+void ClickableProgressBar::mouseReleaseEvent(QMouseEvent *event)
+{
+ Q_EMIT clicked(event->pos());
+}
+
} // namespace GUIUtil
diff --git a/src/qt/guiutil.h b/src/qt/guiutil.h
index e28f68930f..5765b2ec4a 100644
--- a/src/qt/guiutil.h
+++ b/src/qt/guiutil.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,6 +14,7 @@
#include <QProgressBar>
#include <QString>
#include <QTableView>
+#include <QLabel>
#include <boost/filesystem.hpp>
@@ -67,10 +68,9 @@ namespace GUIUtil
/** Return a field of the currently selected entry as a QString. 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
*/
- QVariant getEntryData(QAbstractItemView *view, int column, int role);
+ QList<QModelIndex> getEntryData(QAbstractItemView *view, int column);
void setClipboard(const QString& str);
@@ -150,7 +150,7 @@ namespace GUIUtil
Q_OBJECT
public:
- TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth);
+ TableViewLastColumnResizingFixer(QTableView* table, int lastColMinimumWidth, int allColsMinimumWidth, QObject *parent);
void stretchColumnWidth(int column);
private:
@@ -200,20 +200,46 @@ namespace GUIUtil
/* Format a CNodeCombinedStats.nTimeOffset into a user-readable string. */
QString formatTimeOffset(int64_t nTimeOffset);
- QString formateNiceTimeOffset(qint64 secs);
+ QString formatNiceTimeOffset(qint64 secs);
+
+ class ClickableLabel : public QLabel
+ {
+ Q_OBJECT
+
+ Q_SIGNALS:
+ /** Emitted when the label is clicked. The relative mouse coordinates of the click are
+ * passed to the signal.
+ */
+ void clicked(const QPoint& point);
+ protected:
+ void mouseReleaseEvent(QMouseEvent *event);
+ };
+
+ class ClickableProgressBar : public QProgressBar
+ {
+ Q_OBJECT
+
+ Q_SIGNALS:
+ /** Emitted when the progressbar is clicked. The relative mouse coordinates of the click are
+ * passed to the signal.
+ */
+ void clicked(const QPoint& point);
+ protected:
+ void mouseReleaseEvent(QMouseEvent *event);
+ };
#if defined(Q_OS_MAC) && QT_VERSION >= 0x050000
// workaround for Qt OSX Bug:
// https://bugreports.qt-project.org/browse/QTBUG-15631
// QProgressBar uses around 10% CPU even when app is in background
- class ProgressBar : public QProgressBar
+ class ProgressBar : public ClickableProgressBar
{
bool event(QEvent *e) {
return (e->type() != QEvent::StyleAnimationUpdate) ? QProgressBar::event(e) : false;
}
};
#else
- typedef QProgressBar ProgressBar;
+ typedef ClickableProgressBar ProgressBar;
#endif
} // namespace GUIUtil
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 5a336b105e..e0678f45fc 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/intro.h b/src/qt/intro.h
index ee768a7ad8..5b428b379c 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/locale/bitcoin_af.ts b/src/qt/locale/bitcoin_af.ts
index 97ada8dd5c..8cbf5aadc5 100644
--- a/src/qt/locale/bitcoin_af.ts
+++ b/src/qt/locale/bitcoin_af.ts
@@ -22,6 +22,10 @@
<translation>&amp;Dupliseer</translation>
</message>
<message>
+ <source>C&amp;lose</source>
+ <translation>S&amp;luit</translation>
+ </message>
+ <message>
<source>Delete the currently selected address from the list</source>
<translation>Verwyder die adres wat u gekies het van die lys</translation>
</message>
@@ -37,6 +41,73 @@
<source>&amp;Delete</source>
<translation>&amp;Vee uit</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Kies die adres waarheen u munte wil stuur</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Kies die adres wat die munte moet ontvang</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>K&amp;ies</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Stuurders adresse</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Ontvanger adresse</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Hierdie is die adresse vanwaar u Bitcoin betalings stuur. U moet altyd die bedrag en die adres van die ontvanger nagaan voordat u enige munte stuur.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Hierdie is die adresse waar u Bitcoins sal ontvang. Ons beveel aan dat u 'n nuwe adres kies vir elke transaksie</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Dupliseer Adres</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Verander</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Voer adreslys uit</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Uitvoer was onsuksesvol</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Die adreslys kon nie in %1 gestoor word nie. Probeer asseblief weer.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Merk</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -56,6 +127,82 @@
<source>Repeat new passphrase</source>
<translation>Herhaal nuwe wagwoord</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Tik die nuwe wagwoord vir u beursie.&lt;br/&gt;Gerbuik asseblief 'n wagwoord met &lt;b&gt;tien of meer lukrake karakters&lt;/b&gt;, of &lt;b&gt;agt of meer woorde&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Kodifiseer beursie</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>U het u beursie se wagwoord nodig om toegang tot u beursie te verkry.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Sluit beursie oop</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>U het u beursie se wagwoord nodig om u beursie se kode te ontsyfer.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Ontsleutel beursie</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Verander wagwoord</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Tik die ou en die nuwe wagwoorde vir die beursie.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Bevestig dat die beursie gekodifiseer is</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Waarskuwing: Indien u die beursie kodifiseer en u vergeet u wagwoord &lt;b&gt;VERLOOR U AL U BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Is u seker dat u die beursie wil kodifiseer?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Beursie gekodifiseer</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>BELANGRIK: Alle vorige kopieë en rugsteun-weergawes wat u tevore van die gemaak het, moet vervang word met die jongste weergawe van u nuutste gekodifiseerde beursie. Alle vorige weergawes en rugsteun-kopieë van u beursie sal nutteloos raak die oomblik wat u die nuut-gekodifiseerde beursie begin gebruik.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Kodifikasie was onsuksesvol</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Weens 'n interne fout het kodifikasie het nie geslaag nie. U beursie is nie gekodifiseer nie</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Die wagwoorde stem nie ooreen nie.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Die beursie is nie oopgesluit nie</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>U het die verkeerde wagwoord ingetik.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>WAARSKUWING: Outomatiese Kapitalisering is aktief op u sleutelbord!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -87,14 +234,42 @@
<translation>&amp;Transaksies</translation>
</message>
<message>
+ <source>Browse transaction history</source>
+ <translation>Blaai deur transaksiegeskiedenis</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>&amp;Sluit</translation>
+ </message>
+ <message>
<source>Quit application</source>
<translation>Stop en verlaat die applikasie</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>&amp;Oor %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Wys inligting oor %1</translation>
+ </message>
+ <message>
+ <source>About &amp;Qt</source>
+ <translation>Oor &amp;Qt</translation>
+ </message>
+ <message>
+ <source>Show information about Qt</source>
+ <translation>Wys inligting oor Qt</translation>
+ </message>
+ <message>
<source>&amp;Options...</source>
<translation>&amp;Opsies</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Verander konfigurasie-opsies vir %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Kodifiseer Beursie</translation>
</message>
@@ -151,6 +326,10 @@
<translation>&amp;Ontvang</translation>
</message>
<message>
+ <source>&amp;Show / Hide</source>
+ <translation>&amp;Wys / Versteek</translation>
+ </message>
+ <message>
<source>Show or hide the main Window</source>
<translation>Wys of versteek die hoofbladsy</translation>
</message>
@@ -167,10 +346,18 @@
<translation>Verifieër boodskappe om seker te maak dat dit met die gespesifiseerde Bitcoin adresse</translation>
</message>
<message>
+ <source>&amp;File</source>
+ <translation>&amp;Leër</translation>
+ </message>
+ <message>
<source>&amp;Help</source>
<translation>&amp;Help</translation>
</message>
<message>
+ <source>Tabs toolbar</source>
+ <translation>Orebalk</translation>
+ </message>
+ <message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
<translation>Versoek betalings (genereer QR-kodes en bitcoin: URI's)</translation>
</message>
@@ -186,53 +373,459 @@
<source>Open a bitcoin: URI or payment request</source>
<translation>Skep 'n bitcoin: URI of betalingsversoek</translation>
</message>
+ <message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Blokke op skyf word geïndekseer...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Blokke op skyf word geprosesseer...</translation>
+ </message>
+ <message>
+ <source>No block source available...</source>
+ <translation>Geen blokbron beskikbaar...</translation>
+ </message>
+ <message>
+ <source>%1 behind</source>
+ <translation>%1 agter</translation>
+ </message>
+ <message>
+ <source>Last received block was generated %1 ago.</source>
+ <translation>Laaste ontvange blok is %1 gelede gegenereer.</translation>
+ </message>
+ <message>
+ <source>Transactions after this will not yet be visible.</source>
+ <translation>Transaksies hierna sal nog nie sigbaar wees nie.</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Fout</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Waarskuwing</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Inligting</translation>
+ </message>
+ <message>
+ <source>Up to date</source>
+ <translation>Op datum</translation>
+ </message>
+ <message>
+ <source>Catching up...</source>
+ <translation>Word op datum gebring...</translation>
+ </message>
+ <message>
+ <source>Date: %1
+</source>
+ <translation>Datum: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Adres: %1
+</translation>
+ </message>
+ <message>
+ <source>Sent transaction</source>
+ <translation>Gestuurde transaksie</translation>
+ </message>
+ <message>
+ <source>Incoming transaction</source>
+ <translation>Inkomende transaksie</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
+ <message>
+ <source>Bytes:</source>
+ <translation>Grepe:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Fooi:</translation>
+ </message>
+ <message>
+ <source>Dust:</source>
+ <translation>Stof:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Na Fooi:</translation>
+ </message>
+ <message>
+ <source>(un)select all</source>
+ <translation>(de)selekteer alle</translation>
+ </message>
+ <message>
+ <source>List mode</source>
+ <translation>Lysmodus</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Confirmations</source>
+ <translation>Bevestigings</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Bevestig</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
+ <message>
+ <source>Edit Address</source>
+ <translation>Wysig Adres</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
+ <message>
+ <source>name</source>
+ <translation>naam</translation>
+ </message>
</context>
<context>
<name>HelpMessageDialog</name>
- </context>
+ <message>
+ <source>version</source>
+ <translation>weergawe</translation>
+ </message>
+ <message>
+ <source>About %1</source>
+ <translation>Ongeveer %1</translation>
+ </message>
+ <message>
+ <source>UI Options:</source>
+ <translation>Gebruikerkoppelvlakopsies:</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Begin geminimeer</translation>
+ </message>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Alle instellings wat in die grafiese gebruikerkoppelvlak gewysig is, terugstel</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
+ <message>
+ <source>Welcome</source>
+ <translation>Welkom</translation>
+ </message>
+ <message>
+ <source>Welcome to %1.</source>
+ <translation>Welkom by %1.</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Fout</translation>
+ </message>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Hide</source>
+ <translation>Versteek</translation>
+ </message>
</context>
<context>
<name>OpenURIDialog</name>
</context>
<context>
<name>OptionsDialog</name>
+ <message>
+ <source>Options</source>
+ <translation>Opsies</translation>
+ </message>
+ <message>
+ <source>MB</source>
+ <translation>MG</translation>
+ </message>
+ <message>
+ <source>Accept connections from outside</source>
+ <translation>Verbindings van buite toelaat</translation>
+ </message>
+ <message>
+ <source>Allow incoming connections</source>
+ <translation>Inkomende verbindings toelaat</translation>
+ </message>
+ <message>
+ <source>Reset all client options to default.</source>
+ <translation>Alle kliëntopsies na verstek terugstel.</translation>
+ </message>
+ <message>
+ <source>Expert</source>
+ <translation>Kenner</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
+ <source>default</source>
+ <translation>verstek</translation>
+ </message>
+ <message>
+ <source>none</source>
+ <translation>geen</translation>
+ </message>
+ <message>
+ <source>Confirm options reset</source>
+ <translation>Bevestig terugstel van opsies</translation>
+ </message>
+ <message>
+ <source>Client restart required to activate changes.</source>
+ <translation>Kliënt moet herbegin word om veranderinge te aktiveer.</translation>
+ </message>
</context>
<context>
<name>OverviewPage</name>
+ <message>
+ <source>Available:</source>
+ <translation>Beskikbaar:</translation>
+ </message>
+ <message>
+ <source>Pending:</source>
+ <translation>Hangend:</translation>
+ </message>
+ <message>
+ <source>Immature:</source>
+ <translation>Onvolwasse:</translation>
+ </message>
+ <message>
+ <source>Balances</source>
+ <translation>Balanse</translation>
+ </message>
+ <message>
+ <source>Total:</source>
+ <translation>Totaal:</translation>
+ </message>
+ <message>
+ <source>Your current total balance</source>
+ <translation>U huidige totale balans</translation>
+ </message>
+ <message>
+ <source>Spendable:</source>
+ <translation>Besteebaar:</translation>
+ </message>
+ <message>
+ <source>Recent transactions</source>
+ <translation>Onlangse transaksies</translation>
+ </message>
+ </context>
+<context>
+ <name>PaymentServer</name>
</context>
<context>
<name>PeerTableModel</name>
+ <message>
+ <source>User Agent</source>
+ <translation>Gebruikeragent</translation>
+ </message>
</context>
<context>
<name>QObject</name>
+ <message>
+ <source>%1 d</source>
+ <translation>%1 d</translation>
+ </message>
+ <message>
+ <source>%1 h</source>
+ <translation>%1 u</translation>
+ </message>
+ <message>
+ <source>%1 m</source>
+ <translation>%1 m</translation>
+ </message>
+ <message>
+ <source>%1 s</source>
+ <translation>%1 s</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation>Geen</translation>
+ </message>
+ <message>
+ <source>N/A</source>
+ <translation>n.v.t.</translation>
+ </message>
+ <message>
+ <source>%1 ms</source>
+ <translation>%1 ms</translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 en %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
+ <message>
+ <source>N/A</source>
+ <translation>n.v.t.</translation>
+ </message>
+ <message>
+ <source>Client version</source>
+ <translation>Kliëntweergawe</translation>
+ </message>
+ <message>
+ <source>General</source>
+ <translation>Algemeen</translation>
+ </message>
+ <message>
+ <source>Network</source>
+ <translation>Netwerk</translation>
+ </message>
+ <message>
+ <source>Name</source>
+ <translation>Naam</translation>
+ </message>
+ <message>
+ <source>Number of connections</source>
+ <translation>Aantal verbindings</translation>
+ </message>
+ <message>
+ <source>Block chain</source>
+ <translation>Blokketting</translation>
+ </message>
+ <message>
+ <source>Current number of blocks</source>
+ <translation>Huidige aantal blokke</translation>
+ </message>
+ <message>
+ <source>Received</source>
+ <translation>Ontvang</translation>
+ </message>
+ <message>
+ <source>Sent</source>
+ <translation>Gestuur</translation>
+ </message>
+ <message>
+ <source>Banned peers</source>
+ <translation>Verbanne porture</translation>
+ </message>
+ <message>
+ <source>Whitelisted</source>
+ <translation>Gewitlys</translation>
+ </message>
+ <message>
+ <source>Direction</source>
+ <translation>Rigting</translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation>Weergawe</translation>
+ </message>
+ <message>
+ <source>User Agent</source>
+ <translation>Gebruikeragent</translation>
+ </message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
</context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Merk</translation>
+ </message>
</context>
<context>
- <name>SendCoinsDialog</name>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Merk</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
+ <name>SendCoinsDialog</name>
+ <message>
+ <source>Bytes:</source>
+ <translation>Grepe:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Fooi:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Na Fooi:</translation>
+ </message>
+ <message>
+ <source>Transaction Fee:</source>
+ <translation>Transaksiefooi:</translation>
+ </message>
+ <message>
+ <source>Choose...</source>
+ <translation>Kies...</translation>
+ </message>
+ <message>
+ <source>per kilobyte</source>
+ <translation>per kilogreep</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Versteek</translation>
+ </message>
+ <message>
+ <source>total at least</source>
+ <translation>totaal ten minste</translation>
+ </message>
+ <message>
+ <source>Dust:</source>
+ <translation>Stof:</translation>
+ </message>
+ <message>
+ <source>Balance:</source>
+ <translation>Balans:</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
+</context>
+<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -245,20 +838,118 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Merk</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Bevestig</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Merk</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Uitvoer was onsuksesvol</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Voer uit</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Voer die inligting op hierdie bladsy uit na 'n leer</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
<translation>Bitcoin Kern</translation>
</message>
<message>
+ <source>Information</source>
+ <translation>Inligting</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Waarskuwing</translation>
+ </message>
+ <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Moenie transaksies vir langer as &lt;n&gt; ure in die geheuepoel hou nie (verstek: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Insufficient funds</source>
+ <translation>Onvoldoende fondse</translation>
+ </message>
+ <message>
+ <source>Loading block index...</source>
+ <translation>Blokindeks word gelaai...</translation>
+ </message>
+ <message>
+ <source>Loading wallet...</source>
+ <translation>Beursie word gelaai...</translation>
+ </message>
+ <message>
+ <source>Rescanning...</source>
+ <translation>Word herskandeer...</translation>
+ </message>
+ <message>
+ <source>Done loading</source>
+ <translation>Klaar met laai</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Fout</translation>
+ </message>
+</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_af_ZA.ts b/src/qt/locale/bitcoin_af_ZA.ts
index e553fc7759..1db5008384 100644
--- a/src/qt/locale/bitcoin_af_ZA.ts
+++ b/src/qt/locale/bitcoin_af_ZA.ts
@@ -13,6 +13,21 @@
<source>&amp;Delete</source>
<translation>&amp;Verwyder</translation>
</message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -32,7 +47,71 @@
<source>Repeat new passphrase</source>
<translation>Herhaal nuwe wagfrase</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Enkripteer beursie</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Sluit beursie oop</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Hierdie operasie benodig 'n wagwoord om die beursie oop te sluit.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Sluit beursie oop</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Verander wagfrase</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Tik in die ou wagfrase en die nuwe wagfrase vir die beursie.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Bevestig beursie enkripsie.</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Die beursie is nou bewaak</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Die beursie kon nie bewaak word nie</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Beursie bewaaking het misluk as gevolg van 'n interne fout. Die beursie is nie bewaak nie!</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Die wagfrase stem nie ooreen nie</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Beursie oopsluiting het misluk</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Die wagfrase wat ingetik was om die beursie oop te sluit, was verkeerd.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Beursie dekripsie het misluk</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Die beursie se wagfrase verandering was suksesvol.</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -129,6 +208,18 @@
<source>Date</source>
<translation>Datum</translation>
</message>
+ <message>
+ <source>Copy address</source>
+ <translation>Maak kopie van adres</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
@@ -140,7 +231,27 @@
<source>&amp;Address</source>
<translation>&amp;Adres</translation>
</message>
-</context>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nuwe ontvangende adres</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nuwe stuurende adres</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Wysig ontvangende adres</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Wysig stuurende adres</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Kon nie die beursie oopsluit nie.</translation>
+ </message>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -159,6 +270,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Vorm</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -180,6 +298,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -190,6 +311,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>&amp;Information</source>
@@ -206,9 +333,48 @@
<source>&amp;Message:</source>
<translation>&amp;Boodskap:</translation>
</message>
- </context>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+</context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Bedrag</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Boodskap</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Boodskap</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -240,6 +406,14 @@
<source>S&amp;end</source>
<translation>S&amp;tuur</translation>
</message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -253,6 +427,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -277,12 +454,238 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Van</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>onbekend</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Na</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>eie adres</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiket</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Krediet</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>nie aanvaar nie</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Debiet</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Transaksie fooi</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Netto bedrag</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Boodskap</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Transaksie ID</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transaksie</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Bedrag</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>waar</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>onwaar</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipe</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Ontvang met</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Ontvang van</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Gestuur na</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Betalings Aan/na jouself</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Gemyn</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n.v.t)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen etiket)</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Datum en tyd wat die transaksie ontvang was.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipe transaksie.</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Alles</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Vandag</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Hierdie week</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Hierdie maand</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Verlede maand</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Hierdie jaar</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Reeks...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Ontvang met</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Gestuur na</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Aan/na jouself</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Gemyn</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Ander</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Min bedrag</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Maak kopie van adres</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipe</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Reeks:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>aan</translation>
+ </message>
+</context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Stuur Munstukke</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index af62207df2..15c5158f21 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -23,7 +23,7 @@
</message>
<message>
<source>C&amp;lose</source>
- <translation>&amp;اغلاق</translation>
+ <translation>ا&amp;غلاق</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;أمسح</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>اختر العنوان الذي سترسل له العملات</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>اختر العنوان الذي تستقبل عليه العملات</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;اختر</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>ارسال العناوين</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>استقبال العناوين</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>هذه هي عناوين Bitcion التابعة لك من أجل إرسال الدفعات. تحقق دائما من المبلغ و عنوان المرسل المستقبل قبل إرسال العملات</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>هذه هي عناوين Bitcion التابعة لك من أجل إستقبال الدفعات. ينصح استخدام عنوان جديد من أجل كل صفقة</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>انسخ العنوان</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>نسخ &amp;الوصف</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>تعديل</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>تصدير قائمة العناوين</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>ملف مفصول بفواصل (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>فشل التصدير</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>لقد حدث خطأ أثناء حفظ قائمة العناوين إلى %1. يرجى المحاولة مرة أخرى.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>وصف</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>عنوان</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(لا وصف)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,90 @@
<source>Repeat new passphrase</source>
<translation>ادخل كلمة المرور الجديدة مرة أخرى</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>أدخل عبارة مرور جديدة إلى المحفظة. الرجاء استخدام عبارة مرور تتكون من10 حروف عشوائية على الاقل, أو أكثر من 7 كلمات</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>تشفير المحفظة</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>هذه العملية تحتاج كلمة مرور محفظتك لفتحها</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>إفتح المحفظة</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>هذه العملية تحتاج كلمة مرور محفظتك لفك تشفيرها </translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>فك تشفير المحفظة</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>تغيير كلمة المرور</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>أدخل كلمة المرور القديمة والجديدة للمحفظة.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>تأكيد تشفير المحفظة</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>تحذير: إذا قمت بتشفير محفظتك وفقدت كلمة المرور الخاص بك, ستفقد كل عملات BITCOINS الخاصة بك.</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>هل أنت متأكد من رغبتك في تشفير محفظتك ؟</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>محفظة مشفرة</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>هام: أي نسخة إحتياطية سابقة قمت بها لمحفظتك يجب استبدالها بأخرى حديثة، مشفرة. لأسباب أمنية، النسخ الاحتياطية السابقة لملفات المحفظة الغير مشفرة تصبح عديمة الفائدة مع بداية استخدام المحفظة المشفرة الجديدة.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>فشل تشفير المحفظة</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>فشل تشفير المحفظة بسبب خطأ داخلي. لم يتم تشفير محفظتك.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>كلمتي المرور ليستا متطابقتان</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>فشل فتح المحفظة</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>كلمة المرور التي تم إدخالها لفك تشفير المحفظة غير صحيحة.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>فشل فك التشفير المحفظة</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>لقد تم تغير عبارة مرور المحفظة بنجاح</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>تحذير: مفتاح الحروف الكبيرة مفعل</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -111,6 +266,10 @@
<translation>الخروج من التطبيق</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>حوالي %1</translation>
+ </message>
+ <message>
<source>Show information about %1</source>
<translation>أظهر المعلومات حولة %1</translation>
</message>
@@ -127,6 +286,10 @@
<translation>&amp;خيارات ...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>تغيير خيارات الإعداد لأساس ل%1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;تشفير المحفظة</translation>
</message>
@@ -262,17 +425,9 @@
<source>No block source available...</source>
<translation>لا يوجد أي مصدر الكتلة</translation>
</message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>لم يتم معالجة أي كتلة سجل المعاملات</numerusform><numerusform>تم معالجة كتلة واحدة سجل المعاملات</numerusform><numerusform>تم معالجة كتلتين سجل المعاملات</numerusform><numerusform>تم معالجة %n كتل سجل المعاملات</numerusform><numerusform>تم معالجة %n كتلة سجل المعاملات</numerusform><numerusform>تم معالجة %n كتلة سجل المعاملات</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>0 ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعتين</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعات</numerusform></translation>
- </message>
<message>
- <source>%1 and %2</source>
- <translation>%1 و %2</translation>
+ <source>%1 behind</source>
+ <translation>خلف %1</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
@@ -299,6 +454,14 @@
<translation>محدث</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>بين اشارة المساعدة %1 للحصول على قائمة من خيارات اوامر البت كوين المحتملة </translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>الزبون %1</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>اللحاق بالركب ...</translation>
</message>
@@ -311,12 +474,30 @@
</translation>
</message>
<message>
+ <source>Amount: %1
+</source>
+ <translation>الكمية %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>نوع %1
+</translation>
+ </message>
+ <message>
<source>Label: %1
</source>
<translation>علامه: %1
</translation>
</message>
<message>
+ <source>Address: %1
+</source>
+ <translation>عنوان %1
+</translation>
+ </message>
+ <message>
<source>Sent transaction</source>
<translation>المعاملات المرسلة</translation>
</message>
@@ -332,7 +513,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>المحفظة &lt;b&gt;مشفرة&lt;/b&gt; و &lt;b&gt;مقفلة&lt;/b&gt; حاليا</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -352,10 +533,6 @@
<translation>القيمة :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>افضلية :</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>رسوم :</translation>
</message>
@@ -408,8 +585,52 @@
<translation>تأكيد</translation>
</message>
<message>
- <source>Priority</source>
- <translation>أفضلية</translation>
+ <source>Copy address</source>
+ <translation> انسخ عنوان</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation> انسخ التسمية</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>نسخ الكمية</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>نسخ رقم العملية</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>نسخ الكمية </translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>نسخ الرسوم</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>نسخ بعد الرسوم</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>نسخ التعديل</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>نعم</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>لا</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(لا وصف)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(تغير)</translation>
</message>
</context>
<context>
@@ -434,6 +655,38 @@
<source>&amp;Address</source>
<translation>&amp;العنوان</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>عنوان أستلام جديد</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>عنوان إرسال جديد</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>تعديل عنوان الأستلام</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>تعديل عنوان الارسال</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>العنوان المدخل "%1" ليس عنوان بيت كوين صحيح.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>هدا العنوان "%1" موجود مسبقا في دفتر العناوين</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation> يمكن فتح المحفظة.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>فشل توليد مفتاح جديد.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -465,6 +718,10 @@
<translation>النسخة</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>حوالي %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>خيارات سطر الأوامر</translation>
</message>
@@ -512,6 +769,14 @@
<translation>أهلا</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation> اهلا بكم في %1</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>بما انه هذه اول مرة لانطلاق هذا البرنامج, فيمكنك ان تختار اين سيخزن %1 بياناته</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>استخدام دليل البانات الافتراضي</translation>
</message>
@@ -520,11 +785,26 @@
<translation>استخدام دليل بيانات مخصص:</translation>
</message>
<message>
+ <source>Error: Specified data directory "%1" cannot be created.</source>
+ <translation>خطأ: لا يمكن تكوين دليل بيانات مخصص ل %1</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>خطأ</translation>
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>نمودج</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>إخفاء</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -538,6 +818,10 @@
<source>Select payment request file</source>
<translation>حدد ملف طلب الدفع</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>حدد ملف طلب الدفع لفتحه</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -662,13 +946,20 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>استجابة سيئة من الملقم %1</translation>
+ </message>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
<message>
<source>Amount</source>
- <translation>المبلغ</translation>
+ <translation>مبلغ</translation>
</message>
<message>
<source>%1 h</source>
@@ -682,8 +973,34 @@
<source>N/A</source>
<translation>غير معروف</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 و %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
</context>
<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;حفظ الصورة</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;نسخ الصورة</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>حفظ رمز الاستجابة السريعة QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>صورة PNG (*.png)</translation>
+ </message>
+</context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -868,6 +1185,18 @@
<source>Remove</source>
<translation>ازل</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation> انسخ التسمية</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>انسخ الرسالة</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>نسخ الكمية</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -887,7 +1216,54 @@
<source>&amp;Save Image...</source>
<translation>&amp;حفظ الصورة</translation>
</message>
-</context>
+ <message>
+ <source>Payment information</source>
+ <translation>معلومات الدفع</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation> URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>عنوان</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>مبلغ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>وصف</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>رسالة </translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>تاريخ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>وصف</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>رسالة </translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(لا وصف)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>( لا رسائل )</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -915,10 +1291,6 @@
<translation>القيمة :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>افضلية :</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>رسوم :</translation>
</message>
@@ -960,7 +1332,7 @@
</message>
<message>
<source>Dust:</source>
- <translation>غبار</translation>
+ <translation>غبار:</translation>
</message>
<message>
<source>Clear &amp;All</source>
@@ -978,6 +1350,54 @@
<source>S&amp;end</source>
<translation>&amp;ارسال</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>نسخ الكمية </translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>نسخ الكمية</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>نسخ الرسوم</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>نسخ بعد الرسوم</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>نسخ التعديل</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 الى %2</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>أو</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>تأكيد الإرسال Coins</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>المبلغ المدفوع يجب ان يكون اكبر من 0</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>القيمة تتجاوز رصيدك</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>المجموع يتجاوز رصيدك عندما يتم اضافة %1 رسوم العملية</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(لا وصف)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1029,7 +1449,18 @@
<source>Pay To:</source>
<translation>ادفع &amp;الى :</translation>
</message>
- </context>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>إدخال تسمية لهذا العنوان لإضافته إلى دفتر العناوين الخاص بك</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>نعم</translation>
+ </message>
+</context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1087,7 +1518,51 @@
<source>Verify &amp;Message</source>
<translation>تحقق &amp;الرسالة</translation>
</message>
- </context>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>اضغط "توقيع الرسالة" لتوليد التوقيع</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>العنوان المدخل غير صالح</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>الرجاء التأكد من العنوان والمحاولة مرة اخرى</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>العنوان المدخل لا يشير الى مفتاح</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>تم الغاء عملية فتح المحفظة</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>المفتاح الخاص للعنوان المدخل غير موجود.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>فشل توقيع الرسالة.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>الرسالة موقعة.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>فضلا تاكد من التوقيع وحاول مرة اخرى</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>فشلت عملية التأكد من الرسالة.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>تم تأكيد الرسالة.</translation>
+ </message>
+</context>
<context>
<name>SplashScreen</name>
<message>
@@ -1099,16 +1574,358 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>مفتوح حتى %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1 غير متواجد</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>غير مؤكدة/%1</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>تأكيد %1</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>الحالة.</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, لم يتم حتى الآن البث بنجاح</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>تاريخ</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>المصدر</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>تم اصداره.</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>من</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>غير معروف</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>الى</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>عنوانه</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>علامة</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>غير مقبولة</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>دين</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>رسوم المعاملة</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>رسالة </translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>تعليق</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>رقم المعاملة</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>تاجر</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>معاملة</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>مبلغ</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>صحيح</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>خاطئ</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>يبين هذا الجزء وصفا مفصلا لهده المعاملة</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>تاريخ</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>النوع</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>وصف</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>مفتوح حتى %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>غير متصل</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>يتعارض</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>لم يتم تلقى هذه الكتلة (Block) من قبل أي العقد الأخرى وربما لن تكون مقبولة!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>ولدت ولكن لم تقبل</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>استقبل مع</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>استقبل من</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>أرسل إلى</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>دفع لنفسك</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Mined</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>غير متوفر</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(لا وصف)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>حالة المعاملة. تحوم حول هذا الحقل لعرض عدد التأكيدات.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>التاريخ والوقت الذي تم فيه تلقي المعاملة.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>نوع المعاملات</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>المبلغ الذي أزيل أو أضيف الى الرصيد</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>الكل</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>اليوم</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>هدا الاسبوع</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>هدا الشهر</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>الشهر الماضي</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>هدا العام</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>المدى...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>استقبل مع</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>أرسل إلى</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>إليك</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Mined</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>اخرى</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>ادخل عنوان أووصف للبحث</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>الحد الأدنى</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation> انسخ عنوان</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation> انسخ التسمية</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>نسخ الكمية</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>نسخ رقم العملية</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>عدل الوصف</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>عرض تفاصيل المعاملة</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>ملف مفصول بفواصل (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>تأكيد</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>تاريخ</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>النوع</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>وصف</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>عنوان</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>العنوان</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>فشل التصدير</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>نجح التصدير</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>المدى:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>الى</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>إرسال Coins</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;تصدير</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>تحميل البيانات في علامة التبويب الحالية إلى ملف.</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>نسخ احتياط للمحفظة</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>فشل النسخ الاحتياطي</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>نجاح النسخ الاحتياطي</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1119,14 +1936,14 @@
<translation>حدد مجلد المعلومات</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>قبول الاتصالات من خارج</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>جوهر البيت كوين</translation>
</message>
<message>
+ <source>The %s developers</source>
+ <translation>%s المبرمجون</translation>
+ </message>
+ <message>
<source>Error: Disk space is low!</source>
<translation>تحذير: مساحة القرص منخفضة</translation>
</message>
@@ -1159,10 +1976,6 @@
<translation>قيمة العملية صغيره جدا</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>يجب ان يكون قيمة العملية بالموجب</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>المعاملة طويلة جدا</translation>
</message>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 5894148fe0..d2c52f2c16 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>Выдаліць</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Выбраць адрас, куды выслаць сродкі</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Выбраць адрас, на які атрымаць сродкі</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Выбраць</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>адрасы Адпраўкі</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>адрасы Прымання</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Тут знаходзяцца Біткойн-адрасы для высылання плацяжоў. Заўсёды спраўджвайце колькасць і адрас прызначэння перад здзяйсненнем транзакцыі.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Тут знаходзяцца Біткойн-адрасы для прымання плацяжоў. Пажадана выкарыстоўваць новы адрас для кожнай транзакцыі.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>Капіяваць адрас</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Капіяваць Метку</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>Рэдагаваць</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Экспартаваць Спіс Адрасоў</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Коскамі падзелены файл (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Экспартаванне няўдалае</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Адбылася памылка падчас спробы захаваць адрас у %1. Паспрабуйце зноў.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрас</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>непазначаны</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,90 @@
<source>Repeat new passphrase</source>
<translation>Паўтарыце новую кодавую фразу</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Увядзіце новы пароль для гаманца.&lt;br/&gt;Парольная фраза павинна складацца&lt;b&gt; не меньш чым з дзесяці сімвалаў&lt;/b&gt;, ці &lt;b&gt;больш чым з васьмі слоў&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Зашыфраваць гаманец.</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Гэтая аперацыя патрабуе кодавую фразу, каб рзблакаваць гаманец.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Разблакаваць гаманец</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Гэтая аперацыя патрабуе пароль каб расшыфраваць гаманец.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Рачшыфраваць гаманец</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Змяніць пароль</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Увядзіце стары пароль і новы пароль для гаманца.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Пацвердзіце шыфраванне гаманца</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Увага: калі вы зашыфруеце свой гаманец і страціце парольную фразу, то &lt;b&gt;СТРАЦІЦЕ ЎСЕ СВАЕ БІТКОЙНЫ&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Ці ўпэўненыя вы, што жадаеце зашыфраваць свой гаманец?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Гаманец зашыфраваны</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>ВАЖНА: Усе папярэднія копіі гаманца варта замяніць новым зашыфраваным файлам. У мэтах бяспекі папярэднія копіі незашыфраванага файла-гаманца стануць неўжывальнымі, калі вы станеце карыстацца новым зашыфраваным гаманцом.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Шыфраванне гаманца няўдалае</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Шыфраванне гаманца не адбылося з-за ўнутранай памылкі. Гаманец незашыфраваны.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Уведдзеныя паролі не супадаюць</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Разблакаванне гаманца няўдалае</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Уведзены пароль для расшыфравання гаманца памылковы</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Расшыфраванне гаманца няўдалае</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Парольная фраза гаманца паспяхова зменена.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Увага: Caps Lock уключаны!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -234,38 +389,10 @@
<source>&amp;Command-line options</source>
<translation>Опцыі каманднага радка</translation>
</message>
- <message numerus="yes">
- <source>%n active connection(s) to Bitcoin network</source>
- <translation><numerusform>%n актыўнае злучэнне з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform></translation>
- </message>
<message>
<source>No block source available...</source>
<translation>Крыніца блокаў недасяжная...</translation>
</message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>Апрацаваны %n блок гісторыі транзакцый.</numerusform><numerusform>Апрацавана %n блокі гісторыі транзакцый.</numerusform><numerusform>Апрацавана %n блокаў гісторыі транзакцый.</numerusform><numerusform>Апрацавана %n блокаў гісторыі транзакцый.</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n гадзіна</numerusform><numerusform>%n гадзіны</numerusform><numerusform>%n гадзін</numerusform><numerusform>%n гадзін</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n дзень</numerusform><numerusform>%n дні</numerusform><numerusform>%n дзён</numerusform><numerusform>%n дзён</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n тыдзень</numerusform><numerusform>%n тыдні</numerusform><numerusform>%n тыдняў</numerusform><numerusform>%n тыдняў</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 і %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n год</numerusform><numerusform>%n гады</numerusform><numerusform>%n гадоў</numerusform><numerusform>%n гадоў</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 таму</translation>
@@ -344,7 +471,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Гаманец &lt;b&gt;зашыфраваны&lt;/b&gt; і зараз &lt;b&gt;заблакаваны&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -360,10 +487,6 @@
<translation>Колькасць:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Прыярытэт:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Камісія:</translation>
</message>
@@ -412,10 +535,62 @@
<translation>Пацверджана</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Прыярытэт</translation>
+ <source>Copy address</source>
+ <translation>Капіяваць адрас</translation>
</message>
-</context>
+ <message>
+ <source>Copy label</source>
+ <translation>Капіяваць пазнаку</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Капіяваць ID транзакцыі</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Замкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Адамкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>так</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>не</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>непазначаны</translation>
+ </message>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -430,6 +605,34 @@
<source>&amp;Address</source>
<translation>Адрас</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Новы адрас для атрымання</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Новы адрас для дасылання</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Рэдагаваць адрас прымання</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Рэдагаваць адрас дасылання</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Уведзены адрас "%1" ужо ў кніге адрасоў</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Немагчыма разблакаваць гаманец</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Генерацыя новага ключа няўдалая</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -464,6 +667,10 @@
<source>command-line options</source>
<translation>опцыі каманднага радка</translation>
</message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Стартаваць ммінімізаванай</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -475,15 +682,14 @@
<source>Error</source>
<translation>Памылка</translation>
</message>
- <message numerus="yes">
- <source>%n GB of free space available</source>
- <translation><numerusform>%n Гб вольнага месца даступна</numerusform><numerusform>%n Гб вольнага месца даступна</numerusform><numerusform>%n Гб вольнага месца даступна</numerusform><numerusform>%n Гб вольнага месца даступна</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>(of %n GB needed)</source>
- <translation><numerusform>(з %n Гб патрэбна)</numerusform><numerusform>(з %n Гб патрэбна)</numerusform><numerusform>(з %n Гб патрэбна)</numerusform><numerusform>(з %n Гб патрэбна)</numerusform></translation>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Форма</translation>
</message>
-</context>
+ </context>
<context>
<name>OpenURIDialog</name>
<message>
@@ -514,6 +720,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -522,6 +731,16 @@
<source>Amount</source>
<translation>Колькасць</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 і %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -544,13 +763,56 @@
<source>&amp;Label:</source>
<translation>Метка:</translation>
</message>
- </context>
+ <message>
+ <source>Copy label</source>
+ <translation>Капіяваць пазнаку</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
<source>Copy &amp;Address</source>
<translation>Капіяваць адрас</translation>
</message>
+ <message>
+ <source>Address</source>
+ <translation>Адрас</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Колькасць</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Паведамленне</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Паведамленне</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>непазначаны</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -575,10 +837,6 @@
<translation>Колькасць:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Прыярытэт:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Камісія:</translation>
</message>
@@ -602,7 +860,43 @@
<source>Confirm the send action</source>
<translation>Пацвердзіць дасыланне</translation>
</message>
- </context>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Пацвердзіць дасыланне манет</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Велічыня плацяжу мае быць больш за 0.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>непазначаны</translation>
+ </message>
+</context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -641,8 +935,15 @@
<source>Memo:</source>
<translation>Памятка:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Увядзіце пазнаку гэтаму адрасу, каб дадаць яго ў адрасную кнігу</translation>
+ </message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -675,16 +976,274 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/непацверджана</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 пацверджанняў</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Статус</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, пакуль не было паспяхова транслявана</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>невядома</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Паведамленне</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Каментар</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Колькасць</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Гэтая панэль паказвае дэтальнае апісанне транзакцыі</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тып</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Пацверджана (%1 пацверджанняў)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Гэты блок не быў прыняты іншымі вузламі і магчыма не будзе ўхвалены!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Згенеравана, але не прынята</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Прынята з</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Прынята ад</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Даслана да</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Плацёж самому сабе</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Здабыта</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>непазначаны</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Статус транзакцыі. Навядзіце курсар на гэтае поле, каб паказаць колькасць пацверджанняў.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Дата і час, калі транзакцыя была прынята.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Тып транзакцыі</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Колькасць аднятая ці даданая да балансу.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Усё</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Сёння</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Гэты тыдзень</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Гэты месяц</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Мінулы месяц</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Гэты год</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Прамежак...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Прынята з</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Даслана да</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Да сябе</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Здабыта</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Іншыя</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Увядзіце адрас ці пазнаку для пошуку</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Мін. колькасць</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Капіяваць адрас</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Капіяваць пазнаку</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Капіяваць ID транзакцыі</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Рэдагаваць пазнаку</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Коскамі падзелены файл (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Пацверджана</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тып</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрас</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Экспартаванне няўдалае</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Прамежак:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>да</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Даслаць Манеты</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>Экспарт</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Экспартаваць гэтыя звесткі у файл</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index acb60cf41c..5a0fd2aec2 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Изтриване</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Изберете адрес, на който да се изпращат монети</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Изберете адрес, на който ще получавате монети</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Избери</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Адреси за изпращане</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Адреси за получаване</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Това са адресите на получателите на плащания. Винаги проверявайте размера на сумата и адреса на получателя, преди да изпратите монети.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Това са Вашите Биткойн адреси,благодарение на които ще получавате плащания.Препоръчително е да използвате нови адреси за получаване на всяка транзакция.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Копирай адрес</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Копирай &amp;име</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Редактирай</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Изнасяне на списъка с адреси</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>CSV файл (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Грешка при изнасянето</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Възникна грешка при опита за запазване на списъка с адреси в %1.Моля опитайте отново.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Име</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без име)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,90 @@
<source>Repeat new passphrase</source>
<translation>Въведете новата парола повторно</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Въведете новата парола към портфейла.&lt;br/&gt;Моля ползвайте парола съставена от &lt;b&gt;десет или повече произволни символа&lt;/b&gt;, или &lt;b&gt;осем или повече думи&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Шифриране на портфейла</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Тази операция изисква Вашата парола за отключване на портфейла.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Отключване на портфейла</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Тази операция изисква Вашата парола за дешифриране на портфейла.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Дешифриране на портфейла</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Смяна на паролата</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Въведете старата парола и новата прола към портфейла.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Потвърдете на шифрирането на портфейла</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>ВНИМАНИЕ: Ако шифрирате вашият портфейл и изгубите паролата си, &lt;b&gt;ЩЕ ИЗГУБИТЕ ВСИЧКИТЕ СИ БИТКОИНИ&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Наистина ли желаете да шифрирате портфейла си?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Портфейлът е шифриран</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>ВАЖНО: Всички стари запазвания, които сте направили на Вашият портфейл трябва да замените с запазване на новополучения, шифриран портфейл. От съображения за сигурност, предишните запазвания на нешифрирани портфейли ще станат неизползваеми веднага, щом започнете да използвате новият, шифриран портфейл.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Шифрирането беше неуспешно</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Шифрирането на портфейла беше неуспешно, поради софтуерен проблем. Портфейлът не е шифриран.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Паролите не съвпадат</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Неуспешно отключване на портфейла</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Паролата въведена за дешифриране на портфейла е грешна.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Дешифрирането на портфейла беше неуспешно</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Паролата на портфейла беше променена успешно.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Внимание: Caps Lock (главни букви) е включен.</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -258,10 +413,6 @@
<source>&amp;Command-line options</source>
<translation>&amp;Налични команди</translation>
</message>
- <message numerus="yes">
- <source>%n active connection(s) to Bitcoin network</source>
- <translation><numerusform>%n активна връзка към Биткойн мрежата</numerusform><numerusform>%n активни връзки към Биткойн мрежата</numerusform></translation>
- </message>
<message>
<source>Indexing blocks on disk...</source>
<translation>Индексиране на блокове на диска...</translation>
@@ -274,30 +425,6 @@
<source>No block source available...</source>
<translation>Липсва източник на блоковете...</translation>
</message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>Преработен %n блок от историята с транзакции.</numerusform><numerusform>Преработени %n блокове от историята с транзакции.</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n ден</numerusform><numerusform>%n дни</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n седмица</numerusform><numerusform>%n седмици</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 и %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 зад</translation>
@@ -384,7 +511,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Портфейлът е &lt;b&gt;криптиран&lt;/b&gt; и &lt;b&gt;заключен&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +531,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Такса:</translation>
</message>
@@ -460,8 +583,76 @@
<translation>Потвърдени</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Приоритет</translation>
+ <source>Copy address</source>
+ <translation>Копирай адрес</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копирай име</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копирай сума</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Копирай транзакция с ID</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Заключване на неизхарченото</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Отключване на неизхарченото</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Копиране на количеството</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Копиране на данък добавена стойност</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Копиране след прилагане на данък добавена стойност</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Копиране на байтовете</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Копирай прахта:</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Копирай рестото</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 заключен)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>да</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>не</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без име)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>ресто от %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(промени)</translation>
</message>
</context>
<context>
@@ -486,6 +677,38 @@
<source>&amp;Address</source>
<translation>&amp;Адрес</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Нов адрес за получаване</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Нов адрес за изпращане</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Редактиране на адрес за получаване</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Редактиране на адрес за изпращане</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>"%1" не е валиден Биткоин адрес.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Вече има адрес "%1" в списъка с адреси.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Отключването на портфейла беше неуспешно.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Създаването на ключ беше неуспешно.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -587,15 +810,22 @@
<source>Error</source>
<translation>Грешка</translation>
</message>
- <message numerus="yes">
- <source>%n GB of free space available</source>
- <translation><numerusform>%n GB свободно пространство на разположение</numerusform><numerusform>%n GB свободно пространство на разположение</numerusform></translation>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Формуляр</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Време на последния блок</translation>
</message>
- <message numerus="yes">
- <source>(of %n GB needed)</source>
- <translation><numerusform>(%n GB е нужен)</numerusform><numerusform>(%n GB са нужни)</numerusform></translation>
+ <message>
+ <source>Hide</source>
+ <translation>Скрий</translation>
</message>
-</context>
+ </context>
<context>
<name>OpenURIDialog</name>
<message>
@@ -830,17 +1060,80 @@
</message>
</context>
<context>
- <name>PeerTableModel</name>
+ <name>PaymentServer</name>
<message>
- <source>User Agent</source>
- <translation>Клиент на потребителя</translation>
+ <source>Payment request error</source>
+ <translation>Възникна грешка по време назаявката за плащане</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Време за отговор</translation>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Биткойн не можe да се стартира: click-to-pay handler</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Справяне с URI</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Невалиден адрес на плащане %1</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Файл за справяне със заявки</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Заявката за плащане беше отхвърлена</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Мрежата от която се извършва заявката за плащане не съвпада с мрежата на клиента.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Заявката за плащане е изтекла.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Невалидна заявка за плащане.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Заявената сума за плащане: %1 е твърде малка (счита се за отпадък)</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Възстановяване на сума от %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Заявката за плащане %1 е твърде голям (%2 байта, позволени %3 байта).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Грешка при комуникацията с %1: %2</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Възникна проблем при свързването със сървър %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Грешка в мрежата по време на заявката</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Плащането е прието</translation>
</message>
</context>
<context>
+ <name>PeerTableModel</name>
+ <message>
+ <source>User Agent</source>
+ <translation>Клиент на потребителя</translation>
+ </message>
+ </context>
+<context>
<name>QObject</name>
<message>
<source>Amount</source>
@@ -878,6 +1171,32 @@
<source>%1 ms</source>
<translation>%1 милисекунда</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 и %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Запиши изображение...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Копирай изображение</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Запази QR Код</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG Изображение (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1112,6 +1431,18 @@
<source>Remove</source>
<translation>Премахване</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копирай име</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Копиране на съобщението</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копирай сума</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1131,8 +1462,59 @@
<source>&amp;Save Image...</source>
<translation>&amp;Запиши изображение...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Изискване на плащане от %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Данни за плащането</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Сума</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Име</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Съобщение</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Грешка при създаването на QR Code от URI.</translation>
+ </message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Име</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Съобщение</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без име)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(без съобщение)</translation>
+ </message>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -1163,10 +1545,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Такса:</translation>
</message>
@@ -1211,10 +1589,6 @@
<translation>По избор:</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Време за потвърждение:</translation>
- </message>
- <message>
<source>normal</source>
<translation>нормален</translation>
</message>
@@ -1254,6 +1628,82 @@
<source>S&amp;end</source>
<translation>И&amp;зпрати</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Копиране на количеството</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копирай сума</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Копиране на данък добавена стойност</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Копиране след прилагане на данък добавена стойност</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Копиране на байтовете</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Копирай прахта:</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Копирай рестото</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Наистина ли искате да изпратите?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>добавено като такса за транзакция</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>или</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Потвърждаване</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Сумата трябва да е по-голяма от 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Сумата надвишава текущия баланс</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Сумата при добавяне на данък добавена стойност по %1 транзакцията надвишава сумата по вашата сметка.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Грешка при създаването на транзакция!</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Заявката за плащане е изтекла.</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Внимание: Невалиден Биткойн адрес</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Внимание:Неизвестен адрес за промяна</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без име)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1305,6 +1755,17 @@
<source>Memo:</source>
<translation>Бележка:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Въведете име за този адрес, за да го добавите в списъка с адреси</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Да</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1375,7 +1836,59 @@
<source>Verify &amp;Message</source>
<translation>Потвърди &amp;съобщението</translation>
</message>
- </context>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Натиснете "Подписване на съобщение" за да създадете подпис</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Въведеният адрес е невалиден.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Моля проверете адреса и опитайте отново.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Въведеният адрес не може да се съпостави с валиден ключ.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Отключването на портфейла беше отменено.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Не е наличен частен ключ за въведеният адрес.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Подписването на съобщение беше неуспешно.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Съобщението е подписано.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Подписът не може да бъде декодиран.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Проверете подписа и опитайте отново.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Подписът не отговаря на комбинацията от съобщение и адрес.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Проверката на съобщението беше неуспешна.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Съобщението е потвърдено.</translation>
+ </message>
+</context>
<context>
<name>SplashScreen</name>
<message>
@@ -1391,16 +1904,434 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Подлежи на промяна до %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/офлайн</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/непотвърдени</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>включена в %1 блока</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Статус</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, все още не е изпратено</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Източник</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Издадени</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>От</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>неизвестен</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>За</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>собствен адрес</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>само гледане</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>име</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Кредит</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>не е приет</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Дебит</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Общ дълг</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Общ дълг</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Такса</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Нетна сума</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Съобщение</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Коментар</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Търговец</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Генерираните монети трябва да отлежат %1 блока преди да могат да бъдат похарчени. Когато генерираш блока, той се разпространява в мрежата, за да се добави в блок-веригата. Ако не успее да се добави във веригата, неговия статус ще се стане "неприет" и няма да може да се похарчи. Това е възможно да се случи случайно, ако друг възел генерира блок няколко секунди след твоя.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Информация за грешките</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Транзакция</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Сума</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>true</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>false</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Описание на транзакцията</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тип</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Име</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Подлежи на промяна до %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Извън линия</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Непотвърдено</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Потвърждаване (%1 от %2 препоръчвани потвърждения)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Потвърдени (%1 потвърждения)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>Конфликтно</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Неплатим (%1 потвърждения, ще бъде платим след %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Блокът не е получен от останалите участници и най-вероятно няма да бъде одобрен.</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Генерирана, но отхвърлена от мрежата</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Получени</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Получен от</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Изпратени на</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Плащане към себе си</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Емитирани</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>само гледане</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без име)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Състояние на транзакцията. Задръжте върху това поле за брой потвърждения.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Дата и час на получаване на транзакцията.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Вид транзакция.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Сума извадена или добавена към баланса.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Всички</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Днес</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Тази седмица</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Този месец</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Предния месец</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Тази година</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>От - до...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Получени</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Изпратени на</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Собствени</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Емитирани</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Други</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Търсене по адрес или име</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Минимална сума</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Копирай адрес</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копирай име</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копирай сума</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Копирай транзакция с ID</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Редактирай име</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Подробности за транзакцията</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Изнасяне историята на транзакциите</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>CSV файл (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Потвърдени</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>само гледане</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тип</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Име</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ИД</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Грешка при изнасянето</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Изнасянето е успешна</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Историята с транзакциите беше успешно запазена в %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>От:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>до</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Няма зареден портфейл.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Изпращане</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>Изнеси</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Запишете данните от текущия раздел във файл</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Запазване на портфейла</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Информация за портфейла (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Неуспешно запазване на портфейла</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Възникна грешка при запазването на информацията за портфейла в %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Успешно запазване на портфейла</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Информацията за портфейла беше успешно запазена в %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1419,18 +2350,10 @@
<translation>Въведете Ваш публичен адрес</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Приемайте връзки отвън.(по подразбиране:1 в противен случай -proxy или -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Биткойн ядро</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Сложете в бял списък пиъри,свързващи се от дадената интернет маска или айпи адрес.Може да бъде заложено неколкократно.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; може да бъде:</translation>
</message>
@@ -1491,10 +2414,6 @@
<translation>Сумата на транзакцията е твърде малка</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Сумите на транзакциите трябва да са положителни</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Транзакцията е твърде голяма</translation>
</message>
diff --git a/src/qt/locale/bitcoin_bg_BG.ts b/src/qt/locale/bitcoin_bg_BG.ts
index 4bddb5ff4a..d982da4dd8 100644
--- a/src/qt/locale/bitcoin_bg_BG.ts
+++ b/src/qt/locale/bitcoin_bg_BG.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>Изтрий</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Избери адреса на който да пратиш монети</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Избери адреса на който да получиш монети</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Избери</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Адрес за пращане</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Адрес за получаване</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Тези са вашите Биткойн адреси за изпращане на монети. Винаги проверявайте количеството и получаващия адрес преди изпращане. </translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Това са вашите Биткойн адреси за получаване на монети. Препоръчително е да ползвате нов адрес на всяка транзакция.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>Копирай адрес</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Копирай етикет</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>Редактирай</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Изнеси лист с адреси</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Изнасянето се провали</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Получи се грешка при запазването на листа с адреси към %1. Моля опитайте пак.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Етикет</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без етикет)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +131,35 @@
<source>Repeat new passphrase</source>
<translation>Повтори парола</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Криптирай портфейл</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Тази операция изисква вашата парола на портфейла за отключването на портфейла.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Отключи портфейла</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Тази операция изисква вашата парола на портфейла за декриптирането на портфейла.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Декриптирай портфейл</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Промени парола</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Потвърди криптирането на порфейла</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -165,6 +264,10 @@
</context>
<context>
<name>CoinControlDialog</name>
+ <message>
+ <source>(no label)</source>
+ <translation>(без етикет)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
@@ -179,6 +282,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -188,12 +294,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -201,14 +316,40 @@
</context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Етикет</translation>
+ </message>
</context>
<context>
- <name>SendCoinsDialog</name>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Етикет</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без етикет)</translation>
+ </message>
</context>
<context>
+ <name>SendCoinsDialog</name>
+ <message>
+ <source>(no label)</source>
+ <translation>(без етикет)</translation>
+ </message>
+</context>
+<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -221,12 +362,62 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Етикет</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(без етикет)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Етикет</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Изнасянето се провали</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>Изнеси</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Изнеси данните в избрания раздел към файл</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index ed259c4d08..c09d857632 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Elimina</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Trieu l'adreça on enviar les monedes</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Trieu l'adreça on rebre les monedes</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Tria</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Adreces d'enviament</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Adreces de recepció</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copia l'eti&amp;queta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Edita</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exporta la llista d'adreces</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer separat per comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Repetiu la nova contrasenya</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Encripta el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloqueja el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Aquesta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desencripta el moneder</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Canvia la contrasenya</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduïu la contrasenya antiga i la contrasenya nova al moneder.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirma l'encriptació del moneder</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Esteu segur que voleu encriptar el vostre moneder?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Moneder encriptat</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>Ara es tancarà el %1 per finalitzar el procés d'encriptació. Recordeu que encriptar el vostre moneder no garanteix que les vostres bitcoins no puguin ser robades per programari maliciós que infecti l'ordinador.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder. Per motius de seguretat, les còpies de seguretat anteriors del fitxer de moneder no encriptat esdevindran inusables tan aviat com començar a utilitzar el nou moneder encriptat.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>L'encriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Les contrasenyes introduïdes no coincideixen.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>El desbloqueig del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>La desencriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La contrasenya del moneder ha estat modificada correctament.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Avís: Les lletres majúscules estan activades!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -111,6 +270,14 @@
<translation>Surt de l'aplicació</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>Qu&amp;ant al %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Mosta informació sobre el %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Quant a &amp;Qt</translation>
</message>
@@ -123,6 +290,10 @@
<translation>&amp;Opcions...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Modifica les opcions de configuració de %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Encripta el moneder...</translation>
</message>
@@ -140,13 +311,25 @@
</message>
<message>
<source>&amp;Receiving addresses...</source>
- <translation>Adreces de &amp;recepció</translation>
+ <translation>Adreces de &amp;recepció...</translation>
</message>
<message>
<source>Open &amp;URI...</source>
<translation>Obre un &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Feu clic per inhabilitar l'activitat de la xarxa.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>S'ha inhabilitat l'activitat de la xarxa.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Feu clic per tornar a habilitar l'activitat de la xarxa.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>S'estan reindexant els blocs al disc...</translation>
</message>
@@ -251,32 +434,20 @@
<translation><numerusform>%n connexió activa a la xarxa Bitcoin</numerusform><numerusform>%n connexions actives a la xarxa Bitcoin</numerusform></translation>
</message>
<message>
- <source>No block source available...</source>
- <translation>No hi ha cap font de bloc disponible...</translation>
- </message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>S'han processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
+ <source>Indexing blocks on disk...</source>
+ <translation>S'estan indexant els blocs al disc...</translation>
</message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dia</numerusform><numerusform>%n dies</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n setmana</numerusform><numerusform>%n setmanes</numerusform></translation>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>S'estan processant els blocs al disc...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 i %2</translation>
+ <source>No block source available...</source>
+ <translation>No hi ha cap font de bloc disponible...</translation>
</message>
<message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n any</numerusform><numerusform>%n anys</numerusform></translation>
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>S'ha processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
</message>
<message>
<source>%1 behind</source>
@@ -307,6 +478,14 @@
<translation>Al dia</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Mostra el missatge d'ajuda del %1 per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>Client de %1</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>S'està posant al dia ...</translation>
</message>
@@ -349,6 +528,14 @@
<translation>Transacció entrant</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>La generació de la clau HD és &lt;b&gt;habilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>La generació de la clau HD és &lt;b&gt;inhabilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;desbloquejat&lt;/b&gt;</translation>
</message>
@@ -356,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>S'ha produït un error fatal. Bitcoin no pot continuar amb seguretat i finalitzarà.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -376,12 +567,8 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
- <translation>Comissió</translation>
+ <translation>Comissió:</translation>
</message>
<message>
<source>Dust:</source>
@@ -432,8 +619,84 @@
<translation>Confirmat</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioritat</translation>
+ <source>Copy address</source>
+ <translation>Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copia l'ID de transacció</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloquejada)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sí</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>no</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Aquesta etiqueta es torna vermella si cap recipient rep un import inferior al llindar de polsim actual.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Pot variar en +/- %1 satoshi(s) per entrada.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>canvia de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(canvia)</translation>
</message>
</context>
<context>
@@ -458,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Adreça</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nova adreça de recepció</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nova adreça d'enviament</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Edita l'adreça de recepció</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Edita l'adreça d'enviament</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>No s'ha pogut desbloquejar el moneder.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Ha fallat la generació d'una clau nova.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -493,6 +788,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>Quant al %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Opcions de línia d'ordres</translation>
</message>
@@ -528,12 +827,28 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Mostra la pantalla de benvinguda a l'inici (per defecte: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Reinicialitza tots els canvis de configuració fets des de la interfície gràfica</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
<source>Welcome</source>
- <translation>Us donem la benviguda</translation>
+ <translation>Us donem la benvinguda</translation>
+ </message>
+ <message>
+ <source>Welcome to %1.</source>
+ <translation>Us donem la benvinguda a %1.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Com és la primera vegada que s'executa el programa, podeu triar on %1 emmagatzemarà les dades.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 baixarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim %2GB de dades s'emmagatzemaran en aquest directori, i augmentarà al llarg del temps. El moneder també s'emmagatzemarà en aquest directori.</translation>
</message>
<message>
<source>Use the default data directory</source>
@@ -561,6 +876,37 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulari</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Últim temps de bloc</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progrés</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>s'està calculant...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Temps estimat restant fins sincronitzat</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Amaga</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Desconegut. Sincronització de les capçaleres (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -578,6 +924,10 @@
<source>Select payment request file</source>
<translation>Selecciona un fitxer de sol·licitud de pagament</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Seleccioneu el fitxer de sol·licitud de pagament per obrir</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -590,6 +940,14 @@
<translation>&amp;Principal</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Inicieu %1 automàticament després d'entrar en el sistema.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Inicia %1 en l'entrada al sistema</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>Mida de la memòria cau de la base de &amp;dades</translation>
</message>
@@ -726,6 +1084,14 @@
<translation>&amp;Finestra</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>Ama&amp;ga la icona de la safata del sistema.</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Amaga la icona de la safata</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Mostra només la icona de la barra en minimitzar la finestra.</translation>
</message>
@@ -746,6 +1112,10 @@
<translation>&amp;Llengua de la interfície d'usuari:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Aquí es pot definir la llengua de la interfície d'usuari. Aquest paràmetre tindrà efecte en reiniciar el %1.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>&amp;Unitats per mostrar els imports en:</translation>
</message>
@@ -870,6 +1240,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Error de la sol·licitud de pagament</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>No es pot iniciar bitcoin: controlador click-to-pay</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Gestió d'URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Adreça de pagament no vàlida %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>La sol·licitud de pagament s'ha rebutjat</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La sol·licitud de pagament no està inicialitzada.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Sol·licitud de pagament no vàlida.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reemborsament de %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>La sol·licitud de pagament %1 és massa gran (%2 bytes, permès %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Error en comunicar amb %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>No es pot analitzar la sol·licitud de pagament!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mala resposta del servidor %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Error en la sol·licitud de xarxa</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pagament reconegut</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -879,11 +1340,7 @@
<source>Node/Service</source>
<translation>Node/Servei</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Temps de ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -922,6 +1379,32 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 i %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>De&amp;sa la imatge...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copia la imatge</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Desa el codi QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imatge PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -950,6 +1433,10 @@
<translation>Utilitzant BerkeleyDB versió</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Datadir</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>&amp;Temps d'inici</translation>
</message>
@@ -1110,14 +1597,6 @@
<translation>Neteja la consola</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Desconnecta el node</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Bandeja el node durant</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hora</translation>
</message>
@@ -1134,10 +1613,6 @@
<translation>1 &amp;any</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Desbandeja el node</translation>
- </message>
- <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Utilitza les fletxes d'amunt i avall per navegar per l'historial, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
</message>
@@ -1264,6 +1739,18 @@
<source>Remove</source>
<translation>Esborra</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copia el missatge</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1283,6 +1770,73 @@
<source>&amp;Save Image...</source>
<translation>De&amp;sa la imatge...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Sol·licita un pagament a %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informació de pagament</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Error en codificar l'URI en un codi QR.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(sense missatge)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(no s'ha sol·licitat import)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Sol·licitat</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1319,10 +1873,6 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Comissió:</translation>
</message>
@@ -1391,10 +1941,6 @@
<translation>(No s'ha inicialitzat encara la comissió intel·ligent. Normalment pren uns pocs blocs...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Temps de confirmació:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1412,7 +1958,7 @@
</message>
<message>
<source>Clear all fields of the form.</source>
- <translation>Netejar tots els camps del formulari.</translation>
+ <translation>Esborra tots els camps del formuari.</translation>
</message>
<message>
<source>Dust:</source>
@@ -1434,6 +1980,106 @@
<source>S&amp;end</source>
<translation>E&amp;nvia</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Esteu segur que ho voleu enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>S'ha afegit una taxa de transacció</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Import total %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>o</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirma l'enviament de monedes</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>L'adreça del destinatari no és vàlida. Torneu-la a comprovar.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>L'import a pagar ha de ser major que 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>L'import supera el vostre balanç.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>El total excedeix el vostre balanç quan s'afegeix la comissió a la transacció %1.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>S'ha trobat una adreça duplicada: les adreces només s'haurien d'utilitzar una vegada cada una.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>La creació de la transacció ha fallat!</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Una comissió superior a %1 es considera una comissió absurdament alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Paga només la comissió necessària de %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Avís: adreça Bitcoin no vàlida</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Avís: adreça de canvi desconeguda</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1451,7 +2097,7 @@
</message>
<message>
<source>Choose previously used address</source>
- <translation>Escull una adreça feta servir anteriorment</translation>
+ <translation>Tria les adreces fetes servir amb anterioritat</translation>
</message>
<message>
<source>This is a normal payment.</source>
@@ -1513,6 +2159,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llibreta d'adreces</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1545,11 +2202,11 @@
</message>
<message>
<source>Alt+A</source>
- <translation>Alt+A</translation>
+ <translation>Alta+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
- <translation>Enganxa l'adreça del porta-retalls</translation>
+ <translation>Enganxar adreça del porta-retalls</translation>
</message>
<message>
<source>Alt+P</source>
@@ -1607,6 +2264,58 @@
<source>Reset all verify message fields</source>
<translation>Neteja tots els camps de verificació de missatge</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>L'adreça introduïda no és vàlida.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>L'adreça introduïda no referencia a cap clau.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>El desbloqueig del moneder ha estat cancelat.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clau privada per a la adreça introduïda no està disponible.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>La signatura del missatge ha fallat.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Missatge signat.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La signatura no s'ha pogut descodificar.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Comproveu la signatura i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La signatura no coincideix amb el resum del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Ha fallat la verificació del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Missatge verificat.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1623,11 +2332,404 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/fora de línia</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/sense confirmar</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 confirmacions</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Estat</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, encara no ha estat emès correctement</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Font</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Generada</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>De</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconegut</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>A</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>adreça pròpia</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiqueta</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Crèdit</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>no acceptat</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Dèbit</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Dèbit total</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Crèdit total</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Comissió de transacció</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Import net</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentari</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID de la transacció</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Mercader</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu aquest bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Informació de depuració</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transacció</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Entrades</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>cert</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>fals</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Aquest panell mostra una descripció detallada de la transacció</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Fora de línia</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Sense confirmar</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonada</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmat (%1 confirmacions)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflicte</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Aquest bloc no ha estat rebut per cap altre node i probablement no serà acceptat!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generat però no acceptat</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebuda amb</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Rebuda de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviada a</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pagament a un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minada</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Estat de la transacció. Desplaceu-vos sobre aquest camp per mostrar el nombre de confirmacions.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Data i hora en que la transacció va ser rebuda.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipus de transacció.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Si està implicada o no una adreça només de lectura en la transacció.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Intenció/propòsit de la transacció definida per l'usuari.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Import extret o afegit del balanç.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Tot</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Avui</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Aquesta setmana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Aquest mes</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>El mes passat</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Enguany</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rang...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebuda amb</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviada a</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>A un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minada</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Altres</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Introduïu una adreça o una etiqueta per cercar</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Import mínim</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copia l'ID de transacció</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copia la transacció crua</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar etiqueta</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostra detalls de la transacció</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exporta l'historial de transacció</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer separat per comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmat</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Només de lectura</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>S'ha produït un error en provar de desar l'historial de transacció a %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportació amb èxit</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>L'historial de transaccions s'ha desat correctament a %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rang:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>a</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1637,6 +2739,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>No s'ha carregat cap moneder.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Envia monedes</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exporta</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Còpia de seguretat del moneder</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Dades del moneder (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Ha fallat la còpia de seguretat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>S'ha produït un error en provar de desar les dades del moneder a %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>La còpia de seguretat s'ha realitzat correctament</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>S'han desat les dades del moneder correctament a %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1699,18 +2850,10 @@
<translation>No s'ha pogut iniciar el servidor HTTP. Vegeu debug.log per a més detalls.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee és molt elevat. Aquesta és la comissió de transacció que podeu pagar quan les estimacions de comissions no estan disponibles.</translation>
- </message>
- <message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Vincula a una adreça específica i sempre escolta-hi. Utilitza la notació [host]:port per IPv6</translation>
</message>
@@ -1719,10 +2862,6 @@
<translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuït sota llicència de programari MIT. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
</message>
@@ -1731,22 +2870,6 @@
<translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>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</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Avís: la xarxa no sembla que hi estigui plenament d'acord. Alguns miners sembla que estan experimentant problemes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Avís: sembla que no estem plenament d'acord amb els nostres iguals! Podria caler que actualitzar l'aplicació, o potser que ho facin altres nodes.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Afegeix a la llista blanca els iguals que es connecten de la màscara de xarxa o adreça IP donada. Es pot especificar moltes vegades.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; pot ser:</translation>
</message>
@@ -1755,10 +2878,6 @@
<translation>Opcions de la creació de blocs:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Connecta només al(s) node(s) especificats</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opcions de connexió:</translation>
</message>
@@ -1847,6 +2966,10 @@
<translation>Utilitza UPnP per a mapejar el port d'escolta (per defecte: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Utilitza la cadena de proves</translation>
+ </message>
+ <message>
<source>Verifying blocks...</source>
<translation>S'estan verificant els blocs...</translation>
</message>
@@ -1859,6 +2982,14 @@
<translation>El moneder %s resideix fora del directori de dades %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Opcions de depuració/proves del moneder:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Cal reescriure el moneder: reinicieu %s per a completar-ho</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Opcions de moneder:</translation>
</message>
@@ -1903,10 +3034,6 @@
<translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Genera a l'atzar credencials per a cada connexió proxy. Això habilita l'aïllament del flux de Tor (per defecte: %u)</translation>
</message>
@@ -1919,10 +3046,6 @@
<translation>L'import de la transacció és massa petit per enviar-la després que se'n dedueixi la comissió</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
</message>
@@ -1948,7 +3071,7 @@
</message>
<message>
<source>Information</source>
- <translation>&amp;Informació</translation>
+ <translation>Informació</translation>
</message>
<message>
<source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
@@ -2007,10 +3130,6 @@
<translation>Import de la transacció massa petit</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Els imports de les transaccions han de ser positius</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transacció massa gran per a la política de comissions</translation>
</message>
@@ -2135,10 +3254,6 @@
<translation>Defineix la mida clau disponible a &lt;n&gt; (per defecte: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Defineix la mida de bloc mínima en bytes (per defecte: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Defineix el nombre de fils a crides de servei RPC (per defecte: %d)</translation>
</message>
@@ -2159,10 +3274,22 @@
<translation>Gasta el canvi no confirmat en enviar les transaccions (per defecte: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>S'estan iniciant els fils de la xarxa...</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Llindar per a desconnectar els iguals de comportament qüestionable (per defecte: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Els imports de la transacció no han de ser negatius</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>La transacció ha de tenir com a mínim un destinatari</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index df0f750a61..c4748c0afa 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Elimina</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Trieu una adreça on voleu enviar monedes</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Trieu l'adreça on voleu rebre monedes</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>T&amp;ria</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>S'estan enviant les adreces</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>S'estan rebent les adreces</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Estes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Estes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copia l'&amp;etiqueta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Edita</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exporta la llista d'adreces</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer de separació amb comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>S'ha produït un error en guardar la llista d'adreces a %1. Torneu-ho a provar.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,90 @@
<source>Repeat new passphrase</source>
<translation>Repetiu la nova contrasenya</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Encripta el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Esta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloqueja el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Esta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desencripta el moneder</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Canvia la contrasenya</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduïu la contrasenya antiga i la contrasenya nova al moneder.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirma l'encriptació del moneder</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Esteu segur que voleu encriptar el vostre moneder?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Moneder encriptat</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANT: Tota copia de seguretat que hàgeu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>L'encriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>La contrasenya introduïda no coincideix.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>El desbloqueig del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>La desencriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La contrasenya del moneder ha estat modificada correctament.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Avís: Les lletres majúscules estan activades!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -238,38 +393,10 @@
<source>&amp;Command-line options</source>
<translation>Opcions de la &amp;línia d'ordes</translation>
</message>
- <message numerus="yes">
- <source>%n active connection(s) to Bitcoin network</source>
- <translation><numerusform>%n connexió activa a la xarxa Bitcoin</numerusform><numerusform>%n connexions actives a la xarxa Bitcoin</numerusform></translation>
- </message>
<message>
<source>No block source available...</source>
<translation>No hi ha cap font de bloc disponible...</translation>
</message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>Proccessats %n bloc de l'historial de transaccions.</numerusform><numerusform>Proccessats %n blocs de l'historial de transaccions.</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dia</numerusform><numerusform>%n dies</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n setmana</numerusform><numerusform>%n setmanes</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 i %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n any</numerusform><numerusform>%n anys</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 darrere</translation>
@@ -348,7 +475,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -368,10 +495,6 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Comissió</translation>
</message>
@@ -424,8 +547,80 @@
<translation>Confirmat</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioritat</translation>
+ <source>Copy address</source>
+ <translation>Copiar adreça </translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacció</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloquejada)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sí</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>no</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Pot variar +/- %1 satoshi(s) per entrada.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>canvia de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(canvia)</translation>
</message>
</context>
<context>
@@ -450,6 +645,38 @@
<source>&amp;Address</source>
<translation>&amp;Adreça</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nova adreça de recepció.</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nova adreça d'enviament</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Edita les adreces de recepció</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Edita les adreces d'enviament</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>No s'ha pogut desbloquejar el moneder.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Ha fallat la generació d'una nova clau.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -496,6 +723,22 @@
<source>command-line options</source>
<translation>Opcions de la línia d'ordes</translation>
</message>
+ <message>
+ <source>UI Options:</source>
+ <translation>Opcions d'interfície:</translation>
+ </message>
+ <message>
+ <source>Set language, for example "de_DE" (default: system locale)</source>
+ <translation>Defineix un idioma, per exemple «de_DE» (per defecte: preferències locals de sistema)</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Inicia minimitzat</translation>
+ </message>
+ <message>
+ <source>Set SSL root certificates for payment request (default: -system-)</source>
+ <translation>Defineix certificats arrel SSL per a la sol·licitud de pagament (per defecte: -sistema-)</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -519,15 +762,22 @@
<source>Error</source>
<translation>Error</translation>
</message>
- <message numerus="yes">
- <source>%n GB of free space available</source>
- <translation><numerusform>%n GB d'espai lliure disponible</numerusform><numerusform>%n GB d'espai lliure disponible</numerusform></translation>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulari</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Últim temps de bloc</translation>
</message>
- <message numerus="yes">
- <source>(of %n GB needed)</source>
- <translation><numerusform>(de %n GB necessari)</numerusform><numerusform>(de %n GB necessaris)</numerusform></translation>
+ <message>
+ <source>Hide</source>
+ <translation>Amaga</translation>
</message>
-</context>
+ </context>
<context>
<name>OpenURIDialog</name>
<message>
@@ -546,6 +796,10 @@
<source>Select payment request file</source>
<translation>Selecciona un fitxer de sol·licitud de pagament</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Selecciona el fitxer de sol·licitud de pagament per obrir</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -814,6 +1068,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Error en la sol·licitud de pagament</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>No es pot iniciar bitcoin: gestor clica-per-pagar</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Gestió d'URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Adreça de pagament no vàlida %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>La sol·licitud de pagament s'ha rebutjat</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La sol·licitud de pagament no està inicialitzada.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Sol·licitud de pagament no vàlida.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reemborsament de %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>La sol·licitud de pagament %1 és massa gran (%2 bytes, permés %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Error en comunicar amb %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>No es pot analitzar la sol·licitud de pagament!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mala resposta del servidor %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Error en la sol·licitud de xarxa</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pagament reconegut</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -823,11 +1168,7 @@
<source>Node/Service</source>
<translation>Node/Servei</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Temps de ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -866,6 +1207,32 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 i %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Guarda la imatge...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copia la imatge</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Guarda el codi QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imatge PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1106,7 +1473,7 @@
</message>
<message>
<source>Clear all fields of the form.</source>
- <translation>Esborra tots els camps del formuari.</translation>
+ <translation>Netejar tots els camps del formulari.</translation>
</message>
<message>
<source>Clear</source>
@@ -1136,6 +1503,18 @@
<source>Remove</source>
<translation>Esborra</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copia el missatge</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1155,8 +1534,67 @@
<source>&amp;Save Image...</source>
<translation>&amp;Guarda la imatge...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Sol·licita un pagament a %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informació de pagament</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Error en codificar l'URI en un codi QR.</translation>
+ </message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(sense missatge)</translation>
+ </message>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -1191,12 +1629,8 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
- <translation>Comissió:</translation>
+ <translation>Comissió</translation>
</message>
<message>
<source>After Fee:</source>
@@ -1263,10 +1697,6 @@
<translation>(No s'ha inicialitzat encara la comissió intel·ligent. Normalment pren uns pocs blocs...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Temps de confirmació:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1306,6 +1736,98 @@
<source>S&amp;end</source>
<translation>E&amp;nvia</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Esteu segur que ho voleu enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>S'ha afegit una taxa de transacció</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>o</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirma l'enviament de monedes</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>L'adreça de destinatari no és vàlida. Torneu-la a comprovar.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>L'import a pagar ha de ser major que 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>L'import supera el vostre balanç.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>El total excedeix el teu balanç quan s'afig la comissió a la transacció %1.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>S'ha trobat una adreça duplicada: cal utilitzar les adreces només un cop cada vegada.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Ha fallat la creació de la transacció!</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Una comissió superior a %1 es considera una comissió absurdament alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Avís: adreça Bitcoin no vàlida</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Avís: adreça de canvi desconeguda</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1323,7 +1845,7 @@
</message>
<message>
<source>Choose previously used address</source>
- <translation>Trieu una adreça feta servir anteriorment</translation>
+ <translation>Tria les adreces fetes servir amb anterioritat</translation>
</message>
<message>
<source>This is a normal payment.</source>
@@ -1335,11 +1857,11 @@
</message>
<message>
<source>Alt+A</source>
- <translation>Alta+A</translation>
+ <translation>Alt+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
- <translation>Apegar adreça del porta-retalls</translation>
+ <translation>Apega l'adreça del porta-retalls</translation>
</message>
<message>
<source>Alt+P</source>
@@ -1385,6 +1907,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Introduïu una etiqueta per a esta adreça per afegir-la a la llibreta d'adreces</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1479,6 +2012,58 @@
<source>Reset all verify message fields</source>
<translation>Neteja tots els camps de verificació de missatge</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>L'adreça introduïda no és vàlida.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>L'adreça introduïda no referencia a cap clau.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>El desbloqueig del moneder ha estat cancelat.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clau privada per a la adreça introduïda no està disponible.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>La signatura del missatge ha fallat.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Missatge signat.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La signatura no s'ha pogut descodificar.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Comproveu la signatura i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La signatura no coincideix amb el resum del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Ha fallat la verificació del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Missatge verificat.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1495,11 +2080,396 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/fora de línia</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/sense confirmar</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 confirmacions</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Estat</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, encara no ha estat emés correctement</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Font</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Generat</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Des de</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconegut</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>A</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>Adreça pròpia</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiqueta</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Crèdit</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>no acceptat</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Dèbit</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Dèbit total</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Crèdit total</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Comissió de transacció</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Import net</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentar</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID de transacció</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Mercader</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu este bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Informació de depuració</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transacció</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Entrades</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>cert</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>fals</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Este panell mostra una descripció detallada de la transacció</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Fora de línia</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Sense confirmar</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmat (%1 confirmacions)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflicte</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Este bloc no ha estat rebut per cap altre node i probablement no serà acceptat!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generat però no acceptat</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebut amb</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Rebut de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviat a</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pagament a un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minat</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Estat de la transacció. Desplaceu-vos sobre este camp per mostrar el nombre de confirmacions.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Data i hora en que la transacció va ser rebuda.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipus de transacció.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Si està implicada o no una adreça només de lectura en la transacció.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Intenció/propòsit de la transacció definida per l'usuari.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Import extret o afegit del balanç.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Tot</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Hui</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Esta setmana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Este mes</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>El mes passat</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Enguany</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rang...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebut amb</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviat a</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>A un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minat</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Altres</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Introduïu una adreça o una etiqueta per cercar</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Import mínim</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar adreça </translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacció</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar etiqueta</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostra detalls de la transacció</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exporta l'historial de transacció</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer de separació amb comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmat</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Només de lectura</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>S'ha produït un error en provar de guardar l'historial de transacció a %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportació amb èxit</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>L'historial de transaccions s'ha guardat correctament a %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rang:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>a</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1509,6 +2479,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>No s'ha carregat cap moneder.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Envia monedes</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exporta</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Còpia de seguretat del moneder</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Dades del moneder (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Ha fallat la còpia de seguretat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>S'ha produït un error en provar de guardar les dades del moneder a %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>La còpia de seguretat s'ha realitzat correctament</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>S'han guardat les dades del moneder correctament a %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1531,12 +2550,16 @@
<translation>Accepta la línia d'ordes i ordes JSON-RPC </translation>
</message>
<message>
- <source>Run in the background as a daemon and accept commands</source>
- <translation>Executa en segon pla com a programa dimoni i accepta ordes</translation>
+ <source>Error: A fatal internal error occurred, see debug.log for details</source>
+ <translation>Error: s'ha produït un error intern fatal. Vegeu debug.log per a més detalls</translation>
+ </message>
+ <message>
+ <source>Pruning blockstore...</source>
+ <translation>S'està podant l'emmagatzemament de blocs...</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
+ <source>Run in the background as a daemon and accept commands</source>
+ <translation>Executa en segon pla com a programa dimoni i accepta ordes</translation>
</message>
<message>
<source>Bitcoin Core</source>
@@ -1551,10 +2574,6 @@
<translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuït sota llicència de programari MIT. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Executa una orde quan una transacció del moneder canvie (%s en cmd es canvia per TxID)</translation>
</message>
@@ -1563,22 +2582,6 @@
<translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta és una versió de pre-llançament - utilitza-la sota la teva responsabilitat - No usar per a minería o aplicacions de compra-venda</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Avís: la xarxa no pareix que hi estiga plenament d'acord. Alguns miners pareix que estan experimentant problemes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Avís: pareix que no estem plenament d'acord amb els nostres iguals! Podria caldre que actualitzar l'aplicació, o potser que ho facen altres nodes.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Afig a la llista blanca els iguals que es connecten de la màscara de xarxa o adreça IP donada. Es pot especificar moltes vegades.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; pot ser:</translation>
</message>
@@ -1587,10 +2590,6 @@
<translation>Opcions de la creació de blocs:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Connecta només al(s) node(s) especificats</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opcions de connexió:</translation>
</message>
@@ -1735,10 +2734,6 @@
<translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meues (per defecte: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Genera a l'atzar credencials per a cada connexió proxy. Això habilita l'aïllament del flux de Tor (per defecte: %u)</translation>
</message>
@@ -1751,10 +2746,6 @@
<translation>L'import de la transacció és massa petit per enviar-la després que se'n deduïsca la comissió</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Este producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
</message>
@@ -1780,7 +2771,7 @@
</message>
<message>
<source>Information</source>
- <translation>&amp;Informació</translation>
+ <translation>Informació</translation>
</message>
<message>
<source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
@@ -1839,10 +2830,6 @@
<translation>Import de la transacció massa petit</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Els imports de les transaccions han de ser positius</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transacció massa gran per a la política de comissions</translation>
</message>
@@ -1967,10 +2954,6 @@
<translation>Defineix la mida clau disponible a &lt;n&gt; (per defecte: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Defineix la mida de bloc mínima en bytes (per defecte: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Defineix el nombre de fils a crides de servei RPC (per defecte: %d)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index f985a6928d..838190b10e 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Elimina</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Trieu l'adreça on enviar les monedes</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Trieu l'adreça on rebre les monedes</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Tria</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Adreces d'enviament</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Adreces de recepció</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Aquestes són les vostres adreces de Bitcoin per enviar els pagaments. Sempre reviseu l'import i l'adreça del destinatari abans de transferir monedes.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Aquestes són les vostres adreces Bitcoin per rebre pagaments. Es recomana utilitzar una adreça nova de recepció per a cada transacció.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copia l'eti&amp;queta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Edita</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exporta la llista d'adreces</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer separat per comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>S'ha produït un error en desar la llista d'adreces a %1. Torneu-ho a provar.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Repetiu la nova contrasenya</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Introduïu la contrasenya nova al moneder.&lt;br/&gt;Utilitzeu una contrasenya de &lt;b&gt;deu o més caràcters aleatoris&lt;/b&gt;, o &lt;b&gt;vuit o més paraules&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Encripta el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Aquesta operació requereix la contrasenya del moneder per a desbloquejar-lo.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloqueja el moneder</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Aquesta operació requereix la contrasenya del moneder per desencriptar-lo.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desencripta el moneder</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Canvia la contrasenya</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduïu la contrasenya antiga i la contrasenya nova al moneder.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirma l'encriptació del moneder</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Avís: si encripteu el vostre moneder i perdeu la contrasenya, &lt;b&gt;PERDREU TOTS ELS VOSTRES BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Esteu segur que voleu encriptar el vostre moneder?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Moneder encriptat</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>Ara es tancarà el %1 per finalitzar el procés d'encriptació. Recordeu que encriptar el vostre moneder no garanteix que les vostres bitcoins no puguin ser robades per programari maliciós que infecti l'ordinador.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANT: Tota copia de seguretat que hàgiu realitzat hauria de ser reemplaçada pel, recentment generat, fitxer encriptat del moneder. Per motius de seguretat, les còpies de seguretat anteriors del fitxer de moneder no encriptat esdevindran inusables tan aviat com començar a utilitzar el nou moneder encriptat.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>L'encriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>L'encriptació del moneder ha fallat per un error intern. El moneder no ha estat encriptat.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Les contrasenyes introduïdes no coincideixen.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>El desbloqueig del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La contrasenya introduïda per a desencriptar el moneder és incorrecta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>La desencriptació del moneder ha fallat</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La contrasenya del moneder ha estat modificada correctament.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Avís: Les lletres majúscules estan activades!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -111,6 +270,14 @@
<translation>Surt de l'aplicació</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>Qu&amp;ant al %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Mosta informació sobre el %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Quant a &amp;Qt</translation>
</message>
@@ -123,6 +290,10 @@
<translation>&amp;Opcions...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Modifica les opcions de configuració de %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Encripta el moneder...</translation>
</message>
@@ -140,13 +311,25 @@
</message>
<message>
<source>&amp;Receiving addresses...</source>
- <translation>Adreces de &amp;recepció</translation>
+ <translation>Adreces de &amp;recepció...</translation>
</message>
<message>
<source>Open &amp;URI...</source>
<translation>Obre un &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Feu clic per inhabilitar l'activitat de la xarxa.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>S'ha inhabilitat l'activitat de la xarxa.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Feu clic per tornar a habilitar l'activitat de la xarxa.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>S'estan reindexant els blocs al disc...</translation>
</message>
@@ -251,32 +434,20 @@
<translation><numerusform>%n connexió activa a la xarxa Bitcoin</numerusform><numerusform>%n connexions actives a la xarxa Bitcoin</numerusform></translation>
</message>
<message>
- <source>No block source available...</source>
- <translation>No hi ha cap font de bloc disponible...</translation>
- </message>
- <message numerus="yes">
- <source>Processed %n block(s) of transaction history.</source>
- <translation><numerusform>S'han processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n hores</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dia</numerusform><numerusform>%n dies</numerusform></translation>
+ <source>Indexing blocks on disk...</source>
+ <translation>S'estan indexant els blocs al disc...</translation>
</message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n setmana</numerusform><numerusform>%n setmanes</numerusform></translation>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>S'estan processant els blocs al disc...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 i %2</translation>
+ <source>No block source available...</source>
+ <translation>No hi ha cap font de bloc disponible...</translation>
</message>
<message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n any</numerusform><numerusform>%n anys</numerusform></translation>
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>S'ha processat %n bloc de l'historial de transacció.</numerusform><numerusform>S'han processat %n blocs de l'historial de transacció.</numerusform></translation>
</message>
<message>
<source>%1 behind</source>
@@ -300,13 +471,21 @@
</message>
<message>
<source>Information</source>
- <translation>Informació</translation>
+ <translation>&amp;Informació</translation>
</message>
<message>
<source>Up to date</source>
<translation>Al dia</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Mostra el missatge d'ajuda del %1 per obtenir una llista amb les possibles opcions de línia d'ordres de Bitcoin</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>Client de %1</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>S'està posant al dia ...</translation>
</message>
@@ -349,6 +528,14 @@
<translation>Transacció entrant</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>La generació de la clau HD és &lt;b&gt;habilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>La generació de la clau HD és &lt;b&gt;inhabilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;desbloquejat&lt;/b&gt;</translation>
</message>
@@ -356,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El moneder està &lt;b&gt;encriptat&lt;/b&gt; i actualment &lt;b&gt;bloquejat&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>S'ha produït un error fatal. Bitcoin no pot continuar amb seguretat i finalitzarà.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -376,12 +567,8 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
- <translation>Comissió</translation>
+ <translation>Comissió:</translation>
</message>
<message>
<source>Dust:</source>
@@ -432,8 +619,84 @@
<translation>Confirmat</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioritat</translation>
+ <source>Copy address</source>
+ <translation>Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copia l'ID de transacció</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloqueja sense gastar</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloquejada)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sí</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>no</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Aquesta etiqueta es torna vermella si cap recipient rep un import inferior al llindar de polsim actual.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Pot variar en +/- %1 satoshi(s) per entrada.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>canvia de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(canvia)</translation>
</message>
</context>
<context>
@@ -458,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Adreça</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nova adreça de recepció</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nova adreça d'enviament</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Edita l'adreça de recepció</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Edita l'adreça d'enviament</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>L'adreça introduïda «%1» no és una adreça de Bitcoin vàlida.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>L'adreça introduïda «%1» ja és present a la llibreta d'adreces.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>No s'ha pogut desbloquejar el moneder.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Ha fallat la generació d'una clau nova.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -493,6 +788,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>Quant al %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Opcions de línia d'ordres</translation>
</message>
@@ -528,12 +827,28 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Mostra la pantalla de benvinguda a l'inici (per defecte: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Reinicialitza tots els canvis de configuració fets des de la interfície gràfica</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
<source>Welcome</source>
- <translation>Us donem la benviguda</translation>
+ <translation>Us donem la benvinguda</translation>
+ </message>
+ <message>
+ <source>Welcome to %1.</source>
+ <translation>Us donem la benvinguda a %1.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Com és la primera vegada que s'executa el programa, podeu triar on %1 emmagatzemarà les dades.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 baixarà i emmagatzemarà una còpia de la cadena de blocs de Bitcoin. Com a mínim %2GB de dades s'emmagatzemaran en aquest directori, i augmentarà al llarg del temps. El moneder també s'emmagatzemarà en aquest directori.</translation>
</message>
<message>
<source>Use the default data directory</source>
@@ -561,6 +876,37 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulari</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Últim temps de bloc</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progrés</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>s'està calculant...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Temps estimat restant fins sincronitzat</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Amaga</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Desconegut. Sincronització de les capçaleres (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -578,6 +924,10 @@
<source>Select payment request file</source>
<translation>Selecciona un fitxer de sol·licitud de pagament</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Seleccioneu el fitxer de sol·licitud de pagament per obrir</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -590,6 +940,14 @@
<translation>&amp;Principal</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Inicieu %1 automàticament després d'entrar en el sistema.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Inicia %1 en l'entrada al sistema</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>Mida de la memòria cau de la base de &amp;dades</translation>
</message>
@@ -726,6 +1084,14 @@
<translation>&amp;Finestra</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>Ama&amp;ga la icona de la safata del sistema.</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Amaga la icona de la safata</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Mostra només la icona de la barra en minimitzar la finestra.</translation>
</message>
@@ -746,6 +1112,10 @@
<translation>&amp;Llengua de la interfície d'usuari:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Aquí es pot definir la llengua de la interfície d'usuari. Aquest paràmetre tindrà efecte en reiniciar el %1.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>&amp;Unitats per mostrar els imports en:</translation>
</message>
@@ -870,6 +1240,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Error de la sol·licitud de pagament</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>No es pot iniciar bitcoin: controlador click-to-pay</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Gestió d'URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>L'URL de recuperació de la sol·licitud de pagament no és vàlida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Adreça de pagament no vàlida %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>L'URI no pot ser analitzat! Això pot ser a causa d'una adreça de Bitcoin no vàlida o per paràmetres URI amb mal format.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Gestió de fitxers de les sol·licituds de pagament</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>No es pot llegir el fitxer de la sol·licitud de pagament. Això pot ser causat per un fitxer de sol·licitud de pagament no vàlid.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>La sol·licitud de pagament s'ha rebutjat</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>La xarxa de la sol·licitud de pagament no coincideix amb la xarxa del client.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La sol·licitud de pagament no està inicialitzada.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>No s'accepten sol·licituds de pagament no verificades a scripts de pagament personalitzats.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Sol·licitud de pagament no vàlida.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>L'import de pagament sol·licitat %1 és massa petit (es considera polsim).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reemborsament de %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>La sol·licitud de pagament %1 és massa gran (%2 bytes, permès %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Error en comunicar amb %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>No es pot analitzar la sol·licitud de pagament!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mala resposta del servidor %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Error en la sol·licitud de xarxa</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pagament reconegut</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -879,11 +1340,7 @@
<source>Node/Service</source>
<translation>Node/Servei</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Temps de ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -922,6 +1379,32 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 i %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>De&amp;sa la imatge...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copia la imatge</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Desa el codi QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imatge PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -950,6 +1433,10 @@
<translation>Utilitzant BerkeleyDB versió</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Datadir</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>&amp;Temps d'inici</translation>
</message>
@@ -1110,14 +1597,6 @@
<translation>Neteja la consola</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Desconnecta el node</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Bandeja el node durant</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hora</translation>
</message>
@@ -1134,10 +1613,6 @@
<translation>1 &amp;any</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Desbandeja el node</translation>
- </message>
- <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Utilitza les fletxes d'amunt i avall per navegar per l'historial, i &lt;b&gt;Ctrl-L&lt;\b&gt; per netejar la pantalla.</translation>
</message>
@@ -1264,6 +1739,18 @@
<source>Remove</source>
<translation>Esborra</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copia el missatge</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1283,6 +1770,73 @@
<source>&amp;Save Image...</source>
<translation>De&amp;sa la imatge...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Sol·licita un pagament a %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informació de pagament</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultant massa llarga, intenta reduir el text per a la etiqueta / missatge</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Error en codificar l'URI en un codi QR.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(sense missatge)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(no s'ha sol·licitat import)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Sol·licitat</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1319,10 +1873,6 @@
<translation>Import:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritat:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Comissió:</translation>
</message>
@@ -1391,10 +1941,6 @@
<translation>(No s'ha inicialitzat encara la comissió intel·ligent. Normalment pren uns pocs blocs...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Temps de confirmació:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1412,7 +1958,7 @@
</message>
<message>
<source>Clear all fields of the form.</source>
- <translation>Netejar tots els camps del formulari.</translation>
+ <translation>Esborra tots els camps del formuari.</translation>
</message>
<message>
<source>Dust:</source>
@@ -1434,6 +1980,106 @@
<source>S&amp;end</source>
<translation>E&amp;nvia</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copia la quantitat</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copia la comissió</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copia la comissió posterior</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copia els bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copia el polsim</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copia el canvi</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Esteu segur que ho voleu enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>S'ha afegit una taxa de transacció</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Import total %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>o</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirma l'enviament de monedes</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>L'adreça del destinatari no és vàlida. Torneu-la a comprovar.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>L'import a pagar ha de ser major que 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>L'import supera el vostre balanç.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>El total excedeix el vostre balanç quan s'afegeix la comissió a la transacció %1.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>S'ha trobat una adreça duplicada: les adreces només s'haurien d'utilitzar una vegada cada una.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>La creació de la transacció ha fallat!</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Una comissió superior a %1 es considera una comissió absurdament alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La sol·licitud de pagament ha vençut.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Paga només la comissió necessària de %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Avís: adreça Bitcoin no vàlida</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Avís: adreça de canvi desconeguda</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1513,6 +2159,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Introduïu una etiqueta per a aquesta adreça per afegir-la a la llibreta d'adreces</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1541,15 +2198,15 @@
</message>
<message>
<source>Choose previously used address</source>
- <translation>Tria les adreces fetes servir amb anterioritat</translation>
+ <translation>Escull una adreça feta servir anteriorment</translation>
</message>
<message>
<source>Alt+A</source>
- <translation>Alt+A</translation>
+ <translation>Alta+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
- <translation>Enganxa l'adreça del porta-retalls</translation>
+ <translation>Enganxar adreça del porta-retalls</translation>
</message>
<message>
<source>Alt+P</source>
@@ -1607,6 +2264,58 @@
<source>Reset all verify message fields</source>
<translation>Neteja tots els camps de verificació de missatge</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Feu clic a «Signa el missatge» per a generar una signatura</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>L'adreça introduïda no és vàlida.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Comproveu l'adreça i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>L'adreça introduïda no referencia a cap clau.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>El desbloqueig del moneder ha estat cancelat.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clau privada per a la adreça introduïda no està disponible.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>La signatura del missatge ha fallat.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Missatge signat.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La signatura no s'ha pogut descodificar.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Comproveu la signatura i torneu-ho a provar.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La signatura no coincideix amb el resum del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Ha fallat la verificació del missatge.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Missatge verificat.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1623,11 +2332,404 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/fora de línia</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/sense confirmar</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 confirmacions</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Estat</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, encara no ha estat emès correctement</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Font</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Generada</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>De</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconegut</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>A</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>adreça pròpia</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiqueta</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Crèdit</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>no acceptat</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Dèbit</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Dèbit total</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Crèdit total</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Comissió de transacció</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Import net</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Missatge</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentari</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID de la transacció</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Mercader</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Les monedes generades han de madurar %1 blocs abans de poder ser gastades. Quan genereu aquest bloc, es farà saber a la xarxa per tal d'afegir-lo a la cadena de blocs. Si no pot fer-se lloc a la cadena, el seu estat canviarà a «no acceptat» i no es podrà gastar. Això pot passar ocasionalment si un altre node genera un bloc en un marge de segons respecte al vostre.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Informació de depuració</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transacció</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Entrades</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Import</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>cert</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>fals</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Aquest panell mostra una descripció detallada de la transacció</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Obert fins %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Fora de línia</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Sense confirmar</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonada</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmant (%1 de %2 confirmacions recomanades)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmat (%1 confirmacions)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflicte</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Immadur (%1 confirmacions, serà disponible després de %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Aquest bloc no ha estat rebut per cap altre node i probablement no serà acceptat!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generat però no acceptat</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebuda amb</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Rebuda de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviada a</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pagament a un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minada</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>només lectura</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sense etiqueta)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Estat de la transacció. Desplaceu-vos sobre aquest camp per mostrar el nombre de confirmacions.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Data i hora en que la transacció va ser rebuda.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipus de transacció.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Si està implicada o no una adreça només de lectura en la transacció.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Intenció/propòsit de la transacció definida per l'usuari.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Import extret o afegit del balanç.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Tot</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Avui</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Aquesta setmana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Aquest mes</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>El mes passat</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Enguany</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rang...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Rebuda amb</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviada a</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>A un mateix</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minada</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Altres</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Introduïu una adreça o una etiqueta per cercar</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Import mínim</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copia l'adreça</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copia l'etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copia l'import</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copia l'ID de transacció</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copia la transacció crua</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar etiqueta</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostra detalls de la transacció</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exporta l'historial de transacció</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Fitxer separat per comes (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmat</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Només de lectura</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adreça</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>L'exportació ha fallat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>S'ha produït un error en provar de desar l'historial de transacció a %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportació amb èxit</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>L'historial de transaccions s'ha desat correctament a %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rang:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>a</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1637,6 +2739,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>No s'ha carregat cap moneder.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Envia monedes</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exporta</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exporta les dades de la pestanya actual a un fitxer</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Còpia de seguretat del moneder</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Dades del moneder (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Ha fallat la còpia de seguretat</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>S'ha produït un error en provar de desar les dades del moneder a %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>La còpia de seguretat s'ha realitzat correctament</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>S'han desat les dades del moneder correctament a %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1699,12 +2850,8 @@
<translation>No s'ha pogut iniciar el servidor HTTP. Vegeu debug.log per a més detalls.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accepta connexions de fora (per defecte: 1 si no -proxy o -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
- <translation>Nucli de Bitcoin</translation>
+ <translation>Bitcoin Core</translation>
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
@@ -1715,10 +2862,6 @@
<translation>Elimina totes les transaccions del moneder i només recupera aquelles de la cadena de blocs a través de -rescan a l'inici</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuït sota llicència de programari MIT. Vegeu el fitxer acompanyant COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Executa una ordre quan una transacció del moneder canviï (%s en cmd es canvia per TxID)</translation>
</message>
@@ -1727,22 +2870,6 @@
<translation>Defineix el nombre de fils de verificació d'scripts (%u a %d, 0 = auto, &lt;0 = deixa tants nuclis lliures, per defecte: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>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</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Avís: la xarxa no sembla que hi estigui plenament d'acord. Alguns miners sembla que estan experimentant problemes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Avís: sembla que no estem plenament d'acord amb els nostres iguals! Podria caler que actualitzar l'aplicació, o potser que ho facin altres nodes.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Afegeix a la llista blanca els iguals que es connecten de la màscara de xarxa o adreça IP donada. Es pot especificar moltes vegades.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; pot ser:</translation>
</message>
@@ -1751,10 +2878,6 @@
<translation>Opcions de la creació de blocs:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Connecta només al(s) node(s) especificats</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opcions de connexió:</translation>
</message>
@@ -1843,6 +2966,10 @@
<translation>Utilitza UPnP per a mapejar el port d'escolta (per defecte: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Utilitza la cadena de proves</translation>
+ </message>
+ <message>
<source>Verifying blocks...</source>
<translation>S'estan verificant els blocs...</translation>
</message>
@@ -1855,6 +2982,14 @@
<translation>El moneder %s resideix fora del directori de dades %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Opcions de depuració/proves del moneder:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Cal reescriure el moneder: reinicieu %s per a completar-ho</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Opcions de moneder:</translation>
</message>
@@ -1899,10 +3034,6 @@
<translation>Mida màxima de les dades en les transaccions de l'operador en què confiem i en les meves (per defecte: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Consulta a adreces d'iguals a través de DNS, si es troba baix en adreces (per defecte: 1 a menys que -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Genera a l'atzar credencials per a cada connexió proxy. Això habilita l'aïllament del flux de Tor (per defecte: %u)</translation>
</message>
@@ -1915,10 +3046,6 @@
<translation>L'import de la transacció és massa petit per enviar-la després que se'n dedueixi la comissió</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Aquest producte inclou programari desenvolupat pel projecte OpenSSL per a ús a l'OpenSSL Toolkit &lt;https://www.openssl.org/&gt; i programari criptogràfic escrit per Eric Young i programari UPnP escrit per Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Els iguals en la llista blanca no poden ser bandejats per DoS i es transmetran sempre llurs transaccions, fins i tot si ja són a la mempool. Això és útil, p. ex., per a una passarel·la</translation>
</message>
@@ -2003,10 +3130,6 @@
<translation>Import de la transacció massa petit</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Els imports de les transaccions han de ser positius</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transacció massa gran per a la política de comissions</translation>
</message>
@@ -2131,10 +3254,6 @@
<translation>Defineix la mida clau disponible a &lt;n&gt; (per defecte: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Defineix la mida de bloc mínima en bytes (per defecte: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Defineix el nombre de fils a crides de servei RPC (per defecte: %d)</translation>
</message>
@@ -2155,10 +3274,22 @@
<translation>Gasta el canvi no confirmat en enviar les transaccions (per defecte: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>S'estan iniciant els fils de la xarxa...</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Llindar per a desconnectar els iguals de comportament qüestionable (per defecte: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Els imports de la transacció no han de ser negatius</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>La transacció ha de tenir com a mínim un destinatari</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Xarxa desconeguda especificada a -onlynet: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index 2dfa295ce0..3b5d7947f6 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -15,7 +15,7 @@
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
- <translation>Zkopíruj aktuálně vybranou adresu do systémové schránky</translation>
+ <translation>Zkopíruj tuto adresu do systémové schránky</translation>
</message>
<message>
<source>&amp;Copy</source>
@@ -27,7 +27,7 @@
</message>
<message>
<source>Delete the currently selected address from the list</source>
- <translation>Smaž zvolenou adresu ze seznamu</translation>
+ <translation>Smaž tuto adresu ze seznamu</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>S&amp;maž</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Zvol adresu, na kterou pošleš mince</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Zvol adres na příjem mincí</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Zvol</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Odesílací adresy</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Přijímací adresy</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Tohle jsou tvé bitcoinové adresy pro posílání plateb. Před odesláním mincí si vždy zkontroluj částku a cílovou adresu.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Tohle jsou tvé bitcoinové adresy pro příjem plateb. Nezapomeň si pro každou transakci vždy vygenerovat novou adresu.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopíruj adresu</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopíruj &amp;označení</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Uprav</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Export seznamu adres</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Formát CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportování selhalo</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Při ukládání seznamu adres do %1 se přihodila nějaká chyba. Zkus to prosím znovu.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Označení</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresa</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez označení)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,10 +131,106 @@
<source>Repeat new passphrase</source>
<translation>Totéž heslo ještě jednou</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Zadej nové heslo k peněžence.&lt;br/&gt;Použij &lt;b&gt;alespoň deset náhodných znaků&lt;/b&gt; nebo &lt;b&gt;alespoň osm slov&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Zašifruj peněženku</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>K provedení této operace musíš zadat heslo k peněžence, aby se mohla odemknout.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Odemkni peněženku</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>K provedení této operace musíš zadat heslo k peněžence, aby se mohla dešifrovat.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dešifruj peněženku</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Změň heslo</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Zadej staré a nové heslo k peněžence.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Potvrď zašifrování peněženky</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Upozornění: Pokud si zašifruješ peněženku a ztratíš či zapomeneš heslo, &lt;b&gt;PŘIJDEŠ O VŠECHNY BITCOINY&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Jsi si jistý, že chceš peněženku zašifrovat?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Peněženka je zašifrována</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 se teď ukončí, aby dokončil zašifrování. Pamatuj však, že pouhé zašifrování peněženky nemůže zabránit krádeži tvých bitcoinů malwarem, kterým se může počítač nakazit.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>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.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Zašifrování peněženky selhalo</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Zašifrování peněženky selhalo kvůli vnitřní chybě. Tvá peněženka tedy nebyla zašifrována.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Zadaná hesla nejsou shodná.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Nepodařilo se odemknout peněženku</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Nezadal jsi správné heslo pro dešifrování peněženky.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Nepodařilo se dešifrovat peněženku</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Heslo k peněžence bylo v pořádku změněno.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Upozornění: Caps Lock je zapnutý!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Maska</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Blokován do</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
@@ -103,6 +270,14 @@
<translation>Ukonči aplikaci</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>O &amp;%1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Zobraz informace o %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>O &amp;Qt</translation>
</message>
@@ -115,6 +290,10 @@
<translation>&amp;Možnosti...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Uprav nastavení %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>Zaši&amp;fruj peněženku...</translation>
</message>
@@ -139,12 +318,24 @@
<translation>Načíst &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Kliknutím zařízneš spojení se sítí.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Síť je vypnutá.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Kliknutím opět umožníš spojení do sítě.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Vytvářím nový index bloků na disku...</translation>
</message>
<message>
<source>Send coins to a Bitcoin address</source>
- <translation>Pošli mince na Bitcoinovou adresu</translation>
+ <translation>Pošli mince na bitcoinovou adresu</translation>
</message>
<message>
<source>Backup wallet to another location</source>
@@ -196,11 +387,11 @@
</message>
<message>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
- <translation>Podepiš zprávy svými Bitcoinovými adresami, čímž prokážeš, že jsi jejich vlastníkem</translation>
+ <translation>Podepiš zprávy svými bitcoinovými adresami, čímž prokážeš, že jsi jejich vlastníkem</translation>
</message>
<message>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
- <translation>Ověř zprávy, aby ses ujistil, že byly podepsány danými Bitcoinovými adresami</translation>
+ <translation>Ověř zprávy, aby ses ujistil, že byly podepsány danými bitcoinovými adresami</translation>
</message>
<message>
<source>&amp;File</source>
@@ -240,7 +431,15 @@
</message>
<message numerus="yes">
<source>%n active connection(s) to Bitcoin network</source>
- <translation><numerusform>%n aktivní spojení do Bitcoinové sítě</numerusform><numerusform>%n aktivní spojení do Bitcoinové sítě</numerusform><numerusform>%n aktivních spojení do Bitcoinové sítě</numerusform></translation>
+ <translation><numerusform>%n aktivní spojení do bitcoinové sítě</numerusform><numerusform>%n aktivní spojení do bitcoinové sítě</numerusform><numerusform>%n aktivních spojení do bitcoinové sítě</numerusform></translation>
+ </message>
+ <message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Vytvářím index bloků na disku...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Zpracovávám bloky na disku...</translation>
</message>
<message>
<source>No block source available...</source>
@@ -250,29 +449,9 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Zpracován %n blok transakční historie.</numerusform><numerusform>Zpracovány %n bloky transakční historie.</numerusform><numerusform>Zpracováno %n bloků transakční historie.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hodinu</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodin</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n den</numerusform><numerusform>%n dny</numerusform><numerusform>%n dnů</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n týden</numerusform><numerusform>%n týdny</numerusform><numerusform>%n týdnů</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 a %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n roků</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
- <translation>Stahuji ještě bloky transakcí za poslední %1</translation>
+ <translation>Stahuji ještě %1 bloků transakcí</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
@@ -280,7 +459,7 @@
</message>
<message>
<source>Transactions after this will not yet be visible.</source>
- <translation>Novější transakce zatím nejsou vidět.</translation>
+ <translation>Následné transakce ještě nebudou vidět.</translation>
</message>
<message>
<source>Error</source>
@@ -299,6 +478,14 @@
<translation>Aktuální</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Seznam argumentů Bitcoinu pro příkazovou řádku získáš v nápovědě %1</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 klient</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Stahuji...</translation>
</message>
@@ -341,6 +528,14 @@
<translation>Příchozí transakce</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>HD generování klíčů je &lt;b&gt;zapnuté&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>HD generování klíčů je &lt;b&gt;vypnuté&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Peněženka je &lt;b&gt;zašifrovaná&lt;/b&gt; a momentálně &lt;b&gt;odemčená&lt;/b&gt;</translation>
</message>
@@ -348,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Peněženka je &lt;b&gt;zašifrovaná&lt;/b&gt; a momentálně &lt;b&gt;zamčená&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Stala se fatální chyba. Bitcoin nemůže bezpečně pokračovat v činnosti, a proto skončí.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -368,10 +567,6 @@
<translation>Částka:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorita:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Poplatek:</translation>
</message>
@@ -424,8 +619,84 @@
<translation>Potvrzeno</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorita</translation>
+ <source>Copy address</source>
+ <translation>Kopíruj adresu</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopíruj její označení</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopíruj částku</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopíruj ID transakce</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Zamkni neutracené</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Odemkni k utracení</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopíruj počet</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopíruj poplatek</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopíruj čistou částku</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopíruj bajty</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopíruj prach</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopíruj drobné</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 zamčeno)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>ano</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>ne</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Popisek zčervená, pokud má některý příjemce obdržet částku menší, než je aktuální práh pro prach.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Může se lišit o +/– %1 satoshi na každý vstup.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez označení)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>drobné z %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(drobné)</translation>
</message>
</context>
<context>
@@ -450,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Adresa</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nová přijímací adresa</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nová odesílací adresa</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Uprav přijímací adresu</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Uprav odesílací adresu</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Zadaná adresa „%1“ není platná bitcoinová adresa.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Zadaná adresa „%1“ už v adresáři je.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Nemohu odemknout peněženku.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Nepodařilo se mi vygenerovat nový klíč.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -485,6 +788,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>O %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Argumenty příkazové řádky</translation>
</message>
@@ -520,7 +827,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Zobrazit startovací obrazovku (výchozí: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Vrátit všechny volby měněné v GUI na výchozí hodnoty</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -528,6 +839,18 @@
<translation>Vítej</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Vítej v %1.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Tohle je poprvé, co spouštíš %1, takže si můžeš zvolit, kam bude ukládat svá data.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 bude stahovat kopii řetězce bloků. Proto bude potřeba do tohoto adresáře uložit nejméně %2 GB dat – toto číslo bude navíc v průběhu času růst. Tvá peněženka bude rovněž uložena v tomto adresáři.</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Použij výchozí adresář pro data</translation>
</message>
@@ -553,6 +876,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulář</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Nedávné transakce ještě nemusí být vidět, takže stav tvého účtu nemusí být platný. Jakmile se však tvá peněženka dosynchronizuje s bitcoinovou sítí (viz informace níže), tak už bude stav správně.</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>Utrácení bitcoinů, které už utratily zatím nezobrazené transakce, nebude bitcoinovou sítí umožněno.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Zbývající počet bloků</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>neznámý…</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Čas posledního bloku</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Stav</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Postup za hodinu</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>propočítávám…</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Odhadovaný zbývající čas</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Skryj</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Neznámý. Synchronizuji záhlaví bloků (%1)…</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -570,6 +944,10 @@
<source>Select payment request file</source>
<translation>Vyber soubor platebního požadavku</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Vyber soubor platebního požadavku k načtení</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -582,6 +960,14 @@
<translation>&amp;Hlavní</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Automaticky spustí %1 po přihlášení do systému.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>S&amp;pustit %1 po přihlášení do systému</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>Velikost &amp;databázové cache</translation>
</message>
@@ -619,7 +1005,7 @@
</message>
<message>
<source>Active command-line options that override above options:</source>
- <translation>Aktivní argumenty z příkazové řádky, které mají přednost před nastavením výše:</translation>
+ <translation>Aktivní argumenty z příkazové řádky, které přetloukly tato nastavení:</translation>
</message>
<message>
<source>Reset all client options to default.</source>
@@ -667,7 +1053,7 @@
</message>
<message>
<source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
- <translation>Připojí se do Bitcoinové sítě přes SOCKS5 proxy.</translation>
+ <translation>Připojí se do bitcoinové sítě přes SOCKS5 proxy.</translation>
</message>
<message>
<source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
@@ -687,7 +1073,7 @@
</message>
<message>
<source>Used for reaching peers via:</source>
- <translation>Použije se k připojování k protějškům přes:</translation>
+ <translation>Použije se k připojování k protějskům přes:</translation>
</message>
<message>
<source>Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type.</source>
@@ -707,7 +1093,7 @@
</message>
<message>
<source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services.</source>
- <translation>Připojí se do Bitcoinové sítě přes SOCKS5 proxy vyhrazenou pro skryté služby v Tor síti.</translation>
+ <translation>Připojí se do bitcoinové sítě přes SOCKS5 proxy vyhrazenou pro skryté služby v Tor síti.</translation>
</message>
<message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source>
@@ -718,6 +1104,14 @@
<translation>O&amp;kno</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>Skryje ikonu, která se zobrazuje v panelu.</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Skrýt &amp;ikonu z panelu</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Po minimalizaci okna zobrazí pouze ikonu v panelu.</translation>
</message>
@@ -738,6 +1132,10 @@
<translation>&amp;Jazyk uživatelského rozhraní:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Tady lze nastavit jazyk uživatelského rozhraní. Nastavení se projeví až po restartování %1.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>Je&amp;dnotka pro částky:</translation>
</message>
@@ -751,7 +1149,7 @@
</message>
<message>
<source>&amp;OK</source>
- <translation>&amp;Použít</translation>
+ <translation>&amp;Budiž</translation>
</message>
<message>
<source>&amp;Cancel</source>
@@ -779,7 +1177,7 @@
</message>
<message>
<source>This change would require a client restart.</source>
- <translation>Tato změna vyžaduje restart aplikace.</translation>
+ <translation>Tahle změna bude chtít restartovat klienta.</translation>
</message>
<message>
<source>The supplied proxy address is invalid.</source>
@@ -794,7 +1192,7 @@
</message>
<message>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
- <translation>Zobrazené informace nemusí být aktuální. Tvá peněženka se automaticky sesynchronizuje s Bitcoinovou sítí, jakmile se s ní spojí. Zatím ale ještě není synchronizace dokončena.</translation>
+ <translation>Zobrazené informace nemusí být aktuální. Tvá peněženka se automaticky sesynchronizuje s bitcoinovou sítí, jakmile se s ní spojí. Zatím ale ještě není synchronizace dokončena.</translation>
</message>
<message>
<source>Watch-only:</source>
@@ -826,7 +1224,7 @@
</message>
<message>
<source>Balances</source>
- <translation>Stav účtů</translation>
+ <translation>Stavy účtů</translation>
</message>
<message>
<source>Total:</source>
@@ -862,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Chyba platebního požadavku</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Nemůžu spustit bitcoin: obsluha click-to-pay</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Zpracování URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>Zdrojová URL platebního požadavku není platná: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Neplatná platební adresa %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>Nepodařilo se analyzovat URI! Důvodem může být neplatná bitcoinová adresa nebo poškozené parametry URI.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Zpracování souboru platebního požadavku</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Soubor platebního požadavku nejde přečíst nebo zpracovat! Příčinou může být špatný soubor platebního požadavku.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Platební požadavek byl odmítnut</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Síť platebního požadavku neodpovídá síti klienta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Platební požadavek vypršel.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Platební požadavek není zahájený.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Neověřené platební požadavky k uživatelským platebním skriptům nejsou podporované.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Neplatný platební požadavek.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Požadovaná platební částka %1 je příliš malá (je považována za prach).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Vrácení peněz od %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Platební požadavek %1 je moc velký (%2 bajtů, povoleno %3 bajtů).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Chyba při komunikaci s %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Platební požadavek je nečitelný!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Chybná odpověď ze serveru %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Chyba síťového požadavku</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Platba potvrzena</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -872,7 +1361,11 @@
<translation>Uzel/Služba</translation>
</message>
<message>
- <source>Ping Time</source>
+ <source>NodeId</source>
+ <translation>Id uzlu</translation>
+ </message>
+ <message>
+ <source>Ping</source>
<translation>Odezva</translation>
</message>
</context>
@@ -884,7 +1377,7 @@
</message>
<message>
<source>Enter a Bitcoin address (e.g. %1)</source>
- <translation>Zadej Bitcoinovou adresu (např. %1)</translation>
+ <translation>Zadej bitcoinovou adresu (např. %1)</translation>
</message>
<message>
<source>%1 d</source>
@@ -914,12 +1407,78 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n vteřinu</numerusform><numerusform>%n vteřiny</numerusform><numerusform>%n vteřin</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n minutu</numerusform><numerusform>%n minuty</numerusform><numerusform>%n minut</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n hodinu</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodin</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n den</numerusform><numerusform>%n dny</numerusform><numerusform>%n dnů</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n týden</numerusform><numerusform>%n týdny</numerusform><numerusform>%n týdnů</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n roků</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 ještě bezpečně neskončil…</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Chyba: Zadaný adresář pro data „%1“ neexistuje.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Chyba: Nemohu zpracovat konfigurační soubor: %1. Používej pouze syntaxi klíč=hodnota.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Chyba: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Ulož obrázek...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Kopíruj obrázek</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Ulož QR kód</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG obrázek (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
- <translation>N/A</translation>
+ <translation>nedostupná informace</translation>
</message>
<message>
<source>Client version</source>
@@ -942,6 +1501,10 @@
<translation>Používaná verze BerkeleyDB</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Adresář s daty</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Čas spuštění</translation>
</message>
@@ -966,8 +1529,16 @@
<translation>Aktuální počet bloků</translation>
</message>
<message>
+ <source>Memory Pool</source>
+ <translation>Transakční zásobník</translation>
+ </message>
+ <message>
+ <source>Current number of transactions</source>
+ <translation>Aktuální množství transakcí</translation>
+ </message>
+ <message>
<source>Memory usage</source>
- <translation>Využití paměti</translation>
+ <translation>Obsazenost paměti</translation>
</message>
<message>
<source>Received</source>
@@ -982,10 +1553,18 @@
<translation>&amp;Protějšky</translation>
</message>
<message>
+ <source>Banned peers</source>
+ <translation>Protějšky pod klatbou (blokované)</translation>
+ </message>
+ <message>
<source>Select a peer to view detailed information.</source>
<translation>Vyber protějšek a uvidíš jeho detailní informace.</translation>
</message>
<message>
+ <source>Whitelisted</source>
+ <translation>Vždy vítán</translation>
+ </message>
+ <message>
<source>Direction</source>
<translation>Směr</translation>
</message>
@@ -994,10 +1573,34 @@
<translation>Verze</translation>
</message>
<message>
+ <source>Starting Block</source>
+ <translation>Počáteční blok</translation>
+ </message>
+ <message>
+ <source>Synced Headers</source>
+ <translation>Aktuálně hlaviček</translation>
+ </message>
+ <message>
+ <source>Synced Blocks</source>
+ <translation>Aktuálně bloků</translation>
+ </message>
+ <message>
<source>User Agent</source>
<translation>Typ klienta</translation>
</message>
<message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>Otevři soubor s ladicími záznamy %1 z aktuálního datového adresáře. U velkých žurnálů to může pár vteřin zabrat.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>Zmenšit písmo</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Zvětšit písmo</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Služby</translation>
</message>
@@ -1022,6 +1625,18 @@
<translation>Odezva</translation>
</message>
<message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>Jak dlouho už čekám na pong.</translation>
+ </message>
+ <message>
+ <source>Ping Wait</source>
+ <translation>Doba čekání na odezvu</translation>
+ </message>
+ <message>
+ <source>Min Ping</source>
+ <translation>Nejrychlejší odezva</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Časový posun</translation>
</message>
@@ -1066,14 +1681,6 @@
<translation>Vyčistit konzoli</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Odpojit uzel</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Uvalit na uzel klatbu na</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hodinu</translation>
</message>
@@ -1090,8 +1697,20 @@
<translation>1 &amp;rok</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Zbavit uzel klatby</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Odpoj</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Uval klatbu na</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>&amp;Odblokuj</translation>
+ </message>
+ <message>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>Vítej v RPC konzoli %1.</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
@@ -1102,6 +1721,14 @@
<translation>Napsáním &lt;b&gt;help&lt;/b&gt; si vypíšeš přehled dostupných příkazů.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>UPOZORNĚNÍ: Podvodníci jsou aktivní a říkají uživatelům, aby sem zadávali příkazy, kterými jim pak ale vykradou jejich peněženky. Nepoužívej tuhle konzoli, pokud úplně neznáš důsledky jednotlivých příkazů.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>Síť je vypnutá</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
@@ -1174,7 +1801,7 @@
</message>
<message>
<source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
- <translation>Volitelná zpráva, která se připojí k platebnímu požadavku a která se zobrazí, když se požadavek otevře. Poznámka: tahle zpráva se neposílá s platbou po Bitcoinové síti.</translation>
+ <translation>Volitelná zpráva, která se připojí k platebnímu požadavku a která se zobrazí, když se požadavek otevře. Poznámka: tahle zpráva se neposílá s platbou po bitcoinové síti.</translation>
</message>
<message>
<source>An optional label to associate with the new receiving address.</source>
@@ -1220,6 +1847,22 @@
<source>Remove</source>
<translation>Smazat</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>Kopíruj URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopíruj její označení</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Kopíruj zprávu</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopíruj částku</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1239,6 +1882,73 @@
<source>&amp;Save Image...</source>
<translation>&amp;Ulož obrázek...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Platební požadavek: %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informace o platbě</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresa</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Částka</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Označení</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Zpráva</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>Výsledná URI je příliš dlouhá, zkus zkrátit text označení/zprávy.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Chyba při kódování URI do QR kódu.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Označení</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Zpráva</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez označení)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(bez zprávy)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(bez požadované částky)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Požádáno</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1275,10 +1985,6 @@
<translation>Částka:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorita:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Poplatek:</translation>
</message>
@@ -1347,10 +2053,6 @@
<translation>(Inteligentní poplatek ještě není inicializovaný. Obvykle mu to tak pár bloků trvá...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Rychlost potvrzení:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normální</translation>
</message>
@@ -1375,6 +2077,10 @@
<translation>Prach:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Časové cílování potvrzení:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>Všechno s&amp;maž</translation>
</message>
@@ -1390,6 +2096,118 @@
<source>S&amp;end</source>
<translation>Pošl&amp;i</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopíruj počet</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopíruj částku</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopíruj poplatek</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopíruj čistou částku</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopíruj bajty</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopíruj prach</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopíruj drobné</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 pro %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Jsi si jistý, že to chceš poslat?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>přidán jako transakční poplatek</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Celková částka %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>nebo</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Potvrď odeslání mincí</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Adresa příjemce je neplatná – překontroluj ji prosím.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Odesílaná částka musí být větší než 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Částka překračuje stav účtu.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Celková částka při připočítání poplatku %1 překročí stav účtu.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Zaznamenána duplicitní adresa: každá adresa by ale měla být použita vždy jen jednou.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Vytvoření transakce selhalo!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>Transakce byla zamítnuta s tímto odůvodněním: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Poplatek vyšší než %1 je považován za absurdně vysoký.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Platební požadavek vypršel.</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n blok</numerusform><numerusform>%n bloky</numerusform><numerusform>%n bloků</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Zaplatit pouze vyžadovaný poplatek %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Potvrzování by podle odhadu mělo začít během %n bloku.</numerusform><numerusform>Potvrzování by podle odhadu mělo začít během %n bloků.</numerusform><numerusform>Potvrzování by podle odhadu mělo začít během %n bloků.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Upozornění: Neplatná bitcoinová adresa</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Upozornění: Neznámá adresa pro drobné</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez označení)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1459,7 +2277,7 @@
</message>
<message>
<source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
- <translation>Zpráva, která byla připojena k bitcoin: URI a která se ti pro přehled uloží k transakci. Poznámka: Tahle zpráva se neposílá s platbou po Bitcoinové síti.</translation>
+ <translation>Zpráva, která byla připojena k bitcoin: URI a která se ti pro přehled uloží k transakci. Poznámka: Tahle zpráva se neposílá s platbou po bitcoinové síti.</translation>
</message>
<message>
<source>Pay To:</source>
@@ -1469,10 +2287,25 @@
<source>Memo:</source>
<translation>Poznámka:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Zadej označení této adresy; obojí se ti pak uloží do adresáře</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Ano</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 se ukončuje...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>Nevypínej počítač, dokud toto okno nezmizí.</translation>
</message>
@@ -1525,7 +2358,7 @@
</message>
<message>
<source>Sign the message to prove you own this Bitcoin address</source>
- <translation>Podepiš zprávu, čímž prokážeš, že jsi vlastníkem této Bitcoinové adresy</translation>
+ <translation>Podepiš zprávu, čímž prokážeš, že jsi vlastníkem této bitcoinové adresy</translation>
</message>
<message>
<source>Sign &amp;Message</source>
@@ -1553,7 +2386,7 @@
</message>
<message>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
- <translation>Ověř zprávu, aby ses ujistil, že byla podepsána danou Bitcoinovou adresou</translation>
+ <translation>Ověř zprávu, aby ses ujistil, že byla podepsána danou bitcoinovou adresou</translation>
</message>
<message>
<source>Verify &amp;Message</source>
@@ -1563,6 +2396,58 @@
<source>Reset all verify message fields</source>
<translation>Vymaž všechna pole formuláře pro ověření zrávy</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Kliknutím na „Podepiš zprávu“ vygeneruješ podpis</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Zadaná adresa je neplatná.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Zkontroluj ji prosím a zkus to pak znovu.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Zadaná adresa nepasuje ke klíči.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Odemčení peněženky bylo zrušeno.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Soukromý klíč pro zadanou adresu není dostupný.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Nepodařilo se podepsat zprávu.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Zpráva podepsána.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Podpis nejde dekódovat.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Zkontroluj ho prosím a zkus to pak znovu.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Podpis se neshoduje s hašem zprávy.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Nepodařilo se ověřit zprávu.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Zpráva ověřena.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1579,11 +2464,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Otevřeno pro %n další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Otřevřeno dokud %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>koliduje s transakcí o %1 konfirmacích</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/nepotvrzeno, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>v transakčním zásobníku</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>není ani v transakčním zásobníku</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>zanechaná</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/nepotvrzeno</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 potvrzení</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Stav</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, ještě nebylo rozesláno</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, rozesláno přes %n uzel</numerusform><numerusform>, rozesláno přes %n uzly</numerusform><numerusform>, rozesláno přes %n uzlů</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Zdroj</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Vygenerováno</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Od</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>neznámo</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Pro</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>vlastní adresa</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>sledovaná</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>označení</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Příjem</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>dozraje po %n bloku</numerusform><numerusform>dozraje po %n blocích</numerusform><numerusform>dozraje po %n blocích</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>neakceptováno</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Výdaj</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Celkové výdaje</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Celkové příjmy</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Transakční poplatek</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Čistá částka</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Zpráva</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Komentář</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID transakce</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Celková velikost transakce</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Pořadí výstupu</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Obchodník</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Vygenerované mince musí čekat %1 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.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Ladicí informace</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transakce</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Vstupy</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Částka</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>true</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>false</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Toto okno zobrazuje detailní popis transakce</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Podrobnosti o %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Typ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Označení</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Otevřeno pro %n další blok</numerusform><numerusform>Otevřeno pro %n další bloky</numerusform><numerusform>Otevřeno pro %n dalších bloků</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Otřevřeno dokud %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Nepotvrzeno</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Zanechaná</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Potvrzuje se (%1 z %2 doporučených potvrzení)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Potvrzeno (%1 potvrzení)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>V kolizi</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Nedozráno (%1 potvrzení, dozraje při %2 potvrzeních)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Tento blok nedostal žádný jiný uzel a pravděpodobně nebude akceptován!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Vygenerováno, ale neakceptováno</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Přijato do</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Přijato od</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Posláno na</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Platba sama sobě</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Vytěženo</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>sledovací</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez označení)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Stav transakce. Najetím myši na toto políčko si zobrazíš počet potvrzení.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Datum a čas přijetí transakce.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Druh transakce.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Zda tato transakce zahrnuje i některou sledovanou adresu.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Uživatelsky určený účel transakce.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Částka odečtená z nebo přičtená k účtu.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Vše</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Dnes</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Tento týden</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Tento měsíc</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Minulý měsíc</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Letos</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rozsah...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Přijato</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Posláno</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Sám sobě</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Vytěženo</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Ostatní</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Zadej adresu nebo označení pro její vyhledání</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Minimální částka</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Zapomenout transakci</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopíruj adresu</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopíruj její označení</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopíruj částku</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopíruj ID transakce</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Kopíruj surovou transakci</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Kopíruj kompletní podrobnosti o transakci</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Uprav označení</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Zobraz detaily transakce</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exportuj transakční historii</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Formát CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Potvrzeno</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Sledovaná</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Typ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Označení</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresa</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportování selhalo</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Při ukládání transakční historie do %1 se přihodila nějaká chyba.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Úspěšně vyexportováno</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Transakční historie byla v pořádku uložena do %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rozsah:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>až</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1593,6 +2927,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Žádná peněženka se nenačetla.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Pošli mince</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Export</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exportuj data z tohoto panelu do souboru</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Záloha peněženky</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Data peněženky (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Zálohování selhalo</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Při ukládání peněženky do %1 se přihodila nějaká chyba.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Úspěšně zazálohováno</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Data z peněženky byla v pořádku uložena do %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1615,6 +2998,18 @@
<translation>Akceptovat příkazy z příkazové řádky a přes JSON-RPC</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Přijímat spojení zvenčí (výchozí: 1, pokud není zadáno -proxy nebo -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>Připojovat se pouze k určeným uzlům; samotné -noconnect nebo -connect=0 zakáží automatické připojování</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Šířen pod softwarovou licencí MIT, viz přiložený soubor %s nebo %s</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Pokud není &lt;category&gt; zadána nebo je &lt;category&gt; = 1, bude tisknout veškeré ladicí informace.</translation>
</message>
@@ -1655,16 +3050,12 @@
<translation>Nemohu spustit HTTP server. Detaily viz v debug.log.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Přijímat spojení zvenčí (výchozí: 1, pokud není zadáno -proxy nebo -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee je nastaveno velmi vysoko! Toto je transakční poplatek, který bys platil, pokud nebude k dispozici odhad poplatků.</translation>
+ <source>The %s developers</source>
+ <translation>Vývojáři %s</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1679,20 +3070,40 @@
<translation>Poslouchat na zadané adrese. Pro zápis IPv6 adresy použij notaci [adresa]:port</translation>
</message>
<message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>Nedaří se mi získat zámek na datový adresář %s. %s pravděpodobně už jednou běží.</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>Smazat všechny transakce peněženky a při startu obnovit pouze relevantní části řetězce bloků pomocí -rescan</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Šířen pod softwarovou licencí MIT, viz přiložený soubor COPYING nebo &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Chyba při načítání %s: nemůžeš zapnout HD u existující ne-HD peněženky</translation>
+ </message>
+ <message>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>Nastala chyba při čtení souboru %s! 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é.</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Spustit příkaz, když se objeví transakce týkající se peněženky (%s se v příkazu nahradí za TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Vynutit přeposílání transakcí od vždy vítaných protějšků (tj. těch na bílé listině), i když porušují místní zásady pro přeposílání (výchozí: %d)</translation>
+ <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
+ <translation>Maximální povolené seřizování času mediánem časů protějšků. Místní vnímání času může být ovlivněno protějšky, a to dopředu nebo dozadu až o toto množství. (výchozí: %u vteřin)</translation>
+ </message>
+ <message>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>Horní hranice pro celkový poplatek (v %s) za jednu transakci z peněženky nebo jednu surovou transakci; příliš nízká hodnota může zmařit velké transakce (výchozí: %s)</translation>
+ </message>
+ <message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Zkontroluj, že máš v počítači správně nastavený datum a čas! Pokud jsou nastaveny špatně, %s nebude fungovat správně.</translation>
+ </message>
+ <message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Prosíme, zapoj se nebo přispěj, pokud ti %s přijde užitečný. Více informací o programu je na %s.</translation>
</message>
<message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
@@ -1707,10 +3118,18 @@
<translation>Tohle je testovací verze – používej ji jen na vlastní riziko, ale rozhodně ji nepoužívej k těžbě nebo pro obchodní aplikace</translation>
</message>
<message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Nedaří se mi vrátit databázi do stavu před štěpem. Budeš muset znovu stáhnout celý řetězec bloků</translation>
+ </message>
+ <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Použít UPnP k namapování naslouchacího portu (výchozí: 1, pokud naslouchá a nepoužívá -proxy)</translation>
</message>
<message>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>Peněženka nebude vytvářet transakce, které by porušovaly limity transakčního zásobníku na řetězce (výchozí: %u)</translation>
+ </message>
+ <message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation>Upozornění: Síť podle všeho není v konzistentním stavu. Někteří těžaři jsou zřejmě v potížích.</translation>
</message>
@@ -1719,8 +3138,12 @@
<translation>Upozornění: Nesouhlasím zcela se svými protějšky! Možná potřebuji aktualizovat nebo ostatní uzly potřebují aktualizovat.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Vždy vítat protějšky připojující se z dané podsítě či IP adresy. Lze zadat i vícekrát.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>Je třeba přestavět databázi použitím -reindex-chainstate, aby bylo možné změnit -txindex</translation>
+ </message>
+ <message>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s je poškozen, jeho záchrana se nezdařila</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1735,18 +3158,34 @@
<translation>Připojit komentář k typu klienta</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>Pokusit se při startu zachránit soukromé klíče z poškozeného souboru s klíči</translation>
+ </message>
+ <message>
<source>Block creation options:</source>
<translation>Možnosti vytváření bloku:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Připojit se pouze k zadanému uzlu (příp. zadaným uzlům)</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>Nemohu přeložit -%s adresu: '%s'</translation>
+ </message>
+ <message>
+ <source>Chain selection options:</source>
+ <translation>Možnosti výběru řetězce:</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>Index drobných je mimo platný rozsah</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Možnosti připojení:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i–%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>Bylo zjištěno poškození databáze bloků</translation>
</message>
@@ -1763,6 +3202,26 @@
<translation>Chceš přestavět databázi bloků hned teď?</translation>
</message>
<message>
+ <source>Enable publish hash block in &lt;address&gt;</source>
+ <translation>Zapnout oznamování hashů bloků na adrese &lt;address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish hash transaction in &lt;address&gt;</source>
+ <translation>Zapnout oznamování hashů transakcí na adrese &lt;address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish raw block in &lt;address&gt;</source>
+ <translation>Zapnout oznamování surových bloků na adrese &lt;address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish raw transaction in &lt;address&gt;</source>
+ <translation>Zapnout oznamování surových transakcí na adrese &lt;address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Povolit výměnu transakcí v transakčním zásobníku (výchozí: %u)</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
<translation>Chyba při zakládání databáze bloků</translation>
</message>
@@ -1771,6 +3230,22 @@
<translation>Chyba při vytváření databázového prostředí %s pro peněženku!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>Chyba při načítání %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>Chyba při načítání %s: peněženka je poškozená</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>Chyba při načítání %s: peněženka vyžaduje novější verzi %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Chyba při načítání %s: nemůžeš vypnout HD u existující HD peněženky</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Chyba při načítání databáze bloků</translation>
</message>
@@ -1795,10 +3270,18 @@
<translation>Nemám žádný nebo jen špatný genesis blok. Není špatně nastavený datadir?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>Selhala úvodní zevrubná prověrka. %s se ukončuje.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Neplatná -onion adresa: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>Neplatná částka pro -%s=&lt;částka&gt;: '%s'</translation>
+ </message>
+ <message>
<source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
<translation>Neplatná částka pro -fallbackfee=&lt;částka&gt;: '%s'</translation>
</message>
@@ -1807,12 +3290,12 @@
<translation>Udržovat zasobník transakcí menší než &lt;n&gt; megabajtů (výchozí: %u)</translation>
</message>
<message>
- <source>Location of the auth cookie (default: data dir)</source>
- <translation>Místo pro autentizační cookie (výchozí: adresář pro data)</translation>
+ <source>Loading banlist...</source>
+ <translation>Načítám seznam klateb...</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Minimální počet bajtů na každý sigop v transakcích, které přeposíláme a těžíme (výchozí: %u)</translation>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Místo pro autentizační cookie (výchozí: adresář pro data)</translation>
</message>
<message>
<source>Not enough file descriptors available.</source>
@@ -1823,6 +3306,10 @@
<translation>Připojovat se pouze k uzlům v &lt;net&gt; síti (ipv4, ipv6 nebo onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Vypsat tuto nápovědu a skončit</translation>
+ </message>
+ <message>
<source>Print version and exit</source>
<translation>Vypsat verzi a skončit</translation>
</message>
@@ -1835,6 +3322,18 @@
<translation>Prořezávací režim není kompatibilní s -txindex.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Při startu znovu vytvořit index řetězce bloků z aktuálních blk*.dat souborů</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Znovu vytvořit stav řetězce bloků z aktuálně indexovaných bloků</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>Vracím bloky…</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Nastavit velikost databázové vyrovnávací paměti v megabajtech (%d až %d, výchozí: %d)</translation>
</message>
@@ -1847,6 +3346,14 @@
<translation>Udej název souboru s peněženkou (v rámci datového adresáře)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Zdrojový kód je dostupný na %s.</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>Nedaří se mi připojit na %s na tomhle počítači. %s už pravděpodobně jednou běží.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Nepodporovaný argument -benchmark se ignoruje, použij -debug=bench.</translation>
</message>
@@ -1863,22 +3370,34 @@
<translation>Použít UPnP k namapování naslouchacího portu (výchozí: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Použít testovací řetězec</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Komentář u typu klienta (%s) obsahuje riskantní znaky.</translation>
</message>
<message>
<source>Verifying blocks...</source>
- <translation>Ověřuji bloky...</translation>
+ <translation>Ověřuji bloky…</translation>
</message>
<message>
<source>Verifying wallet...</source>
- <translation>Kontroluji peněženku...</translation>
+ <translation>Kontroluji peněženku…</translation>
</message>
<message>
<source>Wallet %s resides outside data directory %s</source>
<translation>Peněženka %s se nachází mimo datový adresář %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Možnosti ladění/testování peněženky:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Soubor s peněženkou potřeboval přepsat: restartuj %s, aby se operace dokončila</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Možnosti peněženky:</translation>
</message>
@@ -1927,10 +3446,6 @@
<translation>Maximální velikost dat v transakcích nesoucích data, se kterou jsme ochotni je ještě přeposílat a těžit (výchozí: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Při nedostatku adres získat další protějšky z DNS (výchozí: 1, pokud není použito -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Použít náhodné údaje pro každé proxy spojení. To umožní izolovat nesouvisející datové toky v Toru (výchozí: %u)</translation>
</message>
@@ -1943,8 +3458,8 @@
<translation>Částka v transakci po odečtení poplatku je příliš malá na odeslání</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu &lt;https://www.openssl.org/&gt; a kryptografický program od Erika Younga a program UPnP od Thomase Bernarda.</translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Použít hierarchické deterministické generování klíčů (HD) podle BIP32. Má vliv pouze během vytváření peněženky/prvního startu</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2055,10 +3570,6 @@
<translation>Částka v transakci je příliš malá</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Částky v transakci musí být kladné</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transakce je na poplatkovou politiku příliš velká</translation>
</message>
@@ -2083,6 +3594,10 @@
<translation>Upozornění</translation>
</message>
<message>
+ <source>Warning: unknown new rules activated (versionbit %i)</source>
+ <translation>Upozornění: aktivována neznámá nová pravidla (verzový bit %i)</translation>
+ </message>
+ <message>
<source>Whether to operate in a blocks only mode (default: %u)</source>
<translation>Zda fungovat v čistě blokovém režimu (výchozí: %u)</translation>
</message>
@@ -2092,7 +3607,7 @@
</message>
<message>
<source>ZeroMQ notification options:</source>
- <translation>Možnosti ZeroMQ oznámení:</translation>
+ <translation>Možnosti ZeroMQ oznamování:</translation>
</message>
<message>
<source>Password for JSON-RPC connections</source>
@@ -2119,18 +3634,22 @@
<translation>-maxtxfee je nastaveno velmi vysoko! Takto vysoký poplatek může být zaplacen v jednotlivé transakci.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee je nastaveno velmi vysoko! Toto je transakční poplatek, který zaplatíš za každou poslanou transakci.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Nedržet transakce v zásobníku déle než &lt;n&gt; hodin (výchozí: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Ekvivalent bajtů za každý sigop v transakcích – pro účely přeposílání a těžení (výchozí: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Poplatky (v %s/kB) menší než tato hodnota jsou považovány za nulové pro účely vytváření transakcí (výchozí: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Vynutit přeposílání transakcí od vždy vítaných protějšků (tj. těch na bílé listině), i když porušují místní zásady pro přeposílání (výchozí: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Jak moc důkladná má být verifikace bloků -checkblocks (0-4, výchozí: %u)</translation>
</message>
@@ -2147,10 +3666,26 @@
<translation>Tisknout ladicí informace (výchozí: %u, zadání &lt;category&gt; je volitelné)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Při nedostatku adres získat další protějšky z DNS (výchozí: 1, pokud není použito -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>Nastaví serializaci surových transakcí nebo bloků, jak jsou vraceny v méně povídavém módu: ne-segwit (0) nebo segwit (1) (výchozí: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Umožnit filtrování bloků a transakcí pomocí Bloomova filtru (výchozí: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Toto je transakční poplatek, který se platí, pokud náhodou není k dispozici odhad poplatků.</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>Tento produkt zahrnuje programy vyvinuté OpenSSL Projektem pro použití v OpenSSL Toolkitu %s a kryptografický program od Erika Younga a program UPnP od Thomase Bernarda.</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>Celková délka síťového identifikačního řetězce (%i) překročila svůj horní limit (%i). Omez počet nebo velikost voleb uacomment.</translation>
</message>
@@ -2171,8 +3706,20 @@
<translation>Použít samostatnou SOCKS5 proxy ke spojení s protějšky přes skryté služby v Toru (výchozí: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Uživatelské jméno a zahašované heslo pro JSON-RPC spojení. Pole &lt;userpw&gt; má formát: &lt;UŽIVATELSKÉ_JMÉNO&gt;:&lt;SŮL&gt;$&lt;HAŠ&gt;. Pomocný pythonní skript je přiložen v share/rpcuser. Tuto volbu lze použít i vícekrát</translation>
+ <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
+ <translation>Upozornění: Síť těží neznámé verze bloků! Je možné, že jsou v platnosti neznámá pravidla</translation>
+ </message>
+ <message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>Upozornění: soubor s peněženkou je poškozený, data jsou však zachráněna! Původní soubor %s je uložený jako %s v %s. Pokud nejsou stav tvého účtu nebo transakce v pořádku, zřejmě bys měl obnovit zálohu.</translation>
+ </message>
+ <message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Vždy vítat protějšky připojující se z dané IP adresy (např. 1.2.3.4) či podsítě (CIDR zápis, např. 1.2.3.0/24). Lze zadat i vícekrát.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s je nastaveno velmi vysoko!</translation>
</message>
<message>
<source>(default: %s)</source>
@@ -2195,6 +3742,10 @@
<translation>Neplatná -proxy adresa: '%s'</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>Vyčerpal se zásobník klíčů, zavolej prvně, prosím, keypoolrefill</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>Čekat na JSON-RPC spojení na &lt;portu&gt; (výchozí: %u nebo testnet: %u)</translation>
</message>
@@ -2231,12 +3782,16 @@
<translation>Přeposílat ne-P2SH multisig (výchozí: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>Posílat transakce se zapnutým plným RBF (= replace-by-fee) (výchozí: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>Nastavit zásobník klíčů na velikost &lt;n&gt; (výchozí: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Nastavit minimální velikost bloku v bajtech (výchozí: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Nastavit maximální váhu bloku pro BIP141 (výchozí: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2255,10 +3810,38 @@
<translation>Utrácet i ještě nepotvrzené drobné při posílání transakcí (výchozí: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Spouštím síťová vlákna…</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>Peněženka zaručí přiložení poplatku alespoň ve výši minima pro přenos transakce.</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Toto je minimální poplatek, který zaplatíš za každou transakci.</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Toto je poplatek, který zaplatíš za každou poslanou transakci.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Práh pro odpojování zlobivých protějšků (výchozí: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Částky v transakci nemohou být záporné</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>Transakce má v transakčním zásobníku příliš dlouhý řetězec</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>Transakce musí mít alespoň jednoho příjemce</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>V -onlynet byla uvedena neznámá síť: '%s'</translation>
</message>
@@ -2288,7 +3871,7 @@
</message>
<message>
<source>Rescanning...</source>
- <translation>Přeskenovávám...</translation>
+ <translation>Přeskenovávám…</translation>
</message>
<message>
<source>Done loading</source>
diff --git a/src/qt/locale/bitcoin_cs_CZ.ts b/src/qt/locale/bitcoin_cs_CZ.ts
deleted file mode 100644
index 70aa981f50..0000000000
--- a/src/qt/locale/bitcoin_cs_CZ.ts
+++ /dev/null
@@ -1,300 +0,0 @@
-<TS language="cs_CZ" version="2.1">
-<context>
- <name>AddressBookPage</name>
- <message>
- <source>Right-click to edit address or label</source>
- <translation>Pravým klikem editujte adresu nebo popisek</translation>
- </message>
- <message>
- <source>Create a new address</source>
- <translation>Vytvořit novou adresu</translation>
- </message>
- <message>
- <source>Copy the currently selected address to the system clipboard</source>
- <translation>Kopírovat aktuálně vybrané adresy do schránky</translation>
- </message>
- <message>
- <source>Delete the currently selected address from the list</source>
- <translation>Odstraní aktuálně vybrané adresy ze seznamu</translation>
- </message>
- <message>
- <source>Export the data in the current tab to a file</source>
- <translation>Exportovat aktuální pohled do souboru</translation>
- </message>
- <message>
- <source>&amp;Export</source>
- <translation>&amp;Exportovat</translation>
- </message>
- <message>
- <source>&amp;Delete</source>
- <translation>&amp;Odstranit</translation>
- </message>
-</context>
-<context>
- <name>AskPassphraseDialog</name>
- <message>
- <source>Enter passphrase</source>
- <translation>Zadej heslo</translation>
- </message>
- <message>
- <source>New passphrase</source>
- <translation>Nové heslo</translation>
- </message>
- <message>
- <source>Repeat new passphrase</source>
- <translation>Zopakujte nové heslo</translation>
- </message>
-</context>
-<context>
- <name>BanTableModel</name>
- </context>
-<context>
- <name>BitcoinGUI</name>
- <message>
- <source>Synchronizing with network...</source>
- <translation>Synchronizuji se sítí...</translation>
- </message>
- <message>
- <source>&amp;Overview</source>
- <translation>&amp;Přehled</translation>
- </message>
- <message>
- <source>Show general overview of wallet</source>
- <translation>Zobrazit základní přehled o peněžence</translation>
- </message>
- <message>
- <source>&amp;Transactions</source>
- <translation>&amp;Transakce</translation>
- </message>
- <message>
- <source>Browse transaction history</source>
- <translation>Procházení historií transakcí</translation>
- </message>
- <message>
- <source>Quit application</source>
- <translation>Ukončit aplikaci</translation>
- </message>
- <message>
- <source>&amp;Options...</source>
- <translation>&amp;Možnosti...</translation>
- </message>
- <message>
- <source>Change the passphrase used for wallet encryption</source>
- <translation>Změnit heslo k šifrování peněženky</translation>
- </message>
- <message>
- <source>Bitcoin</source>
- <translation>Bitcoin</translation>
- </message>
- <message>
- <source>&amp;File</source>
- <translation>&amp;Soubor</translation>
- </message>
- <message>
- <source>&amp;Settings</source>
- <translation>&amp;Nastavení</translation>
- </message>
- <message>
- <source>&amp;Help</source>
- <translation>Nápo&amp;věda</translation>
- </message>
- <message>
- <source>Tabs toolbar</source>
- <translation>Panely</translation>
- </message>
- <message>
- <source>Up to date</source>
- <translation>Aktuální</translation>
- </message>
- <message>
- <source>Catching up...</source>
- <translation>Zachytávám...</translation>
- </message>
- <message>
- <source>Sent transaction</source>
- <translation>Odeslané transakce</translation>
- </message>
- <message>
- <source>Incoming transaction</source>
- <translation>Příchozí transakce</translation>
- </message>
- <message>
- <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
- <translation>Peněženka je &lt;b&gt;zašifrována&lt;/b&gt; a momentálně &lt;b&gt;odemčená&lt;/b&gt;</translation>
- </message>
- <message>
- <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
- <translation>Peněženka je &lt;b&gt;zašifrována&lt;/b&gt; a momentálně &lt;b&gt;uzamčená&lt;/b&gt;</translation>
- </message>
-</context>
-<context>
- <name>CoinControlDialog</name>
- <message>
- <source>Amount:</source>
- <translation>Množství:</translation>
- </message>
- <message>
- <source>Amount</source>
- <translation>Množství</translation>
- </message>
- <message>
- <source>Date</source>
- <translation>Datum</translation>
- </message>
- <message>
- <source>Confirmed</source>
- <translation>Potvrzeno</translation>
- </message>
- </context>
-<context>
- <name>EditAddressDialog</name>
- <message>
- <source>Edit Address</source>
- <translation>Upravit adresu</translation>
- </message>
- <message>
- <source>&amp;Label</source>
- <translation>&amp;Popisek</translation>
- </message>
- <message>
- <source>&amp;Address</source>
- <translation>&amp;Adresa</translation>
- </message>
-</context>
-<context>
- <name>FreespaceChecker</name>
- </context>
-<context>
- <name>HelpMessageDialog</name>
- <message>
- <source>Usage:</source>
- <translation>Použití:</translation>
- </message>
- </context>
-<context>
- <name>Intro</name>
- </context>
-<context>
- <name>OpenURIDialog</name>
- </context>
-<context>
- <name>OptionsDialog</name>
- <message>
- <source>Options</source>
- <translation>Možnosti</translation>
- </message>
- <message>
- <source>Map port using &amp;UPnP</source>
- <translation>Mapovat port pomocí &amp;UPnP</translation>
- </message>
- <message>
- <source>&amp;Minimize to the tray instead of the taskbar</source>
- <translation>&amp;Minimalizovat do systémové lišty (tray) namísto do hlavního panelu</translation>
- </message>
- <message>
- <source>M&amp;inimize on close</source>
- <translation>M&amp;inimalizovat při zavření</translation>
- </message>
- </context>
-<context>
- <name>OverviewPage</name>
- </context>
-<context>
- <name>PeerTableModel</name>
- </context>
-<context>
- <name>QObject</name>
- <message>
- <source>Amount</source>
- <translation>Množství</translation>
- </message>
- </context>
-<context>
- <name>RPCConsole</name>
- <message>
- <source>Name</source>
- <translation>Jméno</translation>
- </message>
- </context>
-<context>
- <name>ReceiveCoinsDialog</name>
- <message>
- <source>&amp;Label:</source>
- <translation>&amp;Popisek:</translation>
- </message>
- <message>
- <source>&amp;Message:</source>
- <translation>Zpráva:</translation>
- </message>
- </context>
-<context>
- <name>ReceiveRequestDialog</name>
- </context>
-<context>
- <name>SendCoinsDialog</name>
- <message>
- <source>Amount:</source>
- <translation>Množství:</translation>
- </message>
- <message>
- <source>Balance:</source>
- <translation>Zůstatek:</translation>
- </message>
- </context>
-<context>
- <name>SendCoinsEntry</name>
- <message>
- <source>&amp;Label:</source>
- <translation>&amp;Popisek:</translation>
- </message>
- <message>
- <source>Message:</source>
- <translation>Zpráva:</translation>
- </message>
- </context>
-<context>
- <name>ShutdownWindow</name>
- </context>
-<context>
- <name>SignVerifyMessageDialog</name>
- </context>
-<context>
- <name>SplashScreen</name>
- <message>
- <source>[testnet]</source>
- <translation>[testnet]</translation>
- </message>
-</context>
-<context>
- <name>TrafficGraphWidget</name>
- </context>
-<context>
- <name>TransactionDescDialog</name>
- <message>
- <source>This pane shows a detailed description of the transaction</source>
- <translation>Toto podokno zobrazuje detailní popis transakce</translation>
- </message>
-</context>
-<context>
- <name>UnitDisplayStatusBarControl</name>
- </context>
-<context>
- <name>bitcoin-core</name>
- <message>
- <source>Options:</source>
- <translation>Možnosti:</translation>
- </message>
- <message>
- <source>Loading addresses...</source>
- <translation>Načítání adres...</translation>
- </message>
- <message>
- <source>Loading wallet...</source>
- <translation>Načítání peněženky...</translation>
- </message>
- <message>
- <source>Done loading</source>
- <translation>Načítání dokončeno</translation>
- </message>
- </context>
-</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_cy.ts b/src/qt/locale/bitcoin_cy.ts
index 38bc45775b..9f2d87b606 100644
--- a/src/qt/locale/bitcoin_cy.ts
+++ b/src/qt/locale/bitcoin_cy.ts
@@ -29,7 +29,10 @@
<source>&amp;Delete</source>
<translation>&amp;Dileu</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -44,7 +47,7 @@
<source>Repeat new passphrase</source>
<translation>Ailadroddwch gyfrinymadrodd newydd</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -146,26 +149,6 @@
<source>Tabs toolbar</source>
<translation>Bar offer tabiau</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n awr</numerusform><numerusform>%n awr</numerusform><numerusform>%n awr</numerusform><numerusform>%n awr</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dydd</numerusform><numerusform>%n dydd</numerusform><numerusform>%n dydd</numerusform><numerusform>%n dydd</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n wythnos</numerusform><numerusform>%n wythnos</numerusform><numerusform>%n wythnos</numerusform><numerusform>%n wythnos</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 a %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n blwydd</numerusform><numerusform>%n blwydd</numerusform><numerusform>%n blwydd</numerusform><numerusform>%n blwydd</numerusform></translation>
- </message>
<message>
<source>Error</source>
<translation>Gwall</translation>
@@ -226,7 +209,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Mae'r waled &lt;b&gt;wedi'i amgryptio&lt;/b&gt; ac &lt;b&gt;ar glo&lt;/b&gt; ar hyn o bryd</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -252,7 +235,7 @@
<source>&amp;Address</source>
<translation>&amp;Cyfeiriad</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -279,6 +262,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Ffurflen</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -332,10 +322,23 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -367,6 +370,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -417,6 +423,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -445,12 +454,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index d298c81bd4..0b49b5aefc 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Slet</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Vælg adresse at sende bitcoins til</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Vælg adresse at modtage bitcoins med</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Vælg</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Afsendelsesadresser</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Modtagelsesadresser</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Disse er dine Bitcoin-adresser til afsendelse af betalinger. Tjek altid beløb og modtagelsesadresse, inden du sender bitcoins.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Dette er dine Bitcoin-adresser til modtagelse af betalinger. Det anbefales at bruge en ny modtagelsesadresse for hver transaktion.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiér adresse</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopiér &amp;mærkat</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Redigér</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Eksportér adresseliste</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommasepareret fil (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksport mislykkedes</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Der opstod en fejl under gemning af adresselisten til %1. Prøv venligst igen.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Mærkat</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ingen mærkat)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Gentag ny adgangskode</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Indtast det nye kodeord til tegnebogen.&lt;br/&gt;Brug venligst et kodeord på &lt;b&gt;ti eller flere tilfældige tegn&lt;/b&gt; eller &lt;b&gt;otte eller flere ord&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Kryptér tegnebog</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Denne funktion har brug for din tegnebogs adgangskode for at låse tegnebogen op.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Lås tegnebog op</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Denne funktion har brug for din tegnebogs adgangskode for at dekryptere tegnebogen.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dekryptér tegnebog</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Skift adgangskode</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Indtast den gamle adgangskode og en ny adgangskode til tegnebogen.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Bekræft tegnebogskryptering</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Advarsel: Hvis du krypterer din tegnebog og mister din adgangskode, vil du &lt;b&gt;MISTE ALLE DINE BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Er du sikker på, at du ønsker at kryptere din tegnebog?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Tegnebog krypteret</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 vil nu lukke for at færdiggøre krypteringsprocessen. Husk at kryptering af din tegnebog kan ikke beskytte dine bitcoin fuldt ud mod at blive stjålet af eventuel malware, der måtte have inficeret din computer.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>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 ubrugelige i det øjeblik, du starter med at anvende den nye, krypterede tegnebog.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Tegnebogskryptering mislykkedes</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Tegnebogskryptering mislykkedes på grund af en intern fejl. Din tegnebog blev ikke krypteret.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>De angivne adgangskoder stemmer ikke overens.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Tegnebogsoplåsning mislykkedes</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Den angivne adgangskode for tegnebogsdekrypteringen er forkert.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Tegnebogsdekryptering mislykkedes</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Tegnebogens adgangskode blev ændret.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Advarsel: Caps Lock-tasten er aktiveret!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -76,7 +235,7 @@
<name>BitcoinGUI</name>
<message>
<source>Sign &amp;message...</source>
- <translation>Underskriv &amp;besked…</translation>
+ <translation>Signér &amp;besked…</translation>
</message>
<message>
<source>Synchronizing with network...</source>
@@ -159,6 +318,18 @@
<translation>&amp;Åbn URI…</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Klik for at deaktivere netværksaktivitet.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Netværksaktivitet deaktiveret.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Klik for a aktivere netværksaktivitet igen.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Genindekserer blokke på disken…</translation>
</message>
@@ -216,11 +387,11 @@
</message>
<message>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
- <translation>Underskriv beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig</translation>
+ <translation>Signér beskeder med dine Bitcoin-adresser for at bevise, at de tilhører dig</translation>
</message>
<message>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
- <translation>Verificér beskeder for at sikre, at de er underskrevet med de angivne Bitcoin-adresser</translation>
+ <translation>Verificér beskeder for at sikre, at de er signeret med de angivne Bitcoin-adresser</translation>
</message>
<message>
<source>&amp;File</source>
@@ -240,7 +411,7 @@
</message>
<message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
- <translation>Anmod om betalinger (genererer QR-koder og "bitcoin:"-URI'er)</translation>
+ <translation>Anmod om betalinger (genererer QR-koder og “bitcoin:”-URI'er)</translation>
</message>
<message>
<source>Show the list of used sending addresses and labels</source>
@@ -252,7 +423,7 @@
</message>
<message>
<source>Open a bitcoin: URI or payment request</source>
- <translation>Åbn en "bitcoin:"-URI eller betalingsanmodning</translation>
+ <translation>Åbn en “bitcoin:”-URI eller betalingsanmodning</translation>
</message>
<message>
<source>&amp;Command-line options</source>
@@ -278,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Bearbejdede %n blok med transaktionshistorik.</numerusform><numerusform>Bearbejdede %n blokke med transaktionshistorik.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dag</numerusform><numerusform>%n dage</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n uge</numerusform><numerusform>%n uger</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 og %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n år</numerusform><numerusform>%n år</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 bagud</translation>
@@ -377,6 +528,14 @@
<translation>Indgående transaktion</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>Generering af HD-nøgler er &lt;b&gt;aktiveret&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>Generering af HD-nøgler er &lt;b&gt;deaktiveret&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Tegnebog er &lt;b&gt;krypteret&lt;/b&gt; og i øjeblikket &lt;b&gt;ulåst&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Tegnebog er &lt;b&gt;krypteret&lt;/b&gt; og i øjeblikket &lt;b&gt;låst&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Der opstod en fatal fejl. Bitcoin kan ikke længere fortsætte sikkert og vil afslutte.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>Beløb:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Gebyr:</translation>
</message>
@@ -460,8 +619,84 @@
<translation>Bekræftet</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioritet</translation>
+ <source>Copy address</source>
+ <translation>Kopiér adresse</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiér mærkat</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiér beløb</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopiér transaktions-ID</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Fastlås ubrugte</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Lås ubrugte op</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopiér mængde</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopiér gebyr</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopiér eftergebyr</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopiér byte</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopiér støv</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopiér byttepenge</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 fastlåst)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>ja</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>nej</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Denne mærkat bliver rød, hvis en eller flere modtagere modtager et beløb, der er mindre end den aktuelle støvgrænse.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Kan variere med ±%1 satoshi per input.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ingen mærkat)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>byttepenge fra %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(byttepange)</translation>
</message>
</context>
<context>
@@ -486,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Adresse</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Ny modtagelsesadresse</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Ny afsendelsesadresse</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Redigér modtagelsesadresse</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Redigér afsendelsesadresse</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Den indtastede adresse “%1” er ikke en gyldig Bitcoin-adresse.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Den indtastede adresse “%1” er allerede i adressebogen.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Kunne ikke låse tegnebog op.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Ny nøglegenerering mislykkedes.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -546,7 +813,7 @@
</message>
<message>
<source>Set language, for example "de_DE" (default: system locale)</source>
- <translation>Vælg sprog; fx "da_DK" (standard: systemsprog)</translation>
+ <translation>Vælg sprog; fx “da_DK” (standard: systemsprog)</translation>
</message>
<message>
<source>Start minimized</source>
@@ -593,7 +860,7 @@
</message>
<message>
<source>Error: Specified data directory "%1" cannot be created.</source>
- <translation>Fejl: Angivet datamappe "%1" kan ikke oprettes.</translation>
+ <translation>Fejl: Angivet datamappe “%1” kan ikke oprettes.</translation>
</message>
<message>
<source>Error</source>
@@ -605,7 +872,58 @@
</message>
<message numerus="yes">
<source>(of %n GB needed)</source>
- <translation><numerusform>(ud af %n GB behøvet)</numerusform><numerusform>(ud af %n GB behøvet)</numerusform></translation>
+ <translation><numerusform>(ud af %n GB nødvendig)</numerusform><numerusform>(ud af %n GB nødvendig)</numerusform></translation>
+ </message>
+</context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formular</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Nylige transaktioner er måske ikke synlige endnu, og derfor kan din tegnebogs saldo være ukorrekt. Denne information vil være korrekt, når din tegnebog er færdig med at synkronisere med bitcoin-netværket, som detaljerne herunder viser.</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>Forsøg på at bruge bitcoin, som er indeholdt i endnu-ikke-viste transaktioner, accepteres ikke af netværket.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Antal blokke tilbage</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Ukendt…</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Tidsstempel for seneste blok</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Fremgang</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Øgning af fremgang pr. time</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>beregner…</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Estimeret tid tilbage af synkronisering</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Skjul</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Ukendt. Synkroniserer hoveder (%1)…</translation>
</message>
</context>
<context>
@@ -626,6 +944,10 @@
<source>Select payment request file</source>
<translation>Vælg fil for betalingsanmodning</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Vælg fil for betalingsanmodning til åbning</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -715,7 +1037,7 @@
</message>
<message>
<source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
- <translation>Hvis du slår brug af ubekræftede byttepenge fra, kan byttepengene fra en transaktion ikke bruges, før pågældende transaktion har mindst én bekræftelse. Dette påvirker også måden hvorpå din saldo beregnes.</translation>
+ <translation>Hvis du deaktiverer brug af ubekræftede byttepenge, kan byttepengene fra en transaktion ikke bruges, før pågældende transaktion har mindst én bekræftelse. Dette påvirker også måden hvorpå din saldo beregnes.</translation>
</message>
<message>
<source>&amp;Spend unconfirmed change</source>
@@ -938,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Fejl i betalingsanmodning</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Kan ikke starte bitcoin: click-to-pay-håndtering</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI-håndtering</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>Hentnings-URL for betalingsanmodning er ugyldig: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Ugyldig betalingsadresse %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI kan ikke tolkes! Dette kan skyldes en ugyldig Bitcoin-adresse eller forkert udformede URL-parametre.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Filhåndtering for betalingsanmodninger</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Fil for betalingsanmodning kan ikke læses! Dette kan skyldes en ugyldig fil for betalingsanmodning.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Betalingsanmodning afvist</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Netværk for betalingsanmodning stemmer ikke overens med klientens netværk.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Betalingsanmodning er udløbet.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Betalingsanmodning er ikke klargjort.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Ikke-verificerede betalingsanmodninger for tilpassede betalings-scripts understøttes ikke.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Ugyldig betalingsanmodning.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Anmodet betalingsbeløb på %1 er for lille (regnes som støv).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Tilbagebetaling fra %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Betalingsanmodning %1 er for stor (%2 byte; %3 byte tilladt).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Fejl under kommunikation med %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Betalingsanmodning kan ikke tolkes!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Fejlagtigt svar fra server %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Fejl i netværksforespørgsel</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Betaling anerkendt</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -948,8 +1361,12 @@
<translation>Knude/tjeneste</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Ping-tid</translation>
+ <source>NodeId</source>
+ <translation>Knude-id</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Ping</translation>
</message>
</context>
<context>
@@ -990,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n sekund</numerusform><numerusform>%n sekunder</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n minut</numerusform><numerusform>%n minutter</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n dag</numerusform><numerusform>%n dage</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n uge</numerusform><numerusform>%n uger</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 og %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n år</numerusform><numerusform>%n år</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 har endnu ikke afsluttet på sikker vis…</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Fejl: Angivet datamappe “%1” eksisterer ikke.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Fejl: Kan ikke fortolke konfigurationsfil: %1. Brug kun syntaksen nøgle=værdi.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Fejl: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>Gem billede…</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Kopiér foto</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Gem QR-kode</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG-billede (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1150,6 +1633,10 @@
<translation>Ping-ventetid</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Minimum ping</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Tidsforskydning</translation>
</message>
@@ -1194,14 +1681,6 @@
<translation>Ryd konsol</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Afbryd forbindelse til knude</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Bandlys knude i</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;time</translation>
</message>
@@ -1218,8 +1697,16 @@
<translation>1 &amp;år</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Fjern bandlysning af knude</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Afbryd forbindelse</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Bandlys i</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>&amp;Fjern bandlysning</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1234,6 +1721,14 @@
<translation>Tast &lt;b&gt;help&lt;/b&gt; for en oversigt over de tilgængelige kommandoer.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>ADVARSEL: Svindlere har tidligere forsøgt at få folk til at indtaste kommandoer her og derved stjæle indholdet af deres tegnebog. Brug ikke denne konsol uden fuldt ud at forstå følgerne for en kommando.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>Netværksaktivitet deaktiveret</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
@@ -1352,6 +1847,22 @@
<source>Remove</source>
<translation>Fjern</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>Kopiér URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiér mærkat</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Kopiér besked</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiér beløb</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,6 +1882,73 @@
<source>&amp;Save Image...</source>
<translation>&amp;Gem billede…</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Anmod om betaling til %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Betalingsinformation</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Beløb</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Mærkat</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Besked</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>Resulterende URI var for lang; prøv at forkorte teksten til mærkaten/beskeden.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Fejl ved kodning fra URI til QR-kode.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Dato</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Mærkat</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Besked</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ingen mærkat)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(ingen besked)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(intet anmodet beløb)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Anmodet</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1407,10 +1985,6 @@
<translation>Beløb:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Gebyr:</translation>
</message>
@@ -1448,7 +2022,7 @@
</message>
<message>
<source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
- <translation>Hvis det brugertilpassede gebyr er sat til 1000 satoshis, og transaktionen kun fylder 250 byte, betaler "pr. kilobyte" kun 250 satoshis i gebyr, mens "total mindst" betaler 1000 satoshis. For transaktioner større end en kilobyte betaler begge pr. kilobyte.</translation>
+ <translation>Hvis det brugertilpassede gebyr er sat til 1000 satoshis, og transaktionen kun fylder 250 byte, betaler “pr. kilobyte” kun 250 satoshis i gebyr, mens “total mindst” betaler 1000 satoshis. For transaktioner større end en kilobyte betaler begge pr. kilobyte.</translation>
</message>
<message>
<source>Hide</source>
@@ -1479,10 +2053,6 @@
<translation>(Smart-gebyr er ikke initialiseret endnu. Dette tager typisk nogle få blokke…)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Bekræftelsestid:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1507,6 +2077,10 @@
<translation>Støv:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Mål for bekræftelsestid:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>Ryd &amp;alle</translation>
</message>
@@ -1522,6 +2096,126 @@
<source>S&amp;end</source>
<translation>&amp;Afsend</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopiér mængde</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiér beløb</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopiér gebyr</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopiér eftergebyr</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopiér byte</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopiér støv</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopiér byttepenge</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 til %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Er du sikker på, at du vil sende?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>tilføjet som transaktionsgebyr</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Beløb i alt %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>eller</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Bekræft afsendelse af bitcoins</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Modtageradressen er ikke gyldig. Tjek venligst igen.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Beløbet til betaling skal være større end 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Beløbet overstiger din saldo.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Totalen overstiger din saldo, når transaktionsgebyret på %1 er inkluderet.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Adressegenganger fundet. Adresser bør kun bruges én gang hver.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Oprettelse af transaktion mislykkedes!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>Transaktionen blev afvist med følgende begrundelse: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Et gebyr højere end %1 opfattes som et absurd højt gebyr.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Betalingsanmodning er udløbet.</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n blok</numerusform><numerusform>%n blokke</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Betal kun det påkrævede gebyr på %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Bekræftelse estimeret til at begynde om %n blok.</numerusform><numerusform>Bekræftelse estimeret til at begynde om %n blokke.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Advarsel: Ugyldig Bitcoin-adresse</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Advarsel: Ukendt byttepengeadresse</translation>
+ </message>
+ <message>
+ <source>Confirm custom change address</source>
+ <translation>Bekræft tilpasset byttepengeadresse</translation>
+ </message>
+ <message>
+ <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source>
+ <translation>Den adresse, du har valgt til byttepenge, er ikke en del af denne tegnebog. Nogle af eller alle penge i din tegnebog kan blive sendt til denne adresse. Er du sikker?</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ingen mærkat)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1591,7 +2285,7 @@
</message>
<message>
<source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
- <translation>En besked, som blev føjet til "bitcon:"-URI'en, som vil gemmes med transaktionen til din reference. Bemærk: Denne besked vil ikke blive sendt over Bitcoin-netværket.</translation>
+ <translation>En besked, som blev føjet til “bitcon:”-URI'en, som vil gemmes med transaktionen til din reference. Bemærk: Denne besked vil ikke blive sendt over Bitcoin-netværket.</translation>
</message>
<message>
<source>Pay To:</source>
@@ -1601,6 +2295,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Indtast en mærkat for denne adresse for at føje den til din adressebog</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Ja</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1617,11 +2322,11 @@
<name>SignVerifyMessageDialog</name>
<message>
<source>Signatures - Sign / Verify a Message</source>
- <translation>Signature - Underskriv/verificér en besked</translation>
+ <translation>Signaturer – Underskriv/verificér en besked</translation>
</message>
<message>
<source>&amp;Sign Message</source>
- <translation>&amp;Underskriv besked</translation>
+ <translation>&amp;Singér besked</translation>
</message>
<message>
<source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
@@ -1649,27 +2354,27 @@
</message>
<message>
<source>Enter the message you want to sign here</source>
- <translation>Indtast her beskeden, du ønsker at underskrive</translation>
+ <translation>Indtast her beskeden, du ønsker at signere</translation>
</message>
<message>
<source>Signature</source>
- <translation>Underskrift</translation>
+ <translation>Signatur</translation>
</message>
<message>
<source>Copy the current signature to the system clipboard</source>
- <translation>Kopiér den nuværende underskrift til systemets udklipsholder</translation>
+ <translation>Kopiér den nuværende signatur til systemets udklipsholder</translation>
</message>
<message>
<source>Sign the message to prove you own this Bitcoin address</source>
- <translation>Underskriv denne besked for at bevise, at Bitcoin-adressen tilhører dig</translation>
+ <translation>Signér denne besked for at bevise, at Bitcoin-adressen tilhører dig</translation>
</message>
<message>
<source>Sign &amp;Message</source>
- <translation>Underskriv &amp;besked</translation>
+ <translation>Signér &amp;besked</translation>
</message>
<message>
<source>Reset all sign message fields</source>
- <translation>Nulstil alle "underskriv besked"-felter</translation>
+ <translation>Nulstil alle “signér besked”-felter</translation>
</message>
<message>
<source>Clear &amp;All</source>
@@ -1689,7 +2394,7 @@
</message>
<message>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
- <translation>Verificér beskeden for at sikre, at den er underskrevet med den angivne Bitcoin-adresse</translation>
+ <translation>Verificér beskeden for at sikre, at den er signeret med den angivne Bitcoin-adresse</translation>
</message>
<message>
<source>Verify &amp;Message</source>
@@ -1697,7 +2402,59 @@
</message>
<message>
<source>Reset all verify message fields</source>
- <translation>Nulstil alle "verificér besked"-felter</translation>
+ <translation>Nulstil alle “verificér besked”-felter</translation>
+ </message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Klik “Signér besked” for at generere underskriften</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Den indtastede adresse er ugyldig.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Tjek venligst adressen og forsøg igen.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Den indtastede adresse henviser ikke til en nøgle.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Tegnebogsoplåsning annulleret.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Den private nøgle for den indtastede adresse er ikke tilgængelig.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Signering af besked mislykkedes.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Besked signeret.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Signaturen kunne ikke afkodes.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Tjek venligst signaturen og forsøg igen.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Signaturen passer ikke overens med beskedens indhold.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Verificering af besked mislykkedes.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Besked verificeret.</translation>
</message>
</context>
<context>
@@ -1715,11 +2472,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Åben i %n yderligere blok</numerusform><numerusform>Åben i %n yderligere blokke</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Åben indtil %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>i konflikt med en transaktion, der har %1 bekræftelser</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/ubekræftet, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>i hukommelsespulje</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>ikke i hukommelsespulje</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>opgivet</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/ubekræftet</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 bekræftelser</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Status</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, er ikke blevet transmitteret endnu</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, transmitteret igennem %n knude</numerusform><numerusform>, transmitteret igennem %n knuder</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Dato</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Kilde</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Genereret</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Fra</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>ukendt</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Til</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>egen adresse</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>kigge</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>mærkat</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Kredit</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>modner om %n blok</numerusform><numerusform>modner om %n blokke</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>ikke accepteret</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Debet</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Total debet</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Total kredit</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Transaktionsgebyr</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Nettobeløb</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Besked</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Kommentar</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Transaktions-ID</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Totalstørrelse af transaktion</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Outputindeks</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Forretningsdrivende</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Minede bitcoins skal modne %1 blokke, før de kan bruges. Da du genererede denne blok, blev den transmitteret til netværket for at blive føjet til blokkæden. Hvis det ikke lykkes at få den i kæden, vil dens tilstand ændres til “ikke accepteret”, og den vil ikke kunne bruges. Dette kan ske nu og da, hvis en anden knude udvinder en blok inden for nogle få sekunder fra din.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Fejlsøgningsinformation</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transaktion</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Input</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Beløb</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>sand</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>falsk</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Denne rude viser en detaljeret beskrivelse af transaktionen</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Detaljer for %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Dato</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Mærkat</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Åben i %n yderligere blok</numerusform><numerusform>Åben i %n yderligere blokke</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Åben indtil %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Ubekræftet</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Opgivet</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Bekræfter (%1 af %2 anbefalede bekræftelser)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Bekræftet (%1 bekræftelser)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>Konflikt</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Umoden (%1 bekræftelser; vil være tilgængelig efter %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Denne blok blev ikke modtaget af nogen andre knuder og vil formentlig ikke blive accepteret!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Genereret, men ikke accepteret</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Modtaget med</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Modtaget fra</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Sendt til</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Betaling til dig selv</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minet</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>kigge</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ingen mærkat)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Transaktionsstatus. Hold musen over dette felt for at vise antallet af bekræftelser.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Dato og klokkeslæt for modtagelse af transaktionen.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Transaktionstype.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Afgør hvorvidt en kigge-adresse er involveret i denne transaktion.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Brugerdefineret hensigt/formål med transaktionen.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Beløb trukket fra eller tilføjet balance.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Alle</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>I dag</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Denne uge</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Denne måned</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Sidste måned</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>I år</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Interval…</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Modtaget med</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Sendt til</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Til dig selv</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minet</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Andet</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Indtast adresse eller mærkat for at søge</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Minimumsbeløb</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Opgiv transaktion</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopiér adresse</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiér mærkat</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiér beløb</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopiér transaktions-ID</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Kopiér rå transaktion</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Kopiér komplette transaktionsdetaljer</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Redigér mærkat</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Vis transaktionsdetaljer</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Eksportér transaktionshistorik</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommasepareret fil (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Bekræftet</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Kigge</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Dato</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Mærkat</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksport mislykkedes</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>En fejl opstod under gemning af transaktionshistorik til %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Eksport problemfri</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Transaktionshistorikken blev gemt til %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Interval:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>til</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1729,6 +2935,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Ingen tegnebog er indlæst.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Send bitcoins</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Eksportér</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Eksportér den aktuelle visning til en fil</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Sikkerhedskopiér tegnebog</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Tegnebogsdata (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Sikkerhedskopiering mislykkedes</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Der skete en fejl under gemning af tegnebogsdata til %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Sikkerhedskopiering problemfri</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Tegnebogsdata blev gemt til %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1751,6 +3006,18 @@
<translation>Acceptér kommandolinje- og JSON-RPC-kommandoer</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Acceptér forbindelser udefra (standard: 1 hvis ingen -proxy eller -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>Forbind kun til de specificerede knuder; -noconnect eller -connect=0 alene for at deaktivere automatiske forbindelser</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Distribueret under MIT-softwarelicensen; se den vedlagte fil %s eller %s</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Hvis &lt;category&gt; ikke angives eller hvis &lt;category&gt; = 1, udskriv al fejlretningsinformation.</translation>
</message>
@@ -1764,7 +3031,7 @@
</message>
<message>
<source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
- <translation>Reducér lagringskravene ved at beskære (slette) gamle blokke. Denne tilstand er ikke kompatibel med -txindex og -rescan. Advarsel: Fortrydelse af denne indstilling kræver gendownload af hele blokkæden. (standard: 0 = slå beskæring af blokke fra, &gt;%u = målstørrelse i MiB der skal bruges på blokfiler)</translation>
+ <translation>Reducér lagringskravene ved at beskære (slette) gamle blokke. Denne tilstand er ikke kompatibel med -txindex og -rescan. Advarsel: Fortrydelse af denne indstilling kræver gendownload af hele blokkæden. (standard: 0 = deaktivér beskæring af blokke, &gt;%u = målstørrelse i MiB der skal bruges på blokfiler)</translation>
</message>
<message>
<source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
@@ -1791,10 +3058,6 @@
<translation>Kunne ikke starte HTTP-server. Se fejlretningslog for detaljer.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Acceptér forbindelser udefra (standard: 1 hvis hverken -proxy eller -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1803,10 +3066,6 @@
<translation>Udviklerne af %s</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee er sat meget højt! Dette er transaktionsgebyret, du eventuelt betaler, hvis gebyrestimater ikke er tilgængelige.</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>En gebyrsats (i %s/kB), som vil blive brugt, hvis gebyrestimering har utilstrækkelig data (standard: %s)</translation>
</message>
@@ -1827,10 +3086,6 @@
<translation>Slet alle transaktioner i tegnebogen og genskab kun disse dele af blokkæden gennem -rescan under opstart</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribueret under MIT-softwarelicensen; se den vedlagte fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Fejl under indlæsning af %s: Du kan ikke aktivere HD på en allerede eksisterende ikke-HD-tegnebog</translation>
</message>
@@ -1843,10 +3098,6 @@
<translation>Udfør kommando, når en transaktion i tegnebogen ændres (%s i kommandoen erstattes med TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Gennemtving videresendelse af transaktioner fra hvidlistede knuder, selv om de overtræder lokal videresendelsespolitik (standard: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Justering af maksimalt tilladt gennemsnitlig afvigelse fra peer-tid. Den lokale opfattelse af tid kan blive påvirket frem eller tilbage af peers med denne mængde tid. (standard: %u sekunder)</translation>
</message>
@@ -1872,7 +3123,7 @@
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Dette er en foreløbig testudgivelse - brug på eget ansvar - brug ikke til udvinding eller handelsprogrammer</translation>
+ <translation>Dette er en foreløbig testudgivelse – brug på eget ansvar – brug ikke til mining eller handelsprogrammer</translation>
</message>
<message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
@@ -1883,6 +3134,14 @@
<translation>Brug UPnP for at konfigurere den lyttende port (standard: 1 under lytning og ingen -proxy)</translation>
</message>
<message>
+ <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=&lt;USERNAME&gt;/rpcpassword=&lt;PASSWORD&gt; pair of arguments. This option can be specified multiple times</source>
+ <translation>Brugernavn og hashet adgangskode for JSON-RPC-forbindelser. Feltet &lt;userpw&gt; er i formatet: &lt;BRUGERNAVN&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Et kanonisk Python-skript er inkluderet i share/rpcuser. Klienten forbinder så normalt ved hjælp af argumentparret rpcuser=&lt;BRUGERNAVN&gt;/rpcpassword=&lt;ADGANGSKODE&gt;. Dette tilvalg kan angives flere gange</translation>
+ </message>
+ <message>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>Tegnebogen vil ikke oprette transaktioner, som overtræder begrænsningen for hukommelsespuljekæden (standard: %u)</translation>
+ </message>
+ <message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation>Advarsel: Netværket ser ikke ud til at være fuldt ud enige! Enkelte minere ser ud til at opleve problemer.</translation>
</message>
@@ -1891,10 +3150,6 @@
<translation>Advarsel: Vi ser ikke ud til at være fuldt ud enige med andre knuder! Du kan være nødt til at opgradere, eller andre knuder kan være nødt til at opgradere.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Sæt andre knuder, der forbinder fra den angivne netmaske eller IP, på hvidliste. Kan angives flere gange.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex-chainstate for at ændre -txindex</translation>
</message>
@@ -1924,15 +3179,15 @@
</message>
<message>
<source>Cannot resolve -%s address: '%s'</source>
- <translation>Kan ikke finde -%s-adressen: "%s"</translation>
+ <translation>Kan ikke finde -%s-adressen: “%s”</translation>
</message>
<message>
- <source>Change index out of range</source>
- <translation>Ændr indeks uden for interval</translation>
+ <source>Chain selection options:</source>
+ <translation>Indstillinger for kædevalg:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Tilslut kun til de(n) angivne knude(r)</translation>
+ <source>Change index out of range</source>
+ <translation>Ændr indeks uden for interval</translation>
</message>
<message>
<source>Connection options:</source>
@@ -1952,7 +3207,7 @@
</message>
<message>
<source>Do not load the wallet and disable wallet RPC calls</source>
- <translation>Indlæs ikke tegnebogen og slå tegnebogs-RPC-kald fra</translation>
+ <translation>Indlæs ikke tegnebogen og deaktivér tegnebogs-RPC-kald</translation>
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
@@ -2032,15 +3287,15 @@
</message>
<message>
<source>Invalid -onion address: '%s'</source>
- <translation>Ugyldig -onion adresse: "%s"</translation>
+ <translation>Ugyldig -onion adresse: “%s”</translation>
</message>
<message>
<source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
- <translation>Ugyldigt beløb for -%s=&lt;beløb&gt;: "%s"</translation>
+ <translation>Ugyldigt beløb for -%s=&lt;beløb&gt;: “%s”</translation>
</message>
<message>
<source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
- <translation>Ugyldigt beløb for -fallbackfee=&lt;beløb&gt;: "%s"</translation>
+ <translation>Ugyldigt beløb for -fallbackfee=&lt;beløb&gt;: “%s”</translation>
</message>
<message>
<source>Keep the transaction memory pool below &lt;n&gt; megabytes (default: %u)</source>
@@ -2055,10 +3310,6 @@
<translation>Placering for autentificerings-cookie (standard: datamappe)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Minimum bytes pr. sigop i transaktioner, vi videresender og miner (standard: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>For få tilgængelige fildeskriptorer.</translation>
</message>
@@ -2099,10 +3350,6 @@
<translation>Sæt cache-størrelse for database i megabytes (%d til %d; standard: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Sæt maksimal blokudgift (standard: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>Sæt maksimum blokstørrelse i byte (standard: %d)</translation>
</message>
@@ -2135,6 +3382,10 @@
<translation>Brug UPnP til at konfigurere den lyttende port (standard: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Brug testkæden</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Brugeragent-kommentar (%s) indeholder usikre tegn.</translation>
</message>
@@ -2176,7 +3427,7 @@
</message>
<message>
<source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
- <translation>Opret nye filer med systemstandard for rettigheder i stedet for umask 077 (kun virksomt med tegnebogsfunktionalitet slået fra)</translation>
+ <translation>Opret nye filer med systemstandard for rettigheder i stedet for umask 077 (kun virksomt med tegnebogsfunktionalitet deaktiveret)</translation>
</message>
<message>
<source>Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)</source>
@@ -2200,17 +3451,13 @@
</message>
<message>
<source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
- <translation>Ugyldigt beløb for -maxtxfee=&lt;beløb&gt;: "%s" (skal være på mindst minrelay-gebyret på %s for at undgå hængende transaktioner)</translation>
+ <translation>Ugyldigt beløb for -maxtxfee=&lt;beløb&gt;: “%s” (skal være på mindst minrelay-gebyret på %s for at undgå hængende transaktioner)</translation>
</message>
<message>
<source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
<translation>Maksimal størrelse på data i transaktioner til dataoverførsel, som vi videresender og miner (standard: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Forespørgsel</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Brug tilfældige akkreditiver for hver proxy-forbindelse. Dette aktiverer strømisolation med Tor (standard: %u)</translation>
</message>
@@ -2223,10 +3470,6 @@
<translation>Transaktionsbeløbet er for lille til at sende, når gebyret er trukket fra</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Dette produkt indeholder software, der er udviklet af OpenSSL-projektet for brug i OpenSSL-værktøjskassen &lt;https://www.openssl.org/&gt;, samt kryptografisk software, der er skrevet af Eric Young, samt UPnP-software, der er skrevet af Thomas Bernard.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>Brug hierarkisk deterministisk nøglegenerering (HD) efter BIP32. Har kun effekt ved generering af ny tegnebog og under første opstart</translation>
</message>
@@ -2268,11 +3511,11 @@
</message>
<message>
<source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
- <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: "%s" (skal være mindst %s)</translation>
+ <translation>Ugyldigt beløb for -paytxfee=&lt;beløb&gt;: “%s” (skal være mindst %s)</translation>
</message>
<message>
<source>Invalid netmask specified in -whitelist: '%s'</source>
- <translation>Ugyldig netmaske angivet i -whitelist: "%s"</translation>
+ <translation>Ugyldig netmaske angivet i -whitelist: “%s”</translation>
</message>
<message>
<source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
@@ -2280,7 +3523,7 @@
</message>
<message>
<source>Need to specify a port with -whitebind: '%s'</source>
- <translation>Nødt til at angive en port med -whitebinde: "%s"</translation>
+ <translation>Nødt til at angive en port med -whitebinde: “%s”</translation>
</message>
<message>
<source>Node relay options:</source>
@@ -2316,7 +3559,7 @@
</message>
<message>
<source>Signing transaction failed</source>
- <translation>Underskrift af transaktion mislykkedes</translation>
+ <translation>Signering af transaktion mislykkedes</translation>
</message>
<message>
<source>The transaction amount is too small to pay the fee</source>
@@ -2339,10 +3582,6 @@
<translation>Transaktionsbeløb er for lavt</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transaktionsbeløb skal være positive</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transaktion for stor til gebyrretningslinjer</translation>
</message>
@@ -2407,18 +3646,22 @@
<translation>-maxtxfee er sat meget højt! Gebyrer så store risikeres betalt på en enkelt transaktion.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee er sat meget højt! Dette er transaktionsgebyret, som du betaler, hvis du sender en transaktion.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Behold ikke transaktioner i hukommelsespuljen i mere end &lt;n&gt; timer (default: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Tilsvarende bytes pr. sigop i transaktioner, som videresendes og mines (standard: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Gebyrer (i %s/kB) mindre end dette opfattes som intet gebyr under oprettelse af transaktioner (standard: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Gennemtving videresendelse af transaktioner fra hvidlistede knuder, selv om de overtræder lokal videresendelsespolitik (standard: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Hvor gennemarbejdet blokverificeringen for -checkblocks er (0-4; standard: %u)</translation>
</message>
@@ -2435,10 +3678,26 @@
<translation>Udskriv fejlsøgningsinformation (standard: %u, angivelse af &lt;kategori&gt; er valgfri)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Forespørg knudeadresser via DNS-opslag hvis antallet af adresser er lavt (standard: 1 med mindre -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>Indstiller serialiseringen af rå transaktioner eller blok-hex returneret i ikke-verbose tilstand, non-segwit(0) eller sigwit(1) (standard: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Understøt filtrering af blokke og transaktioner med Bloom-filtre (standard: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Dette er transaktionsgebyret, du kan betale, når gebyrestimeringer ikke er tilgængelige.</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>Dette produkt indeholder software, der er udviklet af OpenSSL-projektet for brug i OpenSSL-værktøjskassen %s, samt kryptografisk software, der er skrevet af Eric Young, samt UPnP-software, der er skrevet af Thomas Bernard.</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>Den totale længde på netværksversionsstrengen (%i) overstiger maksimallængden (%i). Reducér antaller af eller størrelsen på uacomments.</translation>
</message>
@@ -2459,10 +3718,6 @@
<translation>Brug separat SOCS5-proxy for at nå knuder via skjulte Tor-tjenester (standard: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Brugernavn og hashet adgangskode for JSON-RPC-forbindelser. Feltet &lt;userpw&gt; er i formatet: &lt;BRUGERNAVN&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Et kanonisk Python-skript inkluderes i share/rpcuser. Dette tilvalg kan angives flere gange</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Advarsel: Ukendte blokversioner bliver minet! Det er muligt, at ukendte regler er i brug</translation>
</message>
@@ -2471,6 +3726,14 @@
<translation>Advarsel: Tegnebogsfil ødelagt, data reddet! Oprindelig %s gemt som %s i %s; hvis din saldo eller dine transaktioner er forkert, bør du genskabe fra en sikkerhedskopi.</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Sæt knuder på hvidliste, som forbinder fra den givne IP-adresse (fx 1.2.3.4) eller CIDR-noteret netværk (fx 1.2.3.0/24). Kan angives flere gange.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s er meget højt sat!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(standard: %s)</translation>
</message>
@@ -2488,7 +3751,11 @@
</message>
<message>
<source>Invalid -proxy address: '%s'</source>
- <translation>Ugyldig -proxy adresse: "%s"</translation>
+ <translation>Ugyldig -proxy adresse: “%s”</translation>
+ </message>
+ <message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>Nøglepulje løb tør; kald venligst keypoolrefill først</translation>
</message>
<message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
@@ -2527,13 +3794,17 @@
<translation>Videresend ikke-P2SH multisig (standard: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>Send transaktioner med fuld-RBF opt-in aktiveret (standard: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>Sæt nøglepuljestørrelse til &lt;n&gt; (standard: %u)
</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Angiv minimumsblokstørrelse i byte (standard: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Sæt maksimal BIP141-blokvægt (standard: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2556,12 +3827,40 @@
<translation>Brug ubekræftede byttepenge under afsendelse af transaktioner (standard: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Starter netværkstråde…</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>Tegnebogen vil undgå at betale mindre end minimum-videresendelsesgebyret.</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Dette er det transaktionsgebyr, du minimum betaler for hver transaktion.</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Dette er transaktionsgebyret, som betaler, når du sender en transaktion.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Grænse for afbrydelse af forbindelse til knuder, der opfører sig upassende (standard: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Transaktionsbeløb må ikke være negative</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>Transaktionen har en for lang hukommelsespuljekæde</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>Transaktionen skal have mindst én modtager</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
- <translation>Ukendt netværk anført i -onlynet: "%s"</translation>
+ <translation>Ukendt netværk anført i -onlynet: “%s”</translation>
</message>
<message>
<source>Insufficient funds</source>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 2708324d17..1dfd77cf61 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Löschen</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Wählen Sie die Adresse aus, an die Sie Bitcoins überweisen möchten</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Wählen Sie die Adresse aus, über die Sie Bitcoins empfangen wollen</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Auswählen</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Zahlungsadressen</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Empfangsadressen</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Dies sind ihre Bitcoin-Adressen zum Tätigen von Überweisungen. Bitte prüfen Sie den Betrag und die Empfangsadresse, bevor Sie Bitcoins überweisen.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Dies sind Ihre Bitcoin-Adressen zum Empfangen von Zahlungen. Es wird empfohlen, für jede Transaktion eine neue Empfangsadresse zu verwenden.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>Adresse &amp;kopieren</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>&amp;Bezeichnung kopieren</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editieren</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Addressliste exportieren</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommagetrennte-Datei (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportieren fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Beim Speichern der Adressliste nach %1 ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(keine Bezeichnung)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Neue Passphrase bestätigen</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Geben Sie die neue Passphrase für die Wallet ein.&lt;br&gt;Bitte benutzen Sie eine Passphrase bestehend aus &lt;b&gt;zehn oder mehr zufälligen Zeichen&lt;/b&gt; oder &lt;b&gt;acht oder mehr Wörtern&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Wallet verschlüsseln</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Dieser Vorgang benötigt ihre Passphrase, um die Wallet zu entsperren.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Wallet entsperren</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Dieser Vorgang benötigt Ihre Passphrase, um die Wallet zu entschlüsseln.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Wallet entschlüsseln</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Passphrase ändern</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Geben Sie die alte und neue Wallet-Passphrase ein.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Wallet-Verschlüsselung bestätigen</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Warnung: Wenn Sie Ihre Wallet verschlüsseln und Ihre Passphrase verlieren, werden Sie &lt;b&gt;alle Ihre Bitcoins verlieren&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Sind Sie sich sicher, dass Sie Ihre Wallet verschlüsseln möchten?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Wallet verschlüsselt</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 wird jetzt beendet, um den Verschlüsselungsprozess abzuschließen. Bitte beachten Sie, dass die Wallet-Verschlüsselung nicht vollständig vor Diebstahl Ihrer Bitcoins durch Schadprogramme schützt, die Ihren Computer befällt.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>WICHTIG: Alle vorherigen Wallet-Sicherungen sollten durch die neu erzeugte, verschlüsselte Wallet ersetzt werden. Aus Sicherheitsgründen werden vorherige Sicherungen der unverschlüsselten Wallet nutzlos, sobald Sie die neue, verschlüsselte Wallet verwenden.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Wallet-Verschlüsselung fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Die Wallet-Verschlüsselung ist aufgrund eines internen Fehlers fehlgeschlagen. Ihre Wallet wurde nicht verschlüsselt.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Die eingegebenen Passphrasen stimmen nicht überein.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Wallet-Entsperrung fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Die eingegebene Passphrase zur Wallet-Entschlüsselung war nicht korrekt.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Wallet-Entschlüsselung fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Die Wallet-Passphrase wurde erfolgreich geändert.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Warnung: Die Feststelltaste ist aktiviert!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -112,7 +271,7 @@
</message>
<message>
<source>&amp;About %1</source>
- <translation>&amp;Über %1</translation>
+ <translation>Über %1</translation>
</message>
<message>
<source>Show information about %1</source>
@@ -159,6 +318,18 @@
<translation>&amp;URI öffnen...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Klicken zum Deaktivieren der Netzwerkaktivität.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Netzwerkaktivität deaktiviert.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Klicken zum Aktivieren der Netzwerkaktivität.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Reindiziere Blöcke auf Datenträger...</translation>
</message>
@@ -278,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n Block des Transaktionsverlaufs verarbeitet.</numerusform><numerusform>%n Blöcke des Transaktionsverlaufs verarbeitet.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 und %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n Jahr</numerusform><numerusform>%n Jahre</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 im Rückstand</translation>
@@ -377,6 +528,14 @@
<translation>Eingehende Transaktion</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>HD Schlüssel Generierung ist &lt;b&gt;aktiviert&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>HD Schlüssel Generierung ist &lt;b&gt;deaktiviert&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;entsperrt&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Wallet ist &lt;b&gt;verschlüsselt&lt;/b&gt; und aktuell &lt;b&gt;gesperrt&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Ein schwerer Fehler ist aufgetreten. Bitcoin kann nicht stabil weiter ausgeführt werden und wird beendet.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>Betrag:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorität:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Gebühr:</translation>
</message>
@@ -460,8 +619,84 @@
<translation>Bestätigt</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorität</translation>
+ <source>Copy address</source>
+ <translation>Adresse kopieren</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Bezeichnung kopieren</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Betrag kopieren</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Transaktionskennung kopieren</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Nicht ausgegebenen Betrag sperren</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Nicht ausgegebenen Betrag entsperren</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Anzahl kopieren</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Gebühr kopieren</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Abzüglich Gebühr kopieren</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Byte kopieren</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>"Staub" kopieren</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Wechselgeld kopieren</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 gesperrt)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>ja</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>nein</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Diese Bezeichnung wird rot, wenn irgendein Empfänger einen Betrag kleiner als die derzeitige "Staubgrenze" erhält.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Kann pro Eingabe um +/- %1 Satoshi(s) abweichen.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(keine Bezeichnung)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>Wechselgeld von %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(Wechselgeld)</translation>
</message>
</context>
<context>
@@ -486,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Adresse</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Neue Empfangsadresse</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Neue Zahlungsadresse</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Empfangsadresse bearbeiten</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Zahlungsadresse bearbeiten</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Die eingegebene Adresse "%1" ist keine gültige Bitcoin-Adresse.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Die eingegebene Adresse "%1" befindet sich bereits im Adressbuch.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Wallet konnte nicht entsperrt werden.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Erzeugung eines neuen Schlüssels fehlgeschlagen.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +876,49 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formular</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Anzahl verbleibender Blöcke</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Unbekannt...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Letzte Blockzeit</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Fortschritt</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Fortschritt pro Stunde</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>berechne...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Abschätzung der verbleibenden Zeit bis synchronisiert</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ausblenden</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Unbekannt. Synchronisiere Headers (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +936,10 @@
<source>Select payment request file</source>
<translation>Zahlungsanforderungsdatei auswählen</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Zu öffnende Zahlungsanforderungsdatei auswählen</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -810,6 +1124,10 @@
<translation>&amp;Sprache der Benutzeroberfläche:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Die Benutzeroberflächensprache kann hier festgelegt werden. Diese Einstellung wird nach einem Neustart von %1 wirksam werden.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>&amp;Einheit der Beträge:</translation>
</message>
@@ -934,6 +1252,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>fehlerhafte Zahlungsanforderung</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Kann Bitcoin nicht starten: Klicken-zum-Bezahlen-Handler</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI-Verarbeitung</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>Abruf-URL der Zahlungsanforderung ist ungültig: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Ungültige Zahlungsadresse %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI kann nicht analysiert werden! Dies kann durch eine ungültige Bitcoin-Adresse oder fehlerhafte URI-Parameter verursacht werden.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Zahlungsanforderungsdatei-Verarbeitung</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Zahlungsanforderungsdatei kann nicht gelesen werden! Dies kann durch eine ungültige Zahlungsanforderungsdatei verursacht werden.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Zahlungsanforderung abgelehnt</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Netzwerk der Zahlungsanforderung stimmt nicht mit dem Client-Netzwerk überein.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Zahlungsanforderung abgelaufen.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Zahlungsanforderung ist nicht initialisiert.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Unverifizierte Zahlungsanforderungen an benutzerdefinierte Zahlungsskripte werden nicht unterstützt.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Ungültige Zahlungsanforderung.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Angeforderter Zahlungsbetrag in Höhe von %1 ist zu niedrig und wurde als "Staub" eingestuft.</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Rücküberweisung von %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Zahlungsanforderung %1 ist zu groß (%2 Byte, erlaubt sind %3 Byte).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Kommunikationsfehler mit %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Zahlungsanforderung kann nicht verarbeitet werden!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Fehlerhafte Antwort vom Server: %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>fehlerhafte Netzwerkanfrage</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Zahlung bestätigt</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -944,8 +1353,12 @@
<translation>Knoten/Dienst</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Pingzeit</translation>
+ <source>NodeId</source>
+ <translation>Knoten Identität</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Ping</translation>
</message>
</context>
<context>
@@ -986,6 +1399,68 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n Sekunde</numerusform><numerusform>%n Sekunde(n)</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n Minute</numerusform><numerusform>%n Minute(n)</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n Stunde</numerusform><numerusform>%n Stunden</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n Tag</numerusform><numerusform>%n Tage</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n Woche</numerusform><numerusform>%n Wochen</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 und %2</translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 wurde noch nicht sicher beendet...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Fehler: Angegebenes Datenverzeichnis "%1" existiert nicht.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Fehler: Konfigurationsdatei kann nicht analysiert werden: %1. Bitte nur "Schlüssel=Wert"-Syntax verwenden.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Fehler: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>Grafik &amp;speichern...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>Grafik &amp;kopieren</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>QR-Code speichern</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG-Grafik (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1146,6 +1621,10 @@
<translation>Ping Wartezeit</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Minimaler Ping</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Zeitversatz</translation>
</message>
@@ -1190,14 +1669,6 @@
<translation>Konsole zurücksetzen</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>Knoten &amp;trennen</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Knoten gebannt für</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;Stunde</translation>
</message>
@@ -1214,7 +1685,15 @@
<translation>1 &amp;Jahr</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Trennen</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Banne für</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
<translation>&amp;Node entsperren</translation>
</message>
<message>
@@ -1230,6 +1709,14 @@
<translation>Bitte &lt;b&gt;help&lt;/b&gt; eingeben, um eine Übersicht verfügbarer Befehle zu erhalten.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>WARNUNG: Betrüger versuchen aktiv Nutzer dazu zu bringen Kommandos hier auszuführen um die Wallet Inhalte zu stehlen. Diese Konsole sollte nicht benutzt werden ausser man kennt die möglichen Folgen des Kommandos.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>Netzwerkaktivität deaktiviert</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
@@ -1348,6 +1835,22 @@
<source>Remove</source>
<translation>Entfernen</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>&amp;URI kopieren</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Bezeichnung kopieren</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Nachricht kopieren</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Betrag kopieren</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1367,6 +1870,73 @@
<source>&amp;Save Image...</source>
<translation>Grafik &amp;speichern...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Zahlung anfordern an %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Zahlungsinformationen</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Betrag</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Nachricht</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>Resultierende URI ist zu lang, bitte den Text für Bezeichnung/Nachricht kürzen.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Beim Enkodieren der URI in den QR-Code ist ein Fehler aufgetreten.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Nachricht</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(keine Bezeichnung)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(keine Nachricht)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(kein Betrag angefordert)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Angefordert</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1403,10 +1973,6 @@
<translation>Betrag:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorität:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Gebühr:</translation>
</message>
@@ -1475,10 +2041,6 @@
<translation>(Intelligente Gebührenlogik ist noch nicht verfügbar. Normalerweise dauert dies einige Blöcke lang...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Bestätigungszeit:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1503,6 +2065,10 @@
<translation>"Dust":</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Gewünschte Bestätigungszeit:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>&amp;Zurücksetzen</translation>
</message>
@@ -1518,6 +2084,118 @@
<source>S&amp;end</source>
<translation>&amp;Überweisen</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Anzahl kopieren</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Betrag kopieren</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Gebühr kopieren</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Abzüglich Gebühr kopieren</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Byte kopieren</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>"Staub" kopieren</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Wechselgeld kopieren</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 an %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Wollen Sie die Überweisung ausführen?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>als Transaktionsgebühr hinzugefügt</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Gesamtbetrag %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>oder</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Überweisung bestätigen</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Die Zahlungsadresse ist ungültig, bitte nochmals überprüfen.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Der zu zahlende Betrag muss größer als 0 sein.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Der angegebene Betrag übersteigt Ihren Kontostand.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Der angegebene Betrag übersteigt aufgrund der Transaktionsgebühr in Höhe von %1 Ihren Kontostand.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Doppelte Adresse entdeckt: Adressen dürfen jeweils nur einmal vorkommen.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Transaktionserstellung fehlgeschlagen!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>Die Transaktion wurde aus folgendem Grund abgelehnt: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Eine höhere Gebühr als %1 wird als unsinnig hohe Gebühr angesehen.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Zahlungsanforderung abgelaufen.</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n Block</numerusform><numerusform>%n Blöcke</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Nur die notwendige Gebühr in Höhe von %1 zahlen</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Voraussichtlicher Beginn der Bestätigung innerhalb von %n Block.</numerusform><numerusform>Voraussichtlicher Beginn der Bestätigung innerhalb von %n Blöcken.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Warnung: Ungültige Bitcoin-Adresse</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Warnung: Unbekannte Wechselgeld-Adresse</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(keine Bezeichnung)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1597,6 +2275,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Geben Sie eine Bezeichnung für diese Adresse ein, um sie zu Ihrem Adressbuch hinzuzufügen</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Ja</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1695,6 +2384,58 @@
<source>Reset all verify message fields</source>
<translation>Alle "Nachricht verifizieren"-Felder zurücksetzen</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Auf "Nachricht signieren" klicken, um die Signatur zu erzeugen</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Die eingegebene Adresse ist ungültig.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Bitte überprüfen Sie die Adresse und versuchen Sie es erneut.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Die eingegebene Adresse verweist nicht auf einen Schlüssel.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Wallet-Entsperrung wurde abgebrochen.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Privater Schlüssel zur eingegebenen Adresse ist nicht verfügbar.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Signierung der Nachricht fehlgeschlagen.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Nachricht signiert.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Die Signatur konnte nicht dekodiert werden.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Bitte überprüfen Sie die Signatur und versuchen Sie es erneut.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Die Signatur entspricht nicht dem "Message Digest".</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Verifikation der Nachricht fehlgeschlagen.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Nachricht verifiziert.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1711,11 +2452,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Offen bis %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>steht im Konflikt mit einer Transaktion mit %1 Bestätigungen</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>%1/unbestätigt</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>im Speicherpool</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>nicht im Speicherpool</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>eingestellt</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/unbestätigt</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 Bestätigungen</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Status</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, wurde noch nicht erfolgreich übertragen</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, über %n Knoten übertragen</numerusform><numerusform>, über %n Knoten übertragen</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Quelle</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Erzeugt</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Von</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>unbekannt</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>An</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>eigene Adresse</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>beobachtet</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Gutschrift</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>reift noch %n weiteren Block</numerusform><numerusform>reift noch %n weitere Blöcke</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>nicht angenommen</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Belastung</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Gesamtbelastung</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Gesamtgutschrift</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Transaktionsgebühr</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Nettobetrag</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Nachricht</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Kommentar</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Transaktionskennung</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Gesamte Transaktionsgröße</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Ausgabeindex</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Händler</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Erzeugte Bitcoins müssen %1 Blöcke lang reifen, bevor sie ausgegeben werden können. Als Sie diesen Block erzeugten, 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 Sie werden keine Bitcoins gutgeschrieben bekommen. Das kann gelegentlich passieren, wenn ein anderer Knoten einen Block fast zeitgleich erzeugt.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Debuginformationen</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transaktion</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Eingaben</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Betrag</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>wahr</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>falsch</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Dieser Bereich zeigt eine detaillierte Beschreibung der Transaktion an</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Details für %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Typ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Offen für %n weiteren Block</numerusform><numerusform>Offen für %n weitere Blöcke</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Offen bis %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Unbestätigt</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Eingestellt</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Wird bestätigt (%1 von %2 empfohlenen Bestätigungen)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Bestätigt (%1 Bestätigungen)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>in Konflikt stehend</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Unreif (%1 Bestätigungen, wird verfügbar sein nach %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Dieser Block wurde vom Netzwerk nicht angenommen und wird wahrscheinlich nicht bestätigt werden!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generiert, aber nicht akzeptiert</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Empfangen über</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Empfangen von</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Überwiesen an</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Eigenüberweisung</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Erarbeitet</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>beobachtet</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(k.A.)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(keine Bezeichnung)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Transaktionsstatus. Fahren Sie mit der Maus über dieses Feld, um die Anzahl der Bestätigungen zu sehen.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Datum und Zeit als die Transaktion empfangen wurde.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Art der Transaktion</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Zeigt an, ob eine beobachtete Adresse in diese Transaktion involviert ist.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Benutzerdefinierte Absicht bzw. Verwendungszweck der Transaktion</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Der Betrag, der dem Kontostand abgezogen oder hinzugefügt wurde.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Alle</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Heute</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Diese Woche</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Diesen Monat</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Letzten Monat</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Dieses Jahr</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Zeitraum...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Empfangen über</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Überwiesen an</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Eigenüberweisung</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Erarbeitet</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Andere</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Zu suchende Adresse oder Bezeichnung eingeben</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Mindestbetrag</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Transaktion einstellen</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Adresse kopieren</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Bezeichnung kopieren</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Betrag kopieren</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Transaktionskennung kopieren</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Rohe Transaktion kopieren</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Vollständige Transaktionsdetails kopieren</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Bezeichnung bearbeiten</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Transaktionsdetails anzeigen</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Transaktionsverlauf exportieren</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommagetrennte-Datei (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Bestätigt</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Nur beobachten</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Typ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Bezeichnung</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportieren fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Beim Speichern des Transaktionsverlaufs nach %1 ist ein Fehler aufgetreten.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportieren erfolgreich</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Speichern des Transaktionsverlaufs nach %1 war erfolgreich.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Zeitraum:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>bis</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1725,6 +2915,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Es wurde keine Wallet geladen.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Bitcoins überweisen</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>E&amp;xportieren</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Daten der aktuellen Ansicht in eine Datei exportieren</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Wallet sichern</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Wallet-Daten (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Sicherung fehlgeschlagen</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Beim Speichern der Wallet-Daten nach %1 ist ein Fehler aufgetreten.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Sicherung erfolgreich</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Speichern der Wallet-Daten nach %1 war erfolgreich.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1747,6 +2986,14 @@
<translation>Kommandozeilen- und JSON-RPC-Befehle annehmen</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Veröffentlicht unter der MIT-Softwarelizenz, siehe beiligende Datei %s oder %s.</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Wenn &lt;category&gt; nicht angegeben wird oder &lt;category&gt;=1, jegliche Debugginginformationen ausgeben.</translation>
</message>
@@ -1755,10 +3002,18 @@
<translation>Kürzungsmodus wurde kleiner als das Minimum in Höhe von %d MiB konfiguriert. Bitte verwenden Sie einen größeren Wert.</translation>
</message>
<message>
+ <source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
+ <translation>Prune (Kürzung): Die letzte Syncronisation der Wallet liegt vor gekürzten (gelöschten) Blöcken. Es ist ein -reindex (download der gesamten Blockkette) notwendig.</translation>
+ </message>
+ <message>
<source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
<translation>Speicherplatzanforderung durch kürzen (löschen) alter Blöcke reduzieren. Dieser Modus ist nicht mit -txindex und -rescan kompatibel. Warnung: Die Umkehr dieser Einstellung erfordert das erneute Herunterladen der gesamten Blockkette. (Standard: 0 = deaktiviert das Kürzen von Blöcken, &gt;%u = Zielgröße in MiB, die für Blockdateien verwendet werden darf)</translation>
</message>
<message>
+ <source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
+ <translation>Rescans sind im pruned mode nicht möglich. Ein -reindex ist notwendig, welcher die gesmate Blockkette erneut herunterlädt.</translation>
+ </message>
+ <message>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation>Fehler: Ein schwerer interner Fehler ist aufgetreten, siehe debug.log für Details.</translation>
</message>
@@ -1779,22 +3034,22 @@
<translation>Kann HTTP Server nicht starten. Siehe debug log für Details.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Eingehende Verbindungen annehmen (Standard: 1, wenn nicht -proxy oder -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee ist sehr hoch eingestellt! Das ist die Transaktionsgebühr, welche du zahlen müsstest, wenn die Gebührenschätzungen nicht verfügbar sind.</translation>
+ <source>The %s developers</source>
+ <translation>Die %s-Entwickler</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>Eine Transaktionsgebühr (in %s/kB) wird genutzt, wenn für die Gebührenschützung zu wenig Daten vorliegen (Standardwert: %s)</translation>
</message>
<message>
+ <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
+ <translation>Geben Sie immer die Transaktionen, die Sie von freigegebenen Peers erhalten haben, weiter (Voreinstellung: %d)</translation>
+ </message>
+ <message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>An die angegebene Adresse binden und immer abhören. Für IPv6 "[Host]:Port"-Notation verwenden</translation>
</message>
@@ -1807,16 +3062,20 @@
<translation>Alle Wallet-Transaktionen löschen und nur diese Teilbereiche der Blockkette durch -rescan beim Starten wiederherstellen</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Veröffentlicht unter der MIT-Softwarelizenz, siehe beiligende Datei COPYING oder &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>Lesen von %s fehlgeschlagen! Alle Schlüssel wurden korrekt gelesen, Transaktionsdaten bzw. Adressbucheinträge fehlen aber möglicherweise oder sind inkorrekt.</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Befehl ausführen wenn sich eine Wallet-Transaktion verändert (%s im Befehl wird durch die Transaktions-ID ersetzt)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Leite Transaktionen von Peers auf der Positivliste auf jeden Fall weiter, auch wenn sie die lokale Weiterleitungsregeln verletzen (Standardeinstellung: %d)</translation>
+ <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
+ <translation>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</translation>
+ </message>
+ <message>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>Maximale Gesamtgebühr (in %s) in einer Börsentransaktion; wird dies zu niedrig gesetzten können große Transaktionen abgebrochen werden (Standard: %s)</translation>
</message>
<message>
<source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
@@ -1839,6 +3098,10 @@
<translation>Dies ist eine Vorab-Testversion - Verwendung auf eigene Gefahr - nicht für Mining- oder Handelsanwendungen nutzen!</translation>
</message>
<message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um zum ungekürzten Modus zurückzukehren. Dies erfordert, dass die gesamte Blockkette erneut heruntergeladen wird.</translation>
+ </message>
+ <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: 1, wenn abgehört wird und -proxy nicht gesetzt ist)</translation>
</message>
@@ -1851,10 +3114,6 @@
<translation>Warnung: Wir scheinen nicht vollständig mit unseren Gegenstellen übereinzustimmen! Sie oder die anderen Knoten müssen unter Umständen Ihre Client-Software aktualisieren.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Gegenstellen die sich von der angegebenen Netzmaske oder IP-Adresse aus verbinden immer zulassen. Kann mehrmals angegeben werden.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Sie müssen die Datenbank mit Hilfe von -reindex-chainstate neu aufbauen, um -txindex zu verändern</translation>
</message>
@@ -1887,8 +3146,8 @@
<translation>Kann Adresse in -%s nicht auflösen: '%s'</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Mit nur dem oder den angegebenen Knoten verbinden</translation>
+ <source>Change index out of range</source>
+ <translation>Position des Wechselgelds außerhalb des Bereichs</translation>
</message>
<message>
<source>Connection options:</source>
@@ -1931,6 +3190,10 @@
<translation>Aktiviere das Veröffentlichen der Roh-Transaktion in &lt;address&gt;</translation>
</message>
<message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Maximal &lt;n&gt; nicht-verbindbare Transaktionen im Speicher halten (Standard: %u)</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
<translation>Fehler beim Initialisieren der Blockdatenbank</translation>
</message>
@@ -1975,6 +3238,10 @@
<translation>Fehlerhafter oder kein Genesis-Block gefunden. Falsches Datenverzeichnis für das Netzwerk?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>Initialisierungsplausibilitätsprüfung fehlgeschlagen. %s wird beendet.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Ungültige "-onion"-Adresse: '%s'</translation>
</message>
@@ -2023,6 +3290,18 @@
<translation>Kürzungsmodus ist nicht mit -txindex kompatibel.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat beim Starten wiederaufbauen</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat wiederaufbauen</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>Verifiziere Blöcke...</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Größe des Datenbankcaches in Megabyte festlegen (%d bis %d, Standard: %d)</translation>
</message>
@@ -2059,6 +3338,10 @@
<translation>UPnP verwenden, um eine Portweiterleitung einzurichten (Standard: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Die Testchain verwenden</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Der User Agent Kommentar (%s) enthält unsichere Zeichen.</translation>
</message>
@@ -2075,6 +3358,14 @@
<translation>Wallet %s liegt außerhalb des Datenverzeichnisses %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Wallet Debugging-/Testoptionen:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Wallet musste neu geschrieben werden: starten Sie %s zur Fertigstellung neu</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Wallet-Optionen:</translation>
</message>
@@ -2123,10 +3414,6 @@
<translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Adressen von Gegenstellen via DNS-Namensauflösung finden, falls zu wenige Adressen verfügbar sind (Standard: 1, außer bei -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Zufällige Anmeldedaten für jede Proxyverbindung verwenden. Dies aktiviert Tor-Datenflussisolation (Standard: %u)</translation>
</message>
@@ -2139,8 +3426,8 @@
<translation>Der Transaktionsbetrag ist zum senden zu niedrig, nachdem die Gebühr abgezogen wurde.</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Dieses Produkt enthält Software, die vom OpenSSL-Projekt zur Verwendung im OpenSSL-Toolkit &lt;https://www.openssl.org/&gt; entwickelt wird, sowie von Eric Young geschriebene kryptographische Software und von Thomas Bernard geschriebene UPnP-Software.</translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2251,10 +3538,6 @@
<translation>Transaktionsbetrag zu niedrig</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transaktionsbeträge müssen positiv sein</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transaktion ist für die Gebührenrichtlinie zu groß</translation>
</message>
@@ -2319,18 +3602,22 @@
<translation>-maxtxfee ist auf einen sehr hohen Wert festgelegt! Gebühren dieser Höhe könnten für eine einzelne Transaktion bezahlt werden.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee ist auf einen sehr hohen Wert festgelegt! Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Die Transaktion nicht länger im Speicherpool behalten als &lt;n&gt; Stunden (Standard: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Niedrigere Gebühren (in %s/Kb) als diese werden bei der Transaktionserstellung als gebührenfrei angesehen (Standard: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Leite Transaktionen von Peers auf der Positivliste auf jeden Fall weiter, auch wenn sie die lokale Weiterleitungsregeln verletzen (Standardeinstellung: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Legt fest, wie gründlich die Blockverifikation von -checkblocks ist (0-4, Standard: %u)</translation>
</message>
@@ -2347,6 +3634,18 @@
<translation>Debugginginformationen ausgeben (Standard: %u, &lt;category&gt; anzugeben ist optional)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Adressen von Gegenstellen via DNS-Namensauflösung finden, falls zu wenige Adressen verfügbar sind (Standard: 1, außer bei -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
+ <translation>Unterstütze Blöcke und Transaktionen mit Bloomfiltern zu filtern (default: %u)</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Das ist die Transaktionsgebühr, welche du zahlen müsstest, wenn die Gebührenschätzungen nicht verfügbar sind.</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>Gesamtlänge des Netzwerkversionstrings (%i) erreicht die maximale Länge (%i). Reduzieren Sie die Nummer oder die Größe von uacomments.</translation>
</message>
@@ -2367,14 +3666,18 @@
<translation>Separaten SOCKS5-Proxy verwenden, um Gegenstellen über versteckte Tor-Dienste zu erreichen (Standard: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Benutzername und gehashtes Passwort für JSON-RPC Verbindungen. Das Feld &lt;userpw&gt; kommt im Format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Ein kanonisches Pythonskript ist in share/rpcuser inbegriffen. Diese Option kann mehrere Male spezifiziert werden</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Warnung: Unbekannte Blockversion wird durch Mining erzeugt! Es ist möglich, dass unbekannte Regeln in Kraft sind.</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Gegenstellen die sich von der angegebenen IP-Adresse (e.g. 1.2.3.4) oder CIDR Notation (eg. 1.2.3.0/24) aus verbinden immer zulassen. Kann mehrmals angegeben werden.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s wurde sehr hoch Eingestellt!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(Standard: %s)</translation>
</message>
@@ -2431,12 +3734,16 @@
<translation>Nicht-"P2SH-Multisig" weiterleiten (Standard: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>Wähle alle zu sendenden Transaktionen als full-RBF (Standard: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>Größe des Schlüsselpools festlegen auf &lt;n&gt; (Standard: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Minimale Blockgröße in Byte festlegen (Standard: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Maximales BIP141 Blockgewicht festlegen (Standard: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2459,10 +3766,22 @@
<translation>Unbestätigtes Wechselgeld darf beim Senden von Transaktionen ausgegeben werden (Standard: %u)</translation>
</message>
<message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Dies ist die minimale Gebühr die beim Senden einer Transaktion fällig wird.</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Dies ist die Gebühr die beim Senden einer Transaktion fällig wird.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Schwellenwert, um Verbindungen zu sich nicht konform verhaltenden Gegenstellen zu beenden (Standard: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Transaktionsbeträge dürfen nicht negativ sein.</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Unbekannter Netztyp in -onlynet angegeben: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_el.ts b/src/qt/locale/bitcoin_el.ts
index de76a110cf..61e5a1cec8 100644
--- a/src/qt/locale/bitcoin_el.ts
+++ b/src/qt/locale/bitcoin_el.ts
@@ -7,6 +7,9 @@
</message>
</context>
<context>
+ <name>AddressTableModel</name>
+ </context>
+<context>
<name>AskPassphraseDialog</name>
<message>
<source>Enter passphrase</source>
@@ -20,7 +23,7 @@
<source>Repeat new passphrase</source>
<translation>Επαναλάβετε νέο συνθηματικό</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -56,7 +59,7 @@
<source>&amp;Address</source>
<translation>Διεύθυνση</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -79,6 +82,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -92,12 +98,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>Services</source>
@@ -110,11 +125,14 @@
<source>Remove</source>
<translation>Αφαίρεση</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Insufficient funds!</source>
@@ -133,6 +151,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -145,12 +166,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Insufficient funds</source>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 2814e4f6e7..b1caab06b1 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Διαγραφή</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Επανέλαβε τον νέο κωδικό πρόσβασης</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -247,10 +250,6 @@
<translation>Η πηγή του μπλοκ δεν ειναι διαθέσιμη... </translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 και %2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 πίσω</translation>
</message>
@@ -328,7 +327,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Το πορτοφόλι είναι &lt;b&gt;κρυπτογραφημένο&lt;/b&gt; και &lt;b&gt;κλειδωμένο&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -348,10 +347,6 @@
<translation>Ποσό:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Προτεραιότητα:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Ταρίφα</translation>
</message>
@@ -403,11 +398,7 @@
<source>Confirmed</source>
<translation>Επικυρωμένες</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Προτεραιότητα</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -430,7 +421,7 @@
<source>&amp;Address</source>
<translation>&amp;Διεύθυνση</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -509,6 +500,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Φόρμα</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Χρόνος τελευταίου μπλοκ</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Απόκρυψη</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -526,7 +532,7 @@
<source>Select payment request file</source>
<translation>Επιλέξτε πληρωμή αρχείου αίτησης</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -787,12 +793,11 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
- <message>
- <source>Ping Time</source>
- <translation>Χρόνος καθυστέρησης</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -831,7 +836,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 και %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1053,7 +1068,7 @@
<source>Remove</source>
<translation>Αφαίρεση</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1072,7 +1087,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Αποθήκευση εικόνας...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1108,10 +1126,6 @@
<translation>Ποσό:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Προτεραιότητα:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Ταρίφα</translation>
</message>
@@ -1160,10 +1174,6 @@
<translation>Προσαρμογή:</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Χρόνος επικύρωσης:</translation>
- </message>
- <message>
<source>normal</source>
<translation>κανονικό</translation>
</message>
@@ -1203,7 +1213,7 @@
<source>S&amp;end</source>
<translation>Αποστολη</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1262,7 +1272,10 @@
<source>Memo:</source>
<translation>Σημείωση:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1348,7 +1361,7 @@
<source>Reset all verify message fields</source>
<translation>Επαναφορά όλων επαλήθευμενων πεδίων μήνυματος </translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1364,12 +1377,21 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Αυτό το παράθυρο δείχνει μια λεπτομερή περιγραφή της συναλλαγής</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1378,6 +1400,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1404,10 +1435,6 @@
<translation>Εκτέλεση στο παρασκήνιο κι αποδοχή εντολών</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Να δέχεσαι συνδέσεις από έξω(προεπιλογή:1)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1420,18 +1447,10 @@
<translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Αυτό είναι ένα προ-τεστ κυκλοφορίας - χρησιμοποιήστε το με δική σας ευθύνη - δεν χρησιμοποιείτε για εξόρυξη ή για αλλες εφαρμογές</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Αποκλεισμός επιλογων δημιουργίας: </translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Σύνδεση μόνο με ορισμένους κόμβους</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Επιλογές σύνδεσης:</translation>
</message>
@@ -1552,10 +1571,6 @@
<translation>Το ποσό της συναλλαγής είναι πολύ μικρο </translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Τα ποσά των συναλλαγών πρέπει να είναι θετικα</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Η συναλλαγή ειναι πολύ μεγάλη </translation>
</message>
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 79c3e87b2b..60dcc9f701 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -53,6 +53,94 @@
<source>&amp;Delete</source>
<translation>&amp;Delete</translation>
</message>
+ <message>
+ <location filename="../addressbookpage.cpp" line="+50"/>
+ <source>Choose the address to send coins to</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Choose the address to receive coins with</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>C&amp;hoose</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Sending addresses</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Receiving addresses</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>&amp;Copy Address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy &amp;Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>&amp;Edit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+193"/>
+ <source>Export Address List</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Comma separated file (*.csv)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Exporting Failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <location filename="../addresstablemodel.cpp" line="+170"/>
+ <source>Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>(no label)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -76,11 +164,129 @@
<source>Repeat new passphrase</source>
<translation>Repeat new passphrase</translation>
</message>
+ <message>
+ <location filename="../askpassphrasedialog.cpp" line="+46"/>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Encrypt wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Unlock wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Decrypt wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Change passphrase</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Confirm wallet encryption</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <location line="+58"/>
+ <source>Wallet encrypted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-56"/>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>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.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <location line="+7"/>
+ <location line="+42"/>
+ <location line="+6"/>
+ <source>Wallet encryption failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-54"/>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+48"/>
+ <source>The supplied passphrases do not match.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-37"/>
+ <source>Wallet unlock failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+11"/>
+ <location line="+19"/>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Wallet decryption failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+47"/>
+ <location line="+24"/>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
<message>
- <location filename="../bantablemodel.cpp" line="+88"/>
+ <location filename="../bantablemodel.cpp" line="+89"/>
<source>IP/Netmask</source>
<translation type="unfinished"></translation>
</message>
@@ -93,27 +299,27 @@
<context>
<name>BitcoinGUI</name>
<message>
- <location filename="../bitcoingui.cpp" line="+341"/>
+ <location filename="../bitcoingui.cpp" line="+356"/>
<source>Sign &amp;message...</source>
<translation>Sign &amp;message...</translation>
</message>
<message>
- <location line="+377"/>
+ <location line="+417"/>
<source>Synchronizing with network...</source>
<translation>Synchronizing with network...</translation>
</message>
<message>
- <location line="-455"/>
+ <location line="-495"/>
<source>&amp;Overview</source>
<translation>&amp;Overview</translation>
</message>
<message>
- <location line="-130"/>
+ <location line="-143"/>
<source>Node</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+131"/>
+ <location line="+144"/>
<source>Show general overview of wallet</source>
<translation>Show general overview of wallet</translation>
</message>
@@ -198,12 +404,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+372"/>
+ <location line="+357"/>
+ <source>Click to disable network activity.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Network activity disabled.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Click to enable network activity again.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+53"/>
<source>Reindexing blocks on disk...</source>
<translation>Reindexing blocks on disk...</translation>
</message>
<message>
- <location line="-457"/>
+ <location line="-497"/>
<source>Send coins to a Bitcoin address</source>
<translation>Send coins to a Bitcoin address</translation>
</message>
@@ -233,17 +454,17 @@
<translation>&amp;Verify message...</translation>
</message>
<message>
- <location line="+481"/>
+ <location line="+504"/>
<source>Bitcoin</source>
<translation>Bitcoin</translation>
</message>
<message>
- <location line="-693"/>
+ <location line="-729"/>
<source>Wallet</source>
<translation>Wallet</translation>
</message>
<message>
- <location line="+139"/>
+ <location line="+152"/>
<source>&amp;Send</source>
<translation>&amp;Send</translation>
</message>
@@ -323,7 +544,7 @@
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+341"/>
+ <location line="+354"/>
<source>%n active connection(s) to Bitcoin network</source>
<translation>
<numerusform>%n active connection to Bitcoin network</numerusform>
@@ -331,7 +552,7 @@
</translation>
</message>
<message>
- <location line="+22"/>
+ <location line="+49"/>
<source>Indexing blocks on disk...</source>
<translation type="unfinished"></translation>
</message>
@@ -353,51 +574,13 @@
<numerusform>Processed %n blocks of transaction history.</numerusform>
</translation>
</message>
- <message numerus="yes">
- <location line="+26"/>
- <source>%n hour(s)</source>
- <translation>
- <numerusform>%n hour</numerusform>
- <numerusform>%n hours</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <location line="+4"/>
- <source>%n day(s)</source>
- <translation>
- <numerusform>%n day</numerusform>
- <numerusform>%n days</numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <location line="+4"/>
- <location line="+6"/>
- <source>%n week(s)</source>
- <translation>
- <numerusform>%n week</numerusform>
- <numerusform>%n weeks</numerusform>
- </translation>
- </message>
- <message>
- <location line="+0"/>
- <source>%1 and %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message numerus="yes">
- <location line="+0"/>
- <source>%n year(s)</source>
- <translation type="unfinished">
- <numerusform>%n year</numerusform>
- <numerusform>%n years</numerusform>
- </translation>
- </message>
<message>
- <location line="+4"/>
+ <location line="+24"/>
<source>%1 behind</source>
<translation>%1 behind</translation>
</message>
<message>
- <location line="+21"/>
+ <location line="+24"/>
<source>Last received block was generated %1 ago.</source>
<translation>Last received block was generated %1 ago.</translation>
</message>
@@ -422,27 +605,27 @@
<translation>Information</translation>
</message>
<message>
- <location line="-95"/>
+ <location line="-78"/>
<source>Up to date</source>
<translation>Up to date</translation>
</message>
<message>
- <location line="-388"/>
+ <location line="-428"/>
<source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+188"/>
+ <location line="+197"/>
<source>%1 client</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+244"/>
+ <location line="+255"/>
<source>Catching up...</source>
<translation>Catching up...</translation>
</message>
<message>
- <location line="+137"/>
+ <location line="+145"/>
<source>Date: %1
</source>
<translation type="unfinished"></translation>
@@ -482,7 +665,17 @@
<translation>Incoming transaction</translation>
</message>
<message>
- <location line="+62"/>
+ <location line="+52"/>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</translation>
</message>
@@ -491,6 +684,11 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
</message>
+ <message>
+ <location filename="../bitcoin.cpp" line="+518"/>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -515,22 +713,17 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+29"/>
- <source>Priority:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+45"/>
+ <location line="+80"/>
<source>Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+32"/>
+ <location line="-48"/>
<source>Dust:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+48"/>
+ <location line="+93"/>
<source>After Fee:</source>
<translation type="unfinished"></translation>
</message>
@@ -585,8 +778,105 @@
<translation type="unfinished">Confirmed</translation>
</message>
<message>
- <location line="+5"/>
- <source>Priority</source>
+ <location filename="../coincontroldialog.cpp" line="+55"/>
+ <source>Copy address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+26"/>
+ <source>Copy amount</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-25"/>
+ <source>Copy transaction ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Lock unspent</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Unlock unspent</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Copy quantity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Copy fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy after fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy bytes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy dust</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy change</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+325"/>
+ <source>(%1 locked)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+183"/>
+ <source>yes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>no</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <location line="+52"/>
+ <source>(no label)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <source>change from %1 (%2)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>(change)</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -617,6 +907,46 @@
<source>&amp;Address</source>
<translation>&amp;Address</translation>
</message>
+ <message>
+ <location filename="../editaddressdialog.cpp" line="+28"/>
+ <source>New receiving address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>New sending address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Edit receiving address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Edit sending address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>The entered address &quot;%1&quot; is already in the address book.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Could not unlock wallet.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>New key generation failed.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -753,28 +1083,94 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+24"/>
+ <location line="+26"/>
<source>Error</source>
<translation>Error</translation>
</message>
<message numerus="yes">
<location line="+9"/>
<source>%n GB of free space available</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n GB of free space available</numerusform>
+ <numerusform>%n GB of free space available</numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+3"/>
<source>(of %n GB needed)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>(of %n GB needed)</numerusform>
+ <numerusform>(of %n GB needed)</numerusform>
</translation>
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <location filename="../forms/modaloverlay.ui" line="+14"/>
+ <source>Form</source>
+ <translation type="unfinished">Form</translation>
+ </message>
+ <message>
+ <location line="+119"/>
+ <source>Recent transactions may not yet be visible, and therefore your wallet&apos;s balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>Number of blocks left</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+26"/>
+ <location filename="../modaloverlay.cpp" line="+136"/>
+ <source>Unknown...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-13"/>
+ <source>Last block time</source>
+ <translation type="unfinished">Last block time</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Progress</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>Progress increase per hour</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <location line="+20"/>
+ <source>calculating...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <source>Estimated time left until synced</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Hide</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../modaloverlay.cpp" line="-1"/>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<location filename="../forms/openuridialog.ui" line="+14"/>
@@ -796,6 +1192,11 @@
<source>Select payment request file</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../openuridialog.cpp" line="+47"/>
+ <source>Select payment request file to open</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -1106,7 +1507,7 @@
<translation>Form</translation>
</message>
<message>
- <location line="+59"/>
+ <location line="+62"/>
<location line="+386"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</translation>
@@ -1193,6 +1594,132 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <location filename="../paymentserver.cpp" line="+328"/>
+ <location line="+216"/>
+ <location line="+42"/>
+ <location line="+113"/>
+ <location line="+14"/>
+ <location line="+18"/>
+ <source>Payment request error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-402"/>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+103"/>
+ <location line="+14"/>
+ <location line="+7"/>
+ <source>URI handling</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Invalid payment address %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Payment request file handling</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <location line="+9"/>
+ <location line="+31"/>
+ <location line="+10"/>
+ <location line="+17"/>
+ <location line="+88"/>
+ <source>Payment request rejected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-155"/>
+ <source>Payment request network doesn&apos;t match client network.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Payment request expired.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Payment request is not initialized.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <location line="+17"/>
+ <source>Invalid payment request.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-10"/>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>Refund from %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Error communicating with %1: %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Payment request cannot be parsed!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Bad response from server %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Network request error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Payment acknowledged</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<location filename="../peertablemodel.cpp" line="+117"/>
@@ -1206,7 +1733,12 @@
</message>
<message>
<location line="+0"/>
- <source>Ping Time</source>
+ <source>NodeId</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Ping</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -1218,12 +1750,12 @@
<translation type="unfinished">Amount</translation>
</message>
<message>
- <location filename="../guiutil.cpp" line="+135"/>
+ <location filename="../guiutil.cpp" line="+136"/>
<source>Enter a Bitcoin address (e.g. %1)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+764"/>
+ <location line="+759"/>
<source>%1 d</source>
<translation type="unfinished"></translation>
</message>
@@ -1239,7 +1771,7 @@
</message>
<message>
<location line="+2"/>
- <location line="+47"/>
+ <location line="+50"/>
<source>%1 s</source>
<translation type="unfinished"></translation>
</message>
@@ -1258,6 +1790,106 @@
<source>%1 ms</source>
<translation type="unfinished"></translation>
</message>
+ <message numerus="yes">
+ <location line="+18"/>
+ <source>%n second(s)</source>
+ <translation>
+ <numerusform>%n second</numerusform>
+ <numerusform>%n seconds</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source>%n minute(s)</source>
+ <translation>
+ <numerusform>%n minute</numerusform>
+ <numerusform>%n minutes</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source>%n hour(s)</source>
+ <translation type="unfinished">
+ <numerusform>%n hour</numerusform>
+ <numerusform>%n hours</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <source>%n day(s)</source>
+ <translation type="unfinished">
+ <numerusform>%n day</numerusform>
+ <numerusform>%n days</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+4"/>
+ <location line="+6"/>
+ <source>%n week(s)</source>
+ <translation type="unfinished">
+ <numerusform>%n week</numerusform>
+ <numerusform>%n weeks</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>%1 and %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+0"/>
+ <source>%n year(s)</source>
+ <translation type="unfinished">
+ <numerusform>%n year</numerusform>
+ <numerusform>%n years</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../bitcoin.cpp" line="+172"/>
+ <source>%1 didn&apos;t yet exit safely...</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <location line="-81"/>
+ <source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Error: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <location filename="../receiverequestdialog.cpp" line="+36"/>
+ <source>&amp;Save Image...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Copy Image</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Save QR Code</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>PNG Image (*.png)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1290,11 +1922,12 @@
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
+ <location line="+23"/>
<source>N/A</source>
<translation>N/A</translation>
</message>
<message>
- <location line="-1322"/>
+ <location line="-1345"/>
<source>Client version</source>
<translation>Client version</translation>
</message>
@@ -1392,8 +2025,8 @@
</message>
<message>
<location line="+60"/>
- <location filename="../rpcconsole.cpp" line="+295"/>
- <location line="+634"/>
+ <location filename="../rpcconsole.cpp" line="+456"/>
+ <location line="+719"/>
<source>Select a peer to view detailed information.</source>
<translation type="unfinished"></translation>
</message>
@@ -1490,11 +2123,16 @@
</message>
<message>
<location line="+23"/>
+ <source>Min Ping</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
<source>Time Offset</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-1093"/>
+ <location line="-1116"/>
<source>Last block time</source>
<translation>Last block time</translation>
</message>
@@ -1524,7 +2162,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../rpcconsole.cpp" line="-342"/>
+ <location filename="../rpcconsole.cpp" line="-413"/>
<source>In:</source>
<translation type="unfinished"></translation>
</message>
@@ -1544,45 +2182,45 @@
<translation>Clear console</translation>
</message>
<message>
- <location filename="../rpcconsole.cpp" line="-203"/>
- <source>&amp;Disconnect Node</source>
+ <location filename="../rpcconsole.cpp" line="-214"/>
+ <source>1 &amp;hour</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
- <location line="+1"/>
- <location line="+1"/>
- <location line="+1"/>
- <source>Ban Node for</source>
+ <source>1 &amp;day</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-3"/>
- <source>1 &amp;hour</source>
+ <location line="+1"/>
+ <source>1 &amp;week</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
- <source>1 &amp;day</source>
+ <source>1 &amp;year</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>1 &amp;week</source>
+ <location line="-4"/>
+ <source>&amp;Disconnect</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
- <source>1 &amp;year</source>
+ <location line="+1"/>
+ <location line="+1"/>
+ <location line="+1"/>
+ <source>Ban for</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+46"/>
- <source>&amp;Unban Node</source>
+ <location line="+48"/>
+ <source>&amp;Unban</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+117"/>
+ <location line="+126"/>
<source>Welcome to the %1 RPC console.</source>
<translation type="unfinished"></translation>
</message>
@@ -1597,7 +2235,17 @@
<translation>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</translation>
</message>
<message>
- <location line="+146"/>
+ <location line="+2"/>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Network activity disabled</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+150"/>
<source>%1 B</source>
<translation type="unfinished"></translation>
</message>
@@ -1617,7 +2265,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+88"/>
+ <location line="+99"/>
<source>(node id: %1)</source>
<translation type="unfinished"></translation>
</message>
@@ -1633,7 +2281,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+10"/>
<source>Inbound</source>
<translation type="unfinished"></translation>
</message>
@@ -1749,6 +2397,26 @@
<source>Remove</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../receivecoinsdialog.cpp" line="+47"/>
+ <source>Copy URI</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy amount</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1772,11 +2440,95 @@
<source>&amp;Save Image...</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../receiverequestdialog.cpp" line="+65"/>
+ <source>Request payment to %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Payment information</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>URI</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Amount</source>
+ <translation type="unfinished">Amount</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Error encoding URI into QR Code.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <location filename="../recentrequeststablemodel.cpp" line="+29"/>
+ <source>Date</source>
+ <translation type="unfinished">Date</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>(no label)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>(no message)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>(no amount requested)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+42"/>
+ <source>Requested</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
+ <location filename="../sendcoinsdialog.cpp" line="+553"/>
<source>Send Coins</source>
<translation>Send Coins</translation>
</message>
@@ -1816,17 +2568,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+32"/>
- <source>Priority:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+48"/>
+ <location line="+80"/>
<source>Fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+80"/>
+ <location line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"></translation>
</message>
@@ -1908,17 +2655,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+29"/>
- <source>Confirmation time:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+60"/>
+ <location line="+89"/>
<source>normal</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
+ <location line="+40"/>
<source>fast</source>
<translation type="unfinished"></translation>
</message>
@@ -1938,12 +2680,17 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-805"/>
+ <location line="-876"/>
<source>Dust:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+808"/>
+ <location line="+691"/>
+ <source>Confirmation time target:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+188"/>
<source>Clear &amp;All</source>
<translation>Clear &amp;All</translation>
</message>
@@ -1962,6 +2709,165 @@
<source>S&amp;end</source>
<translation>S&amp;end</translation>
</message>
+ <message>
+ <location filename="../sendcoinsdialog.cpp" line="-486"/>
+ <source>Copy quantity</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy amount</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy after fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy bytes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy dust</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy change</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+205"/>
+ <location line="+5"/>
+ <location line="+5"/>
+ <location line="+4"/>
+ <source>%1 to %2</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Are you sure you want to send?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>added as transaction fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Total Amount %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>or</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Confirm send coins</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+191"/>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The amount exceeds your balance.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Transaction creation failed!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Payment request expired.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+67"/>
+ <source>%n block(s)</source>
+ <translation>
+ <numerusform>%n block</numerusform>
+ <numerusform>%n blocks</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>Pay only the required fee of %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+25"/>
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation>
+ <numerusform>Estimated to begin confirmation within %n block.</numerusform>
+ <numerusform>Estimated to begin confirmation within %n blocks.</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+102"/>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Warning: Unknown change address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Confirm custom change address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>(no label)</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -2066,6 +2972,20 @@
<source>Memo:</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="../sendcoinsentry.cpp" line="+37"/>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <location filename="../sendcoinsdialog.cpp" line="+95"/>
+ <location line="+5"/>
+ <source>Yes</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -2190,6 +3110,77 @@
<source>Reset all verify message fields</source>
<translation>Reset all verify message fields</translation>
</message>
+ <message>
+ <location filename="../signverifymessagedialog.cpp" line="+41"/>
+ <source>Click &quot;Sign Message&quot; to generate signature</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+83"/>
+ <location line="+80"/>
+ <source>The entered address is invalid.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-80"/>
+ <location line="+8"/>
+ <location line="+72"/>
+ <location line="+8"/>
+ <source>Please check the address and try again.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-80"/>
+ <location line="+80"/>
+ <source>The entered address does not refer to a key.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-72"/>
+ <source>Wallet unlock was cancelled.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Private key for the entered address is not available.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Message signing failed.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Message signed.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>The signature could not be decoded.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <location line="+13"/>
+ <source>Please check the signature and try again.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>The signature did not match the message digest.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Message verification failed.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Message verified.</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -2208,40 +3199,685 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <location filename="../transactiondesc.cpp" line="+30"/>
+ <source>Open for %n more block(s)</source>
+ <translation>
+ <numerusform>Open for %n more block</numerusform>
+ <numerusform>Open for %n more blocks</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Open until %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1/offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>0/unconfirmed, %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>in memory pool</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>not in memory pool</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>abandoned</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1/unconfirmed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>%1 confirmations</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Status</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>, has not been successfully broadcast yet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+2"/>
+ <source>, broadcast through %n node(s)</source>
+ <translation>
+ <numerusform>, broadcast through %n node</numerusform>
+ <numerusform>, broadcast through %n nodes</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Date</source>
+ <translation type="unfinished">Date</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Source</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Generated</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <location line="+13"/>
+ <location line="+72"/>
+ <source>From</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-72"/>
+ <source>unknown</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+20"/>
+ <location line="+69"/>
+ <source>To</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-87"/>
+ <source>own address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <location line="+69"/>
+ <source>watch-only</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-67"/>
+ <source>label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <location line="+12"/>
+ <location line="+53"/>
+ <location line="+26"/>
+ <location line="+55"/>
+ <source>Credit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="-144"/>
+ <source>matures in %n more block(s)</source>
+ <translation>
+ <numerusform>matures in %n more block</numerusform>
+ <numerusform>matures in %n more blocks</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>not accepted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+59"/>
+ <location line="+25"/>
+ <location line="+55"/>
+ <source>Debit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-70"/>
+ <source>Total debit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Total credit</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+5"/>
+ <source>Transaction fee</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>Net amount</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <location line="+11"/>
+ <source>Message</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-9"/>
+ <source>Comment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Transaction ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Transaction total size</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Output index</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>Merchant</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Generated coins must mature %1 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 &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Debug information</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Transaction</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Inputs</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+21"/>
+ <source>Amount</source>
+ <translation type="unfinished">Amount</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <location line="+1"/>
+ <source>true</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-1"/>
+ <location line="+1"/>
+ <source>false</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+20"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>This pane shows a detailed description of the transaction</translation>
</message>
+ <message>
+ <location filename="../transactiondescdialog.cpp" line="+17"/>
+ <source>Details for %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <location filename="../transactiontablemodel.cpp" line="+246"/>
+ <source>Date</source>
+ <translation type="unfinished">Date</translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message numerus="yes">
+ <location line="+58"/>
+ <source>Open for %n more block(s)</source>
+ <translation>
+ <numerusform>Open for %n more block</numerusform>
+ <numerusform>Open for %n more blocks</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Open until %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Offline</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Unconfirmed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Abandoned</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Conflicted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Generated but not accepted</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Received with</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Received from</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Sent to</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Payment to yourself</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Mined</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>watch-only</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>(n/a)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+213"/>
+ <source>(no label)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Date and time that the transaction was received.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Type of transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Amount removed from or added to balance.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <location filename="../transactionview.cpp" line="+69"/>
+ <location line="+16"/>
+ <source>All</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-15"/>
+ <source>Today</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>This week</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>This month</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Last month</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>This year</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Range...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Received with</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Sent to</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>To yourself</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Mined</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Other</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Enter address or label to search</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Min amount</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+36"/>
+ <source>Abandon transaction</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy amount</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy transaction ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy raw transaction</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Copy full transaction details</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Edit label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Show transaction details</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+186"/>
+ <source>Export Transaction History</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Comma separated file (*.csv)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Confirmed</source>
+ <translation type="unfinished">Confirmed</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Watch-only</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Date</source>
+ <translation type="unfinished">Date</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Label</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>ID</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Exporting Failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Exporting Successful</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+147"/>
+ <source>Range:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>to</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
- <location filename="../bitcoingui.cpp" line="+116"/>
+ <location filename="../bitcoingui.cpp" line="+129"/>
<source>Unit to show amounts in. Click to select another unit.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <location filename="../walletframe.cpp" line="+27"/>
+ <source>No wallet has been loaded.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <location filename="../walletmodel.cpp" line="+291"/>
+ <source>Send Coins</source>
+ <translation type="unfinished">Send Coins</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <location filename="../walletview.cpp" line="+46"/>
+ <source>&amp;Export</source>
+ <translation type="unfinished">&amp;Export</translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Export the data in the current tab to a file</source>
+ <translation type="unfinished">Export the data in the current tab to a file</translation>
+ </message>
+ <message>
+ <location line="+201"/>
+ <source>Backup Wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Wallet Data (*.dat)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Backup Failed</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Backup Successful</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
- <location filename="../bitcoinstrings.cpp" line="+292"/>
+ <location filename="../bitcoinstrings.cpp" line="+311"/>
<source>Options:</source>
<translation>Options:</translation>
</message>
<message>
- <location line="+30"/>
+ <location line="+31"/>
<source>Specify data directory</source>
<translation>Specify data directory</translation>
</message>
<message>
- <location line="-89"/>
+ <location line="-90"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Connect to a node to retrieve peer addresses, and disconnect</translation>
</message>
<message>
- <location line="+92"/>
+ <location line="+93"/>
<source>Specify your own public address</source>
<translation>Specify your own public address</translation>
</message>
@@ -2251,7 +3887,22 @@
<translation>Accept command line and JSON-RPC commands</translation>
</message>
<message>
- <location line="-128"/>
+ <location line="-214"/>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+34"/>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation type="unfinished"></translation>
</message>
@@ -2266,17 +3917,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
- <source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
+ <location line="+18"/>
<source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+119"/>
+ <location line="+132"/>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation type="unfinished"></translation>
</message>
@@ -2296,17 +3942,12 @@
<translation>Run in the background as a daemon and accept commands</translation>
</message>
<message>
- <location line="+30"/>
+ <location line="+37"/>
<source>Unable to start HTTP server. See debug log for details.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-121"/>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
- </message>
- <message>
- <location line="-206"/>
+ <location line="-353"/>
<source>Bitcoin Core</source>
<translation type="unfinished">Bitcoin Core</translation>
</message>
@@ -2316,17 +3957,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
+ <location line="+7"/>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+6"/>
<source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
<translation type="unfinished"></translation>
</message>
@@ -2341,17 +3977,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+8"/>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
+ <location line="+13"/>
<source>Error loading %s: You can&apos;t enable HD on a already existing non-HD wallet</source>
<translation type="unfinished"></translation>
</message>
@@ -2366,12 +3997,7 @@
<translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
</message>
<message>
- <location line="+12"/>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+17"/>
+ <location line="+29"/>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation type="unfinished"></translation>
</message>
@@ -2391,22 +4017,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+24"/>
- <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
+ <location line="+14"/>
+ <source>Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, &gt;%u = automatically prune block files to stay under the specified target size in MiB)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Set lowest fee rate (in %s/kB) for transactions to be included in block creation. (default: %s)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
+ <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
<source>The block database contains a block which appears to be from the future. This may be due to your computer&apos;s date and time being set incorrectly. Only rebuild the block database if you are sure that your computer&apos;s date and time are correct</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+15"/>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation type="unfinished"></translation>
</message>
@@ -2416,22 +4052,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
+ <location line="+8"/>
+ <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=&lt;USERNAME&gt;/rpcpassword=&lt;PASSWORD&gt; pair of arguments. This option can be specified multiple times</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</translation>
+ <location line="+6"/>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
+ <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+10"/>
+ <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+12"/>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation type="unfinished"></translation>
</message>
@@ -2441,7 +4082,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+4"/>
<source>-maxmempool must be at least %d MB</source>
<translation type="unfinished"></translation>
</message>
@@ -2451,7 +4092,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+6"/>
<source>Append comment to the user agent string</source>
<translation type="unfinished"></translation>
</message>
@@ -2472,13 +4113,13 @@
</message>
<message>
<location line="+2"/>
- <source>Change index out of range</source>
+ <source>Chain selection options:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
- <source>Connect only to the specified node(s)</source>
- <translation>Connect only to the specified node(s)</translation>
+ <source>Change index out of range</source>
+ <translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
@@ -2621,7 +4262,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+5"/>
<source>Loading banlist...</source>
<translation type="unfinished"></translation>
</message>
@@ -2631,12 +4272,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="+7"/>
<source>Not enough file descriptors available.</source>
<translation>Not enough file descriptors available.</translation>
</message>
@@ -2681,7 +4317,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+5"/>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation type="unfinished"></translation>
</message>
@@ -2696,12 +4332,12 @@
<translation>Specify wallet file (within data directory)</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+4"/>
<source>The source code is available from %s.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+16"/>
<source>Unable to bind to %s on this computer. %s is probably already running.</source>
<translation type="unfinished"></translation>
</message>
@@ -2727,6 +4363,11 @@
</message>
<message>
<location line="+1"/>
+ <source>Use the test chain</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation type="unfinished"></translation>
</message>
@@ -2761,7 +4402,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-321"/>
+ <location line="-351"/>
<source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
<translation type="unfinished"></translation>
</message>
@@ -2776,7 +4417,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+9"/>
<source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
<translation type="unfinished"></translation>
</message>
@@ -2786,7 +4427,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+15"/>
<source>Error: Listening for incoming connections failed (listen returned error %s)</source>
<translation type="unfinished"></translation>
</message>
@@ -2816,37 +4457,27 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+21"/>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="+24"/>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+18"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+12"/>
+ <location line="+15"/>
<source>The transaction amount is too small to send after the fee has been deducted</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+21"/>
+ <location line="+28"/>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+26"/>
+ <location line="+31"/>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation type="unfinished"></translation>
</message>
@@ -2856,12 +4487,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+8"/>
<source>(default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+4"/>
<source>Accept public REST requests (default: %u)</source>
<translation type="unfinished"></translation>
</message>
@@ -2941,12 +4572,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <source>Set maximum BIP141 block cost (default: %d)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="+7"/>
<source>Show all debugging options (usage: --help -help-debug)</source>
<translation type="unfinished"></translation>
</message>
@@ -2961,17 +4587,17 @@
<translation>Signing transaction failed</translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+10"/>
<source>The transaction amount is too small to pay the fee</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>This is experimental software.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+4"/>
<source>Tor control port password (default: empty)</source>
<translation type="unfinished"></translation>
</message>
@@ -2986,12 +4612,7 @@
<translation>Transaction amount too small</translation>
</message>
<message>
- <location line="+1"/>
- <source>Transaction amounts must be positive</source>
- <translation>Transaction amounts must be positive</translation>
- </message>
- <message>
- <location line="+1"/>
+ <location line="+4"/>
<source>Transaction too large for fee policy</source>
<translation type="unfinished"></translation>
</message>
@@ -3011,7 +4632,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+4"/>
<source>Username for JSON-RPC connections</source>
<translation>Username for JSON-RPC connections</translation>
</message>
@@ -3041,43 +4662,43 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-65"/>
+ <location line="-73"/>
<source>Password for JSON-RPC connections</source>
<translation>Password for JSON-RPC connections</translation>
</message>
<message>
- <location line="-218"/>
+ <location line="-235"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Execute command when the best block changes (%s in cmd is replaced by block hash)</translation>
</message>
<message>
- <location line="+146"/>
+ <location line="+163"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
</message>
<message>
- <location line="+57"/>
+ <location line="+58"/>
<source>Loading addresses...</source>
<translation>Loading addresses...</translation>
</message>
<message>
- <location line="-264"/>
+ <location line="-284"/>
<source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+3"/>
<source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
+ <location line="+43"/>
+ <source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+37"/>
- <source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
+ <location line="+2"/>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -3086,7 +4707,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+3"/>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation type="unfinished"></translation>
</message>
@@ -3106,12 +4732,32 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+32"/>
+ <location line="+13"/>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+16"/>
+ <location line="+12"/>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation type="unfinished"></translation>
</message>
@@ -3136,27 +4782,32 @@
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+15"/>
+ <source>Warning: Unknown block versions being mined! It&apos;s possible unknown rules are in effect</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+3"/>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
- <source>Warning: Unknown block versions being mined! It&apos;s possible unknown rules are in effect</source>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <location line="+12"/>
+ <source>%s is set very high!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+1"/>
<source>(default: %s)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+8"/>
<source>Always query for peer addresses via DNS lookup (default: %u)</source>
<translation type="unfinished"></translation>
</message>
@@ -3177,6 +4828,11 @@
</message>
<message>
<location line="+7"/>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation type="unfinished"></translation>
</message>
@@ -3206,7 +4862,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+7"/>
<source>Prepend debug output with timestamp (default: %u)</source>
<translation type="unfinished"></translation>
</message>
@@ -3221,12 +4877,22 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+7"/>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+1"/>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation type="unfinished"></translation>
</message>
@@ -3251,37 +4917,72 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+1"/>
+ <source>Starting network threads...</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
+ <location line="+4"/>
+ <source>Transaction amounts must not be negative</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Transaction must have at least one recipient</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
<source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
<translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
</message>
<message>
- <location line="-73"/>
+ <location line="-80"/>
<source>Insufficient funds</source>
<translation>Insufficient funds</translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+14"/>
<source>Loading block index...</source>
<translation>Loading block index...</translation>
</message>
<message>
- <location line="-60"/>
+ <location line="-61"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Add a node to connect to and attempt to keep the connection open</translation>
</message>
<message>
- <location line="+61"/>
+ <location line="+62"/>
<source>Loading wallet...</source>
<translation>Loading wallet...</translation>
</message>
<message>
- <location line="-54"/>
+ <location line="-55"/>
<source>Cannot downgrade wallet</source>
<translation>Cannot downgrade wallet</translation>
</message>
diff --git a/src/qt/locale/bitcoin_en_GB.ts b/src/qt/locale/bitcoin_en_GB.ts
index 1893aaca09..1676f67979 100644
--- a/src/qt/locale/bitcoin_en_GB.ts
+++ b/src/qt/locale/bitcoin_en_GB.ts
@@ -41,6 +41,65 @@
<source>&amp;Delete</source>
<translation>&amp;Delete</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Choose the address to send coins to</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Choose the address to receive coins with</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>C&amp;hoose</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Sending addresses</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Receiving addresses</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copy Address</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copy &amp;Label</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Edit</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Export Address List</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exporting Failed</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Address</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(no label)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +119,11 @@
<source>Repeat new passphrase</source>
<translation>Repeat new passphrase</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Encrypt wallet</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -278,26 +341,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Processed %n block of transaction history.</numerusform><numerusform>Processed %n blocks of transaction history.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hour</numerusform><numerusform>%n hours</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n day</numerusform><numerusform>%n days</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n week</numerusform><numerusform>%n weeks</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 and %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n year</numerusform><numerusform>%n years</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 behind</translation>
@@ -384,7 +427,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +447,6 @@
<translation>Amount:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priority:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Fee:</translation>
</message>
@@ -460,10 +499,10 @@
<translation>Confirmed</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priority</translation>
+ <source>(no label)</source>
+ <translation>(no label)</translation>
</message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -486,7 +525,7 @@
<source>&amp;Address</source>
<translation>&amp;Address</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -609,6 +648,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Last block time</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Hide</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,7 +680,7 @@
<source>Select payment request file</source>
<translation>Select payment request file</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -938,6 +992,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -947,11 +1004,7 @@
<source>Node/Service</source>
<translation>Node/Service</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping Time</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -990,7 +1043,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 and %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1194,14 +1257,6 @@
<translation>Clear console</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Disconnect Node</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Ban Node for</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hour</translation>
</message>
@@ -1218,10 +1273,6 @@
<translation>1 &amp;year</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Unban Node</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>Welcome to the %1 RPC console.</translation>
</message>
@@ -1352,7 +1403,7 @@
<source>Remove</source>
<translation>Remove</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1371,7 +1422,26 @@
<source>&amp;Save Image...</source>
<translation>&amp;Save Image...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Address</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(no label)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1407,10 +1477,6 @@
<translation>Amount:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priority:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Fee:</translation>
</message>
@@ -1479,10 +1545,6 @@
<translation>(Smart fee not initialised yet. This usually takes a few blocks...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Confirmation time:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1522,6 +1584,10 @@
<source>S&amp;end</source>
<translation>S&amp;end</translation>
</message>
+ <message>
+ <source>(no label)</source>
+ <translation>(no label)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,7 +1667,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1699,7 +1768,7 @@
<source>Reset all verify message fields</source>
<translation>Reset all verify message fields</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1715,12 +1784,45 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>This pane shows a detailed description of the transaction</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(no label)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Address</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exporting Failed</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1729,6 +1831,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1791,10 +1902,6 @@
<translation>Unable to start HTTP server. See debug log for details.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accept connections from outside (default: 1 if no -proxy or -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1803,10 +1910,6 @@
<translation>The %s developers</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</translation>
</message>
@@ -1827,10 +1930,6 @@
<translation>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Error loading %s: You can't enable HD on a already existing non-HD wallet</translation>
</message>
@@ -1843,10 +1942,6 @@
<translation>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</translation>
</message>
@@ -1871,10 +1966,6 @@
<translation>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</translation>
- </message>
- <message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation>Unable to rewind the database to a pre-fork state. You will need to re-download the blockchain</translation>
</message>
@@ -1883,18 +1974,6 @@
<translation>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>You need to rebuild the database using -reindex-chainstate to change -txindex</translation>
</message>
@@ -1931,10 +2010,6 @@
<translation>Change index out of range</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Connect only to the specified node(s)</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Connection options:</translation>
</message>
@@ -2055,10 +2130,6 @@
<translation>Location of the auth cookie (default: data dir)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Minimum bytes per sigop in transactions we relay and mine (default: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Not enough file descriptors available.</translation>
</message>
@@ -2099,10 +2170,6 @@
<translation>Set database cache size in megabytes (%d to %d, default: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Set maximum block cost (default: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>Set maximum block size in bytes (default: %d)</translation>
</message>
@@ -2207,10 +2274,6 @@
<translation>Maximum size of data in data carrier transactions we relay and mine (default: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Randomise credentials for every proxy connection. This enables Tor stream isolation (default: %u)</translation>
</message>
@@ -2223,10 +2286,6 @@
<translation>The transaction amount is too small to send after the fee has been deducted</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</translation>
</message>
@@ -2339,10 +2398,6 @@
<translation>Transaction amount too small</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transaction amounts must be positive</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transaction too large for fee policy</translation>
</message>
@@ -2407,14 +2462,14 @@
<translation>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</translation>
</message>
@@ -2459,10 +2514,6 @@
<translation>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</translation>
</message>
@@ -2531,8 +2582,8 @@
<translation>Set key pool size to &lt;n&gt; (default: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Set minimum block size in bytes (default: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Set maximum BIP141 block weight (default: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index 4471aeb72e..2337c2bd29 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Forigi</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Ripetu la novan pasfrazon</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -242,26 +245,6 @@
<source>No block source available...</source>
<translation>Neniu fonto de blokoj trovebla...</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n horo</numerusform><numerusform>%n horoj</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n tago</numerusform><numerusform>%n tagoj</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semajno</numerusform><numerusform>%n semajnoj</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 kaj %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n jaro</numerusform><numerusform>%n jaroj</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>mankas %1</translation>
@@ -340,7 +323,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Monujo estas &lt;b&gt;ĉifrita&lt;/b&gt; kaj aktuale &lt;b&gt;ŝlosita&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -356,10 +339,6 @@
<translation>Sumo:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritato:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Krompago:</translation>
</message>
@@ -411,11 +390,7 @@
<source>Confirmed</source>
<translation>Konfirmita</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritato</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -438,7 +413,7 @@
<source>&amp;Address</source>
<translation>&amp;Adreso</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -509,6 +484,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularo</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Horo de la lasta bloko</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -526,7 +512,7 @@
<source>Select payment request file</source>
<translation>Elektu la dosieron de la pagpeto</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -710,6 +696,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -738,6 +727,16 @@
<source>N/A</source>
<translation>neaplikebla</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 kaj %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -920,7 +919,7 @@
<source>Remove</source>
<translation>Forigi</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -939,7 +938,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Konservi Bildon...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -971,10 +973,6 @@
<translation>Sumo:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritato:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Krompago:</translation>
</message>
@@ -1022,7 +1020,7 @@
<source>S&amp;end</source>
<translation>Ŝendi</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1077,7 +1075,10 @@
<source>Memo:</source>
<translation>Memorando:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1155,7 +1156,7 @@
<source>Reset all verify message fields</source>
<translation>Reagordigi ĉiujn prikontrolajn kampojn</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1171,16 +1172,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Tiu ĉi panelo montras detalan priskribon de la transakcio</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1207,10 +1226,6 @@
<translation>Ruli fone kiel demono kaj akcepti komandojn</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Akcepti konektojn el ekstere (defaŭlte: 1 se ne estas -proxy nek -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Kerno de Bitmono</translation>
</message>
@@ -1223,18 +1238,6 @@
<translation>Plenumi komandon kiam monuja transakcio ŝanĝiĝas (%s en cmd anstataŭiĝas per TxID)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Tiu ĉi estas antaŭeldona testa versio - uzu laŭ via propra risko - ne uzu por minado aŭ por aplikaĵoj por vendistoj</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Averto: La reto ne tute konsentas! Kelkaj minantoj ŝajne spertas problemojn aktuale.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Averto: ŝajne ni ne tute konsentas kun niaj samtavolanoj! Eble vi devas ĝisdatigi vian klienton, aŭ eble aliaj nodoj faru same.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; povas esti:</translation>
</message>
@@ -1243,10 +1246,6 @@
<translation>Blok-kreaj agordaĵoj:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Konekti nur al specifita(j) nodo(j)</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Difektita blokdatumbazo trovita</translation>
</message>
@@ -1339,10 +1338,6 @@
<translation>Transakcia sumo tro malgranda</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transakcia sumo devas esti pozitiva</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transakcio estas tro granda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index c67016637b..5ba44a954c 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Eliminar</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Seleccione la dirección a la que enviar monedas</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Seleccione la dirección de la que recibir monedas</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>E&amp;scoger</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Direcciones de envío</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Direcciones de recepción</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Estas son sus direcciones Bitcoin para enviar pagos. Verifique siempre la cantidad y la dirección de recepción antes de enviar bitcoins.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Estas son sus direcciones Bitcoin para recibir pagos. Se recomienda utilizar una nueva dirección de recepción para cada transacción</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copiar Dirección</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copiar &amp;Etiqueta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editar</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exportar lista de direcciones</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Archivo separado de coma (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falló la exportación</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Había un error intentando guardar la lista de direcciones en %1. Por favor inténtelo de nuevo.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Repita la nueva contraseña</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Introduzca la nueva contraseña del monedero. &lt;br/&gt;Por favor utilice una contraseña de &lt;b&gt;diez o más carácteres aleatorios&lt;/b&gt;, o &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Cifrar monedero</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Esta operación necesita su contraseña de monedero para desbloquear el monedero.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloquear monedero</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Esta operación necesita su contraseña para descifrar el monedero.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Descifrar monedero</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Cambiar contraseña</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduzca la contraseña antigua y la nueva para el monedero.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirmar cifrado del monedero</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Advertencia: Si cifra su monedero y pierde su contraseña&lt;b&gt;¡PERDERÁ TODOS SUS BITCOINS!&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>¿Seguro que desea cifrar su monedero?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Monedero cifrado</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 se cerrará ahora para terminar el proceso de cifrado. Recuerde que cifrar su monedero no puede proteger completamente su monedero de ser robado por malware que infecte su ordenador.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANTE: Cualquier copia de seguridad anterior que haya hecho en su archivo de monedero debería ser reemplazada con el archivo de monedero cifrado generado recientemente. Por razones de seguridad, las copias de seguridad anteriores del archivo de monedero descifrado serán inútiles en cuanto empiece a utilizar el nuevo monedero cifrado.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Fracasó el cifrado del monedero</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Falló el cifrado del monedero debido a un error interno. Su monedero no fue cifrado.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>La contraseña introducida no coincide.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Fracasó el desbloqueo del monedero</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La contraseña introducida para el cifrado del monedero es incorrecta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Fracasó el cifrado del monedero</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La contraseña del monedero se ha cambiado con éxito.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Alerta: ¡La clave de bloqueo Caps está activa!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -159,6 +318,18 @@
<translation>Abrir &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Pulsar para deshabilitar la actividad de red.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Actividad de red deshabilitada.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Pulsar para volver a habilitar la actividad de red.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Reindexando bloques en disco...</translation>
</message>
@@ -272,32 +443,12 @@
</message>
<message>
<source>No block source available...</source>
- <translation>Ninguna fuente de bloques disponible ...</translation>
+ <translation>Ninguna fuente de bloques disponible...</translation>
</message>
<message numerus="yes">
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n bloque procesado del historial de transacciones.</numerusform><numerusform>%n bloques procesados del historial de transacciones.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n día</numerusform><numerusform>%n días</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 y %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n año</numerusform><numerusform>%n años</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 atrás</translation>
@@ -377,6 +528,14 @@
<translation>Transacción entrante</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>La generación de clave HD está &lt;b&gt;habilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>La generación de clave HD está &lt;b&gt;deshabilitada&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Ha ocurrido un error fatal. Bitcoin no puede seguir seguro y se cerrará.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>Cuantía:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Tasa:</translation>
</message>
@@ -460,8 +619,84 @@
<translation>Confirmado</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioridad</translation>
+ <source>Copy address</source>
+ <translation>Copiar ubicación</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacción</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloquear lo no gastado</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloquear lo no gastado</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar comisión</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar después de couta</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar polvo</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar cambio</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloqueado)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sí</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>no</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Esta etiqueta se vuelve roja si algún destinatario recibe una cantidad inferior a la actual puerta polvorienta.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Puede variar +/- %1 satoshi(s) por entrada.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>cambia desde %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(cambio)</translation>
</message>
</context>
<context>
@@ -486,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nueva dirección de recivimiento</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nueva dirección de envío</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Editar dirección de recivimiento</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Editar dirección de envío</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>La dirección introducida "%1" no es una dirección Bitcoin válida.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>La dirección introducida "%1" está ya en la agenda.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Podría no desbloquear el monedero.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Falló la generación de la nueva clave.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -499,7 +766,7 @@
</message>
<message>
<source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
- <translation>El directorio ya existe. Añada %1 si pretende crear aquí un directorio nuevo.</translation>
+ <translation>El directorio ya existe. Añada %1 si pretende crear un directorio nuevo.</translation>
</message>
<message>
<source>Path already exists, and is not a directory.</source>
@@ -557,6 +824,10 @@
<translation>Establecer los certificados raíz SSL para solicitudes de pago (predeterminado: -system-)</translation>
</message>
<message>
+ <source>Show splash screen on startup (default: %u)</source>
+ <translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: %u)</translation>
+ </message>
+ <message>
<source>Reset all settings changed in the GUI</source>
<translation>Reiniciar todos los ajustes modificados en el GUI</translation>
</message>
@@ -573,7 +844,7 @@
</message>
<message>
<source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
- <translation>Al ser la primera vez que se ejecuta el programa, puede elegir donde %1 almacenara sus datos</translation>
+ <translation>Al ser la primera vez que se ejecuta el programa, puede elegir donde %1 almacenará sus datos.</translation>
</message>
<message>
<source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
@@ -605,6 +876,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Las transacciones recientes aún no pueden ser visibles, y por lo tanto el saldo de su monedero podría ser incorrecto. Esta información será correcta cuando su monedero haya terminado de sincronizarse con la red de bitcoin, como se detalla abajo.</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>La red no aceptará el intentar gastar bitcoins que están afectados por transacciones aún no mostradas.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Número de bloques dejados</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Desconocido...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora del último bloque</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progreso</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Avance del progreso por hora</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>calculando...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Tiempo estimado restante hasta la sincronización</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ocultar</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Desconocido. Sincronizando cabeceras (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -622,6 +944,10 @@
<source>Select payment request file</source>
<translation>Seleccionar archivo de sulicitud de pago</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Seleccionar el archivo de solicitud de pago para abrir</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -643,7 +969,7 @@
</message>
<message>
<source>Size of &amp;database cache</source>
- <translation>Tamaño de cache de la &amp;base de datos</translation>
+ <translation>Tamaño del cache de la &amp;base de datos</translation>
</message>
<message>
<source>MB</source>
@@ -707,7 +1033,7 @@
</message>
<message>
<source>Enable coin &amp;control features</source>
- <translation>Habilitar funcionalidad de &amp;coin control</translation>
+ <translation>Habilitar funcionalidad de &amp;Coin Control</translation>
</message>
<message>
<source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
@@ -811,7 +1137,7 @@
</message>
<message>
<source>&amp;Unit to show amounts in:</source>
- <translation>Mostrar las cantidades en la &amp;unidad:</translation>
+ <translation>&amp;Unidad en la cual mostrar las cantidades:</translation>
</message>
<message>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
@@ -835,7 +1161,7 @@
</message>
<message>
<source>none</source>
- <translation>ninguna</translation>
+ <translation>Ninguna</translation>
</message>
<message>
<source>Confirm options reset</source>
@@ -934,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Fallo en la solicitud de pago</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>No se puede iniciar bitcoin: encargado click-para-pagar</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Manejo de URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>La búsqueda de solicitud de pago URL es válida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Dirección de pago inválida %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI no puede ser analizado! Esto puede ser causado por una dirección Bitcoin inválida o parametros URI mal formados.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Manejo del archivo de solicitud de pago</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>¡El archivo de solicitud de pago no puede ser leído! Esto puede ser causado por un archivo de solicitud de pago inválido.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Solicitud de pago rechazada</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>La red de solicitud de pago no cimbina la red cliente.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Solicitud de pago caducada.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La solicitud de pago no se ha iniciado.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Solicitudes de pago sin verificar a scripts de pago habitual no se soportan.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Solicitud de pago inválida.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Cantidad de pago solicitada de %1 es demasiado pequeña (considerado polvo).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reembolsar desde %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Solicitud de pago de %1 es demasiado grande (%2 bytes, permitidos %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Fallo al comunicar con %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>¡La solicitud de pago no puede ser analizada!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mala respuesta desde el servidor %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Fallo de solicitud de red</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pago declarado</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -944,8 +1361,12 @@
<translation>Nodo/Servicio</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Ping</translation>
+ <source>NodeId</source>
+ <translation>ID de nodo</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Sonido</translation>
</message>
</context>
<context>
@@ -986,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n segundo</numerusform><numerusform>%n segundos</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n minuto</numerusform><numerusform>%n minutos</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n dia</numerusform><numerusform>%n dias</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 y %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n año</numerusform><numerusform>%n años</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 no se ha cerrado de forma segura todavía...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Error: El directorio de datos «%1» especificado no existe.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Error: No se puede analizar el archivo de configuración: %1. Utilice únicamente la sintaxis clave=valor.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Error: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Guardar imagen...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copiar imagen</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Guardar código QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imagen PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1146,6 +1633,10 @@
<translation>Espera de Ping</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Sonido Mínimo</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Desplazamiento de tiempo</translation>
</message>
@@ -1190,14 +1681,6 @@
<translation>Borrar consola</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>Nodo &amp;Desconectado</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Prohibir Nodo para</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hora</translation>
</message>
@@ -1214,8 +1697,12 @@
<translation>1 &amp;año</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Desbanear Nodo</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Desconectar</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Prohibir para</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1348,6 +1835,18 @@
<source>Remove</source>
<translation>Eliminar</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar capa</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copiar imagen</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1367,6 +1866,73 @@
<source>&amp;Save Image...</source>
<translation>Guardar Imagen...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Solicitar pago a %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Información de pago</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultante demasiado grande, trate de reducir el texto de etiqueta / mensaje.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Fallo al codificar URI en código QR.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(no hay mensaje)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(no hay solicitud de cantidad)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Solicitado</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1403,10 +1969,6 @@
<translation>Cuantía:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Tasa:</translation>
</message>
@@ -1436,7 +1998,7 @@
</message>
<message>
<source>collapse fee-settings</source>
- <translation>Colapsar ajustes de cuota</translation>
+ <translation>Colapsar ajustes de comisión.</translation>
</message>
<message>
<source>per kilobyte</source>
@@ -1444,7 +2006,7 @@
</message>
<message>
<source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
- <translation>Si la tarifa de aduana se establece en 1000 satoshis y la transacción está a sólo 250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "el mínimo total" pagaría 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte</translation>
+ <translation>Si la comisión se establece en 1000 satoshis y la transacción está a sólo 250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "el mínimo total" pagaría 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte</translation>
</message>
<message>
<source>Hide</source>
@@ -1456,7 +2018,7 @@
</message>
<message>
<source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
- <translation>Pagando solamente la cuota mínima es correcto, siempre y cuando haya menos volumen de transacciones que el espacio en los bloques. Pero tenga en cuenta que esto puede terminar en una transacción nunca confirmada, una vez que haya más demanda para transacciones Bitcoin que la red pueda procesar.</translation>
+ <translation>Pagar solamente la comisión mínima es correcto, siempre y cuando haya menos volumen de transacciones que el espacio en los bloques. Pero tenga en cuenta que esto puede terminar en una transacción nunca confirmada, una vez que haya más demanda para transacciones Bitcoin que la red pueda procesar.</translation>
</message>
<message>
<source>(read the tooltip)</source>
@@ -1464,19 +2026,15 @@
</message>
<message>
<source>Recommended:</source>
- <translation>Recomendado:</translation>
+ <translation>Recomendada:</translation>
</message>
<message>
<source>Custom:</source>
- <translation>Personalizado:</translation>
+ <translation>Personalizada:</translation>
</message>
<message>
<source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
- <translation>(Tarifa inteligente no inicializado aún. Esto generalmente lleva a pocos bloques...)</translation>
- </message>
- <message>
- <source>Confirmation time:</source>
- <translation>Tiempo de confirmación:</translation>
+ <translation>(Aún no se ha inicializado la Comisión Inteligente. Esto generalmente tarda pocos bloques...)</translation>
</message>
<message>
<source>normal</source>
@@ -1518,6 +2076,106 @@
<source>S&amp;end</source>
<translation>&amp;Enviar</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar comisión</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar después de couta</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar polvo</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar cambio</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>¿Seguro que quiere enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>añadido como comisión de transacción</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Cantidad total %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>o</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirmar enviar monedas</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>La dirección de destinatario no es válida. Por favor revísela.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>La cantidad a pagar debe de ser mayor que 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>La cantidad excede su saldo.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>El total excede su saldo cuando la comisión de transacción de %1 es incluida.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Dirección duplicada encontrada: la dirección sólo debería ser utilizada una vez por cada uso.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>¡Falló la creación de transacción!</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Una comisión mayor que %1 se considera una cuota irracionalmente alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Solicitud de pago caducada.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Pagar únicamente la comisión solicitada de %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Alerta: dirección Bitcoin inválida</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Alerta: dirección cambiada desconocida</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1563,11 +2221,11 @@
</message>
<message>
<source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
- <translation>La cuota será deducida de la cantidad que sea mandada. El destinatario recibirá menos bitcoins de los que entres en el </translation>
+ <translation>La comisión será deducida de la cantidad que sea mandada. El destinatario recibirá menos bitcoins de la cantidad introducida en el campo Cantidad. Si hay varios destinatarios, la comisión será distribuida a partes iguales.</translation>
</message>
<message>
<source>S&amp;ubtract fee from amount</source>
- <translation>Restar comisiones a la cantidad</translation>
+ <translation>Restar comisiones de la cantidad.</translation>
</message>
<message>
<source>Message:</source>
@@ -1597,6 +2255,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Introduzca una etiqueta para esta dirección para añadirla a su lista de direcciones.</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1695,6 +2364,58 @@
<source>Reset all verify message fields</source>
<translation>Vaciar todos los campos de la verificación de mensaje</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Click en "Fírmar mensaje" para generar una firma</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>La dirección introducida no es válida.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Por favor revise la dirección e inténtelo de nuevo.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>La dirección introducida no remite a una clave.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>El desbloqueo del monedero fue cancelado.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clave privada de la dirección introducida no está disponible.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Falló la firma del mensaje.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Mensaje firmado.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La firma no pudo descodificarse.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Por favor compruebe la firma y pruebe de nuevo.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La firma no se combinó con el mensaje.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Falló la verificación del mensaje.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Mensaje verificado.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1711,11 +2432,440 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Abierto hasta %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>Hay un conflicto con la traducción de las confirmaciones %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/sin conexión</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/no confirmado, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>en el equipo de memoria</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>no en el equipo de memoria</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>abandonado</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/no confirmado</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>confirmaciones %1</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Estado</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, no ha sido emitido con éxito aún</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Fuente</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Generado</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Desde</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconocido</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Para</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>dirección propia</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>de observación</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiqueta</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Credito</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>no aceptada</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Enviado</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Total enviado</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Total recibido</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Comisión de transacción</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Cantidad neta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentario</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Identificador de transacción (ID)</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Indice de salida</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Vendedor</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a "no aceptado" y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Información de depuración</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transacción</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>entradas</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>verdadero</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>falso</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta ventana muestra información detallada sobre la transacción</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Detalles para %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Abierto hasta %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Sin conexion</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Sin confirmar</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonado</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmando (%1 de %2 confirmaciones recomendadas)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmado (%1 confirmaciones)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflicto</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>No disponible (%1 confirmaciones. Estarán disponibles al cabo de %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generado pero no aceptado</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recibido con</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Recibidos de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado a</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pago proprio</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minado</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>de observación</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(nd)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Fecha y hora en que se recibió la transacción.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipo de transacción.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Si una dirección watch-only está involucrada en esta transacción o no.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Descripción de la transacción definido por el usuario.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Cantidad retirada o añadida al saldo.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Todo</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Hoy</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Esta semana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Este mes</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Mes pasado</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Este año</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rango...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recibido con</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado a</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>A usted mismo</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minado</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Otra</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Introduzca una dirección o etiqueta que buscar</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Cantidad mínima</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Transacción abandonada</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar ubicación</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar capa</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacción</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copiar transacción raw</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Copiar todos los detalles de la transacción</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar etiqueta</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostrar detalles de la transacción</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exportar historial de transacciones</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Archivo separado de coma (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmado</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>De observación</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falló la exportación</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Ha habido un error al intentar guardar la transacción con %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportación finalizada</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>La transacción ha sido guardada en %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rango:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>para</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1725,6 +2875,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>No se ha cargado ningún monedero</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Enviar</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exportar</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exportar a un archivo los datos de esta pestaña</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Copia de seguridad del monedero</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Datos de monedero (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>La copia de seguridad ha fallado</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Ha habido un error al intentar guardar los datos del monedero en %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Se ha completado con éxito la copia de respaldo</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Los datos del monedero se han guardado con éxito en %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1758,7 +2957,7 @@
</message>
<message>
<source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
- <translation>Poda: la ultima sincronizacion de la cartera sobrepasa los datos podados. Necesitas reindexar con -reindex (o descargar la cadena de bloques de nuevo en el caso de un nodo podado)</translation>
+ <translation>Poda: la ultima sincronizacion del monedero sobrepasa los datos podados. Necesitas reindexar con -reindex (o descargar la cadena de bloques de nuevo en el caso de un nodo podado)</translation>
</message>
<message>
<source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
@@ -1790,20 +2989,12 @@
<translation>No se ha podido comenzar el servidor HTTP. Ver debug log para detalles.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
<source>The %s developers</source>
- <translation>Los %s desarrolladores</translation>
- </message>
- <message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee tiene un ajuste muy alto! Esta es la comisión de transacción que pagarás cuando las estimaciones de comisiones no estén disponibles.</translation>
+ <translation>Los desarrolladores de %s</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1826,10 +3017,6 @@
<translation>Borrar todas las transacciones del monedero y sólo recuperar aquellas partes de la cadena de bloques por medio de -rescan on startup.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuido bajo la licencia de software MIT, vea la copia del archivo adjunto o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Error cargando %s: No puede habilitar HD en un monedero existente que no es HD</translation>
</message>
@@ -1842,16 +3029,12 @@
<translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Ajuste máximo permitido del tiempo offset medio de pares. La perspectiva local de tiempo se verá influenciada por los pares anteriores y posteriores a esta cantidad. (Por defecto: %u segundos)</translation>
</message>
<message>
<source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
- <translation>Máximas comisiones totales (en %s) para utilizar en una sola transacción de la cartera; establecer esto demasiado bajo puede abortar grandes transacciones (predeterminado: %s)</translation>
+ <translation>Máximas comisiones totales (en %s) para utilizar en una sola transacción del monedero; establecer esto demasiado bajo puede abortar grandes transacciones (predeterminado: %s)</translation>
</message>
<message>
<source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
@@ -1870,10 +3053,6 @@
<translation>La base de datos de bloques contiene un bloque que parece ser del futuro. Esto puede ser porque la fecha y hora de tu ordenador están mal ajustados. Reconstruye la base de datos de bloques solo si estas seguro de que la fecha y hora de tu ordenador estan ajustados correctamente.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
- </message>
- <message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation>No es posible reconstruir la base de datos a un estado anterior. Debe descargar de nuevo la cadena de bloques.</translation>
</message>
@@ -1882,18 +3061,6 @@
<translation>Utiliza UPnP para asignar el puerto de escucha (predeterminado: 1 cuando esta escuchando sin -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Atención: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están presentando inconvenientes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Atención: ¡Parece que no estamos completamente de acuerdo con nuestros pares! Podría necesitar una actualización, u otros nodos podrían necesitarla.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Poner en lista blanca a los equipos que se conecten desde la máscara de subred o dirección IP especificada. Se puede especificar múltiples veces.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Necesita reconstruir la base de datos usando -reindex-chainstate para cambiar -txindex</translation>
</message>
@@ -1930,10 +3097,6 @@
<translation>Cambio de indice fuera de rango</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conectar sólo a los nodos (o nodo) especificados</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opciones de conexión:</translation>
</message>
@@ -2054,10 +3217,6 @@
<translation>Ubicación de la cookie de autenticación (default: data dir)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Mínimo de bytes por sigop en transacciones que retransmitimos y minamos (predeterminado: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>No hay suficientes descriptores de archivo disponibles. </translation>
</message>
@@ -2095,11 +3254,7 @@
</message>
<message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
- <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
- </message>
- <message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Establecer tamaño máximo de bloque (por defecto: %d)</translation>
+ <translation>Asignar tamaño del cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
</message>
<message>
<source>Set maximum block size in bytes (default: %d)</source>
@@ -2199,17 +3354,13 @@
</message>
<message>
<source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
- <translation>Cantidad no válida para -maxtxfee=&lt;amount&gt;: '%s' (debe ser por lo menos la cuota de comisión mínima de %s para prevenir transacciones atascadas)</translation>
+ <translation>Cantidad no válida para -maxtxfee=&lt;amount&gt;: '%s' (debe ser por lo menos la comisión mínima de %s para prevenir transacciones atascadas)</translation>
</message>
<message>
<source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
<translation>El tamaño máximo de los datos en las operaciones de transporte de datos que transmitimos y el mio (default: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Consulta de direcciones pares mediante búsqueda de DNS, si bajo en direcciones (por defecto: 1 a menos que - conectar)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Aleatorizar las credenciales para cada conexión proxy. Esto habilita la Tor stream isolation (por defecto: %u)</translation>
</message>
@@ -2222,10 +3373,6 @@
<translation>Monto de transacción muy pequeña luego de la deducción por comisión</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Este producto incluye software desarrollado por el OpenSSL Project para su uso en OpenSSL Toolkit &lt;https://www.openssl.org/&gt;, software de cifrado escrito por Eric Young y software UPnP escrito por Thomas Bernard.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>Usar tras BIP32 la generación de llave determinística jerárquica (HD) . Solo tiene efecto durante el primer inicio/generación del monedero</translation>
</message>
@@ -2295,7 +3442,7 @@
</message>
<message>
<source>Rescan the block chain for missing wallet transactions on startup</source>
- <translation>Rescanea la cadena de bloques para transacciones perdidas de la cartera</translation>
+ <translation>Rescanea la cadena de bloques para buscar transacciones perdidas del monedero</translation>
</message>
<message>
<source>Send trace/debug info to console instead of debug.log file</source>
@@ -2338,16 +3485,12 @@
<translation>Cantidad de la transacción demasiado pequeña</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Las cantidades en las transacciones deben ser positivas</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Operación demasiado grande para la política de tasas</translation>
</message>
<message>
<source>Transaction too large</source>
- <translation>Transacción demasiado grande</translation>
+ <translation>Transacción demasiado grande, intenta dividirla en varias.</translation>
</message>
<message>
<source>Unable to bind to %s on this computer (bind returned error %s)</source>
@@ -2355,7 +3498,7 @@
</message>
<message>
<source>Upgrade wallet to latest format on startup</source>
- <translation>Actualizar el monedero al último formato</translation>
+ <translation>Actualizar el monedero al último formato al inicio</translation>
</message>
<message>
<source>Username for JSON-RPC connections</source>
@@ -2401,25 +3544,29 @@
</message>
<message>
<source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
- <translation>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</translation>
+ <translation>(1 = mantener los meta datos de transacción, por ejemplo: propietario e información de pago, 2 = omitir los metadatos)</translation>
</message>
<message>
<source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
- <translation>-maxtxfee tiene un ajuste muy elevado! Las comisiones así de grandes podrían ser pagadas en una única transaccion.</translation>
- </message>
- <message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee tiene un ajuste muy elevado! Esta es la comisión de transacción que pagaras si envías una transaccion.</translation>
+ <translation>-maxtxfee tiene un ajuste muy elevado! Comisiones muy grandes podrían ser pagadas en una única transaccion.</translation>
</message>
<message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>No mantener transacciones en la memoria mas de &lt;n&gt; horas (predeterminado: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Bytes equivalentes por sigop en transacciones para retrasmisión y minado (predeterminado: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Las comisiones (en %s/kB) menores que esto son consideradas de cero comision para la creacion de transacciones (predeterminado: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: %u)</translation>
</message>
@@ -2436,8 +3583,20 @@
<translation>Mostrar depuración (por defecto: %u, proporcionar &lt;category&gt; es opcional)</translation>
</message>
<message>
+ <source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
+ <translation>Admite filtrado de bloques, y transacciones con filtros Bloom. Reduce la carga de red. ( por defecto :%u)</translation>
+ </message>
+ <message>
+ <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
+ <translation>La longitud total de la cadena de versión de red ( %i ) supera la longitud máxima ( %i ) . Reducir el número o tamaño de uacomments .</translation>
+ </message>
+ <message>
+ <source>Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)</source>
+ <translation>Intenta de mantener el Tráfico de salida , bajo el Objetivo Determinado (en MiB por 24h) , 0 = sin limite (Por Defecto :%d )</translation>
+ </message>
+ <message>
<source>Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
- <translation>Error: Unsupported argumento -socks encontrados. SOCKS versión ajuste ya no es posible, sólo SOCKS5 proxies son compatibles.</translation>
+ <translation>Error: argumento -socks encontrado. El ajuste de la versión SOCKS ya no es posible, sólo proxies SOCKS5 son compatibles.</translation>
</message>
<message>
<source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
@@ -2448,10 +3607,6 @@
<translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Nombre de usuario y hash de la contraseña para las conexiones JSON-RPC. El campo &lt;userpw&gt; tiene el formato: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Se incluye un script python convencional en share/rpcuser. Esta opción puede ser especificada multiples veces</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Advertencia: Se están minando versiones de bloques desconocidas! Es posible que normas desconocidas estén activas</translation>
</message>
@@ -2460,6 +3615,10 @@
<translation>Aviso: fichero de monedero corrupto, datos recuperados! Original %s guardado como %s en %s; si su balance de transacciones es incorrecto, debe restaurar desde una copia de seguridad.</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Los pares de listas blancas que se conectan desde la dirección IP dada (por ejemplo, 1.2.3.4) o la red marcada CIDR (por ejemplo, 1.2.3.0/24). Se puede especificar varias veces.</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(predeterminado: %s)</translation>
</message>
@@ -2520,8 +3679,8 @@
<translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Establecer tamaño mínimo de bloque en bytes (por defecto: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Establecer peso máximo bloque BIP141 (predeterminado: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2541,7 +3700,11 @@
</message>
<message>
<source>Spend unconfirmed change when sending transactions (default: %u)</source>
- <translation>Gastar cambio no confirmado al enviar transacciones (predeterminado: %u)</translation>
+ <translation>Usar cambio aún no confirmado al enviar transacciones (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Starting network threads...</source>
+ <translation>Iniciando funciones de red...</translation>
</message>
<message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
@@ -2569,7 +3732,7 @@
</message>
<message>
<source>Cannot downgrade wallet</source>
- <translation>No se puede rebajar el monedero</translation>
+ <translation>No se puede cambiar a una versión mas antigua el monedero</translation>
</message>
<message>
<source>Cannot write default address</source>
diff --git a/src/qt/locale/bitcoin_es_AR.ts b/src/qt/locale/bitcoin_es_AR.ts
index 40ebaf8856..6a418e645b 100644
--- a/src/qt/locale/bitcoin_es_AR.ts
+++ b/src/qt/locale/bitcoin_es_AR.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Repetí la nueva Frase de Contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -83,6 +86,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -92,12 +98,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -107,12 +122,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -125,12 +146,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index 188641d6e7..ac01c4219b 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Repite nueva contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -207,10 +210,6 @@
<translation>Pide pagos (genera codigos QR and bitcoin: URls)</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 y %2</translation>
- </message>
- <message>
<source>Error</source>
<translation>Error</translation>
</message>
@@ -246,7 +245,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>La billetera esta &lt;b&gt;codificada&lt;/b&gt; y actualmente &lt;b&gt;bloqueda&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -254,10 +253,6 @@
<translation>Cantidad:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>comisión:
</translation>
@@ -278,11 +273,7 @@
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>prioridad</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -297,7 +288,7 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -332,6 +323,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>URI:</source>
@@ -442,6 +440,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -454,6 +455,16 @@
<source>N/A</source>
<translation>N/A</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 y %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -548,7 +559,10 @@
<source>&amp;Save Image...</source>
<translation>Guardar imagen...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -564,10 +578,6 @@
<translation>Cantidad:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>comisión:
</translation>
@@ -608,7 +618,7 @@
<source>S&amp;end</source>
<translation>&amp;Envía</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -645,6 +655,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -709,16 +722,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta ventana muestra información detallada sobre la transacción</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -745,11 +776,6 @@
<translation>bitcoin core</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conecta solo al nodo especificado
-</translation>
- </message>
- <message>
<source>Error loading block database</source>
<translation>Error cargando blkindex.dat</translation>
</message>
diff --git a/src/qt/locale/bitcoin_es_CO.ts b/src/qt/locale/bitcoin_es_CO.ts
index df189190f6..f993f88605 100644
--- a/src/qt/locale/bitcoin_es_CO.ts
+++ b/src/qt/locale/bitcoin_es_CO.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Repetir nueva contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -198,11 +201,18 @@
<context>
<name>Intro</name>
<message>
+ <source>Welcome</source>
+ <translation>bienvenido</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Error</translation>
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -212,12 +222,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -227,12 +246,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -245,12 +270,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index ba963d2b80..eb6583083b 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;Eliminar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Repita la nueva contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -286,7 +289,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -302,10 +305,6 @@
<translation>Cuantía:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Tasa:</translation>
</message>
@@ -345,11 +344,7 @@
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioridad</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -372,7 +367,7 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -435,6 +430,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Desde</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora del último bloque</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -452,7 +458,7 @@
<source>Select payment request file</source>
<translation>Seleccione archivo de sulicitud de pago</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -616,6 +622,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -638,6 +647,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -798,7 +813,7 @@
<source>Remove</source>
<translation>Eliminar</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -817,7 +832,10 @@
<source>&amp;Save Image...</source>
<translation>Guardar Imagen...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -853,10 +871,6 @@
<translation>Cuantía:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Tasa:</translation>
</message>
@@ -908,7 +922,7 @@
<source>S&amp;end</source>
<translation>&amp;Enviar</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -963,7 +977,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
</context>
@@ -1037,7 +1054,7 @@
<source>Reset all verify message fields</source>
<translation>Limpiar todos los campos de la verificación de mensaje</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1053,16 +1070,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta ventana muestra información detallada sobre la transacción</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1092,10 +1127,6 @@
</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Aceptar conexiones desde el exterior (predeterminado: 1 si no -proxy o -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Núcleo de Bitcoin</translation>
</message>
@@ -1108,18 +1139,6 @@
<translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta es una versión de pre-prueba - utilícela bajo su propio riesgo. No la utilice para usos comerciales o de minería.</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Atención: ¡Parece que la red no está totalmente de acuerdo! Algunos mineros están presentando inconvenientes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Atención: ¡Parece que no estamos completamente de acuerdo con nuestros pares! Podría necesitar una actualización, u otros nodos podrían necesitarla.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; puede ser:</translation>
</message>
@@ -1128,10 +1147,6 @@
<translation>Opciones de creación de bloques:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conectar sólo a los nodos (o nodo) especificados</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Corrupción de base de datos de bloques detectada.</translation>
</message>
@@ -1232,10 +1247,6 @@
<translation>Monto de la transacción muy pequeño</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Montos de transacciones deben ser positivos</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transacción demasiado grande</translation>
</message>
diff --git a/src/qt/locale/bitcoin_es_ES.ts b/src/qt/locale/bitcoin_es_ES.ts
index c66a477cc2..c971d664d8 100644
--- a/src/qt/locale/bitcoin_es_ES.ts
+++ b/src/qt/locale/bitcoin_es_ES.ts
@@ -3,11 +3,11 @@
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
- <translation>Haz clic derecho para editar la dirección o la etiqueta</translation>
+ <translation>Haz clic derecho para editar la dirección o etiqueta</translation>
</message>
<message>
<source>Create a new address</source>
- <translation>Crea una nueva direccióon</translation>
+ <translation>Crear una nueva dirección</translation>
</message>
<message>
<source>&amp;New</source>
@@ -15,7 +15,7 @@
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
- <translation>Copia la direccón seleccionada al portapapeles del sistema</translation>
+ <translation>Copiar la dirección seleccionada al portapapeles del sistema</translation>
</message>
<message>
<source>&amp;Copy</source>
@@ -27,11 +27,11 @@
</message>
<message>
<source>Delete the currently selected address from the list</source>
- <translation>Elimina la dirección seleccionada de la lista</translation>
+ <translation>Eliminar la dirección seleccionada de la lista</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
- <translation>Exporta los datos de la pestaña actual a un archivo</translation>
+ <translation>Exportar los datos en la ficha actual a un archivo</translation>
</message>
<message>
<source>&amp;Export</source>
@@ -41,16 +41,87 @@
<source>&amp;Delete</source>
<translation>&amp;Eliminar</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Seleccione la dirección a la que enviar monedas</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Seleccione la dirección de la que recibir monedas</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>E&amp;scoger</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Enviando direcciones</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Recibiendo direcciones</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Estas son sus direcciones Bitcoin para enviar pagos. Verifique siempre la cantidad y la dirección de recibimiento antes de enviar monedas.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Estas son sus direcciones Bitcoin para recibir pagos. Se recomienda utilizar una nueva dirección de recibimiento para cada transacción</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copiar Dirección</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copiar &amp;Etiqueta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editar</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exportar lista de direcciones</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Archivo separado de coma (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falló la exportación</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Había un error intentando guardar la lista de direcciones en %1. Por favor inténtelo de nuevo.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
- <translation>Dialogo de Contraseña</translation>
+ <translation>Diálogo de contraseña</translation>
</message>
<message>
<source>Enter passphrase</source>
- <translation>Introduzca la contraseña</translation>
+ <translation>Introducir contraseña</translation>
</message>
<message>
<source>New passphrase</source>
@@ -58,12 +129,108 @@
</message>
<message>
<source>Repeat new passphrase</source>
- <translation>Repite la nueva contraseña</translation>
+ <translation>Repita la nueva contraseña</translation>
+ </message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Introduzca la nueva frase clave del monedero. &lt;br/&gt;Por favor utilice una frase clave de &lt;b&gt;diez o más carácteres aleatorios&lt;/b&gt;, o &lt;b&gt;ocho o más palabras&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Monedero encriptado</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Esta operación necesita su frase clave de monedero para desbloquear el monedero.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloquear monedero</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Esta operación necesita su frase clave de cartera para desencriptar el monedero.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desencriptar monedero</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Cambiar frase clave</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduzca la vieja frase clave y la nueva flase clave para el monedero.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirmar encriptación del monedero</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Advertencia: Si encripta su monedero y pierde su frase clave &lt;b&gt;PERDERÁ TODOS SUS BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>¿Seguro que desea encriptar su monedero?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Monedero encriptado</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 se cerrará ahora para terminar el proceso de encriptación. Recuerde que encriptar su monedero no puede proteger completamente su monedero de ser robado por malware que infecte su ordenador.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANTE: Cualquier copia de seguridad anterior que haya hecho en su archivo de monedero debería ser reemplazada con el archivo de monedero encriptado generado recientemente. Por razones de seguridad, las copias de seguridad anteriores del archivo de monedero desencriptado serán inútiles en cuanto empiece a utilizar el nuevo monedero encriptado.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Fracasó la encriptación de monedero</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Falló la encriptación del monedero debido a un error interno. Su monedero no fue encriptado.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>La frase clave introducida no coincide.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Fracasó el desbloqueo del monedero</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La frase clave introducida para la encriptación del monedero es incorrecta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Fracasó la encriptación del monedero</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La frase clave del monedero se ha cambiado con éxito.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Alerta: ¡La clave de bloqueo Caps está activa!</translation>
</message>
</context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Máscara</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Bloqueado Hasta</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
@@ -72,7 +239,7 @@
</message>
<message>
<source>Synchronizing with network...</source>
- <translation>Sincronizando con la red...</translation>
+ <translation>Sincronizando con la red…</translation>
</message>
<message>
<source>&amp;Overview</source>
@@ -84,7 +251,7 @@
</message>
<message>
<source>Show general overview of wallet</source>
- <translation>Mostrar vista general de la cartera</translation>
+ <translation>Mostrar vista general del monedero</translation>
</message>
<message>
<source>&amp;Transactions</source>
@@ -92,7 +259,7 @@
</message>
<message>
<source>Browse transaction history</source>
- <translation>Navegar historial de transacciones</translation>
+ <translation>Examinar el historial de transacciones</translation>
</message>
<message>
<source>E&amp;xit</source>
@@ -103,36 +270,48 @@
<translation>Salir de la aplicación</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>&amp;Acerca de %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Mostrar información acerca de %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Acerca de &amp;Qt</translation>
</message>
<message>
<source>Show information about Qt</source>
- <translation>Muestra información acerca de Qt</translation>
+ <translation>Mostrar información acerca de Qt</translation>
</message>
<message>
<source>&amp;Options...</source>
<translation>&amp;Opciones...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Modificar las opciones de configuración para %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
- <translation>&amp;Encriptar Cartera...</translation>
+ <translation>&amp;Cifrar monedero…</translation>
</message>
<message>
<source>&amp;Backup Wallet...</source>
- <translation>&amp;Hacer copia de seguridad de la cartera...</translation>
+ <translation>&amp;Guardar copia del monedero...</translation>
</message>
<message>
<source>&amp;Change Passphrase...</source>
- <translation>&amp;Cambiar contraseña...</translation>
+ <translation>&amp;Cambiar la contraseña…</translation>
</message>
<message>
<source>&amp;Sending addresses...</source>
- <translation>&amp;Enviando direcciones...</translation>
+ <translation>Direcciones de &amp;envío...</translation>
</message>
<message>
<source>&amp;Receiving addresses...</source>
- <translation>&amp;Recibiendo direcciones..</translation>
+ <translation>Direcciones de &amp;recepción...</translation>
</message>
<message>
<source>Open &amp;URI...</source>
@@ -140,93 +319,3308 @@
</message>
<message>
<source>Reindexing blocks on disk...</source>
- <translation>Reindexando bloques en el disco...</translation>
+ <translation>Reindexando bloques en disco...</translation>
</message>
<message>
<source>Send coins to a Bitcoin address</source>
- <translation>Envia monedas a una dirección Bitcoin</translation>
+ <translation>Enviar bitcoins a una dirección Bitcoin</translation>
</message>
<message>
<source>Backup wallet to another location</source>
- <translation>Crea una copia de seguridad de tu cartera en otra ubicación</translation>
+ <translation>Copia de seguridad del monedero en otra ubicación</translation>
+ </message>
+ <message>
+ <source>Change the passphrase used for wallet encryption</source>
+ <translation>Cambiar la contraseña utilizada para el cifrado del monedero</translation>
+ </message>
+ <message>
+ <source>&amp;Debug window</source>
+ <translation>&amp;Ventana de depuración</translation>
+ </message>
+ <message>
+ <source>Open debugging and diagnostic console</source>
+ <translation>Abrir la consola de depuración y diagnóstico</translation>
+ </message>
+ <message>
+ <source>&amp;Verify message...</source>
+ <translation>&amp;Verificar mensaje...</translation>
+ </message>
+ <message>
+ <source>Bitcoin</source>
+ <translation>Bitcoin</translation>
+ </message>
+ <message>
+ <source>Wallet</source>
+ <translation>Monedero</translation>
+ </message>
+ <message>
+ <source>&amp;Send</source>
+ <translation>&amp;Enviar</translation>
+ </message>
+ <message>
+ <source>&amp;Receive</source>
+ <translation>&amp;Recibir</translation>
+ </message>
+ <message>
+ <source>&amp;Show / Hide</source>
+ <translation>&amp;Mostrar / Ocultar</translation>
+ </message>
+ <message>
+ <source>Show or hide the main Window</source>
+ <translation>Mostrar u ocultar la ventana principal</translation>
+ </message>
+ <message>
+ <source>Encrypt the private keys that belong to your wallet</source>
+ <translation>Cifrar las claves privadas de su monedero</translation>
+ </message>
+ <message>
+ <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+ <translation>Firmar mensajes con sus direcciones Bitcoin para demostrar la propiedad</translation>
+ </message>
+ <message>
+ <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+ <translation>Verificar mensajes comprobando que están firmados con direcciones Bitcoin concretas</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Archivo</translation>
+ </message>
+ <message>
+ <source>&amp;Settings</source>
+ <translation>&amp;Configuración</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Ayuda</translation>
+ </message>
+ <message>
+ <source>Tabs toolbar</source>
+ <translation>Barra de pestañas</translation>
+ </message>
+ <message>
+ <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+ <translation>Solicitar pagos (generando códigos QR e identificadores URI "bitcoin:")</translation>
+ </message>
+ <message>
+ <source>Show the list of used sending addresses and labels</source>
+ <translation>Mostrar la lista de direcciones de envío y etiquetas</translation>
+ </message>
+ <message>
+ <source>Show the list of used receiving addresses and labels</source>
+ <translation>Muestra la lista de direcciones de recepción y etiquetas</translation>
+ </message>
+ <message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Abrir un identificador URI "bitcoin:" o una petición de pago</translation>
+ </message>
+ <message>
+ <source>&amp;Command-line options</source>
+ <translation>&amp;Opciones de consola de comandos</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n active connection(s) to Bitcoin network</source>
+ <translation><numerusform>%n conexión activa hacia la red Bitcoin</numerusform><numerusform>%n conexiones activas hacia la red Bitcoin</numerusform></translation>
+ </message>
+ <message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Indexando bloques en disco...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Procesando bloques en disco...</translation>
+ </message>
+ <message>
+ <source>No block source available...</source>
+ <translation>Ninguna fuente de bloques disponible ...</translation>
+ </message>
+ <message numerus="yes">
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>%n bloque procesado del historial de transacciones.</numerusform><numerusform>%n bloques procesados del historial de transacciones.</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 behind</source>
+ <translation>%1 atrás</translation>
+ </message>
+ <message>
+ <source>Last received block was generated %1 ago.</source>
+ <translation>El último bloque recibido fue generado hace %1.</translation>
+ </message>
+ <message>
+ <source>Transactions after this will not yet be visible.</source>
+ <translation>Las transacciones posteriores aún no están visibles.</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Error</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Aviso</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Información</translation>
+ </message>
+ <message>
+ <source>Up to date</source>
+ <translation>Actualizado</translation>
+ </message>
+ <message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Mostrar el mensaje de ayuda %1 para obtener una lista de los posibles comandos de linea de comandos de Bitcoin</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 cliente</translation>
+ </message>
+ <message>
+ <source>Catching up...</source>
+ <translation>Actualizando...</translation>
+ </message>
+ <message>
+ <source>Date: %1
+</source>
+ <translation>Fecha: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Amount: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tipo: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Etiqueta: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Dirección: %1
+</translation>
+ </message>
+ <message>
+ <source>Sent transaction</source>
+ <translation>Transacción enviada</translation>
+ </message>
+ <message>
+ <source>Incoming transaction</source>
+ <translation>Transacción entrante</translation>
+ </message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+ <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;desbloqueado&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+ <translation>El monedero está &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
- </context>
+ <message>
+ <source>Coin Selection</source>
+ <translation>Selección de la moneda</translation>
+ </message>
+ <message>
+ <source>Quantity:</source>
+ <translation>Cantidad:</translation>
+ </message>
+ <message>
+ <source>Bytes:</source>
+ <translation>Bytes:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Cuantía:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Tasa:</translation>
+ </message>
+ <message>
+ <source>Dust:</source>
+ <translation>Polvo:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Después de aplicar la comisión:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Cambio:</translation>
+ </message>
+ <message>
+ <source>(un)select all</source>
+ <translation>(des)marcar todos</translation>
+ </message>
+ <message>
+ <source>Tree mode</source>
+ <translation>Modo árbol</translation>
+ </message>
+ <message>
+ <source>List mode</source>
+ <translation>Modo lista</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>Received with label</source>
+ <translation>Recibido con etiqueta</translation>
+ </message>
+ <message>
+ <source>Received with address</source>
+ <translation>Recibido con dirección</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Confirmations</source>
+ <translation>Confirmaciones</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmado</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar ubicación</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacción</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloquear lo no gastado</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloquear lo no gastado</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar cuota</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar después de couta</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar polvo</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar cambio</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloqueado)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sí</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>no</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Esta etiqueta se vuelve roja si algún destinatario recibe una cantidad inferior a la actual puerta polvorienta.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Puede variar +/- %1 satoshi(s) por entrada.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>cambia desde %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(cambio)</translation>
+ </message>
+</context>
<context>
<name>EditAddressDialog</name>
<message>
+ <source>Edit Address</source>
+ <translation>Editar Dirección</translation>
+ </message>
+ <message>
<source>&amp;Label</source>
- <translation>Etiqueta</translation>
+ <translation>&amp;Etiqueta</translation>
+ </message>
+ <message>
+ <source>The label associated with this address list entry</source>
+ <translation>La etiqueta asociada con esta entrada de la lista de direcciones</translation>
+ </message>
+ <message>
+ <source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
+ <translation>La dirección asociada con esta entrada de la lista de direcciones. Solo puede ser modificada para direcciones de envío.</translation>
</message>
<message>
<source>&amp;Address</source>
- <translation>Dirección</translation>
+ <translation>&amp;Dirección</translation>
+ </message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nueva dirección de recivimiento</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nueva dirección de envío</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Editar dirección de recivimiento</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Editar dirección de envío</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>La dirección introducida "%1" no es una dirección Bitcoin válida.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>La dirección introducida "%1" está ya en la agenda.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Podría no desbloquear el monedero.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Falló la generación de la nueva clave.</translation>
</message>
</context>
<context>
<name>FreespaceChecker</name>
- </context>
+ <message>
+ <source>A new data directory will be created.</source>
+ <translation>Se creará un nuevo directorio de datos.</translation>
+ </message>
+ <message>
+ <source>name</source>
+ <translation>nombre</translation>
+ </message>
+ <message>
+ <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <translation>El directorio ya existe. Añada %1 si pretende crear aquí un directorio nuevo.</translation>
+ </message>
+ <message>
+ <source>Path already exists, and is not a directory.</source>
+ <translation>La ruta ya existe y no es un directorio.</translation>
+ </message>
+ <message>
+ <source>Cannot create data directory here.</source>
+ <translation>No se puede crear un directorio de datos aquí.</translation>
+ </message>
+</context>
<context>
<name>HelpMessageDialog</name>
- </context>
+ <message>
+ <source>version</source>
+ <translation>versión</translation>
+ </message>
+ <message>
+ <source>(%1-bit)</source>
+ <translation>(%1-bit)</translation>
+ </message>
+ <message>
+ <source>About %1</source>
+ <translation>Acerda de %1</translation>
+ </message>
+ <message>
+ <source>Command-line options</source>
+ <translation>Opciones de la línea de órdenes</translation>
+ </message>
+ <message>
+ <source>Usage:</source>
+ <translation>Uso:</translation>
+ </message>
+ <message>
+ <source>command-line options</source>
+ <translation>opciones de la consola de comandos</translation>
+ </message>
+ <message>
+ <source>UI Options:</source>
+ <translation>Opciones de interfaz de usuario:</translation>
+ </message>
+ <message>
+ <source>Choose data directory on startup (default: %u)</source>
+ <translation>Elegir directorio de datos al iniciar (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Set language, for example "de_DE" (default: system locale)</source>
+ <translation>Establecer el idioma, por ejemplo, "es_ES" (predeterminado: configuración regional del sistema)</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Arrancar minimizado</translation>
+ </message>
+ <message>
+ <source>Set SSL root certificates for payment request (default: -system-)</source>
+ <translation>Establecer los certificados raíz SSL para solicitudes de pago (predeterminado: -system-)</translation>
+ </message>
+ <message>
+ <source>Show splash screen on startup (default: %u)</source>
+ <translation>Mostrar pantalla de bienvenida en el inicio (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Reiniciar todos los ajustes modificados en el GUI</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
+ <message>
+ <source>Welcome</source>
+ <translation>Bienvenido</translation>
+ </message>
+ <message>
+ <source>Welcome to %1.</source>
+ <translation>Bienvenido a %1</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Al ser la primera vez que se ejecuta el programa, puede elegir donde %1 almacenara sus datos</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 va a descargar y almacenar una copia de la cadena de bloques de Bitcoin. Al menos %2GB de datos seran almacenados en este directorio, que ira creciendo con el tiempo. El monedero se guardara tambien en ese directorio. </translation>
+ </message>
+ <message>
+ <source>Use the default data directory</source>
+ <translation>Utilizar el directorio de datos predeterminado</translation>
+ </message>
+ <message>
+ <source>Use a custom data directory:</source>
+ <translation>Utilizar un directorio de datos personalizado:</translation>
+ </message>
+ <message>
+ <source>Error: Specified data directory "%1" cannot be created.</source>
+ <translation>Error: no ha podido crearse el directorio de datos especificado "%1".</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Error</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n GB of free space available</source>
+ <translation><numerusform>%n GB de espacio libre</numerusform><numerusform>%n GB de espacio disponible</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>(of %n GB needed)</source>
+ <translation><numerusform>(de %n GB necesitados)</numerusform><numerusform>(de %n GB requeridos)</numerusform></translation>
+ </message>
+</context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora del último bloque</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ocultar</translation>
+ </message>
</context>
<context>
<name>OpenURIDialog</name>
- </context>
+ <message>
+ <source>Open URI</source>
+ <translation>Abrir URI...</translation>
+ </message>
+ <message>
+ <source>Open payment request from URI or file</source>
+ <translation>Abrir solicitud de pago a partir de un identificador URI o de un archivo</translation>
+ </message>
+ <message>
+ <source>URI:</source>
+ <translation>URI:</translation>
+ </message>
+ <message>
+ <source>Select payment request file</source>
+ <translation>Seleccionar archivo de sulicitud de pago</translation>
+ </message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Seleccionar el archivo de solicitud de pago para abrir</translation>
+ </message>
+</context>
<context>
<name>OptionsDialog</name>
- </context>
+ <message>
+ <source>Options</source>
+ <translation>Opciones</translation>
+ </message>
+ <message>
+ <source>&amp;Main</source>
+ <translation>&amp;Principal</translation>
+ </message>
+ <message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Iniciar automaticamente %1 al encender el sistema.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Iniciar %1 al iniciar el sistema</translation>
+ </message>
+ <message>
+ <source>Size of &amp;database cache</source>
+ <translation>Tamaño de cache de la &amp;base de datos</translation>
+ </message>
+ <message>
+ <source>MB</source>
+ <translation>MB</translation>
+ </message>
+ <message>
+ <source>Number of script &amp;verification threads</source>
+ <translation>Número de hilos de &amp;verificación de scripts</translation>
+ </message>
+ <message>
+ <source>Accept connections from outside</source>
+ <translation>Aceptar conexiones desde el exterior</translation>
+ </message>
+ <message>
+ <source>Allow incoming connections</source>
+ <translation>Aceptar conexiones entrantes</translation>
+ </message>
+ <message>
+ <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+ <translation>Dirección IP del proxy (p. ej. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+ </message>
+ <message>
+ <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source>
+ <translation>Minimizar en lugar de salir de la aplicación cuando la ventana está cerrada. Cuando se activa esta opción, la aplicación sólo se cerrará después de seleccionar Salir en el menú.</translation>
+ </message>
+ <message>
+ <source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
+ <translation>Identificadores URL de terceros (por ejemplo, un explorador de bloques) que aparecen en la pestaña de transacciones como elementos del menú contextual. El %s en la URL es reemplazado por el valor hash de la transacción. Se pueden separar URL múltiples por una barra vertical |.</translation>
+ </message>
+ <message>
+ <source>Third party transaction URLs</source>
+ <translation>Identificadores URL de transacciones de terceros</translation>
+ </message>
+ <message>
+ <source>Active command-line options that override above options:</source>
+ <translation>Opciones activas de consola de comandos que tienen preferencia sobre las opciones anteriores:</translation>
+ </message>
+ <message>
+ <source>Reset all client options to default.</source>
+ <translation>Restablecer todas las opciones predeterminadas del cliente.</translation>
+ </message>
+ <message>
+ <source>&amp;Reset Options</source>
+ <translation>&amp;Restablecer opciones</translation>
+ </message>
+ <message>
+ <source>&amp;Network</source>
+ <translation>&amp;Red</translation>
+ </message>
+ <message>
+ <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+ <translation>(0 = automático, &lt;0 = dejar libres ese número de núcleos)</translation>
+ </message>
+ <message>
+ <source>W&amp;allet</source>
+ <translation>&amp;Monedero</translation>
+ </message>
+ <message>
+ <source>Expert</source>
+ <translation>Experto</translation>
+ </message>
+ <message>
+ <source>Enable coin &amp;control features</source>
+ <translation>Habilitar funcionalidad de &amp;coin control</translation>
+ </message>
+ <message>
+ <source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
+ <translation>Si desactiva el gasto del cambio no confirmado, no se podrá usar el cambio de una transacción hasta que se alcance al menos una confirmación. Esto afecta también a cómo se calcula su saldo.</translation>
+ </message>
+ <message>
+ <source>&amp;Spend unconfirmed change</source>
+ <translation>&amp;Gastar cambio no confirmado</translation>
+ </message>
+ <message>
+ <source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
+ <translation>Abrir automáticamente el puerto del cliente Bitcoin en el router. Esta opción solo funciona si el router admite UPnP y está activado.</translation>
+ </message>
+ <message>
+ <source>Map port using &amp;UPnP</source>
+ <translation>Mapear el puerto mediante &amp;UPnP</translation>
+ </message>
+ <message>
+ <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+ <translation>Conectarse a la red Bitcoin a través de un proxy SOCKS5.</translation>
+ </message>
+ <message>
+ <source>&amp;Connect through SOCKS5 proxy (default proxy):</source>
+ <translation>&amp;Conectarse a través de proxy SOCKS5 (proxy predeterminado):</translation>
+ </message>
+ <message>
+ <source>Proxy &amp;IP:</source>
+ <translation>Dirección &amp;IP del proxy:</translation>
+ </message>
+ <message>
+ <source>&amp;Port:</source>
+ <translation>&amp;Puerto:</translation>
+ </message>
+ <message>
+ <source>Port of the proxy (e.g. 9050)</source>
+ <translation>Puerto del servidor proxy (ej. 9050)</translation>
+ </message>
+ <message>
+ <source>Used for reaching peers via:</source>
+ <translation>Usado para alcanzar compañeros via:</translation>
+ </message>
+ <message>
+ <source>Shows, if the supplied default SOCKS5 proxy is used to reach peers via this network type.</source>
+ <translation>Muestra si el proxy SOCKS5 predeterminado es utilizado para llegar a los pares a traves de este tipo de red.</translation>
+ </message>
+ <message>
+ <source>IPv4</source>
+ <translation>IPv4</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
+ <source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services.</source>
+ <translation>Conectar a la red Bitcoin mediante un proxy SOCKS5 por separado para los servicios ocultos de Tor.</translation>
+ </message>
+ <message>
+ <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source>
+ <translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima:</translation>
+ </message>
+ <message>
+ <source>&amp;Window</source>
+ <translation>&amp;Ventana</translation>
+ </message>
+ <message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>&amp;Ocultar el icono de la barra de tareas</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Ocultar barra de tareas</translation>
+ </message>
+ <message>
+ <source>Show only a tray icon after minimizing the window.</source>
+ <translation>Minimizar la ventana a la bandeja de iconos del sistema.</translation>
+ </message>
+ <message>
+ <source>&amp;Minimize to the tray instead of the taskbar</source>
+ <translation>&amp;Minimizar a la bandeja en vez de a la barra de tareas</translation>
+ </message>
+ <message>
+ <source>M&amp;inimize on close</source>
+ <translation>M&amp;inimizar al cerrar</translation>
+ </message>
+ <message>
+ <source>&amp;Display</source>
+ <translation>&amp;Interfaz</translation>
+ </message>
+ <message>
+ <source>User Interface &amp;language:</source>
+ <translation>I&amp;dioma de la interfaz de usuario</translation>
+ </message>
+ <message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>El idioma de la interfaz de usuario puede establecerse aquí. Esta configuración tendrá efecto tras reiniciar %1.</translation>
+ </message>
+ <message>
+ <source>&amp;Unit to show amounts in:</source>
+ <translation>Mostrar las cantidades en la &amp;unidad:</translation>
+ </message>
+ <message>
+ <source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
+ <translation>Elegir la subdivisión predeterminada para mostrar cantidades en la interfaz y cuando se envían bitcoins.</translation>
+ </message>
+ <message>
+ <source>Whether to show coin control features or not.</source>
+ <translation>Mostrar o no funcionalidad de Coin Control</translation>
+ </message>
+ <message>
+ <source>&amp;OK</source>
+ <translation>&amp;Aceptar</translation>
+ </message>
+ <message>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Cancelar</translation>
+ </message>
+ <message>
+ <source>default</source>
+ <translation>predeterminado</translation>
+ </message>
+ <message>
+ <source>none</source>
+ <translation>ninguna</translation>
+ </message>
+ <message>
+ <source>Confirm options reset</source>
+ <translation>Confirme el restablecimiento de las opciones</translation>
+ </message>
+ <message>
+ <source>Client restart required to activate changes.</source>
+ <translation>Se necesita reiniciar el cliente para activar los cambios.</translation>
+ </message>
+ <message>
+ <source>Client will be shut down. Do you want to proceed?</source>
+ <translation>El cliente se cerrará. ¿Desea continuar?</translation>
+ </message>
+ <message>
+ <source>This change would require a client restart.</source>
+ <translation>Este cambio exige el reinicio del cliente.</translation>
+ </message>
+ <message>
+ <source>The supplied proxy address is invalid.</source>
+ <translation>La dirección proxy indicada es inválida.</translation>
+ </message>
+</context>
<context>
<name>OverviewPage</name>
- </context>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ <message>
+ <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
+ <translation>La información mostrada puede estar desactualizada. Su monedero se sincroniza automáticamente con la red Bitcoin después de que se haya establecido una conexión, pero este proceso aún no se ha completado.</translation>
+ </message>
+ <message>
+ <source>Watch-only:</source>
+ <translation>De observación:</translation>
+ </message>
+ <message>
+ <source>Available:</source>
+ <translation>Disponible:</translation>
+ </message>
+ <message>
+ <source>Your current spendable balance</source>
+ <translation>Su saldo disponible actual</translation>
+ </message>
+ <message>
+ <source>Pending:</source>
+ <translation>Pendiente:</translation>
+ </message>
+ <message>
+ <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
+ <translation>Total de transacciones pendientes de confirmar y que aún no contribuye al saldo disponible</translation>
+ </message>
+ <message>
+ <source>Immature:</source>
+ <translation>No madurado:</translation>
+ </message>
+ <message>
+ <source>Mined balance that has not yet matured</source>
+ <translation>Saldo recién minado que aún no ha madurado.</translation>
+ </message>
+ <message>
+ <source>Balances</source>
+ <translation>Saldos</translation>
+ </message>
+ <message>
+ <source>Total:</source>
+ <translation>Total:</translation>
+ </message>
+ <message>
+ <source>Your current total balance</source>
+ <translation>Su saldo actual total</translation>
+ </message>
+ <message>
+ <source>Your current balance in watch-only addresses</source>
+ <translation>Su saldo actual en direcciones watch-only</translation>
+ </message>
+ <message>
+ <source>Spendable:</source>
+ <translation>Gastable:</translation>
+ </message>
+ <message>
+ <source>Recent transactions</source>
+ <translation>Transacciones recientes</translation>
+ </message>
+ <message>
+ <source>Unconfirmed transactions to watch-only addresses</source>
+ <translation>Transacciones sin confirmar en direcciones watch-only</translation>
+ </message>
+ <message>
+ <source>Mined balance in watch-only addresses that has not yet matured</source>
+ <translation>Saldo minado en direcciones watch-only que aún no ha madurado</translation>
+ </message>
+ <message>
+ <source>Current total balance in watch-only addresses</source>
+ <translation>Saldo total en las direcciones watch-only</translation>
+ </message>
+</context>
+<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Fallo en la solicitud de pago</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>No se puede iniciar bitcoin: encargado click-para-pagar</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Manejo de URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>La búsqueda de solicitud de pago URL es válida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Dirección de pago inválida %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI no puede ser analizado! Esto puede ser causado por una dirección Bitcoin inválida o parametros URI mal formados.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Manejo del archivo de solicitud de pago</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>¡El archivo de solicitud de pago no puede ser leído! Esto puede ser causado por un archivo de solicitud de pago inválido.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Solicitud de pago rechazada</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>La red de solicitud de pago no cimbina la red cliente.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Solicitud de pago caducada.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La solicitud de pago no se ha iniciado.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Solicitudes de pago sin verificar a scripts de pago habitual no se soportan.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Solicitud de pago inválida.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Cantidad de pago solicitada de %1 es demasiado pequeña (considerado polvo).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reembolsar desde %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Solicitud de pago de %1 es demasiado grande (%2 bytes, permitidos %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Fallo al comunicar con %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>¡La solicitud de pago no puede ser analizada!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mala respuesta desde el servidor %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Fallo de solicitud de red</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pago declarado</translation>
+ </message>
+</context>
<context>
<name>PeerTableModel</name>
+ <message>
+ <source>User Agent</source>
+ <translation>User Agent</translation>
+ </message>
+ <message>
+ <source>Node/Service</source>
+ <translation>Nodo/Servicio</translation>
+ </message>
</context>
<context>
<name>QObject</name>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>Enter a Bitcoin address (e.g. %1)</source>
+ <translation>Introducir una dirección Bitcoin (p. ej. %1)</translation>
+ </message>
+ <message>
+ <source>%1 d</source>
+ <translation>%1 d</translation>
+ </message>
+ <message>
+ <source>%1 h</source>
+ <translation>%1 h</translation>
+ </message>
+ <message>
+ <source>%1 m</source>
+ <translation>%1 m</translation>
+ </message>
+ <message>
+ <source>%1 s</source>
+ <translation>%1 s</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation>Ninguno</translation>
+ </message>
+ <message>
+ <source>N/A</source>
+ <translation>N/D</translation>
+ </message>
+ <message>
+ <source>%1 ms</source>
+ <translation>%1 ms</translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 y %2</translation>
+ </message>
</context>
<context>
- <name>RPCConsole</name>
+ <name>QObject::QObject</name>
</context>
<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Guardar imagen...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copiar imagen</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Guardar código QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imagen PNG (*.png)</translation>
+ </message>
+</context>
+<context>
+ <name>RPCConsole</name>
+ <message>
+ <source>N/A</source>
+ <translation>N/D</translation>
+ </message>
+ <message>
+ <source>Client version</source>
+ <translation>Versión del cliente</translation>
+ </message>
+ <message>
+ <source>&amp;Information</source>
+ <translation>&amp;Información</translation>
+ </message>
+ <message>
+ <source>Debug window</source>
+ <translation>Ventana de depuración</translation>
+ </message>
+ <message>
+ <source>General</source>
+ <translation>General</translation>
+ </message>
+ <message>
+ <source>Using BerkeleyDB version</source>
+ <translation>Utilizando la versión de BerkeleyDB</translation>
+ </message>
+ <message>
+ <source>Datadir</source>
+ <translation>Datadir</translation>
+ </message>
+ <message>
+ <source>Startup time</source>
+ <translation>Hora de inicio</translation>
+ </message>
+ <message>
+ <source>Network</source>
+ <translation>Red</translation>
+ </message>
+ <message>
+ <source>Name</source>
+ <translation>Nombre</translation>
+ </message>
+ <message>
+ <source>Number of connections</source>
+ <translation>Número de conexiones</translation>
+ </message>
+ <message>
+ <source>Block chain</source>
+ <translation>Cadena de bloques</translation>
+ </message>
+ <message>
+ <source>Current number of blocks</source>
+ <translation>Número actual de bloques</translation>
+ </message>
+ <message>
+ <source>Memory Pool</source>
+ <translation>Piscina de Memoria</translation>
+ </message>
+ <message>
+ <source>Current number of transactions</source>
+ <translation>Número actual de transacciones</translation>
+ </message>
+ <message>
+ <source>Memory usage</source>
+ <translation>Uso de memoria</translation>
+ </message>
+ <message>
+ <source>Received</source>
+ <translation>Recibido</translation>
+ </message>
+ <message>
+ <source>Sent</source>
+ <translation>Enviado</translation>
+ </message>
+ <message>
+ <source>&amp;Peers</source>
+ <translation>&amp;Pares</translation>
+ </message>
+ <message>
+ <source>Banned peers</source>
+ <translation>Peers Bloqueados</translation>
+ </message>
+ <message>
+ <source>Select a peer to view detailed information.</source>
+ <translation>Seleccionar un par para ver su información detallada.</translation>
+ </message>
+ <message>
+ <source>Whitelisted</source>
+ <translation>En la lista blanca</translation>
+ </message>
+ <message>
+ <source>Direction</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation>Versión</translation>
+ </message>
+ <message>
+ <source>Starting Block</source>
+ <translation>Importando bloques...</translation>
+ </message>
+ <message>
+ <source>Synced Headers</source>
+ <translation>Sincronizar Cabeceras</translation>
+ </message>
+ <message>
+ <source>Synced Blocks</source>
+ <translation>Bloques Sincronizados</translation>
+ </message>
+ <message>
+ <source>User Agent</source>
+ <translation>User Agent</translation>
+ </message>
+ <message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>Abrir el archivo de depuración %1 desde el directorio de datos actual. Puede tardar unos segundos para ficheros de gran tamaño.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>Disminuir tamaño de letra</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Aumentar tamaño de letra</translation>
+ </message>
+ <message>
+ <source>Services</source>
+ <translation>Servicios</translation>
+ </message>
+ <message>
+ <source>Ban Score</source>
+ <translation>Puntuación de bloqueo</translation>
+ </message>
+ <message>
+ <source>Connection Time</source>
+ <translation>Duración de la conexión</translation>
+ </message>
+ <message>
+ <source>Last Send</source>
+ <translation>Ultimo envío</translation>
+ </message>
+ <message>
+ <source>Last Receive</source>
+ <translation>Ultima recepción</translation>
+ </message>
+ <message>
+ <source>Ping Time</source>
+ <translation>Ping</translation>
+ </message>
+ <message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>La duración de un ping actualmente en proceso.</translation>
+ </message>
+ <message>
+ <source>Ping Wait</source>
+ <translation>Espera de Ping</translation>
+ </message>
+ <message>
+ <source>Time Offset</source>
+ <translation>Desplazamiento de tiempo</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora del último bloque</translation>
+ </message>
+ <message>
+ <source>&amp;Open</source>
+ <translation>&amp;Abrir</translation>
+ </message>
+ <message>
+ <source>&amp;Console</source>
+ <translation>&amp;Consola</translation>
+ </message>
+ <message>
+ <source>&amp;Network Traffic</source>
+ <translation>&amp;Tráfico de Red</translation>
+ </message>
+ <message>
+ <source>&amp;Clear</source>
+ <translation>&amp;Vaciar</translation>
+ </message>
+ <message>
+ <source>Totals</source>
+ <translation>Total:</translation>
+ </message>
+ <message>
+ <source>In:</source>
+ <translation>Entrante:</translation>
+ </message>
+ <message>
+ <source>Out:</source>
+ <translation>Saliente:</translation>
+ </message>
+ <message>
+ <source>Debug log file</source>
+ <translation>Archivo de registro de depuración</translation>
+ </message>
+ <message>
+ <source>Clear console</source>
+ <translation>Borrar consola</translation>
+ </message>
+ <message>
+ <source>1 &amp;hour</source>
+ <translation>1 &amp;hora</translation>
+ </message>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1 &amp;día</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1 &amp;semana</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1 &amp;año</translation>
+ </message>
+ <message>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>Bienvenido a la consola RPC %1.</translation>
+ </message>
+ <message>
+ <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
+ <translation>Use las flechas arriba y abajo para navegar por el historial y &lt;b&gt;Control+L&lt;/b&gt; para vaciar la pantalla.</translation>
+ </message>
+ <message>
+ <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+ <translation>Escriba &lt;b&gt;help&lt;/b&gt; para ver un resumen de los comandos disponibles.</translation>
+ </message>
+ <message>
+ <source>%1 B</source>
+ <translation>%1 B</translation>
+ </message>
+ <message>
+ <source>%1 KB</source>
+ <translation>%1 KB</translation>
+ </message>
+ <message>
+ <source>%1 MB</source>
+ <translation>%1 MB</translation>
+ </message>
+ <message>
+ <source>%1 GB</source>
+ <translation>%1 GB</translation>
+ </message>
+ <message>
+ <source>(node id: %1)</source>
+ <translation>(nodo: %1)</translation>
+ </message>
+ <message>
+ <source>via %1</source>
+ <translation>via %1</translation>
+ </message>
+ <message>
+ <source>never</source>
+ <translation>nunca</translation>
+ </message>
+ <message>
+ <source>Inbound</source>
+ <translation>Entrante</translation>
+ </message>
+ <message>
+ <source>Outbound</source>
+ <translation>Saliente</translation>
+ </message>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>No</translation>
+ </message>
+ <message>
+ <source>Unknown</source>
+ <translation>Desconocido</translation>
+ </message>
+</context>
+<context>
<name>ReceiveCoinsDialog</name>
- </context>
+ <message>
+ <source>&amp;Amount:</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>&amp;Label:</source>
+ <translation>&amp;Etiqueta:</translation>
+ </message>
+ <message>
+ <source>&amp;Message:</source>
+ <translation>Mensaje:</translation>
+ </message>
+ <message>
+ <source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
+ <translation>Reutilizar una de las direcciones previamente usadas para recibir. Reutilizar direcciones tiene problemas de seguridad y privacidad. No lo uses a menos que antes regeneres una solicitud de pago.</translation>
+ </message>
+ <message>
+ <source>R&amp;euse an existing receiving address (not recommended)</source>
+ <translation>R&amp;eutilizar una dirección existente para recibir (no recomendado)</translation>
+ </message>
+ <message>
+ <source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+ <translation>Un mensaje opcional para adjuntar a la solicitud de pago, que se muestra cuando se abre la solicitud. Nota: El mensaje no se enviará con el pago por la red Bitcoin.</translation>
+ </message>
+ <message>
+ <source>An optional label to associate with the new receiving address.</source>
+ <translation>Etiqueta opcional para asociar con la nueva dirección de recepción.</translation>
+ </message>
+ <message>
+ <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+ <translation>Utilice este formulario para solicitar pagos. Todos los campos son &lt;b&gt;opcionales&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+ <translation>Para solicitar una cantidad opcional. Deje este vacío o cero para no solicitar una cantidad específica.</translation>
+ </message>
+ <message>
+ <source>Clear all fields of the form.</source>
+ <translation>Vaciar todos los campos del formulario.</translation>
+ </message>
+ <message>
+ <source>Clear</source>
+ <translation>Vaciar</translation>
+ </message>
+ <message>
+ <source>Requested payments history</source>
+ <translation>Historial de pagos solicitados</translation>
+ </message>
+ <message>
+ <source>&amp;Request payment</source>
+ <translation>&amp;Solicitar pago</translation>
+ </message>
+ <message>
+ <source>Show the selected request (does the same as double clicking an entry)</source>
+ <translation>Muestra la petición seleccionada (También doble clic)</translation>
+ </message>
+ <message>
+ <source>Show</source>
+ <translation>Mostrar</translation>
+ </message>
+ <message>
+ <source>Remove the selected entries from the list</source>
+ <translation>Borrar de la lista las direcciónes actualmente seleccionadas</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Eliminar</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar capa</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copiar imagen</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
+ <source>QR Code</source>
+ <translation>Código QR</translation>
+ </message>
+ <message>
+ <source>Copy &amp;URI</source>
+ <translation>Copiar &amp;URI</translation>
+ </message>
+ <message>
<source>Copy &amp;Address</source>
- <translation>&amp;Copiar Direccón</translation>
+ <translation>Copiar &amp;Dirección</translation>
</message>
- </context>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>Guardar Imagen...</translation>
+ </message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Solicitar pago a %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Información de pago</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultante demasiado grande, trate de reducir el texto de etiqueta / mensaje.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Fallo al codificar URI en código QR.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(no hay mensaje)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(no hay solicitud de cantidad)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Solicitado</translation>
+ </message>
+</context>
<context>
<name>SendCoinsDialog</name>
- </context>
+ <message>
+ <source>Send Coins</source>
+ <translation>Enviar bitcoins</translation>
+ </message>
+ <message>
+ <source>Coin Control Features</source>
+ <translation>Características de Coin Control</translation>
+ </message>
+ <message>
+ <source>Inputs...</source>
+ <translation>Entradas...</translation>
+ </message>
+ <message>
+ <source>automatically selected</source>
+ <translation>Seleccionado automáticamente</translation>
+ </message>
+ <message>
+ <source>Insufficient funds!</source>
+ <translation>Fondos insuficientes!</translation>
+ </message>
+ <message>
+ <source>Quantity:</source>
+ <translation>Cantidad:</translation>
+ </message>
+ <message>
+ <source>Bytes:</source>
+ <translation>Bytes:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Cuantía:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Tasa:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Después de tasas:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Cambio:</translation>
+ </message>
+ <message>
+ <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
+ <translation>Si se marca esta opción pero la dirección de cambio está vacía o es inválida, el cambio se enviará a una nueva dirección recién generada.</translation>
+ </message>
+ <message>
+ <source>Custom change address</source>
+ <translation>Dirección propia</translation>
+ </message>
+ <message>
+ <source>Transaction Fee:</source>
+ <translation>Comisión de Transacción:</translation>
+ </message>
+ <message>
+ <source>Choose...</source>
+ <translation>Elija...</translation>
+ </message>
+ <message>
+ <source>collapse fee-settings</source>
+ <translation>Colapsar ajustes de cuota</translation>
+ </message>
+ <message>
+ <source>per kilobyte</source>
+ <translation>por kilobyte</translation>
+ </message>
+ <message>
+ <source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
+ <translation>Si la tarifa de aduana se establece en 1000 satoshis y la transacción está a sólo 250 bytes, entonces "por kilobyte" sólo paga 250 satoshis de cuota, mientras que "el mínimo total" pagaría 1.000 satoshis. Para las transacciones más grandes que un kilobyte ambos pagan por kilobyte</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ocultar</translation>
+ </message>
+ <message>
+ <source>total at least</source>
+ <translation>total por lo menos</translation>
+ </message>
+ <message>
+ <source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+ <translation>Pagando solamente la cuota mínima es correcto, siempre y cuando haya menos volumen de transacciones que el espacio en los bloques. Pero tenga en cuenta que esto puede terminar en una transacción nunca confirmada, una vez que haya más demanda para transacciones Bitcoin que la red pueda procesar.</translation>
+ </message>
+ <message>
+ <source>(read the tooltip)</source>
+ <translation>(leer la sugerencia)</translation>
+ </message>
+ <message>
+ <source>Recommended:</source>
+ <translation>Recomendado:</translation>
+ </message>
+ <message>
+ <source>Custom:</source>
+ <translation>Personalizado:</translation>
+ </message>
+ <message>
+ <source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+ <translation>(Tarifa inteligente no inicializado aún. Esto generalmente lleva a pocos bloques...)</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>normal</translation>
+ </message>
+ <message>
+ <source>fast</source>
+ <translation>rápido</translation>
+ </message>
+ <message>
+ <source>Send to multiple recipients at once</source>
+ <translation>Enviar a múltiples destinatarios de una vez</translation>
+ </message>
+ <message>
+ <source>Add &amp;Recipient</source>
+ <translation>Añadir &amp;destinatario</translation>
+ </message>
+ <message>
+ <source>Clear all fields of the form.</source>
+ <translation>Vaciar todos los campos del formulario</translation>
+ </message>
+ <message>
+ <source>Dust:</source>
+ <translation>Polvo:</translation>
+ </message>
+ <message>
+ <source>Clear &amp;All</source>
+ <translation>Vaciar &amp;todo</translation>
+ </message>
+ <message>
+ <source>Balance:</source>
+ <translation>Saldo:</translation>
+ </message>
+ <message>
+ <source>Confirm the send action</source>
+ <translation>Confirmar el envío</translation>
+ </message>
+ <message>
+ <source>S&amp;end</source>
+ <translation>&amp;Enviar</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar cuota</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar después de couta</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar polvo</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar cambio</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>¿Seguro que quiere enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>añadido como transacción de cuota</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Cantidad total %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>o</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirmar enviar monedas</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>La dirección de destinatario no es válida. Por favor revísela.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>La cantidad a pagar debe de ser mayor que 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>La cantidad excede su saldo.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>El total excede su saldo cuando la cuota de transacción de %1 es incluida.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Dirección duplicada encontrada: la dirección sólo debería ser utilizada una vez por cada uso.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>¡Falló la creación de transacción!</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Una couta mayor que %1 se considera una cuota irracionalmente alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Solicitud de pago caducada.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Pagar únicamente la cuota solicitada de %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Alerta: dirección Bitcoin inválida</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Alerta: dirección cambiada desconocida</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+</context>
<context>
<name>SendCoinsEntry</name>
- </context>
+ <message>
+ <source>A&amp;mount:</source>
+ <translation>Ca&amp;ntidad:</translation>
+ </message>
+ <message>
+ <source>Pay &amp;To:</source>
+ <translation>&amp;Pagar a:</translation>
+ </message>
+ <message>
+ <source>&amp;Label:</source>
+ <translation>&amp;Etiqueta:</translation>
+ </message>
+ <message>
+ <source>Choose previously used address</source>
+ <translation>Escoger direcciones previamente usadas</translation>
+ </message>
+ <message>
+ <source>This is a normal payment.</source>
+ <translation>Esto es un pago ordinario.</translation>
+ </message>
+ <message>
+ <source>The Bitcoin address to send the payment to</source>
+ <translation>Dirección Bitcoin a la que enviar el pago</translation>
+ </message>
+ <message>
+ <source>Alt+A</source>
+ <translation>Alt+A</translation>
+ </message>
+ <message>
+ <source>Paste address from clipboard</source>
+ <translation>Pegar dirección desde portapapeles</translation>
+ </message>
+ <message>
+ <source>Alt+P</source>
+ <translation>Alt+P</translation>
+ </message>
+ <message>
+ <source>Remove this entry</source>
+ <translation>Eliminar esta transacción</translation>
+ </message>
+ <message>
+ <source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
+ <translation>La cuota será deducida de la cantidad que sea mandada. El destinatario recibirá menos bitcoins de los que entres en el </translation>
+ </message>
+ <message>
+ <source>S&amp;ubtract fee from amount</source>
+ <translation>Restar comisiones a la cantidad</translation>
+ </message>
+ <message>
+ <source>Message:</source>
+ <translation>Mensaje:</translation>
+ </message>
+ <message>
+ <source>This is an unauthenticated payment request.</source>
+ <translation>Esta es una petición de pago no autentificada.</translation>
+ </message>
+ <message>
+ <source>This is an authenticated payment request.</source>
+ <translation>Esta es una petición de pago autentificada.</translation>
+ </message>
+ <message>
+ <source>Enter a label for this address to add it to the list of used addresses</source>
+ <translation>Introduce una etiqueta para esta dirección para añadirla a la lista de direcciones utilizadas</translation>
+ </message>
+ <message>
+ <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+ <translation>Un mensaje que se adjuntó a la bitcoin: URL que será almacenada con la transacción para su referencia. Nota: Este mensaje no se envía a través de la red Bitcoin.</translation>
+ </message>
+ <message>
+ <source>Pay To:</source>
+ <translation>Paga a:</translation>
+ </message>
+ <message>
+ <source>Memo:</source>
+ <translation>Memo:</translation>
+ </message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Introduzca una etiqueta para esta dirección para añadirla a su agenda</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sí</translation>
+ </message>
+</context>
<context>
<name>ShutdownWindow</name>
- </context>
+ <message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 se esta cerrando...</translation>
+ </message>
+ <message>
+ <source>Do not shut down the computer until this window disappears.</source>
+ <translation>No apague el equipo hasta que desaparezca esta ventana.</translation>
+ </message>
+</context>
<context>
<name>SignVerifyMessageDialog</name>
- </context>
+ <message>
+ <source>Signatures - Sign / Verify a Message</source>
+ <translation>Firmas - Firmar / verificar un mensaje</translation>
+ </message>
+ <message>
+ <source>&amp;Sign Message</source>
+ <translation>&amp;Firmar mensaje</translation>
+ </message>
+ <message>
+ <source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+ <translation>Puede firmar los mensajes con sus direcciones para demostrar que las posee. Tenga cuidado de no firmar cualquier cosa de manera vaga o aleatoria, pues los ataques de phishing pueden tratar de engañarle firmando su identidad a través de ellos. Sólo firme declaraciones totalmente detalladas con las que usted esté de acuerdo.</translation>
+ </message>
+ <message>
+ <source>The Bitcoin address to sign the message with</source>
+ <translation>Dirección Bitcoin con la que firmar el mensaje</translation>
+ </message>
+ <message>
+ <source>Choose previously used address</source>
+ <translation>Escoger dirección previamente usada</translation>
+ </message>
+ <message>
+ <source>Alt+A</source>
+ <translation>Alt+A</translation>
+ </message>
+ <message>
+ <source>Paste address from clipboard</source>
+ <translation>Pegar dirección desde portapapeles</translation>
+ </message>
+ <message>
+ <source>Alt+P</source>
+ <translation>Alt+P</translation>
+ </message>
+ <message>
+ <source>Enter the message you want to sign here</source>
+ <translation>Introduzca el mensaje que desea firmar aquí</translation>
+ </message>
+ <message>
+ <source>Signature</source>
+ <translation>Firma</translation>
+ </message>
+ <message>
+ <source>Copy the current signature to the system clipboard</source>
+ <translation>Copiar la firma actual al portapapeles del sistema</translation>
+ </message>
+ <message>
+ <source>Sign the message to prove you own this Bitcoin address</source>
+ <translation>Firmar el mensaje para demostrar que se posee esta dirección Bitcoin</translation>
+ </message>
+ <message>
+ <source>Sign &amp;Message</source>
+ <translation>Firmar &amp;mensaje</translation>
+ </message>
+ <message>
+ <source>Reset all sign message fields</source>
+ <translation>Vaciar todos los campos de la firma de mensaje</translation>
+ </message>
+ <message>
+ <source>Clear &amp;All</source>
+ <translation>Vaciar &amp;todo</translation>
+ </message>
+ <message>
+ <source>&amp;Verify Message</source>
+ <translation>&amp;Verificar mensaje</translation>
+ </message>
+ <message>
+ <source>Enter the receiver's 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. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source>
+ <translation>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. </translation>
+ </message>
+ <message>
+ <source>The Bitcoin address the message was signed with</source>
+ <translation>La dirección Bitcoin con la que se firmó el mensaje</translation>
+ </message>
+ <message>
+ <source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
+ <translation>Verificar el mensaje para comprobar que fue firmado con la dirección Bitcoin indicada</translation>
+ </message>
+ <message>
+ <source>Verify &amp;Message</source>
+ <translation>Verificar &amp;mensaje</translation>
+ </message>
+ <message>
+ <source>Reset all verify message fields</source>
+ <translation>Vaciar todos los campos de la verificación de mensaje</translation>
+ </message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Click en "Fírmar mensaje" para generar una firma</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>La dirección introducida no es válida.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Por favor revise la dirección e inténtelo de nuevo.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>La dirección introducida no remite a una clave.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>El desbloqueo del monedero fue cancelado.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clave privada de la dirección introducida no está disponible.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Falló la firma del mensaje.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Mensaje firmado.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La firma no pudo descodificarse.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Por favor compruebe la firma y pruebe de nuevo.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La firma no se combinó con el mensaje.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Falló la verificación del mensaje.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Mensaje verificado.</translation>
+ </message>
+</context>
<context>
<name>SplashScreen</name>
- </context>
+ <message>
+ <source>[testnet]</source>
+ <translation>[testnet]</translation>
+ </message>
+</context>
<context>
<name>TrafficGraphWidget</name>
- </context>
+ <message>
+ <source>KB/s</source>
+ <translation>KB/s</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Abierto hasta %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>Hay un conflicto con la traducción de las confirmaciones %1</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/sin conexión</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/no confirmado, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>en el equipo de memoria</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>no en el equipo de memoria</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>abandonado</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/no confirmado</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>confirmaciones %1</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Estado</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, no ha sido emitido con éxito aún</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Fuente</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Generado</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Desde</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconocido</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Para</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>dirección propia</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>de observación</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etiqueta</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Credito</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>no aceptada</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Enviado</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Total enviado</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Total recibido</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Comisión de transacción</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Cantidad neta</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensaje</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentario</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Identificador de transacción (ID)</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Indice de salida</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Vendedor</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Los bitcoins generados deben madurar %1 bloques antes de que puedan gastarse. Cuando generó este bloque, se transmitió a la red para que se añadiera a la cadena de bloques. Si no consigue entrar en la cadena, su estado cambiará a "no aceptado" y ya no se podrá gastar. Esto puede ocurrir ocasionalmente si otro nodo genera un bloque a pocos segundos del suyo.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Información de depuración</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transacción</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>entradas</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantidad</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>verdadero</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>falso</translation>
+ </message>
+</context>
<context>
<name>TransactionDescDialog</name>
- </context>
+ <message>
+ <source>This pane shows a detailed description of the transaction</source>
+ <translation>Esta ventana muestra información detallada sobre la transacción</translation>
+ </message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Detalles para %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Abierto hasta %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Sin conexion</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Sin confirmar</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonado</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmando (%1 de %2 confirmaciones recomendadas)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmado (%1 confirmaciones)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflicto</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>No disponible (%1 confirmaciones. Estarán disponibles al cabo de %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Este bloque no ha sido recibido por otros nodos y probablemente no sea aceptado!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Generado pero no aceptado</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recibido con</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Recibidos de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado a</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pago proprio</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minado</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>de observación</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(nd)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sin etiqueta)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Estado de transacción. Pasa el ratón sobre este campo para ver el número de confirmaciones.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Fecha y hora en que se recibió la transacción.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipo de transacción.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Si una dirección watch-only está involucrada en esta transacción o no.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Descripción de la transacción definido por el usuario.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Cantidad retirada o añadida al saldo.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Todo</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Hoy</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Esta semana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Este mes</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Mes pasado</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Este año</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Rango...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recibido con</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado a</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>A usted mismo</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minado</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Otra</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Introduzca una dirección o etiqueta que buscar</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Cantidad mínima</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Transacción abandonada</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar ubicación</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar capa</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar cantidad</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID de transacción</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copiar transacción raw</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Copiar todos los detalles de la transacción</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar etiqueta</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostrar detalles de la transacción</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exportar historial de transacciones</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Archivo separado de coma (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmado</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>De observación</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Fecha</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Dirección</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falló la exportación</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Ha habido un error al intentar guardar la transacción con %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportación finalizada</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>La transacción ha sido guardada en %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Rango:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>para</translation>
+ </message>
+</context>
<context>
<name>UnitDisplayStatusBarControl</name>
- </context>
+ <message>
+ <source>Unit to show amounts in. Click to select another unit.</source>
+ <translation>Unidad en la que se muestran las cantidades. Haga clic para seleccionar otra unidad.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>No se ha cargado ningún monedero</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Enviar</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exportar</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exportar a un archivo los datos de esta pestaña</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Copia de seguridad del monedero</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Datos de monedero (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>La copia de seguridad ha fallado</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Ha habido un error al intentar guardar los datos del monedero en %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Se ha completado con éxito la copia de respaldo</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Los datos del monedero se han guardado con éxito en %1.</translation>
+ </message>
+</context>
<context>
<name>bitcoin-core</name>
- </context>
+ <message>
+ <source>Options:</source>
+ <translation>Opciones:
+</translation>
+ </message>
+ <message>
+ <source>Specify data directory</source>
+ <translation>Especificar directorio para los datos</translation>
+ </message>
+ <message>
+ <source>Connect to a node to retrieve peer addresses, and disconnect</source>
+ <translation>Conectar a un nodo para obtener direcciones de pares y desconectar</translation>
+ </message>
+ <message>
+ <source>Specify your own public address</source>
+ <translation>Especifique su propia dirección pública</translation>
+ </message>
+ <message>
+ <source>Accept command line and JSON-RPC commands</source>
+ <translation>Aceptar comandos consola y JSON-RPC
+</translation>
+ </message>
+ <message>
+ <source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
+ <translation>Si &lt;category&gt; no es proporcionado o si &lt;category&gt; =1, muestra toda la información de depuración.</translation>
+ </message>
+ <message>
+ <source>Prune configured below the minimum of %d MiB. Please use a higher number.</source>
+ <translation>La Poda se ha configurado por debajo del minimo de %d MiB. Por favor utiliza un valor mas alto.</translation>
+ </message>
+ <message>
+ <source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
+ <translation>Poda: la ultima sincronizacion de la cartera sobrepasa los datos podados. Necesitas reindexar con -reindex (o descargar la cadena de bloques de nuevo en el caso de un nodo podado)</translation>
+ </message>
+ <message>
+ <source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
+ <translation>Reduce los requisitos de almacenaje podando (eliminando) los bloques viejos. Este modo es incompatible con -txindex y -rescan. Advertencia: Revertir este ajuste requiere volver a descargar la cadena de bloques al completo. (predeterminado: 0 = deshabilitar la poda de bloques, &gt;%u = objetivo de tamaño en MiB para usar para los archivos de bloques)</translation>
+ </message>
+ <message>
+ <source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
+ <translation>Nos es posible re-escanear en modo podado.Necesitas utilizar -reindex el cual descargara la cadena de bloques al completo de nuevo.</translation>
+ </message>
+ <message>
+ <source>Error: A fatal internal error occurred, see debug.log for details</source>
+ <translation>Un error interno fatal ocurrió, ver debug.log para detalles</translation>
+ </message>
+ <message>
+ <source>Fee (in %s/kB) to add to transactions you send (default: %s)</source>
+ <translation>Comisión (en %s/KB) para agregar a las transacciones que envíe (por defecto: %s)</translation>
+ </message>
+ <message>
+ <source>Pruning blockstore...</source>
+ <translation>Poda blockstore ...</translation>
+ </message>
+ <message>
+ <source>Run in the background as a daemon and accept commands</source>
+ <translation>Ejecutar en segundo plano como daemon y aceptar comandos
+</translation>
+ </message>
+ <message>
+ <source>Unable to start HTTP server. See debug log for details.</source>
+ <translation>No se ha podido comenzar el servidor HTTP. Ver debug log para detalles.</translation>
+ </message>
+ <message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
+ <source>The %s developers</source>
+ <translation>Los %s desarrolladores</translation>
+ </message>
+ <message>
+ <source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
+ <translation>Una comision (en %s/kB) que sera usada cuando las estimacion de comision no disponga de suficientes datos (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
+ <translation>Aceptar transacciones retransmitidas recibidas desde nodos en la lista blanca incluso cuando no estés retransmitiendo transacciones (predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
+ <translation>Vincular a la dirección dada y escuchar siempre en ella. Utilice la notación [host]:port para IPv6</translation>
+ </message>
+ <message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>No se puede bloquear el directorio %s. %s ya se está ejecutando.</translation>
+ </message>
+ <message>
+ <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+ <translation>Borrar todas las transacciones del monedero y sólo recuperar aquellas partes de la cadena de bloques por medio de -rescan on startup.</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Error cargando %s: No puede habilitar HD en un monedero existente que no es HD</translation>
+ </message>
+ <message>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>Error leyendo %s!. Todas las claves se han leido correctamente, pero los datos de transacciones o la libreta de direcciones pueden faltar o ser incorrectos.</translation>
+ </message>
+ <message>
+ <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
+ <translation>Ejecutar comando cuando una transacción del monedero cambia (%s en cmd se remplazará por TxID)</translation>
+ </message>
+ <message>
+ <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
+ <translation>Ajuste máximo permitido del tiempo offset medio de pares. La perspectiva local de tiempo se verá influenciada por los pares anteriores y posteriores a esta cantidad. (Por defecto: %u segundos)</translation>
+ </message>
+ <message>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>Máximas comisiones totales (en %s) para utilizar en una sola transacción de la cartera; establecer esto demasiado bajo puede abortar grandes transacciones (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Por favor, compruebe si la fecha y hora en su computadora son correctas! Si su reloj esta mal, %s no trabajara correctamente. </translation>
+ </message>
+ <message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Contribuya si encuentra %s de utilidad. Visite %s para mas información acerca del programa.</translation>
+ </message>
+ <message>
+ <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
+ <translation>Establecer el número de hilos (threads) de verificación de scripts (entre %u y %d, 0 = automático, &lt;0 = dejar libres ese número de núcleos; predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
+ <translation>La base de datos de bloques contiene un bloque que parece ser del futuro. Esto puede ser porque la fecha y hora de tu ordenador están mal ajustados. Reconstruye la base de datos de bloques solo si estas seguro de que la fecha y hora de tu ordenador estan ajustados correctamente.</translation>
+ </message>
+ <message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>No es posible reconstruir la base de datos a un estado anterior. Debe descargar de nuevo la cadena de bloques.</translation>
+ </message>
+ <message>
+ <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
+ <translation>Utiliza UPnP para asignar el puerto de escucha (predeterminado: 1 cuando esta escuchando sin -proxy)</translation>
+ </message>
+ <message>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>Necesita reconstruir la base de datos usando -reindex-chainstate para cambiar -txindex</translation>
+ </message>
+ <message>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s corrupto. Fracasó la recuperacion</translation>
+ </message>
+ <message>
+ <source>-maxmempool must be at least %d MB</source>
+ <translation>-maxmempool debe ser por lo menos de %d MB</translation>
+ </message>
+ <message>
+ <source>&lt;category&gt; can be:</source>
+ <translation>&lt;category&gt; puede ser:</translation>
+ </message>
+ <message>
+ <source>Append comment to the user agent string</source>
+ <translation>Adjunta un comentario a la linea de agente de usuario</translation>
+ </message>
+ <message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>Intento de recuperar claves privadas de un monedero corrupto en arranque</translation>
+ </message>
+ <message>
+ <source>Block creation options:</source>
+ <translation>Opciones de creación de bloques:</translation>
+ </message>
+ <message>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>No se puede resolver -%s direccion: '%s'</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>Cambio de indice fuera de rango</translation>
+ </message>
+ <message>
+ <source>Connection options:</source>
+ <translation>Opciones de conexión:</translation>
+ </message>
+ <message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i-%i</translation>
+ </message>
+ <message>
+ <source>Corrupted block database detected</source>
+ <translation>Corrupción de base de datos de bloques detectada.</translation>
+ </message>
+ <message>
+ <source>Debugging/Testing options:</source>
+ <translation>Opciones de depuración/pruebas:</translation>
+ </message>
+ <message>
+ <source>Do not load the wallet and disable wallet RPC calls</source>
+ <translation>No cargar el monedero y desactivar las llamadas RPC del monedero</translation>
+ </message>
+ <message>
+ <source>Do you want to rebuild the block database now?</source>
+ <translation>¿Quieres reconstruir la base de datos de bloques ahora?</translation>
+ </message>
+ <message>
+ <source>Enable publish hash block in &lt;address&gt;</source>
+ <translation>Activar publicar bloque .hash en &lt;.Address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish hash transaction in &lt;address&gt;</source>
+ <translation>Activar publicar transacción .hash en &lt;.Address&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish raw block in &lt;address&gt;</source>
+ <translation>Habilita la publicacion de bloques en bruto en &lt;direccion&gt;</translation>
+ </message>
+ <message>
+ <source>Enable publish raw transaction in &lt;address&gt;</source>
+ <translation>Habilitar publicar transacción en rama en &lt;dirección&gt;</translation>
+ </message>
+ <message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Habilita el reemplazamiento de transacciones en la piscina de memoria (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Error initializing block database</source>
+ <translation>Error al inicializar la base de datos de bloques</translation>
+ </message>
+ <message>
+ <source>Error initializing wallet database environment %s!</source>
+ <translation>Error al inicializar el entorno de la base de datos del monedero %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s</source>
+ <translation>Error cargando %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>Error cargando %s: Monedero dañado</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>Error cargando %s: Monedero requiere un versión mas reciente de %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Error cargando %s: No puede deshabilitar HD en un monedero existente que ya es HD</translation>
+ </message>
+ <message>
+ <source>Error loading block database</source>
+ <translation>Error cargando base de datos de bloques</translation>
+ </message>
+ <message>
+ <source>Error opening block database</source>
+ <translation>Error al abrir base de datos de bloques.</translation>
+ </message>
+ <message>
+ <source>Error: Disk space is low!</source>
+ <translation>Error: ¡Espacio en disco bajo!</translation>
+ </message>
+ <message>
+ <source>Failed to listen on any port. Use -listen=0 if you want this.</source>
+ <translation>Ha fallado la escucha en todos los puertos. Use -listen=0 si desea esto.</translation>
+ </message>
+ <message>
+ <source>Importing...</source>
+ <translation>Importando...</translation>
+ </message>
+ <message>
+ <source>Incorrect or no genesis block found. Wrong datadir for network?</source>
+ <translation>Incorrecto o bloque de génesis no encontrado. Datadir equivocada para la red?</translation>
+ </message>
+ <message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>La inicialización de la verificación de validez falló. Se está apagando %s.</translation>
+ </message>
+ <message>
+ <source>Invalid -onion address: '%s'</source>
+ <translation>Dirección -onion inválida: '%s'</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>Cantidad no valida para -%s=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
+ <translation>Cantidad inválida para -fallbackfee=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
+ <source>Keep the transaction memory pool below &lt;n&gt; megabytes (default: %u)</source>
+ <translation>Mantener la memoria de transacciones por debajo de &lt;n&gt; megabytes (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Loading banlist...</source>
+ <translation>Cargando banlist...</translation>
+ </message>
+ <message>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Ubicación de la cookie de autenticación (default: data dir)</translation>
+ </message>
+ <message>
+ <source>Not enough file descriptors available.</source>
+ <translation>No hay suficientes descriptores de archivo disponibles. </translation>
+ </message>
+ <message>
+ <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+ <translation>Sólo conectar a nodos en redes &lt;net&gt; (ipv4, ipv6 o onion)</translation>
+ </message>
+ <message>
+ <source>Print this help message and exit</source>
+ <translation>Imprimir este mensaje de ayuda y salir</translation>
+ </message>
+ <message>
+ <source>Print version and exit</source>
+ <translation>Imprimir versión y salir</translation>
+ </message>
+ <message>
+ <source>Prune cannot be configured with a negative value.</source>
+ <translation>Pode no se puede configurar con un valor negativo.</translation>
+ </message>
+ <message>
+ <source>Prune mode is incompatible with -txindex.</source>
+ <translation>El modo recorte es incompatible con -txindex.</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Reconstruir el estado de la cadena e indice de bloques a partir de los ficheros blk*.dat en disco</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Reconstruir el estado de la cadena a partir de los bloques indexados</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>Verificando bloques...</translation>
+ </message>
+ <message>
+ <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+ <translation>Asignar tamaño de cache en megabytes (entre %d y %d; predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>Set maximum block size in bytes (default: %d)</source>
+ <translation>Establecer tamaño máximo de bloque en bytes (predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>Specify wallet file (within data directory)</source>
+ <translation>Especificar archivo de monedero (dentro del directorio de datos)</translation>
+ </message>
+ <message>
+ <source>The source code is available from %s.</source>
+ <translation>El código fuente esta disponible desde %s.</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>No se ha podido conectar con %s en este equipo. %s es posible que este todavia en ejecución.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
+ <translation>El argumento -benchmark no es soportado y ha sido ignorado, utiliza -debug=bench</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -debugnet ignored, use -debug=net.</source>
+ <translation>Parámetros no compatibles -debugnet ignorados , use -debug = red.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -tor found, use -onion.</source>
+ <translation>Parámetros no compatibles -tor encontrados, use -onion .</translation>
+ </message>
+ <message>
+ <source>Use UPnP to map the listening port (default: %u)</source>
+ <translation>Usar UPnP para asignar el puerto de escucha (predeterminado:: %u)</translation>
+ </message>
+ <message>
+ <source>User Agent comment (%s) contains unsafe characters.</source>
+ <translation>El comentario del Agente de Usuario (%s) contiene caracteres inseguros.</translation>
+ </message>
+ <message>
+ <source>Verifying blocks...</source>
+ <translation>Verificando bloques...</translation>
+ </message>
+ <message>
+ <source>Verifying wallet...</source>
+ <translation>Verificando monedero...</translation>
+ </message>
+ <message>
+ <source>Wallet %s resides outside data directory %s</source>
+ <translation>El monedero %s se encuentra fuera del directorio de datos %s</translation>
+ </message>
+ <message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Opciones de depuración/pruebas de monedero:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Es necesario reescribir el monedero: reiniciar %s para completar</translation>
+ </message>
+ <message>
+ <source>Wallet options:</source>
+ <translation>Opciones de monedero:</translation>
+ </message>
+ <message>
+ <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+ <translation>Permitir conexiones JSON-RPC de origen especificado. Válido para son una sola IP (por ejemplo 1.2.3.4), una red/máscara de red (por ejemplo 1.2.3.4/255.255.255.0) o una red/CIDR (e.g. 1.2.3.4/24). Esta opción se puede especificar varias veces</translation>
+ </message>
+ <message>
+ <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+ <translation>Ligar a las direcciones especificadas y poner en lista blanca a los equipos conectados a ellas. Usar la notación para IPv6 [host]:puerto.</translation>
+ </message>
+ <message>
+ <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+ <translation>Ligar a las direcciones especificadas para escuchar por conexiones JSON-RPC. Usar la notación para IPv6 [host]:puerto. Esta opción se puede especificar múltiples veces (por defecto: ligar a todas las interfaces)</translation>
+ </message>
+ <message>
+ <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+ <translation>Crear nuevos archivos con permisos por defecto del sistema, en lugar de umask 077 (sólo efectivo con la funcionalidad de monedero desactivada)</translation>
+ </message>
+ <message>
+ <source>Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)</source>
+ <translation>Descubra direcciones IP propias (por defecto: 1 cuando se escucha y nadie -externalip o -proxy)</translation>
+ </message>
+ <message>
+ <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+ <translation>Error: la escucha para conexiones entrantes falló (la escucha regresó el error %s)</translation>
+ </message>
+ <message>
+ <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+ <translation>Ejecutar un comando cuando se reciba una alerta importante o cuando veamos un fork demasiado largo (%s en cmd se reemplazará por el mensaje)</translation>
+ </message>
+ <message>
+ <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source>
+ <translation>Las comisiones (en %s/kB) mas pequeñas que esto se consideran como cero comisión para la retransmisión, minería y creación de la transacción (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+ <translation>Si el pago de comisión no está establecido, incluir la cuota suficiente para que las transacciones comiencen la confirmación en una media de n bloques ( por defecto :%u)</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+ <translation>Cantidad no válida para -maxtxfee=&lt;amount&gt;: '%s' (debe ser por lo menos la cuota de comisión mínima de %s para prevenir transacciones atascadas)</translation>
+ </message>
+ <message>
+ <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+ <translation>El tamaño máximo de los datos en las operaciones de transporte de datos que transmitimos y el mio (default: %u)</translation>
+ </message>
+ <message>
+ <source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
+ <translation>Aleatorizar las credenciales para cada conexión proxy. Esto habilita la Tor stream isolation (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+ <translation>Establecer tamaño máximo de las transacciones de alta prioridad/baja comisión en bytes (predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>The transaction amount is too small to send after the fee has been deducted</source>
+ <translation>Monto de transacción muy pequeña luego de la deducción por comisión</translation>
+ </message>
+ <message>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Usar tras BIP32 la generación de llave determinística jerárquica (HD) . Solo tiene efecto durante el primer inicio/generación del monedero</translation>
+ </message>
+ <message>
+ <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+ <translation>A los equipos en lista blanca no se les pueden prohibir los ataques DoS y sus transacciones siempre son retransmitidas, incluso si ya están en el mempool, es útil por ejemplo para un gateway.</translation>
+ </message>
+ <message>
+ <source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
+ <translation>Necesitas reconstruir la base de datos utilizando -reindex para volver al modo sin recorte. Esto volverá a descargar toda la cadena de bloques</translation>
+ </message>
+ <message>
+ <source>(default: %u)</source>
+ <translation>(por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Accept public REST requests (default: %u)</source>
+ <translation>Aceptar solicitudes públicas en FERIADOS (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Automatically create Tor hidden service (default: %d)</source>
+ <translation>Automáticamente crea el servicio Tor oculto (por defecto: %d)</translation>
+ </message>
+ <message>
+ <source>Connect through SOCKS5 proxy</source>
+ <translation>Conectar usando SOCKS5 proxy</translation>
+ </message>
+ <message>
+ <source>Error reading from database, shutting down.</source>
+ <translation>Error al leer la base de datos, cerrando.</translation>
+ </message>
+ <message>
+ <source>Imports blocks from external blk000??.dat file on startup</source>
+ <translation>Importa los bloques desde un archivo externo blk000?.dat</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Información</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+ <translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s' (debe ser por lo menos %s)</translation>
+ </message>
+ <message>
+ <source>Invalid netmask specified in -whitelist: '%s'</source>
+ <translation>Máscara de red inválida especificada en -whitelist: '%s'</translation>
+ </message>
+ <message>
+ <source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
+ <translation>Mantener como máximo &lt;n&gt; transacciones no conectables en memoria (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Need to specify a port with -whitebind: '%s'</source>
+ <translation>Necesita especificar un puerto con -whitebind: '%s'</translation>
+ </message>
+ <message>
+ <source>Node relay options:</source>
+ <translation>Opciones de nodos de retransmisión:</translation>
+ </message>
+ <message>
+ <source>RPC server options:</source>
+ <translation>Opciones de servidor RPC:</translation>
+ </message>
+ <message>
+ <source>Reducing -maxconnections from %d to %d, because of system limitations.</source>
+ <translation>Reduciendo -maxconnections de %d a %d, debido a limitaciones del sistema.</translation>
+ </message>
+ <message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>Rescanea la cadena de bloques para transacciones perdidas de la cartera</translation>
+ </message>
+ <message>
+ <source>Send trace/debug info to console instead of debug.log file</source>
+ <translation>Enviar información de trazas/depuración a la consola en lugar de al archivo debug.log</translation>
+ </message>
+ <message>
+ <source>Send transactions as zero-fee transactions if possible (default: %u)</source>
+ <translation>Mandar transacciones como comisión-cero si es posible (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Show all debugging options (usage: --help -help-debug)</source>
+ <translation>Muestra todas las opciones de depuración (uso: --help -help-debug)</translation>
+ </message>
+ <message>
+ <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
+ <translation>Reducir el archivo debug.log al iniciar el cliente (predeterminado: 1 sin -debug)</translation>
+ </message>
+ <message>
+ <source>Signing transaction failed</source>
+ <translation>Transacción falló</translation>
+ </message>
+ <message>
+ <source>The transaction amount is too small to pay the fee</source>
+ <translation>Cantidad de la transacción demasiado pequeña para pagar la comisión</translation>
+ </message>
+ <message>
+ <source>This is experimental software.</source>
+ <translation>Este software es experimental.</translation>
+ </message>
+ <message>
+ <source>Tor control port password (default: empty)</source>
+ <translation>Contraseña del puerto de control de Tor (predeterminado: vacio)</translation>
+ </message>
+ <message>
+ <source>Tor control port to use if onion listening enabled (default: %s)</source>
+ <translation>Puerto de control de Tor a utilizar si la escucha de onion esta activada (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Transaction amount too small</source>
+ <translation>Cantidad de la transacción demasiado pequeña</translation>
+ </message>
+ <message>
+ <source>Transaction too large for fee policy</source>
+ <translation>Operación demasiado grande para la política de tasas</translation>
+ </message>
+ <message>
+ <source>Transaction too large</source>
+ <translation>Transacción demasiado grande, intenta dividirla en varias.</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer (bind returned error %s)</source>
+ <translation>No es posible conectar con %s en este sistema (bind ha dado el error %s)</translation>
+ </message>
+ <message>
+ <source>Upgrade wallet to latest format on startup</source>
+ <translation>Actualizar el monedero al último formato al inicio</translation>
+ </message>
+ <message>
+ <source>Username for JSON-RPC connections</source>
+ <translation>Nombre de usuario para las conexiones JSON-RPC
+</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Aviso</translation>
+ </message>
+ <message>
+ <source>Warning: unknown new rules activated (versionbit %i)</source>
+ <translation>Advertencia: nuevas reglas desconocidas activadas (versionbit %i)</translation>
+ </message>
+ <message>
+ <source>Whether to operate in a blocks only mode (default: %u)</source>
+ <translation>Si se debe o no operar en un modo de solo bloques (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Zapping all transactions from wallet...</source>
+ <translation>Eliminando todas las transacciones del monedero...</translation>
+ </message>
+ <message>
+ <source>ZeroMQ notification options:</source>
+ <translation>Opciones de notificación ZeroQM:</translation>
+ </message>
+ <message>
+ <source>Password for JSON-RPC connections</source>
+ <translation>Contraseña para las conexiones JSON-RPC
+</translation>
+ </message>
+ <message>
+ <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
+ <translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
+ </message>
+ <message>
+ <source>Allow DNS lookups for -addnode, -seednode and -connect</source>
+ <translation>Permitir búsquedas DNS para -addnode, -seednode y -connect</translation>
+ </message>
+ <message>
+ <source>Loading addresses...</source>
+ <translation>Cargando direcciones...</translation>
+ </message>
+ <message>
+ <source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
+ <translation>(1 = mantener los meta datos de transacción, por ejemplo: propietario e información de pago, 2 = omitir los metadatos)</translation>
+ </message>
+ <message>
+ <source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+ <translation>-maxtxfee tiene un ajuste muy elevado! Comisiones muy grandes podrían ser pagadas en una única transaccion.</translation>
+ </message>
+ <message>
+ <source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
+ <translation>No mantener transacciones en la memoria mas de &lt;n&gt; horas (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Bytes equivalentes por sigop en transacciones para retrasmisión y minado (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+ <translation>Las comisiones (en %s/kB) menores que esto son consideradas de cero comision para la creacion de transacciones (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Fuerza la retransmisión de transacciones desde nodos en la lista blanca incluso si violan la política de retransmisiones local (predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
+ <translation>Nivel de rigor en la verificación de bloques de -checkblocks (0-4; predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Maintain a full transaction index, used by the getrawtransaction rpc call (default: %u)</source>
+ <translation>Mantener el índice completo de transacciones, usado por la llamada rpc de getrawtransaction (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Number of seconds to keep misbehaving peers from reconnecting (default: %u)</source>
+ <translation>Número de segundos en que se evita la reconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+ <translation>Mostrar depuración (por defecto: %u, proporcionar &lt;category&gt; es opcional)</translation>
+ </message>
+ <message>
+ <source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
+ <translation>Admite filtrado de bloques, y transacciones con filtros Bloom. Reduce la carga de red. ( por defecto :%u)</translation>
+ </message>
+ <message>
+ <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
+ <translation>La longitud total de la cadena de versión de red ( %i ) supera la longitud máxima ( %i ) . Reducir el número o tamaño de uacomments .</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+ <translation>Error: argumento -socks encontrado. El ajuste de la versión SOCKS ya no es posible, sólo proxies SOCKS5 son compatibles.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
+ <translation>El argumento no soportado -whitelistalwaysrelay ha sido ignorado, utiliza -whitelistrelay y/o -whitelistforcerelay.</translation>
+ </message>
+ <message>
+ <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+ <translation>Usar distintos proxys SOCKS5 para comunicarse vía Tor de forma anónima (Por defecto: %s)</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
+ <translation>Advertencia: Se están minando versiones de bloques desconocidas! Es posible que normas desconocidas estén activas</translation>
+ </message>
+ <message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>Aviso: fichero de monedero corrupto, datos recuperados! Original %s guardado como %s en %s; si su balance de transacciones es incorrecto, debe restaurar desde una copia de seguridad.</translation>
+ </message>
+ <message>
+ <source>(default: %s)</source>
+ <translation>(predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+ <translation>Siempre consultar direcciones de otros equipos por medio de DNS lookup (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>How many blocks to check at startup (default: %u, 0 = all)</source>
+ <translation>Cuántos bloques comprobar al iniciar (predeterminado: %u, 0 = todos)</translation>
+ </message>
+ <message>
+ <source>Include IP addresses in debug output (default: %u)</source>
+ <translation>Incluir direcciones IP en la salida de depuración (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Invalid -proxy address: '%s'</source>
+ <translation>Dirección -proxy inválida: '%s'</translation>
+ </message>
+ <message>
+ <source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+ <translation>Escuchar conexiones JSON-RPC en &lt;puerto&gt; (predeterminado: %u o testnet: %u)</translation>
+ </message>
+ <message>
+ <source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
+ <translation>Escuchar conexiones en &lt;puerto&gt; (predeterminado: %u o testnet: %u)</translation>
+ </message>
+ <message>
+ <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+ <translation>Mantener como máximo &lt;n&gt; conexiones a pares (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Make the wallet broadcast transactions</source>
+ <translation>Realiza las operaciones de difusión del monedero</translation>
+ </message>
+ <message>
+ <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+ <translation>Búfer de recepción máximo por conexión, &lt;n&gt;*1000 bytes (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: %u)</source>
+ <translation>Búfer de recepción máximo por conexión, , &lt;n&gt;*1000 bytes (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Prepend debug output with timestamp (default: %u)</source>
+ <translation>Anteponer marca temporal a la información de depuración (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Relay and mine data carrier transactions (default: %u)</source>
+ <translation>Retransmitir y minar transacciones de transporte de datos (por defecto: %u)</translation>
+ </message>
+ <message>
+ <source>Relay non-P2SH multisig (default: %u)</source>
+ <translation>Relay non-P2SH multisig (default: %u)</translation>
+ </message>
+ <message>
+ <source>Set key pool size to &lt;n&gt; (default: %u)</source>
+ <translation>Ajustar el número de claves en reserva &lt;n&gt; (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Establecer peso máximo bloque BIP141 (predeterminado: %d)</translation>
+ </message>
+ <message>
+ <source>Set the number of threads to service RPC calls (default: %d)</source>
+ <translation>Establecer el número de procesos para llamadas del servicio RPC (por defecto: %d)</translation>
+ </message>
+ <message>
+ <source>Specify configuration file (default: %s)</source>
+ <translation>Especificar archivo de configuración (por defecto: %s)</translation>
+ </message>
+ <message>
+ <source>Specify connection timeout in milliseconds (minimum: 1, default: %d)</source>
+ <translation>Especificar tiempo de espera de la conexión (mínimo: 1, por defecto: %d)</translation>
+ </message>
+ <message>
+ <source>Specify pid file (default: %s)</source>
+ <translation>Especificar archivo pid (predeterminado: %s)</translation>
+ </message>
+ <message>
+ <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+ <translation>Usar cambio aún no confirmado al enviar transacciones (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Starting network threads...</source>
+ <translation>Iniciando funciones de red...</translation>
+ </message>
+ <message>
+ <source>Threshold for disconnecting misbehaving peers (default: %u)</source>
+ <translation>Umbral para la desconexión de pares con mal comportamiento (predeterminado: %u)</translation>
+ </message>
+ <message>
+ <source>Unknown network specified in -onlynet: '%s'</source>
+ <translation>La red especificada en -onlynet '%s' es desconocida</translation>
+ </message>
+ <message>
+ <source>Insufficient funds</source>
+ <translation>Fondos insuficientes</translation>
+ </message>
+ <message>
+ <source>Loading block index...</source>
+ <translation>Cargando el índice de bloques...</translation>
+ </message>
+ <message>
+ <source>Add a node to connect to and attempt to keep the connection open</source>
+ <translation>Añadir un nodo al que conectarse y tratar de mantener la conexión abierta</translation>
+ </message>
+ <message>
+ <source>Loading wallet...</source>
+ <translation>Cargando monedero...</translation>
+ </message>
+ <message>
+ <source>Cannot downgrade wallet</source>
+ <translation>No se puede cambiar a una versión mas antigua el monedero</translation>
+ </message>
+ <message>
+ <source>Cannot write default address</source>
+ <translation>No se puede escribir la dirección predeterminada</translation>
+ </message>
+ <message>
+ <source>Rescanning...</source>
+ <translation>Reexplorando...</translation>
+ </message>
+ <message>
+ <source>Done loading</source>
+ <translation>Se terminó de cargar</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Error</translation>
+ </message>
+</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_es_MX.ts b/src/qt/locale/bitcoin_es_MX.ts
index 0a6ea1e1dd..bf8f0ceb88 100644
--- a/src/qt/locale/bitcoin_es_MX.ts
+++ b/src/qt/locale/bitcoin_es_MX.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Repita la nueva contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -246,7 +249,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>La cartera esta &lt;b&gt;encriptada&lt;/b&gt; y &lt;b&gt;bloqueada&lt;/b&gt; actualmente </translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -262,10 +265,6 @@
<translation>Monto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Cuota:</translation>
</message>
@@ -289,11 +288,7 @@
<source>Confirmed</source>
<translation>Confirmado </translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioridad</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -308,7 +303,7 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -347,6 +342,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -376,6 +378,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -386,6 +391,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>Debug window</source>
@@ -427,6 +438,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -445,10 +459,6 @@
<translation>Monto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Cuota:</translation>
</message>
@@ -521,6 +531,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
<message>
<source>Do not shut down the computer until this window disappears.</source>
@@ -553,16 +566,38 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Este panel muestras una descripción detallada de la transacción</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Enviar monedas</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_es_UY.ts b/src/qt/locale/bitcoin_es_UY.ts
index c565a63cd8..61bf9ad7ed 100644
--- a/src/qt/locale/bitcoin_es_UY.ts
+++ b/src/qt/locale/bitcoin_es_UY.ts
@@ -33,7 +33,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -48,7 +51,7 @@
<source>Repeat new passphrase</source>
<translation>Repetir nueva contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -189,7 +192,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>El Monedero esta &lt;b&gt;cifrado&lt;/b&gt; y actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -205,10 +208,6 @@
<translation>AMonto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Change:</source>
<translation>Cambio:</translation>
</message>
@@ -220,11 +219,7 @@
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioridad</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -239,7 +234,7 @@
<source>&amp;Address</source>
<translation>&amp;Direccion </translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -254,6 +249,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -275,12 +277,21 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>&amp;Information</source>
@@ -302,6 +313,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -320,10 +334,6 @@
<translation>AMonto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Change:</source>
<translation>Cambio:</translation>
</message>
@@ -372,6 +382,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -400,12 +413,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_es_VE.ts b/src/qt/locale/bitcoin_es_VE.ts
index 432adc57ee..f465b949a2 100644
--- a/src/qt/locale/bitcoin_es_VE.ts
+++ b/src/qt/locale/bitcoin_es_VE.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Repetir nueva frase de contraseña</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -175,10 +178,6 @@
<translation>Opciones de línea de comandos</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 y %2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 detrás</translation>
</message>
@@ -226,7 +225,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>La billetera está encriptada y bloqueada recientemente</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -246,10 +245,6 @@
<translation>Monto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Comisión:</translation>
</message>
@@ -297,11 +292,7 @@
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioridad</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -324,7 +315,7 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -391,6 +382,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -408,7 +402,7 @@
<source>Select payment request file</source>
<translation>Seleccionar archivo de solicitud de pago</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -448,6 +442,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -456,6 +453,16 @@
<source>Amount</source>
<translation>Monto</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 y %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -495,6 +502,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Quantity:</source>
@@ -509,10 +519,6 @@
<translation>Monto:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridad:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Comisión:</translation>
</message>
@@ -537,6 +543,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -549,12 +558,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -593,10 +620,6 @@
<translation>Borrar todas las transacciones de la billetera y solo recuperar aquellas partes de la cadena de bloques a través de -rescan en el inicio del sistema.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuido bajo la licensia de software MIT, ver el archivo adjunto COPYING o &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Ejecutar comando cuando una transacción de la billetera cambia (%s en cmd es reemplazado por TxID)</translation>
</message>
@@ -605,18 +628,6 @@
<translation>Fija el número de verificación de hilos de script (%u a %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta es una compilación de prueba pre-lanzamiento - use bajo su propio riesgo - no utilizar para aplicaciones de minería o mercantes</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Aviso: ¡La red no parece estar totalmente de acuerdo! Algunos mineros parecen estar teniendo inconvenientes.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Aviso: ¡No parecen estar totalmente de acuerdo con nuestros compañeros! Puede que tengas que actualizar, u otros nodos tengan que actualizarce.</translation>
- </message>
- <message>
<source>Information</source>
<translation>Información</translation>
</message>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 0d659fd719..0512b9f117 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -2,6 +2,10 @@
<context>
<name>AddressBookPage</name>
<message>
+ <source>Right-click to edit address or label</source>
+ <translation>Paremkliki aadressi või sildi muutmiseks</translation>
+ </message>
+ <message>
<source>Create a new address</source>
<translation>Loo uus aadress</translation>
</message>
@@ -37,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Kustuta</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Vali aadress millele mündid saata</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Vali aadress müntide vastuvõtmiseks</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>V&amp;ali</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Saatvad aadressid</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Vastuvõtvad aadressid</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Need on sinu Bitcoin aadressid maksete saatmiseks. Ennem müntide saatmist kontrolli alati summat ja makse saaja aadressi.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Need on sinu Bitcoin aadressid sisenevate maksete vastu võtmiseks. Soovitav on iga tehingu tarbeks kasutada uut aadressi.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopeeri Aadress</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopeeri &amp;Silt</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Muuda</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Ekspordi Aadresside Nimekiri</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Komadega eraldatud väärtuste fail (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksport ebaõnnestus.</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Tõrge aadressi nimekirja salvestamisel %1. Palun proovi uuesti.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Märge</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(märge puudub)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -56,6 +131,86 @@
<source>Repeat new passphrase</source>
<translation>Korda salafraasi</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Sisesta uus salafraas rahakotti.&lt;br/&gt;Kasuta salafraasi millles on&lt;b&gt;kümme või rohkem juhuslikku sümbolit&lt;b&gt;,või&lt;b&gt;kaheksa või rohkem sõna&lt;b/&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Krüpteeri rahakott</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Antud operatsioon vajab rahakoti lahtilukustamiseks salafraasi.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Ava rahakoti lukk</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Antud operatsioon vajab rahakoti dekrüpteerimiseks salafraasi.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dekrüpteeri rahakott</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Vaheta salafraasi</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Sisesta vana salafraas ja uus salafraas rahakotti.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Kinnita rahakoti krüpteerimine.</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Hoiatus:Kui sa krüpteerid oma rahakoti ja kaotad salafraasi, siis sa&lt;b&gt;KAOTAD OMA BITCOINID&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Kas oled kindel, et soovid rahakoti krüpteerida?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Rahakott krüpteeritud</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Rahakoti krüpteerimine ebaõnnestus</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Rahakoti krüpteerimine ebaõnnestus sisemise tõrke tõttu. Sinu rahakott ei ole krüpteeritud.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Sisestatud salafraasid ei kattu.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Rahakoti lahtilukustamine ebaõnnestus</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Rahakoti dekrüpteerimiseks sisestatud salafraas ei ole õige.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Rahakoti dekrüpteerimine ebaõnnestus</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Rahakoti salafraas on edukalt vahetatud.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Hoiatus:Klaviatuuri suurtähelukk on peal.</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -95,6 +250,10 @@
<translation>Väljumine</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>&amp;Teave %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Teave &amp;Qt kohta</translation>
</message>
@@ -140,7 +299,7 @@
</message>
<message>
<source>&amp;Debug window</source>
- <translation>&amp;Debugimise aken</translation>
+ <translation>&amp;Silumise aken</translation>
</message>
<message>
<source>Open debugging and diagnostic console</source>
@@ -164,7 +323,7 @@
</message>
<message>
<source>&amp;Receive</source>
- <translation>&amp;Saama</translation>
+ <translation>&amp;Võta vastu</translation>
</message>
<message>
<source>&amp;Show / Hide</source>
@@ -203,28 +362,36 @@
<translation>Vahelehe tööriistariba</translation>
</message>
<message>
+ <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+ <translation>Loo maksepäring (genereerib QR koodid ja bitcoini: URId)</translation>
+ </message>
+ <message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Ava bitcoini: URI või maksepäring</translation>
+ </message>
+ <message>
<source>&amp;Command-line options</source>
<translation>Käsurea valikud</translation>
</message>
<message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n tund</numerusform><numerusform>%n tundi</numerusform></translation>
+ <source>%n active connection(s) to Bitcoin network</source>
+ <translation><numerusform>%n aktiivne ühendus Bitcoini võrku</numerusform><numerusform>%n aktiivset ühendust Bitcoini võrku</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n päev</numerusform><numerusform>%n päeva</numerusform></translation>
+ <message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Kõvakettal olevate plokkide indekseerimine...</translation>
</message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n nädal</numerusform><numerusform>%n nädalat</numerusform></translation>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Kõvakettal olevate plokkide töötlemine...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 ja %2</translation>
+ <source>No block source available...</source>
+ <translation>Plokkide allikas pole saadaval...</translation>
</message>
<message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n aasta</numerusform><numerusform>%n aastat</numerusform></translation>
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>Töödeldud %n plokk transaktsioonide ajaloost.</numerusform><numerusform>Töödeldud %n plokki transaktsioonide ajaloost.</numerusform></translation>
</message>
<message>
<source>%1 behind</source>
@@ -255,8 +422,12 @@
<translation>Ajakohane</translation>
</message>
<message>
+ <source>%1 client</source>
+ <translation>%1 klient</translation>
+ </message>
+ <message>
<source>Catching up...</source>
- <translation>Jõuan...</translation>
+ <translation>Jõuan järgi...</translation>
</message>
<message>
<source>Date: %1
@@ -304,7 +475,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Rahakott on &lt;b&gt;krüpteeritud&lt;/b&gt; ning hetkel &lt;b&gt;suletud&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -312,6 +483,10 @@
<translation>Kogus:</translation>
</message>
<message>
+ <source>Bytes:</source>
+ <translation>Baiti:</translation>
+ </message>
+ <message>
<source>Amount:</source>
<translation>Summa:</translation>
</message>
@@ -320,18 +495,106 @@
<translation>Tasu:</translation>
</message>
<message>
+ <source>Dust:</source>
+ <translation>Puru:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Peale tehingutasu:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Vahetusraha:</translation>
+ </message>
+ <message>
+ <source>Tree mode</source>
+ <translation>Puu režiim</translation>
+ </message>
+ <message>
+ <source>List mode</source>
+ <translation>Loetelu režiim</translation>
+ </message>
+ <message>
<source>Amount</source>
<translation>Kogus</translation>
</message>
<message>
+ <source>Received with label</source>
+ <translation>Vastuvõetud märgisega</translation>
+ </message>
+ <message>
+ <source>Received with address</source>
+ <translation>Vastuvõetud aadressiga</translation>
+ </message>
+ <message>
<source>Date</source>
<translation>Kuupäev</translation>
</message>
<message>
+ <source>Confirmations</source>
+ <translation>Kinnitused</translation>
+ </message>
+ <message>
<source>Confirmed</source>
<translation>Kinnitatud</translation>
</message>
- </context>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopeeri aadress</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopeeri märgis</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri summa</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopeeri tehingu ID</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopeeri kogus</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopeeri tehingutasu</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopeeri baidid</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopeeri puru</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopeeri vahetusraha</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 lukustatud)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>jah</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>ei</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(märgis puudub)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(vahetusraha)</translation>
+ </message>
+</context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -346,6 +609,38 @@
<source>&amp;Address</source>
<translation>&amp;Aadress</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Uus vastu võttev aadress</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Uus saatev aadress</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Muuda vastuvõtvat aadressi</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Muuda saatvat aadressi</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Sisestatud aadress "%1" ei ole korrektne Bitcoin aadress.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Sisestatud aadress "%1" on juba aadressi raamatus.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Rahakoti lahtilukustamine ebaõnnestus.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Uue võtme genereerimine ebaõnnestus.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -372,6 +667,14 @@
<source>command-line options</source>
<translation>käsurea valikud</translation>
</message>
+ <message>
+ <source>UI Options:</source>
+ <translation>Kasutajaliidese Suvandid:</translation>
+ </message>
+ <message>
+ <source>Show splash screen on startup (default: %u)</source>
+ <translation>Käivitamisel kuva laadimisekraani (vaikimisi %u)</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -385,6 +688,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Vorm</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Viimane ploki aeg</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Peida</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -394,7 +712,15 @@
<source>URI:</source>
<translation>URI:</translation>
</message>
- </context>
+ <message>
+ <source>Select payment request file</source>
+ <translation>Vali maksepäringu fail</translation>
+ </message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Vali maksepäringu fail mida avada</translation>
+ </message>
+</context>
<context>
<name>OptionsDialog</name>
<message>
@@ -450,6 +776,18 @@
<translation>Proxi port (nt 9050)</translation>
</message>
<message>
+ <source>IPv4</source>
+ <translation>IPv4</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
<source>&amp;Window</source>
<translation>&amp;Aken</translation>
</message>
@@ -494,6 +832,10 @@
<translation>vaikeväärtus</translation>
</message>
<message>
+ <source>none</source>
+ <translation>puudub</translation>
+ </message>
+ <message>
<source>Confirm options reset</source>
<translation>Kinnita valikute algseadistamine</translation>
</message>
@@ -513,6 +855,10 @@
<translation>Kuvatav info ei pruugi olla ajakohane. Ühenduse loomisel süngitakse sinu rahakott automaatselt Bitconi võrgustikuga, kuid see toiming on hetkel lõpetamata.</translation>
</message>
<message>
+ <source>Pending:</source>
+ <translation>Ootel:</translation>
+ </message>
+ <message>
<source>Immature:</source>
<translation>Ebaküps:</translation>
</message>
@@ -521,11 +867,34 @@
<translation>Mitte aegunud mine'itud jääk</translation>
</message>
<message>
+ <source>Total:</source>
+ <translation>Kokku:</translation>
+ </message>
+ <message>
<source>Recent transactions</source>
<translation>Hiljutised tehingud</translation>
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Maksepäringu tõrge</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Maksepäring tagasi lükatud</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Maksepäring aegunud.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Kinnitamata maksepäringud kohandatud makse scriptidele ei ole toetatud.</translation>
+ </message>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -538,6 +907,20 @@
<source>N/A</source>
<translation>N/A</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 ja %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Salvesta QR Kood</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -562,6 +945,10 @@
<translation>Üldine</translation>
</message>
<message>
+ <source>Using BerkeleyDB version</source>
+ <translation>Kasutab BerkeleyDB versiooni</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Käivitamise hetk</translation>
</message>
@@ -586,6 +973,10 @@
<translation>Plokkide hetkearv</translation>
</message>
<message>
+ <source>Memory usage</source>
+ <translation>Mälu kasutus</translation>
+ </message>
+ <message>
<source>Received</source>
<translation>Vastuvõetud</translation>
</message>
@@ -602,6 +993,14 @@
<translation>Versioon</translation>
</message>
<message>
+ <source>Synced Headers</source>
+ <translation>Sünkroniseeritud Päised</translation>
+ </message>
+ <message>
+ <source>Synced Blocks</source>
+ <translation>Sünkroniseeritud Plokid</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Teenused</translation>
</message>
@@ -619,7 +1018,7 @@
</message>
<message>
<source>Debug log file</source>
- <translation>Debugimise logifail</translation>
+ <translation>Silumise logifail</translation>
</message>
<message>
<source>Clear console</source>
@@ -649,7 +1048,27 @@
<source>%1 GB</source>
<translation>%1 GB</translation>
</message>
- </context>
+ <message>
+ <source>Inbound</source>
+ <translation>Sisenev</translation>
+ </message>
+ <message>
+ <source>Outbound</source>
+ <translation>Väljuv</translation>
+ </message>
+ <message>
+ <source>Yes</source>
+ <translation>Jah</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Ei</translation>
+ </message>
+ <message>
+ <source>Unknown</source>
+ <translation>Teadmata</translation>
+ </message>
+</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
@@ -665,6 +1084,10 @@
<translation>&amp;Sõnum:</translation>
</message>
<message>
+ <source>Clear all fields of the form.</source>
+ <translation>Puhasta kõik vormi väljad.</translation>
+ </message>
+ <message>
<source>Show</source>
<translation>Näita</translation>
</message>
@@ -672,13 +1095,76 @@
<source>Remove</source>
<translation>Eemalda</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopeeri märgis</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Kopeeri sõnum</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri summa</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
+ <source>QR Code</source>
+ <translation>QR Kood</translation>
+ </message>
+ <message>
<source>Copy &amp;Address</source>
<translation>&amp;Kopeeri Aadress</translation>
</message>
+ <message>
+ <source>Payment information</source>
+ <translation>Makse Informatsioon</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Summa</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI liiga pikk, proovi vähendada märke / sõnumi pikkust.</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(märge puudub)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(sõnum puudub)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -687,6 +1173,14 @@
<translation>Müntide saatmine</translation>
</message>
<message>
+ <source>Inputs...</source>
+ <translation>Sisendid...</translation>
+ </message>
+ <message>
+ <source>automatically selected</source>
+ <translation>automaatselt valitud</translation>
+ </message>
+ <message>
<source>Insufficient funds!</source>
<translation>Liiga suur summa</translation>
</message>
@@ -695,6 +1189,10 @@
<translation>Kogus:</translation>
</message>
<message>
+ <source>Bytes:</source>
+ <translation>Baiti:</translation>
+ </message>
+ <message>
<source>Amount:</source>
<translation>Summa:</translation>
</message>
@@ -703,6 +1201,14 @@
<translation>Tasu:</translation>
</message>
<message>
+ <source>After Fee:</source>
+ <translation>Peale tehingutasu:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Vahetusraha:</translation>
+ </message>
+ <message>
<source>Transaction Fee:</source>
<translation>Tehingu tasu:</translation>
</message>
@@ -711,6 +1217,10 @@
<translation>Vali...</translation>
</message>
<message>
+ <source>per kilobyte</source>
+ <translation>kilobaidi kohta</translation>
+ </message>
+ <message>
<source>Hide</source>
<translation>Peida</translation>
</message>
@@ -735,6 +1245,14 @@
<translation>Lisa &amp;Saaja</translation>
</message>
<message>
+ <source>Clear all fields of the form.</source>
+ <translation>Puhasta kõik vormi väljad.</translation>
+ </message>
+ <message>
+ <source>Dust:</source>
+ <translation>Puru:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>Puhasta &amp;Kõik</translation>
</message>
@@ -750,6 +1268,58 @@
<source>S&amp;end</source>
<translation>S&amp;aada</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopeeri kogus</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri summa</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopeeri tehingutasu</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopeeri baidid</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopeeri puru</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopeeri vahetusraha</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Oled kindel, et soovid saata?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>lisatud kui tehingutasu</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>või</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Saaja aadress ei ole korrektne. Palun kontrolli üle.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Maksepäring aegunud.</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Hoiatus: Ebakorrektne Bitcoin aadress</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(märgis puudub)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -766,6 +1336,10 @@
<translation>&amp;Märgis</translation>
</message>
<message>
+ <source>Choose previously used address</source>
+ <translation>Vali eelnevalt kasutatud aadress</translation>
+ </message>
+ <message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
@@ -778,6 +1352,10 @@
<translation>Alt+P</translation>
</message>
<message>
+ <source>S&amp;ubtract fee from amount</source>
+ <translation>L&amp;ahuta tehingutasu summast</translation>
+ </message>
+ <message>
<source>Message:</source>
<translation>Sõnum:</translation>
</message>
@@ -787,8 +1365,23 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Jah</translation>
+ </message>
+</context>
+<context>
<name>ShutdownWindow</name>
- </context>
+ <message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 lülitub välja...</translation>
+ </message>
+ <message>
+ <source>Do not shut down the computer until this window disappears.</source>
+ <translation>Ära lülita arvutit välja ennem kui see aken on kadunud.</translation>
+ </message>
+</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
@@ -800,6 +1393,14 @@
<translation>&amp;Allkirjastamise teade</translation>
</message>
<message>
+ <source>The Bitcoin address to sign the message with</source>
+ <translation>Bitcoin aadress millega sõnum allkirjastada</translation>
+ </message>
+ <message>
+ <source>Choose previously used address</source>
+ <translation>Vali eelnevalt kasutatud aadress</translation>
+ </message>
+ <message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
@@ -844,6 +1445,10 @@
<translation>&amp;Kinnita Sõnum</translation>
</message>
<message>
+ <source>The Bitcoin address the message was signed with</source>
+ <translation>Bitcoin aadress millega sõnum on allkirjastatud</translation>
+ </message>
+ <message>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
<translation>Kinnita sõnum tõestamaks selle allkirjastatust määratud Bitcoini aadressiga.</translation>
</message>
@@ -855,6 +1460,54 @@
<source>Reset all verify message fields</source>
<translation>Tühjenda kõik sõnumi kinnitamise väljad</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Allkirja loomiseks vajuta "Allkirjasta Sõnum"</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Sisestatud aadress ei ole korrektne</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Palun kontrolli aadressi ja proovi uuesti.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Rahakoti lahtilukustamine on katkestatud.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Sisestatud aadressi privaatvõti pole saadaval.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Sõnumi allkirjastamine ebaõnnestus.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Sõnum allkirjastatud</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Allkirja polnud võimalik dekodeerida.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Palun kontrolli allkirja ja proovi uuesti.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Allkiri ei vastanud sõnumi krüptoräsile.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Sõnumi verifitseerimine ebaõnnestus.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Sõnum verifitseeritud.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -871,16 +1524,190 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/kinnitamata</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 kinnitust</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Olek</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Genereeritud</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>märgis</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>pole vastu võetud</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Tehingutasu</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Kommentaar</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Kaupleja</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Sisendid</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Summa</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>tõene</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>väär</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Paan kuvab tehingu detailid</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tüüp</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Kinnitamata</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Kõik</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Täna</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Käesolev nädal</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Käesolev kuu</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Eelmine kuu</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Käesolev aasta</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Vahemik...</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Minimaalne summa</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopeeri aadress</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopeeri märgis</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri summa</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopeeri tehingu ID</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Komadega eraldatud väärtuste fail (*.csv)</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tüüp</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksport ebaõnnestus.</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -907,10 +1734,6 @@
<translation>Tööta taustal ning aktsepteeri käsklusi</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Luba välisühendusi (vaikeväärtus: 1 kui puudub -proxy või -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoini tuumik</translation>
</message>
@@ -923,18 +1746,10 @@
<translation>Käivita käsklus, kui rahakoti tehing muutub (%s cmd's muudetakse TxID'ks)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>See on test-versioon - kasutamine omal riisikol - ära kasuta mining'uks ega kaupmeeste programmides</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blokeeri loomise valikud:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Ühendu ainult määratud node'i(de)ga</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Tuvastati vigane bloki andmebaas</translation>
</message>
diff --git a/src/qt/locale/bitcoin_et_EE.ts b/src/qt/locale/bitcoin_et_EE.ts
new file mode 100644
index 0000000000..d96ffa42f5
--- /dev/null
+++ b/src/qt/locale/bitcoin_et_EE.ts
@@ -0,0 +1,747 @@
+<TS language="et_EE" version="2.1">
+<context>
+ <name>AddressBookPage</name>
+ <message>
+ <source>Create a new address</source>
+ <translation>Loo uus aadress</translation>
+ </message>
+ <message>
+ <source>&amp;New</source>
+ <translation>&amp;Uus</translation>
+ </message>
+ <message>
+ <source>&amp;Copy</source>
+ <translation>&amp;Kopeeri</translation>
+ </message>
+ <message>
+ <source>Delete the currently selected address from the list</source>
+ <translation>Kustuta valitud aadress nimekirjast</translation>
+ </message>
+ <message>
+ <source>&amp;Delete</source>
+ <translation>&amp;Kustuta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Muuda</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+</context>
+<context>
+ <name>AskPassphraseDialog</name>
+ <message>
+ <source>Enter passphrase</source>
+ <translation>Sisesta parool</translation>
+ </message>
+ <message>
+ <source>New passphrase</source>
+ <translation>Uus parool</translation>
+ </message>
+ <message>
+ <source>Repeat new passphrase</source>
+ <translation>Korda uut parooli</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Krüpteeri rahakott</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dekrüpteeri rahakott</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Muuda parooli</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Kas oled kindel, et soovid rahakoti krüpteerida?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Rahakott krüpteeritud</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Rahakoti krüpteerimine ebaõnnestus</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Rahakoti krüpteerimine ebaõnnestus sisemise vea tõttu. Sinu rahakotti ei krüpteeritud.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Sisestatud paroolid ei kattu.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Rahakoti dekrüpteerimine ebaõnnestus</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Rahakoti parooli vahetus õnnestus.</translation>
+ </message>
+ </context>
+<context>
+ <name>BanTableModel</name>
+ </context>
+<context>
+ <name>BitcoinGUI</name>
+ <message>
+ <source>Synchronizing with network...</source>
+ <translation>Võrguga sünkroniseerimine...</translation>
+ </message>
+ <message>
+ <source>&amp;Overview</source>
+ <translation>&amp;Ülevaade</translation>
+ </message>
+ <message>
+ <source>Open &amp;URI...</source>
+ <translation>Ava &amp;URI...</translation>
+ </message>
+ <message>
+ <source>Reindexing blocks on disk...</source>
+ <translation>Kõvakettal olevate plokkide reindekseerimine...</translation>
+ </message>
+ <message>
+ <source>Bitcoin</source>
+ <translation>Bitcoin</translation>
+ </message>
+ <message>
+ <source>Wallet</source>
+ <translation>Rahakott</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fail</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Abi</translation>
+ </message>
+ <message>
+ <source>%1 behind</source>
+ <translation>%1 ajast maas</translation>
+ </message>
+ <message>
+ <source>Transactions after this will not yet be visible.</source>
+ <translation>Hilisemad transaktsioonid ei ole veel nähtavad.</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Viga</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Hoiatus</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Informatsioon</translation>
+ </message>
+ </context>
+<context>
+ <name>CoinControlDialog</name>
+ <message>
+ <source>Amount:</source>
+ <translation>Kogus</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Kogus</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Confirmations</source>
+ <translation>Kinnitused</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Kinnitatud</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopeeri aadress</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri kogus</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopeeri transaktsiooni ID</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>jah</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>ei</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+ </context>
+<context>
+ <name>EditAddressDialog</name>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Uue võtme genereerimine ebaõnnestus.</translation>
+ </message>
+</context>
+<context>
+ <name>FreespaceChecker</name>
+ <message>
+ <source>name</source>
+ <translation>nimi</translation>
+ </message>
+ </context>
+<context>
+ <name>HelpMessageDialog</name>
+ <message>
+ <source>version</source>
+ <translation>versioon</translation>
+ </message>
+ <message>
+ <source>Command-line options</source>
+ <translation>Käsurea valikud</translation>
+ </message>
+ <message>
+ <source>Usage:</source>
+ <translation>Kasutus:</translation>
+ </message>
+ <message>
+ <source>command-line options</source>
+ <translation>käsurea valikud</translation>
+ </message>
+ </context>
+<context>
+ <name>Intro</name>
+ <message>
+ <source>Welcome</source>
+ <translation>Tere tulemast</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Viga</translation>
+ </message>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
+ <name>OpenURIDialog</name>
+ </context>
+<context>
+ <name>OptionsDialog</name>
+ <message>
+ <source>Options</source>
+ <translation>Valikud</translation>
+ </message>
+ <message>
+ <source>MB</source>
+ <translation>MB</translation>
+ </message>
+ <message>
+ <source>&amp;Network</source>
+ <translation>&amp;Võrk</translation>
+ </message>
+ <message>
+ <source>IPv4</source>
+ <translation>IPv4</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+ </context>
+<context>
+ <name>OverviewPage</name>
+ <message>
+ <source>Pending:</source>
+ <translation>Ootel:</translation>
+ </message>
+ <message>
+ <source>Total:</source>
+ <translation>Kokku:</translation>
+ </message>
+ <message>
+ <source>Recent transactions</source>
+ <translation>Hiljutised transaktsioonid</translation>
+ </message>
+ </context>
+<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
+ <name>PeerTableModel</name>
+ </context>
+<context>
+ <name>QObject</name>
+ <message>
+ <source>Amount</source>
+ <translation>Kogus</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Salvesta Pilt...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Kopeeri Pilt</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Salvesta QR Kood</translation>
+ </message>
+ </context>
+<context>
+ <name>RPCConsole</name>
+ <message>
+ <source>&amp;Information</source>
+ <translation>&amp;Informatsioon</translation>
+ </message>
+ <message>
+ <source>General</source>
+ <translation>Üldine</translation>
+ </message>
+ <message>
+ <source>Network</source>
+ <translation>Võrk</translation>
+ </message>
+ <message>
+ <source>Name</source>
+ <translation>Nimi</translation>
+ </message>
+ <message>
+ <source>Number of connections</source>
+ <translation>Ühenduste arv</translation>
+ </message>
+ <message>
+ <source>Block chain</source>
+ <translation>Blokiahel</translation>
+ </message>
+ <message>
+ <source>Memory usage</source>
+ <translation>Mälu kasutus</translation>
+ </message>
+ <message>
+ <source>Received</source>
+ <translation>Vastu võetud</translation>
+ </message>
+ <message>
+ <source>Sent</source>
+ <translation>Saadetud</translation>
+ </message>
+ <message>
+ <source>Direction</source>
+ <translation>Suund</translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation>Versioon</translation>
+ </message>
+ <message>
+ <source>Services</source>
+ <translation>Teenused</translation>
+ </message>
+ <message>
+ <source>Ping Time</source>
+ <translation>Pingi Aeg</translation>
+ </message>
+ <message>
+ <source>&amp;Network Traffic</source>
+ <translation>&amp;Võrgu Liiklus</translation>
+ </message>
+ <message>
+ <source>Clear console</source>
+ <translation>Puhasta konsool</translation>
+ </message>
+ <message>
+ <source>never</source>
+ <translation>mitte kunagi</translation>
+ </message>
+ <message>
+ <source>Inbound</source>
+ <translation>Sisenev</translation>
+ </message>
+ <message>
+ <source>Outbound</source>
+ <translation>Väljuv</translation>
+ </message>
+ <message>
+ <source>Yes</source>
+ <translation>Jah</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Ei</translation>
+ </message>
+ </context>
+<context>
+ <name>ReceiveCoinsDialog</name>
+ <message>
+ <source>&amp;Amount:</source>
+ <translation>&amp;Kogus:</translation>
+ </message>
+ <message>
+ <source>&amp;Message:</source>
+ <translation>&amp;Sõnum:</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Eemalda</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Kopeeri sõnum</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri kogus</translation>
+ </message>
+</context>
+<context>
+ <name>ReceiveRequestDialog</name>
+ <message>
+ <source>QR Code</source>
+ <translation>QR Kood</translation>
+ </message>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Salvesta Pilt...</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Kogus</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+ </context>
+<context>
+ <name>SendCoinsDialog</name>
+ <message>
+ <source>Amount:</source>
+ <translation>Kogus</translation>
+ </message>
+ <message>
+ <source>Choose...</source>
+ <translation>Vali...</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>normaalne</translation>
+ </message>
+ <message>
+ <source>fast</source>
+ <translation>kiire</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri kogus</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+</context>
+<context>
+ <name>SendCoinsEntry</name>
+ <message>
+ <source>Alt+A</source>
+ <translation>Alt+A</translation>
+ </message>
+ <message>
+ <source>Alt+P</source>
+ <translation>Alt+P</translation>
+ </message>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Jah</translation>
+ </message>
+</context>
+<context>
+ <name>ShutdownWindow</name>
+ </context>
+<context>
+ <name>SignVerifyMessageDialog</name>
+ <message>
+ <source>Alt+A</source>
+ <translation>Alt+A</translation>
+ </message>
+ <message>
+ <source>Alt+P</source>
+ <translation>Alt+P</translation>
+ </message>
+ <message>
+ <source>Signature</source>
+ <translation>Allkiri</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Palun kontrolli aadressi ja proovi uuesti.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Sõnum allkirjastatud.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Allkirja ei õnnestunud dekodeerida.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Palun kontrolli allkirja ja proovi uuesti.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Sõnumi verifitseerimine ebaõnnestus.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Sõnum verifitseeritud.</translation>
+ </message>
+</context>
+<context>
+ <name>SplashScreen</name>
+ <message>
+ <source>[testnet]</source>
+ <translation>[test võrk]</translation>
+ </message>
+</context>
+<context>
+ <name>TrafficGraphWidget</name>
+ <message>
+ <source>KB/s</source>
+ <translation>KB/s</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Status</source>
+ <translation>Olek</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Sõnum</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Kommentaar</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Transaktsiooni ID</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Kogus</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionDescDialog</name>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tüüp</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(silt puudub)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Kõik</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Täna</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Käimasolev kuu</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Eelmine kuu</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Käimasolev aasta</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Vahemik...</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopeeri aadress</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopeeri summa</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopeeri transaktsiooni ID</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Kinnitatud</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Kuupäev</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tüüp</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Silt</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Aadress</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Vahemik:</translation>
+ </message>
+ </context>
+<context>
+ <name>UnitDisplayStatusBarControl</name>
+ </context>
+<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Varunda Rahakott</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Rahakoti Andmed (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Varundamine Ebaõnnestus</translation>
+ </message>
+ </context>
+<context>
+ <name>bitcoin-core</name>
+ <message>
+ <source>Options:</source>
+ <translation>Valikud:</translation>
+ </message>
+ <message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Informatsioon</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Hoiatus</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Viga</translation>
+ </message>
+</context>
+</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_eu_ES.ts b/src/qt/locale/bitcoin_eu_ES.ts
index cbe246f443..f7912f0785 100644
--- a/src/qt/locale/bitcoin_eu_ES.ts
+++ b/src/qt/locale/bitcoin_eu_ES.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Ezabatu</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Aukeratu helbidea txanponak bidaltzeko</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Aukeratu helbidea txanponak jasotzeko</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Aukeratu</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Helbideak bidaltzen</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Helbideak jasotzen</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Hauek dira zure Bitcoin helbideak dirua bidaltzeko. Beti egiaztatu diru-kantitatea eta jasotzeko helbidea bidali baino lehen.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Hauek dira zure Bitcoin helbideak dirua jasotzeko. Gomendagarria da erabiltzea jasotzeko helbide berri bat operazio bakoitzeko.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiatu helbidea</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopiatu &amp;Etiketa</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editatu</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Esportatu helbide lista</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Komaz bereizitako artxiboa (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Esportatua okerra</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Errakuntza bat egon da gordetzen %1 helbide listan. Mesedez, saiatu berriro.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiketa</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Helbidea</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiketarik ez)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +131,75 @@
<source>Repeat new passphrase</source>
<translation>Errepikatu pasahitz berria</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Enkriptatu zorroa</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Eragiketa honek zorroaren pasahitza behar du zorroa desblokeatzeko.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desblokeatu zorroa</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Eragiketa honek zure zorroaren pasahitza behar du, zorroa desenkriptatzeko.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desenkriptatu zorroa</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Aldatu pasahitza</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Berretsi zorroaren enkriptazioa</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Abisua: Zuk enkriptatzen baduzu zure diruzorroa eta zure pasahitza galtzen baduzu, &lt;b&gt;BITCOIN GUZTIAK GALDUKO DITUZU&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Seguru zaude nahi duzula zure diruzorroa enkriptatu?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Zorroa enkriptatuta</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>GARRANTZITSUA: Aurreko seguritate-kopiak ordeztuko dire berriekin, enkriptatutak. Segurtasun arrazoigaitik, aurreko kopiak ezin dira erabili hasiko zarenean zure diruzorro enkriptatu berriarekin.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Zorroaren enkriptazioak huts egin du</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Zorroaren enkriptazioak huts egin du barne-errore baten ondorioz. Zure zorroa ez da enkriptatu.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Eman dituzun pasahitzak ez datoz bat.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Zorroaren desblokeoak huts egin du</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Zorroa desenkriptatzeko sartutako pasahitza okerra da.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Zorroaren desenkriptazioak huts egin du</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -154,7 +293,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Zorroa &lt;b&gt;enkriptatuta&lt;/b&gt; eta &lt;b&gt;blokeatuta&lt;/b&gt; dago une honetan</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -169,6 +308,18 @@
<source>Date</source>
<translation>Data</translation>
</message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopiatu helbidea</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiatu etiketa</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiketarik ez)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
@@ -184,6 +335,34 @@
<source>&amp;Address</source>
<translation>&amp;Helbidea</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Jasotzeko helbide berria</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Bidaltzeko helbide berria</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Editatu jasotzeko helbidea</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Editatu bidaltzeko helbidea</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Sartu berri den helbidea, "%1", helbide-liburuan dago jadanik.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Ezin desblokeatu zorroa.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Gako berriaren sorrerak huts egin du.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -195,6 +374,13 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Inprimakia</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -212,6 +398,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -222,6 +411,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -238,6 +433,10 @@
<source>&amp;Message:</source>
<translation>Mezua</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiatu etiketa</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -245,6 +444,41 @@
<source>Copy &amp;Address</source>
<translation>&amp;Kopiatu helbidea</translation>
</message>
+ <message>
+ <source>Address</source>
+ <translation>Helbidea</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Kopurua</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketa</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mezua</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketa</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mezua</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiketarik ez)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -268,7 +502,19 @@
<source>Confirm the send action</source>
<translation>Berretsi bidaltzeko ekintza</translation>
</message>
- </context>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Berretsi txanponak bidaltzea</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Ordaintzeko kopurua 0 baino handiagoa izan behar du.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiketarik ez)</translation>
+ </message>
+</context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -303,6 +549,13 @@
<source>Pay To:</source>
<translation>Ordaindu honi:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Sartu etiketa bat helbide honetarako, eta gehitu zure helbide-liburuan</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
</context>
<context>
<name>ShutdownWindow</name>
@@ -333,16 +586,238 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Zabalik %1 arte</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/konfirmatu gabe</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 konfirmazioak</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, ez da arrakastaz emititu oraindik</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>ezezaguna</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mezua</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transakzioaren</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Kopurua</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Panel honek transakzioaren deskribapen xehea erakusten du</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Mota</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketa</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Zabalik %1 arte</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Konfirmatuta (%1 konfirmazio)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Bloke hau ez du beste inongo nodorik jaso, eta seguruenik ez da onartuko!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Sortua, baina ez onartua</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Jasota honekin: </translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Hona bidalia: </translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Ordainketa zeure buruari</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Bildua</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiketarik ez)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Transakzioaren egoera. Pasatu sagua gainetik konfirmazio kopurua ikusteko.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Transakzioa jasotako data eta ordua.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Transakzio mota.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Saldoan kendu edo gehitutako kopurua.</translation>
+ </message>
</context>
<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Denak</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Gaur</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Aste honetan</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Hil honetan</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Azken hilean</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Aurten</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Muga...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Jasota honekin: </translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Hona bidalia: </translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Zeure buruari</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Bildua</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Beste</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Sartu bilatzeko helbide edo etiketa</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Kopuru minimoa</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopiatu helbidea</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiatu etiketa</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Komaz bereizitako artxiboa (*.csv)</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Mota</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketa</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Helbidea</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Esportatua okerra</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Bidali txanponak</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Esportatu</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Esportatu datuak uneko fitxategian</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 98543ded46..c1061822ca 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -41,6 +41,49 @@
<source>&amp;Delete</source>
<translation>&amp;حذف</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>آدرس مورد نظر برای ارسال کوین ها را انتخاب کنید</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>آدرس موردنظر برای دریافت کوین ها را انتخاب کنید.</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>انتخاب</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>آدرس های فرستنده</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>آدرس های گیرنده</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>کپی و برچسب‌&amp;گذاری</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;ویرایش</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>برچسب</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>آدرس</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(بدون برچسب)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +103,54 @@
<source>Repeat new passphrase</source>
<translation>تکرار گذرواژهٔ جدید</translation>
</message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>رمزنگاری کیف پول</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>باز کردن قفل کیف پول</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>رمزگشایی کیف پول</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>تأیید رمزنگاری کیف پول</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>آیا مطمئن هستید که می‌خواهید کیف پول خود را رمزنگاری کنید؟</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>کیف پول رمزنگاری شد</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>رمزنگاری کیف پول با شکست مواجه شد</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>رمزنگاری کیف پول بنا به یک خطای داخلی با شکست مواجه شد. کیف پول شما رمزنگاری نشد.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>بازگشایی قفل کیف‌پول با شکست مواجه شد</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>رمزگشایی کیف پول با شکست مواجه شد</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>گذرواژهٔ کیف پول با موفقیت عوض شد.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>هشدار: کلید Caps Lock روشن است!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -131,6 +222,10 @@
<translation>&amp;تنظیمات...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>تغییر تنظیمات %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;رمزنگاری کیف پول...</translation>
</message>
@@ -235,6 +330,10 @@
<translation>نوارابزار برگه‌ها</translation>
</message>
<message>
+ <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+ <translation>درخواست پرداخت ( تولید کد کیوار و ادرس بیت کوین)</translation>
+ </message>
+ <message>
<source>Show the list of used sending addresses and labels</source>
<translation>نمایش لیست آدرس های ارسال و لیبل ها</translation>
</message>
@@ -243,6 +342,10 @@
<translation>نمایش لیست آدرس های دریافت و لیبل ها</translation>
</message>
<message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>بازکردن یک بیت کوین: آدرس یا درخواست پرداخت</translation>
+ </message>
+ <message>
<source>&amp;Command-line options</source>
<translation>گزینه‌های خط‌فرمان</translation>
</message>
@@ -251,28 +354,16 @@
<translation><numerusform>%n ارتباط فعال با شبکهٔ بیت‌کوین</numerusform></translation>
</message>
<message>
- <source>No block source available...</source>
- <translation>منبعی برای دریافت بلاک در دسترس نیست...</translation>
- </message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n ساعت</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n روز</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n هفته</numerusform></translation>
+ <source>Processing blocks on disk...</source>
+ <translation>پردازش بلوک‌ها روی دیسک...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 و %2</translation>
+ <source>No block source available...</source>
+ <translation>منبعی برای دریافت بلاک در دسترس نیست...</translation>
</message>
<message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n سال</numerusform></translation>
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>پردازش %n بلاک از تاریخچه ی تراکنش ها </numerusform></translation>
</message>
<message>
<source>%1 behind</source>
@@ -352,7 +443,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>کیف پول &lt;b&gt;رمزنگاری شده&lt;/b&gt; است و هم‌اکنون &lt;b&gt;قفل&lt;/b&gt; است</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -372,10 +463,6 @@
<translation>مبلغ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>اولویت:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>هزینه:</translation>
</message>
@@ -424,8 +511,48 @@
<translation>تأیید شده</translation>
</message>
<message>
- <source>Priority</source>
- <translation>اولویت</translation>
+ <source>Copy label</source>
+ <translation>کپی برچسب</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>کپی مقدار</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>کپی شناسهٔ تراکنش</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>قفل کردن خرج نشده ها</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>بازکردن قفل خرج نشده ها</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>کپی تعداد</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 قفل شده)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>بله</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>خیر</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(بدون برچسب)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(تغییر)</translation>
</message>
</context>
<context>
@@ -442,7 +569,35 @@
<source>&amp;Address</source>
<translation>&amp;نشانی</translation>
</message>
-</context>
+ <message>
+ <source>New receiving address</source>
+ <translation>نشانی گیرنده جدید</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>نشانی فرستنده جدید</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>ویرایش آدرس گیرنده</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>ویرایش آدرس قرستنده</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>نشانی وارد شده "%1" یک نشانی معتبر بیت‌کوین نیست.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>نشانی وارد شده «%1» در حال حاضر در دفترچه وجود دارد.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>نمی‌توان کیف پول را رمزگشایی کرد.</translation>
+ </message>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -473,6 +628,10 @@
<translation>نسخه</translation>
</message>
<message>
+ <source>(%1-bit)</source>
+ <translation>(%1-بیت)</translation>
+ </message>
+ <message>
<source>About %1</source>
<translation>درباره %1</translation>
</message>
@@ -488,6 +647,26 @@
<source>command-line options</source>
<translation>گزینه‌های خط فرمان</translation>
</message>
+ <message>
+ <source>UI Options:</source>
+ <translation>گزینه‌های رابط کاربری:</translation>
+ </message>
+ <message>
+ <source>Set language, for example "de_DE" (default: system locale)</source>
+ <translation>زبان را تنظیم کنید؛ برای مثال «de_DE» (پیشفرض: زبان سیستم)</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>شروع برنامه به صورت کوچک‌شده</translation>
+ </message>
+ <message>
+ <source>Set SSL root certificates for payment request (default: -system-)</source>
+ <translation>تنظیم گواهی ریشه SSl برای درخواست پرداخت (پیشفرض: -system-)</translation>
+ </message>
+ <message>
+ <source>Show splash screen on startup (default: %u)</source>
+ <translation>نمایش پنجرهٔ خوشامدگویی در ابتدای اجرای برنامه (پیش‌فرض: %u)</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -517,11 +696,38 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>فرم</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>زمان آخرین بلوک</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>پنهان کردن</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
<translation>بازکردن آدرس</translation>
</message>
+ <message>
+ <source>Open payment request from URI or file</source>
+ <translation>بازکردن درخواست پرداخت از آدرس یا فایل</translation>
+ </message>
+ <message>
+ <source>URI:</source>
+ <translation>آدرس اینترنتی:</translation>
+ </message>
+ <message>
+ <source>Select payment request file</source>
+ <translation>انتخاب فایل درخواست پرداخت</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -534,6 +740,14 @@
<translation>&amp;عمومی</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>اجرای خودکار %1 بعد زمان ورود به سیستم.</translation>
+ </message>
+ <message>
+ <source>MB</source>
+ <translation>مگابایت</translation>
+ </message>
+ <message>
<source>Accept connections from outside</source>
<translation>پذیرش اتصالات از بیرون</translation>
</message>
@@ -673,6 +887,10 @@
<translation>تراز علی‌الحساب شما</translation>
</message>
<message>
+ <source>Pending:</source>
+ <translation>در انتظار:</translation>
+ </message>
+ <message>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
<translation>مجموع تراکنش‌هایی که هنوز تأیید نشده‌اند؛ و هنوز روی تراز علی‌الحساب اعمال نشده‌اند</translation>
</message>
@@ -706,12 +924,11 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
- <message>
- <source>Ping Time</source>
- <translation>زمان پینگ</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -719,6 +936,10 @@
<translation>مبلغ</translation>
</message>
<message>
+ <source>Enter a Bitcoin address (e.g. %1)</source>
+ <translation>یک آدرس بیت‌کوین وارد کنید (مثلاً %1)</translation>
+ </message>
+ <message>
<source>%1 d</source>
<translation>%1 روز</translation>
</message>
@@ -746,7 +967,17 @@
<source>%1 ms</source>
<translation>%1 میلیونم ثانیه</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 و %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -794,6 +1025,10 @@
<translation>تعداد فعلی بلوک‌ها</translation>
</message>
<message>
+ <source>Memory Pool</source>
+ <translation>استخر حافظه</translation>
+ </message>
+ <message>
<source>Memory usage</source>
<translation>مصرف حافظه</translation>
</message>
@@ -814,6 +1049,14 @@
<translation>سرویس ها</translation>
</message>
<message>
+ <source>Connection Time</source>
+ <translation>مدت اتصال</translation>
+ </message>
+ <message>
+ <source>Last Send</source>
+ <translation>ارسال شده آخرین بار</translation>
+ </message>
+ <message>
<source>Last Receive</source>
<translation>آخرین دریافتی</translation>
</message>
@@ -909,6 +1152,14 @@
<translation>پیام:</translation>
</message>
<message>
+ <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+ <translation>برای درخواست پرداخت از این فرم استفاده کنید.تمام قسمت ها &lt;b&gt;اختیاری&lt;b&gt; هستند.</translation>
+ </message>
+ <message>
+ <source>Clear all fields of the form.</source>
+ <translation>تمام قسمت های فرم را خالی کن.</translation>
+ </message>
+ <message>
<source>Clear</source>
<translation>پاک‌کردن</translation>
</message>
@@ -917,9 +1168,21 @@
<translation>نمایش</translation>
</message>
<message>
+ <source>Remove the selected entries from the list</source>
+ <translation>حذف ورودی های انتخاب‌شده از لیست</translation>
+ </message>
+ <message>
<source>Remove</source>
<translation>حذف کردن</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>کپی برچسب</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>کپی مقدار</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -935,7 +1198,26 @@
<source>&amp;Save Image...</source>
<translation>&amp;ذخیره عکس...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>آدرس</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>برچسب</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>برچسب</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(بدون برچسب)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -943,6 +1225,14 @@
<translation>ارسال سکه</translation>
</message>
<message>
+ <source>Inputs...</source>
+ <translation>ورودی‌ها...</translation>
+ </message>
+ <message>
+ <source>automatically selected</source>
+ <translation>به طور خودکار انتخاب شدند</translation>
+ </message>
+ <message>
<source>Insufficient funds!</source>
<translation>بود جه نا کافی </translation>
</message>
@@ -959,10 +1249,6 @@
<translation>مبلغ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>اولویت:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>هزینه:</translation>
</message>
@@ -979,10 +1265,22 @@
<translation>هزینهٔ تراکنش:</translation>
</message>
<message>
+ <source>Choose...</source>
+ <translation>انتخاب...</translation>
+ </message>
+ <message>
+ <source>per kilobyte</source>
+ <translation>در هر کیلوبایت</translation>
+ </message>
+ <message>
<source>Hide</source>
<translation>پنهان کردن</translation>
</message>
<message>
+ <source>total at least</source>
+ <translation>در مجموع حداقل</translation>
+ </message>
+ <message>
<source>Recommended:</source>
<translation>توصیه شده:</translation>
</message>
@@ -991,10 +1289,6 @@
<translation>سفارشی:</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>روز تایید:</translation>
- </message>
- <message>
<source>normal</source>
<translation>نرمال</translation>
</message>
@@ -1011,6 +1305,10 @@
<translation>&amp;دریافت‌کنندهٔ جدید</translation>
</message>
<message>
+ <source>Clear all fields of the form.</source>
+ <translation>تمام قسمت های فرم را خالی کن.</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>پاکسازی &amp;همه</translation>
</message>
@@ -1026,6 +1324,18 @@
<source>S&amp;end</source>
<translation>&amp;ارسال</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>کپی تعداد</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>کپی مقدار</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(بدون برچسب)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1081,7 +1391,10 @@
<source>Memo:</source>
<translation>یادداشت:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1167,7 +1480,7 @@
<source>Reset all verify message fields</source>
<translation>بازنشانی تمام فیلدهای پیام</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1183,16 +1496,62 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>این پانل شامل توصیف کاملی از جزئیات تراکنش است</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>برچسب</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(بدون برچسب)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Copy label</source>
+ <translation>کپی برچسب</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>کپی مقدار</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>کپی شناسهٔ تراکنش</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>برچسب</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>آدرس</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1219,10 +1578,6 @@
<translation>اجرا در پشت زمینه به‌صورت یک سرویس و پذیرش دستورات</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>پذیرش اتصالات از بیرون (پیش فرض:1 بدون پراکسی یا اتصال)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation> هسته Bitcoin </translation>
</message>
@@ -1235,18 +1590,10 @@
<translation>هنگامی که یک تراکنش در کیف پولی رخ می دهد، دستور را اجرا کن(%s در دستورات بوسیله ی TxID جایگزین می شود)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>این یک نسخه ی آزمایشی است - با مسئولیت خودتان از آن استفاده کنید - آن را در معدن و بازرگانی بکار نگیرید.</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>بستن گزینه ایجاد</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>تنها در گره (های) مشخص شده متصل شوید</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>گزینه‌های اتصال:</translation>
</message>
@@ -1335,10 +1682,6 @@
<translation>مقدار تراکنش بسیار کم است</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>مقادیر تراکنش باید مثبت باشد</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>تراکنش بسیار بزرگ است</translation>
</message>
@@ -1371,6 +1714,10 @@
<translation>بار گیری آدرس ها</translation>
</message>
<message>
+ <source>(default: %s)</source>
+ <translation>(پیش‌فرض %s)</translation>
+ </message>
+ <message>
<source>Invalid -proxy address: '%s'</source>
<translation>آدرس پراکسی اشتباه %s</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 8faa3ce659..1e829aff9e 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>حذف</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>رمز/پَس فرِیز را دوباره وارد کنید</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -190,7 +193,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>wallet رمزگذاری شد و در حال حاضر قفل است</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -224,7 +227,7 @@
<source>&amp;Address</source>
<translation>حساب&amp;</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -247,6 +250,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>فرم</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -288,6 +298,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -298,6 +311,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>Client version</source>
@@ -343,6 +362,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -372,7 +394,7 @@
<source>S&amp;end</source>
<translation>و ارسال</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -411,7 +433,10 @@
<source>Memo:</source>
<translation>یادداشت:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -453,16 +478,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>این بخش جزئیات تراکنش را نشان می دهد</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -513,10 +556,6 @@
<translation>لود شدن آدرسها..</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>تنظیم کمینه اندازه بلاک بر حسب بایت (پیش فرض: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>تنظیم تعداد ریسمان ها برای سرویس دهی فراخوانی های RPC (پیش فرض: %d)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index b7b3115e25..db643e73d2 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Poista</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Toista uusi tunnuslause</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -115,6 +118,10 @@
<translation>&amp;Tietoja %1</translation>
</message>
<message>
+ <source>Show information about %1</source>
+ <translation>Näytä tietoa aiheesta %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Tietoja &amp;Qt</translation>
</message>
@@ -127,6 +134,10 @@
<translation>&amp;Asetukset...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Muuta kohteen %1 kokoonpanoasetuksia</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Salaa lompakko...</translation>
</message>
@@ -255,6 +266,14 @@
<translation><numerusform>%n aktiivinen yhteys Bitcoin-verkkoon</numerusform><numerusform>%n aktiivista yhteyttä Bitcoin-verkkoon</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Ladataan lohkoindeksiä...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Käsitellään lohkoja levyllä...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>Lohkojen lähdettä ei saatavilla...</translation>
</message>
@@ -262,26 +281,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Prosessoitu %n lohko rahansiirtohistoriasta.</numerusform><numerusform>Prosessoitu %n lohkoa rahansiirtohistoriasta.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n tunti</numerusform><numerusform>%n tuntia</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n päivä</numerusform><numerusform>%n päivää</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n viikko</numerusform><numerusform>%n viikkoa</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 ja %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n vuosi</numerusform><numerusform>%n vuotta</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 jäljessä</translation>
@@ -311,6 +310,14 @@
<translation>Rahansiirtohistoria on ajan tasalla</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Näytä %1 ohjeet saadaksesi listan mahdollisista Bitcoinin komentorivivalinnoista</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1-asiakas</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Saavutetaan verkkoa...</translation>
</message>
@@ -360,7 +367,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Lompakko on &lt;b&gt;salattu&lt;/b&gt; ja tällä hetkellä &lt;b&gt;lukittuna&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -380,10 +387,6 @@
<translation>Määrä:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteetti:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Palkkio:</translation>
</message>
@@ -435,11 +438,7 @@
<source>Confirmed</source>
<translation>Vahvistettu</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioriteetti</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -462,7 +461,7 @@
<source>&amp;Address</source>
<translation>&amp;Osoite</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -497,6 +496,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>Tietoja %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Komentorivi parametrit</translation>
</message>
@@ -532,7 +535,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Näytä aloitusruutu käynnistyksen yhteydessä (oletus: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Nollaa kaikki graafisen käyttöliittymän kautta tehdyt muutokset</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -540,6 +547,18 @@
<translation>Tervetuloa</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Tervetuloa %1 pariin.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Tämä on ensimmäinen kerta, kun %1 on käynnistetty, joten voit valita data-hakemiston paikan.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 lataa ja tallentaa kopion Bitcoinin lohkoketjusta. Vähintään %2Gt dataa tullaan tallentamaan tähän hakemistoon, ja tarve kasvaa ajan myötä. Lompakko tullaan myös tallentamaan tähän hakemistoon.</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Käytä oletuskansiota</translation>
</message>
@@ -565,6 +584,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Lomake</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Viimeisimmän lohkon aika</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Piilota</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +616,7 @@
<source>Select payment request file</source>
<translation>Valitse maksupyynnön tiedosto</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -594,6 +628,14 @@
<translation>&amp;Yleiset</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Käynnistä %1 automaattisesti järjestelmään kirjautumisen jälkeen.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Käynnistä %1 järjestelmään kirjautuessa</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>&amp;Tietokannan välimuistin koko</translation>
</message>
@@ -750,6 +792,10 @@
<translation>&amp;Käyttöliittymän kieli</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Tässä voit määritellä käyttöliittymän kielen. Muutokset astuvat voimaan seuraavan kerran, kun %1 käynnistetään.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>Yksikkö jona bitcoin-määrät näytetään</translation>
</message>
@@ -874,6 +920,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -883,11 +932,7 @@
<source>Node/Service</source>
<translation>Noodi/Palvelu</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Vasteaika</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -926,7 +971,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 ja %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -954,6 +1009,10 @@
<translation>Käyttää BerkeleyDB-versiota</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Data-hakemisto</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Käynnistysaika</translation>
</message>
@@ -1038,6 +1097,18 @@
<translation>Käyttöliittymä</translation>
</message>
<message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>Avaa %1 -debug-loki tämänhetkisestä data-hakemistosta. Tämä voi viedä muutaman sekunnin suurille lokitiedostoille.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>Pienennä fontin kokoa</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Suurenna fontin kokoa</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Palvelut</translation>
</message>
@@ -1114,14 +1185,6 @@
<translation>Tyhjennä konsoli</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Katkaise yhteys solmukohtaan</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Estä solmukohta</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;tunti</translation>
</message>
@@ -1138,10 +1201,6 @@
<translation>1 &amp;vuosi</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Poista solmukohdan esto</translation>
- </message>
- <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Ylös- ja alas-nuolet selaavat historiaa ja &lt;b&gt;Ctrl-L&lt;/b&gt; tyhjentää ruudun.</translation>
</message>
@@ -1268,7 +1327,7 @@
<source>Remove</source>
<translation>Poista</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1287,7 +1346,14 @@
<source>&amp;Save Image...</source>
<translation>&amp;Tallenna kuva</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Aika</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1323,10 +1389,6 @@
<translation>Määrä:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteetti:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Palkkio:</translation>
</message>
@@ -1387,10 +1449,6 @@
<translation>(Älykästä rahansiirtokulua ei ole vielä alustettu. Tähän kuluu yleensä aikaa muutaman lohkon verran...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Vahvistusaika:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normaali</translation>
</message>
@@ -1430,7 +1488,7 @@
<source>S&amp;end</source>
<translation>&amp;Lähetä</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1474,6 +1532,10 @@
<translation>Poista tämä alkio</translation>
</message>
<message>
+ <source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
+ <translation>Kulu vähennetään lähetettävästä määrästä. Saaja vastaanottaa vähemmän bitcoineja kuin merkitset Määrä-kenttään. Jos saajia on monia, kulu jaetaan tasan.</translation>
+ </message>
+ <message>
<source>S&amp;ubtract fee from amount</source>
<translation>V&amp;ähennä maksukulu määrästä</translation>
</message>
@@ -1505,10 +1567,17 @@
<source>Memo:</source>
<translation>Muistio:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 sulkeutuu...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>Älä sammuta tietokonetta ennenkuin tämä ikkuna katoaa.</translation>
</message>
@@ -1591,7 +1660,7 @@
<source>Reset all verify message fields</source>
<translation>Tyhjennä kaikki varmista-viesti-kentät</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1607,12 +1676,33 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>Aika</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Tämä ruutu näyttää yksityiskohtaisen tiedon rahansiirrosta</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Aika</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Date</source>
+ <translation>Aika</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1621,6 +1711,19 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Vie</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1683,48 +1786,52 @@
<translation>HTTP-palvelinta ei voitu käynnistää. Katso debug-lokista lisätietoja.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Hyväksy yhteyksiä ulkopuolelta (vakioasetus: 1 jos -proxy tai -connect ei määritelty)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin-ydin</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee on asetettu erittäin suureksi! Tämä on rahansiirtokulu jonka voit maksaa kun arvioitu rahansirtokulu ei ole saatavilla.</translation>
+ <source>The %s developers</source>
+ <translation>%s kehittäjät</translation>
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Kytkeydy annettuun osoitteeseen ja pidä linja aina auki. Käytä [host]:portin merkintätapaa IPv6:lle.</translation>
</message>
<message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>Ei voida lukita data-hakemistoa %s. %s on luultavasti jo käynnissä.</translation>
+ </message>
+ <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Suorita käsky kun lompakossa rahansiirto muuttuu (%s cmd on vaihdettu TxID kanssa)</translation>
</message>
<message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Tarkistathan että tietokoneesi päivämäärä ja kellonaika ovat oikeassa! Jos kellosi on väärässä, %s ei toimi oikein.</translation>
+ </message>
+ <message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Ole hyvä ja avusta, jos %s on mielestäsi hyödyllinen. Vieraile %s saadaksesi lisää tietoa ohjelmistosta.</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Aseta script varmistuksen threadien lukumäärä (%u - %d, 0= auto, &lt;0 = jätä näin monta ydintä vapaaksi, oletus: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Tämä on esi-julkaistu testiversio - Käytä omalla riskillä - Ei saa käytää louhimiseen tai kauppasovelluksiin.</translation>
+ <source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
+ <translation>Lohkotietokanta sisältää lohkon, joka vaikuttaa olevan tulevaisuudesta. Tämä saattaa johtua tietokoneesi virheellisesti asetetuista aika-asetuksista. Rakenna lohkotietokanta uudelleen vain jos olet varma, että tietokoneesi päivämäärä ja aika ovat oikein.</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Käytä UPnP:ta kuuntelevan portin kartoitukseen (oletus: 1 kun kuunnellaan ja -proxy ei käytössä)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Varoitus: Tietoverkko ei ole sovussa! Luohijat näyttävät kokevan virhetilanteita.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Varoitus: Olemme vertaisverkon kanssa ristiriidassa! Sinun tulee päivittää tai toisten solmujen tulee päivitää.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex-chainstate vaihtaaksesi -txindex</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Salli vertaisten yhdistää annetusta verkkomaskista tai IP-osoitteesta. Voidaan määrittää useampia kertoja.</translation>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s korruptoitunut, korjaaminen epäonnistui</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1735,18 +1842,26 @@
<translation>&lt;category&gt; voi olla:</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>Yritä palauttaa yksityiset avaimet korruptoituneesta lompakosta käynnistyksen yhteydessä</translation>
+ </message>
+ <message>
<source>Block creation options:</source>
<translation>Lohkon luonnin asetukset:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Yhidstä ainoastaan määrättyihin noodeihin</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>-%s -osoitteen '%s' selvittäminen epäonnistui</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Yhteyden valinnat:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Tekijänoikeus (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>Vioittunut lohkotietokanta havaittu</translation>
</message>
@@ -1775,6 +1890,18 @@
<translation>Virhe alustaessa lompakon tietokantaympäristöä %s!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>Virhe ladattaessa %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>Virhe ladattaessa %s: Lompakko vioittunut</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>Virhe ladattaessa %s: Tarvitset uudemman %s -version</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Virhe avattaessa lohkoketjua</translation>
</message>
@@ -1803,6 +1930,22 @@
<translation>Virheellinen -onion osoite: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>Virheellinen määrä -%s=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
+ <translation>Virheellinen määrä -fallbackfee=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
+ <source>Loading banlist...</source>
+ <translation>Ladataan kieltolistaa...</translation>
+ </message>
+ <message>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Todennusevästeen sijainti (oletus: datahakemisto)</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Ei tarpeeksi tiedostomerkintöjä vapaana.</translation>
</message>
@@ -1811,6 +1954,14 @@
<translation>Yhdistä vain solmukohtiin &lt;net&gt;-verkossa (ipv4, ipv6 tai onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Näytä tämä ohjeviesti ja poistu</translation>
+ </message>
+ <message>
+ <source>Print version and exit</source>
+ <translation>Näytä versio ja poistu.</translation>
+ </message>
+ <message>
<source>Prune mode is incompatible with -txindex.</source>
<translation>Karsittu tila ei ole yhteensopiva -txindex:n kanssa.</translation>
</message>
@@ -1827,6 +1978,22 @@
<translation>Aseta lompakkotiedosto (data-hakemiston sisällä)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Lähdekoodi löytyy %s.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
+ <translation>Argumenttia -benchmark ei tueta, käytä -debug=bench.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -debugnet ignored, use -debug=net.</source>
+ <translation>Argumenttia -debugnet ei tueta, käytä -debug=net.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -tor found, use -onion.</source>
+ <translation>Argumenttia -tor ei tueta, käytä -onion.</translation>
+ </message>
+ <message>
<source>Use UPnP to map the listening port (default: %u)</source>
<translation>Käytä UPnP:ta kuuntelevan portin kartoittamiseen (oletus: %u)</translation>
</message>
@@ -1843,6 +2010,10 @@
<translation>Lompakko %s sijaitsee data-hakemiston ulkopuolella %s</translation>
</message>
<message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Lompakko tarvitsee uudelleenkirjoittaa: käynnistä %s uudelleen</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Lompakon valinnat:</translation>
</message>
@@ -1855,6 +2026,10 @@
<translation>Paljasta omat IP-osoitteet (oletus: 1 kun kuunnellaan ja -externalip tai -proxy ei ole käytössä)</translation>
</message>
<message>
+ <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+ <translation>Virhe: Saapuvien yhteyksien kuuntelu epäonnistui (kuuntelu palautti virheen %s)</translation>
+ </message>
+ <message>
<source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
<translation>Aja komento kun olennainen hälytys vastaanotetaan tai nähdään todella pitkä haara (%s komennossa korvataan viestillä)</translation>
</message>
@@ -1863,6 +2038,10 @@
<translation>Aseta maksimikoko korkea prioriteetti/pieni palkkio rahansiirtoihin tavuissa (oletus: %d)</translation>
</message>
<message>
+ <source>The transaction amount is too small to send after the fee has been deducted</source>
+ <translation>Siirtomäärä on liian pieni lähetettäväksi kulun vähentämisen jälkeen.</translation>
+ </message>
+ <message>
<source>(default: %u)</source>
<translation>(oletus: %u)</translation>
</message>
@@ -1871,6 +2050,10 @@
<translation>Hyväksy julkisia REST-pyyntöjä (oletus: %u)</translation>
</message>
<message>
+ <source>Automatically create Tor hidden service (default: %d)</source>
+ <translation>Luo Tor-salattu palvelu automaattisesti (oletus: %d)</translation>
+ </message>
+ <message>
<source>Connect through SOCKS5 proxy</source>
<translation>Yhdistä SOCKS5 proxin kautta</translation>
</message>
@@ -1879,14 +2062,30 @@
<translation>Virheitä tietokantaa luettaessa, ohjelma pysäytetään.</translation>
</message>
<message>
+ <source>Imports blocks from external blk000??.dat file on startup</source>
+ <translation>Tuo lohkot ulkoisesta blk000??.dat -tiedostosta käynnistettäessä</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>Tietoa</translation>
</message>
<message>
+ <source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s' (must be at least %s)</source>
+ <translation>Kelvoton määrä argumentille -paytxfee=&lt;amount&gt;: '%s' (pitää olla vähintään %s)</translation>
+ </message>
+ <message>
+ <source>Invalid netmask specified in -whitelist: '%s'</source>
+ <translation>Kelvoton verkkopeite määritelty argumentissa -whitelist: '%s'</translation>
+ </message>
+ <message>
<source>Keep at most &lt;n&gt; unconnectable transactions in memory (default: %u)</source>
<translation>Pidä enimmillään &lt;n&gt; yhdistämiskelvotonta rahansiirtoa muistissa (oletus: %u)</translation>
</message>
<message>
+ <source>Need to specify a port with -whitebind: '%s'</source>
+ <translation>Pitää määritellä portti argumentilla -whitebind: '%s'</translation>
+ </message>
+ <message>
<source>Node relay options:</source>
<translation>Välityssolmukohdan asetukset:</translation>
</message>
@@ -1935,10 +2134,6 @@
<translation>Siirtosumma liian pieni</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Siirtosumman tulee olla positiivinen</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Rahansiirto on liian suuri maksukulukäytännölle</translation>
</message>
@@ -1991,10 +2186,6 @@
<translation>-maxtxfee on asetettu erittäin suureksi! Tämänkokoisia kuluja saatetaan maksaa yhdessä rahansiirrossa.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee on asetettu erittäin suureksi! Tämä on rahansiirtokulu, jonka maksat, mikäli lähetät rahansiirron.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Älä pidä rahansiirtoja muistivarannoissa kauemmin kuin &lt;n&gt; tuntia (oletus: %u)</translation>
</message>
@@ -2003,6 +2194,10 @@
<translation>Kuinka läpikäyvä lohkojen -checkblocks -todennus on (0-4, oletus: %u)</translation>
</message>
<message>
+ <source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
+ <translation>Tulosta debuggaustieto (oletus: %u, annettu &lt;category&gt; valinnainen)</translation>
+ </message>
+ <message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
<translation>Käytä erillistä SOCKS5-proxyä tavoittaaksesi vertaisia Tor-piilopalveluiden kautta (oletus: %s)</translation>
</message>
@@ -2067,8 +2262,8 @@
<translation>Aseta avainaltaan kooksi &lt;n&gt; (oletus: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Aseta pienin mahdollinen lohkokoko tavuina (oletus: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Aseta suurin BIP141-lohkopaino (oletus: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index 0b538d7664..eef88b43a3 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Supprimer</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Choisir l'adresse à laquelle envoyer des pièces</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Choisir l'adresse avec laquelle recevoir des pîèces</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>C&amp;hoisir</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Adresses d'envoi</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Adresses de réception</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Voici vos adresses Bitcoin pour envoyer des paiements. Vérifiez toujours le montant et l'adresse du destinataire avant d'envoyer des pièces.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Voici vos adresses Bitcoin pour recevoir des paiements. Il est recommandé d'utiliser une nouvelle adresse de réception pour chaque transaction.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copier l'adresse</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copier l'é&amp;tiquette</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Modifier</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exporter la liste d'adresses</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Valeurs séparées par des virgules (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Échec d'exportation</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Une erreur est survenue lors de l'enregistrement de la liste d'adresses vers %1. Veuillez ressayer plus tard.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Étiquette</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(aucune étiquette)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Répéter la phrase de passe</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Saisissez la nouvelle phrase de passe du porte-monnaie.&lt;br/&gt;Veuillez utiliser une phrase de passe composée de &lt;b&gt;dix caractères aléatoires ou plus&lt;/b&gt;, ou de &lt;b&gt;huit mots ou plus&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Chiffrer le porte-monnaie</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Cette opération nécessite votre phrase de passe pour déverrouiller le porte-monnaie.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Déverrouiller le porte-monnaie</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Cette opération nécessite votre phrase de passe pour déchiffrer le porte-monnaie.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Déchiffrer le porte-monnaie</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Changer la phrase de passe</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Saisir l'ancienne puis la nouvelle phrase de passe du porte-monnaie.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirmer le chiffrement du porte-monnaie</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Avertissement : si vous chiffrez votre porte-monnaie et perdez votre phrase de passe, vous &lt;b&gt;PERDREZ TOUS VOS BITCOINS&lt;/b&gt; !</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Voulez-vous vraiment chiffrer votre porte-monnaie ?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Le porte-monnaie est chiffré</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 va maintenant se fermer pour terminer le processus de chiffrement. Souvenez-vous que le chiffrement de votre porte-monnaie ne peut pas protéger entièrement vos bitcoins contre le vol par des logiciels malveillants qui infecteraient votre ordinateur.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANT : toutes les sauvegardes précédentes du fichier de votre porte-monnaie devraient être remplacées par le fichier du porte-monnaie chiffré nouvellement généré. Pour des raisons de sécurité, les sauvegardes précédentes de votre fichier de porte-monnaie non chiffré deviendront inutilisables dès que vous commencerez à utiliser le nouveau porte-monnaie chiffré.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Échec de chiffrement du porte-monnaie</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Le chiffrement du porte-monnaie a échoué en raison d'une erreur interne. Votre porte-monnaie n'a pas été chiffré.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Les phrases de passe saisies ne correspondent pas.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Échec de déverrouillage du porte-monnaie</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La phrase de passe saisie pour déchiffrer le porte-monnaie était erronée.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Échec de déchiffrement du porte-monnaie</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>La phrase de passe du porte-monnaie a été modifiée avec succès.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Avertissement : la touche Verr. Maj. est activée !</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -76,11 +235,11 @@
<name>BitcoinGUI</name>
<message>
<source>Sign &amp;message...</source>
- <translation>&amp;Signer le message...</translation>
+ <translation>Signer un &amp;message...</translation>
</message>
<message>
<source>Synchronizing with network...</source>
- <translation>Synchronisation avec le réseau en cours…</translation>
+ <translation>Synchronisation avec le réseau…</translation>
</message>
<message>
<source>&amp;Overview</source>
@@ -100,7 +259,7 @@
</message>
<message>
<source>Browse transaction history</source>
- <translation>Parcourir l'historique des transactions</translation>
+ <translation>Parcourir l'historique transactionnel</translation>
</message>
<message>
<source>E&amp;xit</source>
@@ -156,7 +315,19 @@
</message>
<message>
<source>Open &amp;URI...</source>
- <translation>Ouvrir un &amp;URI...</translation>
+ <translation>Ouvrir une &amp;URI...</translation>
+ </message>
+ <message>
+ <source>Click to disable network activity.</source>
+ <translation>Cliquer pour désactiver l'activité réseau.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>L'activité réseau est désactivée.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Cliquer pour réactiver l'activité réseau.</translation>
</message>
<message>
<source>Reindexing blocks on disk...</source>
@@ -204,15 +375,15 @@
</message>
<message>
<source>&amp;Show / Hide</source>
- <translation>&amp;Afficher / Cacher</translation>
+ <translation>&amp;Afficher / cacher</translation>
</message>
<message>
<source>Show or hide the main Window</source>
- <translation>Afficher ou masquer la fenêtre principale</translation>
+ <translation>Afficher ou cacher la fenêtre principale</translation>
</message>
<message>
<source>Encrypt the private keys that belong to your wallet</source>
- <translation>Chiffrer les clefs privées de votre porte-monnaie</translation>
+ <translation>Chiffrer les clés privées qui appartiennent à votre porte-monnaie</translation>
</message>
<message>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
@@ -220,7 +391,7 @@
</message>
<message>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
- <translation>Vérifier les messages pour vous assurer qu'ils ont été signés avec les adresses Bitcoin spécifiées</translation>
+ <translation>Vérifier les messages pour s'assurer qu'ils ont été signés avec les adresses Bitcoin spécifiées</translation>
</message>
<message>
<source>&amp;File</source>
@@ -228,7 +399,7 @@
</message>
<message>
<source>&amp;Settings</source>
- <translation>&amp;Réglages</translation>
+ <translation>&amp;Paramètres</translation>
</message>
<message>
<source>&amp;Help</source>
@@ -240,7 +411,7 @@
</message>
<message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
- <translation>Demander des paiements (génère des codes QR et des URIs bitcoin:)</translation>
+ <translation>Demander des paiements (génère des codes QR et des URI bitcoin:)</translation>
</message>
<message>
<source>Show the list of used sending addresses and labels</source>
@@ -252,7 +423,7 @@
</message>
<message>
<source>Open a bitcoin: URI or payment request</source>
- <translation>Ouvrir un URI bitcoin: ou une demande de paiement</translation>
+ <translation>Ouvrir une URI bitcoin: ou une demande de paiement</translation>
</message>
<message>
<source>&amp;Command-line options</source>
@@ -278,29 +449,9 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n bloc d'historique transactionnel a été traité</numerusform><numerusform>%n blocs d'historique transactionnel ont été traités</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n heure</numerusform><numerusform>%n heures</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n jour</numerusform><numerusform>%n jours</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semaine</numerusform><numerusform>%n semaines</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 et %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n an</numerusform><numerusform>%n ans</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
- <translation>%1 en retard</translation>
+ <translation>en retard de %1</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
@@ -308,7 +459,7 @@
</message>
<message>
<source>Transactions after this will not yet be visible.</source>
- <translation>Les transactions après ceci ne sont pas encore visibles.</translation>
+ <translation>Les transactions suivantes ne seront pas déjà visibles.</translation>
</message>
<message>
<source>Error</source>
@@ -336,7 +487,7 @@
</message>
<message>
<source>Catching up...</source>
- <translation>Rattrapage en cours…</translation>
+ <translation>Rattrapage…</translation>
</message>
<message>
<source>Date: %1
@@ -377,6 +528,14 @@
<translation>Transaction entrante</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>La génération de clé HD est &lt;b&gt;activée&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>La génération de clé HD est &lt;b&gt;désactivée&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Le porte-monnaie est &lt;b&gt;chiffré&lt;/b&gt; et est actuellement &lt;b&gt;déverrouillé&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Le porte-monnaie est &lt;b&gt;chiffré&lt;/b&gt; et actuellement &lt;b&gt;verrouillé&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Une erreur fatale est survenue. Bitcoin ne peut plus continuer en toute sécurité et va s'arrêter.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>Montant :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorité :</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Frais :</translation>
</message>
@@ -425,7 +584,7 @@
</message>
<message>
<source>(un)select all</source>
- <translation>Tout (dé)sélectionner</translation>
+ <translation>Tout (des)sélectionner</translation>
</message>
<message>
<source>Tree mode</source>
@@ -460,8 +619,84 @@
<translation>Confirmée</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorité</translation>
+ <source>Copy address</source>
+ <translation>Copier l’adresse</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copier l’étiquette</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copier le montant</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copier l'ID de la transaction</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Verrouiller les transactions non dépensées</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Déverrouiller les transactions non dépensées</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copier la quantité</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copier les frais</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copier après les frais</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copier les octets</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copier la poussière</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copier la monnaie</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 verrouillée)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>oui</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>non</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Cette étiquette devient rouge si un destinataire reçoit un montant inférieur au seuil actuel de poussière.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Peut varier +/- %1 satoshi(s) par entrée.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(aucune étiquette)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>monnaie de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(monnaie)</translation>
</message>
</context>
<context>
@@ -472,7 +707,7 @@
</message>
<message>
<source>&amp;Label</source>
- <translation>&amp;Étiquette</translation>
+ <translation>É&amp;tiquette</translation>
</message>
<message>
<source>The label associated with this address list entry</source>
@@ -480,12 +715,44 @@
</message>
<message>
<source>The address associated with this address list entry. This can only be modified for sending addresses.</source>
- <translation>L'adresse associée à cette entrée de la liste d'adresses. Ceci ne peut être modifié que pour les adresses d'envoi.</translation>
+ <translation>L'adresse associée à cette entrée de la liste d'adresses. Cela ne peut être modifié que pour les adresses d'envoi.</translation>
</message>
<message>
<source>&amp;Address</source>
<translation>&amp;Adresse</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nouvelle adresse de réception</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nouvelle adresse d’envoi</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Modifier l’adresse de réception</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Modifier l’adresse d'envoi</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>L'adresse saisie « %1 » n'est pas une adresse Bitcoin valide.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>L’adresse saisie « %1 » est déjà présente dans le carnet d'adresses.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Impossible de déverrouiller le porte-monnaie.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Échec de génération de la nouvelle clé.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -499,7 +766,7 @@
</message>
<message>
<source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
- <translation>Le répertoire existe déjà. Ajoutez %1 si vous voulez créer un nouveau répertoire ici.</translation>
+ <translation>Le répertoire existe déjà. Ajouter %1 si vous comptez créer un nouveau répertoire ici.</translation>
</message>
<message>
<source>Path already exists, and is not a directory.</source>
@@ -605,18 +872,69 @@
</message>
<message numerus="yes">
<source>(of %n GB needed)</source>
- <translation><numerusform>(sur %n Go nécessaire)</numerusform><numerusform>(sur %n Go nécessaires)</numerusform></translation>
+ <translation><numerusform>(sur %n Go requis)</numerusform><numerusform>(sur %n Go requis)</numerusform></translation>
+ </message>
+</context>
+<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulaire</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Les transactions récentes ne sont peut-être pas encore visibles, et par conséquent, le solde de votre porte-monnaie est peut-être erroné. Cette information sera juste une fois que votre porte-monnaie aura fini de se synchroniser avec le réseau Bitcoin, tel que décrit ci-dessous. </translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>Toute tentative de dépense de bitcoins affectés par des transactions qui ne sont pas encore affichées ne sera pas acceptée par le réseau.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Nombre de blocs restants</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Inconnu...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Horodatage du dernier bloc</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progression</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Avancement de la progression par heure</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>calcul en cours...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Temps estimé avant la fin de la synchronisation</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Cacher</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Inconnu. Synchronisation des en-têtes (%1)...</translation>
</message>
</context>
<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
- <translation>Ouvrir un URI</translation>
+ <translation>Ouvrir une URI</translation>
</message>
<message>
<source>Open payment request from URI or file</source>
- <translation>Ouvrir une demande de paiement à partir d'un URI ou d'un fichier</translation>
+ <translation>Ouvrir une demande de paiement à partir d'une URI ou d'un fichier</translation>
</message>
<message>
<source>URI:</source>
@@ -626,6 +944,10 @@
<source>Select payment request file</source>
<translation>Choisir le fichier de demande de paiement</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Choisir le fichier de demande de paiement à ouvrir</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -635,7 +957,7 @@
</message>
<message>
<source>&amp;Main</source>
- <translation>Réglages &amp;principaux</translation>
+ <translation>&amp;Principaux</translation>
</message>
<message>
<source>Automatically start %1 after logging in to the system.</source>
@@ -655,7 +977,7 @@
</message>
<message>
<source>Number of script &amp;verification threads</source>
- <translation>Nombre d'exétrons de &amp;vérification de script</translation>
+ <translation>Nombre de fils de &amp;vérification de script</translation>
</message>
<message>
<source>Accept connections from outside</source>
@@ -667,7 +989,7 @@
</message>
<message>
<source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
- <translation>Adresse IP du mandataire (par ex. IPv4 : 127.0.0.1 / IPv6 : ::1)</translation>
+ <translation>Adresse IP du mandataire (p. ex. IPv4 : 127.0.0.1 / IPv6 : ::1)</translation>
</message>
<message>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source>
@@ -675,7 +997,7 @@
</message>
<message>
<source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
- <translation>URL de tiers (par ex. un explorateur de blocs) apparaissant dans l'onglet des transactions comme éléments du menu contextuel. %s dans l'URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
+ <translation>URL de tiers (p. ex. un explorateur de blocs) apparaissant dans l'onglet des transactions comme éléments du menu contextuel. %s dans l'URL est remplacé par le hachage de la transaction. Les URL multiples sont séparées par une barre verticale |.</translation>
</message>
<message>
<source>Third party transaction URLs</source>
@@ -691,7 +1013,7 @@
</message>
<message>
<source>&amp;Reset Options</source>
- <translation>&amp;Réinitialisation des options</translation>
+ <translation>&amp;Réinitialiser les options</translation>
</message>
<message>
<source>&amp;Network</source>
@@ -711,11 +1033,11 @@
</message>
<message>
<source>Enable coin &amp;control features</source>
- <translation>Activer les fonctions de &amp;contrôle des pièces </translation>
+ <translation>Activer les fonctions de &amp;contrôle des pièces</translation>
</message>
<message>
<source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
- <translation>Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d'une transaction ne peut pas être utilisée tant que cette transaction n'a pas reçu au moins une confirmation. Ceci affecte aussi comment votre solde est calculé.</translation>
+ <translation>Si vous désactivé la dépense de la monnaie non confirmée, la monnaie d'une transaction ne peut pas être utilisée tant que cette transaction n'a pas reçu au moins une confirmation. Celai affecte aussi le calcul de votre solde.</translation>
</message>
<message>
<source>&amp;Spend unconfirmed change</source>
@@ -723,7 +1045,7 @@
</message>
<message>
<source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
- <translation>Ouvrir le port du client Bitcoin automatiquement sur le routeur. Ceci ne fonctionne que si votre routeur supporte l'UPnP et si la fonctionnalité est activée.</translation>
+ <translation>Ouvrir automatiquement le port du client Bitcoin sur le routeur. Cela ne fonctionne que si votre routeur prend en charge l'UPnP et si la fonction est activée.</translation>
</message>
<message>
<source>Map port using &amp;UPnP</source>
@@ -739,7 +1061,7 @@
</message>
<message>
<source>Proxy &amp;IP:</source>
- <translation>&amp;IP du serveur mandataire :</translation>
+ <translation>&amp;IP du mandataire :</translation>
</message>
<message>
<source>&amp;Port:</source>
@@ -747,7 +1069,7 @@
</message>
<message>
<source>Port of the proxy (e.g. 9050)</source>
- <translation>Port du serveur mandataire (par ex. 9050)</translation>
+ <translation>Port du mandataire (p. ex. 9050)</translation>
</message>
<message>
<source>Used for reaching peers via:</source>
@@ -791,11 +1113,11 @@
</message>
<message>
<source>Show only a tray icon after minimizing the window.</source>
- <translation>Afficher uniquement une icône système après minimisation.</translation>
+ <translation>N'afficher qu'une icône dans la zone de notification après minimisation.</translation>
</message>
<message>
<source>&amp;Minimize to the tray instead of the taskbar</source>
- <translation>&amp;Minimiser dans la barre système au lieu de la barre des tâches</translation>
+ <translation>&amp;Minimiser dans la zone de notification au lieu de la barre des tâches</translation>
</message>
<message>
<source>M&amp;inimize on close</source>
@@ -819,7 +1141,7 @@
</message>
<message>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
- <translation>Choisissez la sous-unité par défaut pour l'affichage dans l'interface et lors de l'envoi de pièces.</translation>
+ <translation>Choisir la sous-unité par défaut d'affichage dans l'interface et lors d'envoi de pièces.</translation>
</message>
<message>
<source>Whether to show coin control features or not.</source>
@@ -847,7 +1169,7 @@
</message>
<message>
<source>Client restart required to activate changes.</source>
- <translation>Le redémarrage du client est nécessaire pour activer les changements.</translation>
+ <translation>Le redémarrage du client est exigé pour activer les changements.</translation>
</message>
<message>
<source>Client will be shut down. Do you want to proceed?</source>
@@ -882,7 +1204,7 @@
</message>
<message>
<source>Your current spendable balance</source>
- <translation>Votre solde actuel pouvant être dépensé</translation>
+ <translation>Votre solde actuel disponible</translation>
</message>
<message>
<source>Pending:</source>
@@ -890,7 +1212,7 @@
</message>
<message>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
- <translation>Total des transactions qui doivent encore être confirmées et qu'il n'est pas encore possible de dépenser</translation>
+ <translation>Total des transactions qui doivent encore être confirmées et qui ne sont pas prises en compte dans le solde disponible</translation>
</message>
<message>
<source>Immature:</source>
@@ -938,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Erreur de demande de paiement</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Impossible de démarrer le gestionnaire de cliquer-pour-payer bitcoin:</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Gestion des URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>L'URL de récupération de la demande de paiement est invalide : %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Adresse de paiement invalide %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>L'URI ne peut pas être analysée ! Cela peut être causé par une adresse Bitcoin invalide ou par des paramètres d'URI mal formés.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Gestion des fichiers de demande de paiement</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Le fichier de demande de paiement ne peut pas être lu ! Cela peut être causé par un fichier de demande de paiement invalide.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Demande de paiement rejetée</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Le réseau de la demande de paiement ne correspond pas au réseau du client.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La demande de paiement a expiré</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>La demande de paiement n'est pas initialisée.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Les demandes de paiements non vérifiées vers des scripts de paiement personnalisés ne sont pas prises en charge.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Demande de paiement invalide.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Le paiement demandé d'un montant de %1 est trop faible (considéré comme de la poussière).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Remboursement de %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>La demande de paiement %1 est trop grande (%2 octets, %3 octets permis).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Erreur de communication avec %1 : %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>La demande de paiement ne peut pas être analysée !</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Mauvaise réponse du serveur %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Erreur de demande réseau</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Le paiement a été confirmé</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -948,8 +1361,12 @@
<translation>Nœud/service</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Temps de ping</translation>
+ <source>NodeId</source>
+ <translation>NodeId</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Ping</translation>
</message>
</context>
<context>
@@ -990,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n seconde</numerusform><numerusform>%n secondes</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n minute</numerusform><numerusform>%n minutes</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n heure</numerusform><numerusform>%n heures</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n jour</numerusform><numerusform>%n jours</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n semaine</numerusform><numerusform>%n semaines</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 et %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n an</numerusform><numerusform>%n ans</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 ne s'est pas encore arrêté en toute sécurité...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Erreur : le répertoire de données indiqué « %1 » n'existe pas.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Erreur : impossible d'analyser le fichier de configuration : %1. N’utiliser que la syntaxe clef=valeur.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Erreur : %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Enregistrer l'image...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copier l'image</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Enregistrer le code QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Image PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1107,7 +1590,7 @@
</message>
<message>
<source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
- <translation>Ouvrir le journal de débogage de %1 depuis le répertoire de données actuel. Ceci peut prendre quelques secondes pour les journaux de grande taille.</translation>
+ <translation>Ouvrir le fichier journal de débogage de %1 à partir du répertoire de données actuel. Cela peut prendre quelques secondes pour les fichiers journaux de grande taille.</translation>
</message>
<message>
<source>Decrease font size</source>
@@ -1143,13 +1626,17 @@
</message>
<message>
<source>The duration of a currently outstanding ping.</source>
- <translation>La durée d'un ping actuellement en cours.</translation>
+ <translation>La durée d'un ping en cours.</translation>
</message>
<message>
<source>Ping Wait</source>
<translation>Attente du ping</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Ping min.</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Décalage temporel</translation>
</message>
@@ -1171,7 +1658,7 @@
</message>
<message>
<source>&amp;Clear</source>
- <translation>&amp;Nettoyer</translation>
+ <translation>&amp;Effacer</translation>
</message>
<message>
<source>Totals</source>
@@ -1187,19 +1674,11 @@
</message>
<message>
<source>Debug log file</source>
- <translation>Journal de débogage</translation>
+ <translation>Fichier journal de débogage</translation>
</message>
<message>
<source>Clear console</source>
- <translation>Nettoyer la console</translation>
- </message>
- <message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Déconnecter le nœud</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Bannir le nœud pendant</translation>
+ <translation>Effacer la console</translation>
</message>
<message>
<source>1 &amp;hour</source>
@@ -1218,8 +1697,16 @@
<translation>1 &amp;an</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Réhabiliter le nœud</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Déconnecter</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Bannir pendant</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>&amp;Réhabiliter</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1227,13 +1714,21 @@
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
- <translation>Utiliser les touches de curseur pour naviguer dans l'historique et &lt;b&gt;Ctrl-L&lt;/b&gt; pour effacer l'écran.</translation>
+ <translation>Utiliser les touches de déplacement pour naviguer dans l'historique et &lt;b&gt;Ctrl-L&lt;/b&gt; pour effacer l'écran.</translation>
</message>
<message>
<source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
<translation>Taper &lt;b&gt;help&lt;/b&gt; pour afficher une vue générale des commandes proposées.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>AVERTISSEMENT : des fraudeurs sont réputés être à l'oeuvre, demandant aux utilisateurs de taper des commandes ici, et dérobant le contenu de leurs porte-monnaie. Ne pas utiliser cette console sans une compréhension parfaite des conséquences d'une commande.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>L'activité réseau est désactivée.</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 o</translation>
</message>
@@ -1298,7 +1793,7 @@
</message>
<message>
<source>Reuse one of the previously used receiving addresses. Reusing addresses has security and privacy issues. Do not use this unless re-generating a payment request made before.</source>
- <translation>Réutilise une adresse de réception précédemment utilisée. Réutiliser une adresse pose des problèmes de sécurité et de vie privée. N'utilisez pas cette option sauf si vous générez à nouveau une demande de paiement déjà faite.</translation>
+ <translation>Réutiliser une adresse de réception utilisée précédemment. Réutiliser une adresse comporte des problèmes de sécurité et de confidentialité. À ne pas utiliser, sauf pour générer une demande de paiement faite au préalable.</translation>
</message>
<message>
<source>R&amp;euse an existing receiving address (not recommended)</source>
@@ -1306,19 +1801,19 @@
</message>
<message>
<source>An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
- <translation>Un message optionnel à joindre à la demande de paiement qui sera affiché à l'ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin.</translation>
+ <translation>Un message facultatif à joindre à la demande de paiement et qui sera affiché à l'ouverture de celle-ci. Note : le message ne sera pas envoyé avec le paiement par le réseau Bitcoin.</translation>
</message>
<message>
<source>An optional label to associate with the new receiving address.</source>
- <translation>Un étiquette optionnelle à associer à la nouvelle adresse de réception</translation>
+ <translation>Un étiquette facultative à associer à la nouvelle adresse de réception.</translation>
</message>
<message>
<source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
- <translation>Utiliser ce formulaire pour demander des paiements. Tous les champs sont &lt;b&gt;optionnels&lt;/b&gt;.</translation>
+ <translation>Utiliser ce formulaire pour demander des paiements. Tous les champs sont &lt;b&gt;facultatifs&lt;/b&gt;.</translation>
</message>
<message>
<source>An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
- <translation>Un montant optionnel à demander. Laisser ceci vide ou à zéro pour ne pas demander de montant spécifique.</translation>
+ <translation>Un montant facultatif à demander. Ne rien saisir ou un zéro pour ne pas demander de montant spécifique.</translation>
</message>
<message>
<source>Clear all fields of the form.</source>
@@ -1334,11 +1829,11 @@
</message>
<message>
<source>&amp;Request payment</source>
- <translation>&amp;Demande de paiement</translation>
+ <translation>&amp;Demander un paiement</translation>
</message>
<message>
<source>Show the selected request (does the same as double clicking an entry)</source>
- <translation>Afficher la demande choisie (identique à un double-clic sur une entrée)</translation>
+ <translation>Afficher la demande choisie (comme double-cliquer sur une entrée)</translation>
</message>
<message>
<source>Show</source>
@@ -1346,11 +1841,27 @@
</message>
<message>
<source>Remove the selected entries from the list</source>
- <translation>Enlever les entrées sélectionnées de la liste</translation>
+ <translation>Retirer les entrées sélectionnées de la liste</translation>
</message>
<message>
<source>Remove</source>
- <translation>Enlever</translation>
+ <translation>Retirer</translation>
+ </message>
+ <message>
+ <source>Copy URI</source>
+ <translation>Copier l'URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copier l’étiquette</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copier le message</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copier le montant</translation>
</message>
</context>
<context>
@@ -1369,7 +1880,74 @@
</message>
<message>
<source>&amp;Save Image...</source>
- <translation>&amp;Sauvegarder l'image...</translation>
+ <translation>&amp;Enregistrer l'image...</translation>
+ </message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Demande de paiement à %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informations de paiement</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Montant</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Étiquette</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Message</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>L'URI résultante est trop longue. Essayez de réduire le texte de l'étiquette ou du message.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Erreur d'encodage de l'URI en code QR.</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Date</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Étiquette</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Message</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(aucune étiquette)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(aucun message)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(aucun montant demandé)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Demandée</translation>
</message>
</context>
<context>
@@ -1407,10 +1985,6 @@
<translation>Montant :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorité :</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Frais :</translation>
</message>
@@ -1424,7 +1998,7 @@
</message>
<message>
<source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
- <translation>Si ceci est actif mais l'adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée.</translation>
+ <translation>Si cette option est activée, et l'adresse de monnaie rendue est vide ou invalide, la monnaie sera envoyée vers une adresse nouvellement générée.</translation>
</message>
<message>
<source>Custom change address</source>
@@ -1460,7 +2034,7 @@
</message>
<message>
<source>Paying only the minimum fee is just fine as long as there is less transaction volume than space in the blocks. But be aware that this can end up in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
- <translation>Il est correct de payer les frais minimum tant que le volume transactionnel est inférieur à l'espace dans les blocs. Mais soyez conscient que ceci pourrait résulter en une transaction n'étant jamais confirmée une fois qu'il y aura plus de transactions que le réseau ne pourra en traiter.</translation>
+ <translation>Il est correct de payer les frais minimum tant que le volume transactionnel est inférieur à l'espace dans les blocs. Mais soyez conscient que cela pourrait résulter en une transaction n'étant jamais confirmée une fois qu'il y aura plus de transactions que le réseau ne pourra en traiter.</translation>
</message>
<message>
<source>(read the tooltip)</source>
@@ -1476,11 +2050,7 @@
</message>
<message>
<source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
- <translation>(Les frais intelligents ne sont pas encore initialisés. Ceci prend habituellement quelques blocs...)</translation>
- </message>
- <message>
- <source>Confirmation time:</source>
- <translation>Temps de confirmation :</translation>
+ <translation>(Les frais intelligents ne sont pas encore initialisés. Cela prend habituellement quelques blocs...)</translation>
</message>
<message>
<source>normal</source>
@@ -1507,8 +2077,12 @@
<translation>Poussière :</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Estimation du délai de confirmation :</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
- <translation>&amp;Tout nettoyer</translation>
+ <translation>&amp;Tout effacer</translation>
</message>
<message>
<source>Balance:</source>
@@ -1522,6 +2096,118 @@
<source>S&amp;end</source>
<translation>E&amp;nvoyer</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copier la quantité</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copier le montant</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copier les frais</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copier après les frais</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copier les octets</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copier la poussière</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copier la monnaie</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 à %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Voulez-vous vraiment envoyer ?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>ajoutés comme frais de transaction</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Montant total %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>ou</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirmer l’envoi de pièces</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>L'adresse du destinataire est invalide. Veuillez la revérifier.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Le montant à payer doit être supérieur à 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Le montant dépasse votre solde.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Le montant dépasse votre solde lorsque les frais de transaction de %1 sont inclus.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Adresse identique trouvée : chaque adresse ne devrait être utilisée qu'une fois.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Échec de création de la transaction !</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>La transaction a été rejetée pour la raison suivante: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Des frais supérieurs à %1 sont considérés comme ridiculement élevés.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>La demande de paiement a expiré</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n bloc</numerusform><numerusform>%n blocs</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Payer seulement les frais exigés de %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Il est estimé que la confirmation commencera dans %n bloc.</numerusform><numerusform>Il est estimé que la confirmation commencera dans %n blocs.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Avertissement : adresse Bitcoin invalide</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Avertissement : adresse de monnaie rendue inconnue</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(aucune étiquette)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1555,7 +2241,7 @@
</message>
<message>
<source>Paste address from clipboard</source>
- <translation>Coller l'adresse depuis le presse-papiers</translation>
+ <translation>Coller l'adresse du presse-papiers</translation>
</message>
<message>
<source>Alt+P</source>
@@ -1563,7 +2249,7 @@
</message>
<message>
<source>Remove this entry</source>
- <translation>Enlever cette entrée</translation>
+ <translation>Retirer cette entrée</translation>
</message>
<message>
<source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
@@ -1591,7 +2277,7 @@
</message>
<message>
<source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
- <translation>Un message qui était joint à l'URI Bitcoin et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin.</translation>
+ <translation>Un message qui était joint à l'URI bitcoin: et qui sera stocké avec la transaction pour référence. Note : ce message ne sera pas envoyé par le réseau Bitcoin.</translation>
</message>
<message>
<source>Pay To:</source>
@@ -1601,6 +2287,17 @@
<source>Memo:</source>
<translation>Mémo :</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Saisir une étiquette pour cette adresse afin de l’ajouter à votre carnet d’adresses</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Oui</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1617,7 +2314,7 @@
<name>SignVerifyMessageDialog</name>
<message>
<source>Signatures - Sign / Verify a Message</source>
- <translation>Signatures - Signer / Vérifier un message</translation>
+ <translation>Signatures - Signer / vérifier un message</translation>
</message>
<message>
<source>&amp;Sign Message</source>
@@ -1625,7 +2322,7 @@
</message>
<message>
<source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
- <translation>Vous pouvez signer des messages/accords avec vos adresses pour prouver que vous pouvez recevoir des bitcoins à ces dernières. Faites attention de ne rien signer de vague ou au hasard, car des attaques d'hameçonnage pourraient essayer de vous faire signer avec votre identité afin de l'usurper. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous êtes d'accord.</translation>
+ <translation>Vous pouvez signer des messages ou des accords avec vos adresses pour prouver que vous pouvez recevoir des bitcoins à ces dernières. Faites attention de ne rien signer de vague ou au hasard, car des attaques d'hameçonnage pourraient essayer de vous faire signer avec votre identité afin de l'usurper. Ne signez que des déclarations entièrement détaillées et avec lesquelles vous êtes d'accord.</translation>
</message>
<message>
<source>The Bitcoin address to sign the message with</source>
@@ -1633,7 +2330,7 @@
</message>
<message>
<source>Choose previously used address</source>
- <translation>Choisir une adresse précédemment utilisée</translation>
+ <translation>Choisir une adresse déjà utilisée</translation>
</message>
<message>
<source>Alt+A</source>
@@ -1641,7 +2338,7 @@
</message>
<message>
<source>Paste address from clipboard</source>
- <translation>Coller une adresse depuis le presse-papiers</translation>
+ <translation>Coller une adresse du presse-papiers</translation>
</message>
<message>
<source>Alt+P</source>
@@ -1661,7 +2358,7 @@
</message>
<message>
<source>Sign the message to prove you own this Bitcoin address</source>
- <translation>Signer le message pour prouver que vous détenez cette adresse Bitcoin</translation>
+ <translation>Signer le message afin de prouver que vous détenez cette adresse Bitcoin</translation>
</message>
<message>
<source>Sign &amp;Message</source>
@@ -1673,7 +2370,7 @@
</message>
<message>
<source>Clear &amp;All</source>
- <translation>&amp;Tout nettoyer</translation>
+ <translation>&amp;Tout effacer</translation>
</message>
<message>
<source>&amp;Verify Message</source>
@@ -1681,7 +2378,7 @@
</message>
<message>
<source>Enter the receiver's 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. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source>
- <translation>Saisissez ci-dessous l'adresse de destinataire, le message (assurez-vous de copier exactement les retours à la ligne, les espaces, les 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é même, pour éviter d'être trompé par une attaque d'homme du milieu. Notez que ceci ne fait que prouver que le signataire reçoit l'adresse et ne peut pas prouver la provenance d'une transaction.</translation>
+ <translation>Saisir ci-dessous l'adresse du destinataire, le message (s'assurer de copier fidèlement les retours à la ligne, les espaces, les tabulations, etc.) et la signature pour vérifier le message. Faire attention à ne pas déduire davantage de la signature que ce qui est contenu dans le message signé même, pour éviter d'être trompé par une attaque d'homme du milieu. Prendre en compte que cela ne fait que prouver que le signataire reçoit l'adresse et ne peut pas prouver la provenance d'une transaction !</translation>
</message>
<message>
<source>The Bitcoin address the message was signed with</source>
@@ -1689,7 +2386,7 @@
</message>
<message>
<source>Verify the message to ensure it was signed with the specified Bitcoin address</source>
- <translation>Vérifier le message pour vous assurer qu'il a bien été signé par l'adresse Bitcoin spécifiée</translation>
+ <translation>Vérifier le message pour s'assurer qu'il a été signé avec l'adresse Bitcoin spécifiée</translation>
</message>
<message>
<source>Verify &amp;Message</source>
@@ -1699,6 +2396,58 @@
<source>Reset all verify message fields</source>
<translation>Réinitialiser tous les champs de vérification de message</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Cliquez sur « Signer le message » pour générer la signature</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>L'adresse saisie est invalide.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Veuillez vérifier l'adresse et ressayer.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>L'adresse saisie ne fait pas référence à une clé.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Le déverrouillage du porte-monnaie a été annulé.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>La clé privée n'est pas disponible pour l'adresse saisie.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Échec de signature du message.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Le message a été signé.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>La signature n'a pu être décodée.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Veuillez vérifier la signature et ressayer.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>La signature ne correspond pas au condensé du message.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Échec de vérification du message.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Le message a été vérifié.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1715,11 +2464,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Ouvert pendant encore %n bloc</numerusform><numerusform>Ouvert pendant encore %n blocs</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Ouvert jusqu'à %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>est en conflit avec une transaction ayant %1 confirmations</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/hors ligne</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/non confirmées, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>dans la réserve de mémoire</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>pas dans la réserve de mémoire</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>abandonnée</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/non confirmée</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 confirmations</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>État</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, n’a pas encore été diffusée avec succès</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, diffusée par %n nœud</numerusform><numerusform>, diffusée par %n nœuds</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Date</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Source</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Générée</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>De</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>inconnue</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>À</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>votre adresse</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>juste-regarder</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>étiquette</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Crédit</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>arrivera à maturité dans %n bloc</numerusform><numerusform>arrivera à maturité dans %n blocs</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>refusée</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Débit</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Débit total</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Crédit total</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Frais de transaction</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Montant net</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Message</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Commentaire</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID de la transaction</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Taille totale de la transaction</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Index de sorties</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Marchand</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Les pièces générées doivent mûrir pendant %1 blocs avant de pouvoir être dépensées. Lorsque ce bloc a été généré, il a été diffusé sur le réseau pour être ajouté à la chaîne de blocs. Si son intégration à la chaîne échoue, son état sera modifié en « refusée » 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 du vôtre.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Informations de débogage</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transaction</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Entrées</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Montant</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>vrai</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>faux</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ce panneau affiche une description détaillée de la transaction</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Détails de %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Date</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Étiquette</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Ouvert pendant encore %n bloc</numerusform><numerusform>Ouvert pendant encore %n blocs</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Ouvert jusqu'à %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Hors ligne</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Non confirmée</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonnée</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmation (%1 sur %2 confirmations recommandées)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmée (%1 confirmations)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>En conflit</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Immature (%1 confirmations, sera disponible après %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Ce bloc n’a été reçu par aucun autre nœud et ne sera probablement pas accepté !</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Générée mais refusée</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Reçue avec</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Reçue de</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Envoyée à</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Paiement à vous-même</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Miné</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>juste-regarder</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n.d)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(aucune étiquette)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>État de la transaction. Survoler ce champ avec la souris pour afficher le nombre de confirmations.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Date et heure de réception de la transaction.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Type de transaction.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Une adresse juste-regarder est-elle ou non impliquée dans cette transaction.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Intention/but de la transaction défini par l'utilisateur.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Le montant a été ajouté ou soustrait du solde.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Toutes</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Aujourd’hui</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Cette semaine</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Ce mois</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Le mois dernier</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Cette année</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Plage…</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Reçue avec</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Envoyée à</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>À vous-même</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Miné </translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Autres </translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Saisir une adresse ou une étiquette à rechercher</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Montant min.</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Abandonner la transaction</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copier l’adresse</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copier l’étiquette </translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copier le montant </translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copier l'ID de la transaction</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copier la transaction brute</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Copier tous les détails de la transaction</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Modifier l’étiquette </translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Afficher les détails de la transaction</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exporter l'historique transactionnel</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Valeurs séparées par des virgules (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmée</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Juste-regarder</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Date </translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type </translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Étiquette</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresse</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID </translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Échec d'exportation</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Une erreur est survenue lors de l'enregistrement de l'historique transactionnel vers %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>L'exportation est réussie</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>L'historique transactionnel a été enregistré avec succès vers %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Plage :</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>à </translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1729,6 +2927,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Aucun porte-monnaie n'a été chargé.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Envoyer des pièces</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exporter</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exporter les données de l'onglet actuel vers un fichier</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Sauvegarder le porte-monnaie</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Données du porte-monnaie (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Échec de la sauvegarde</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Une erreur est survenue lors de l'enregistrement des données du porte-monnaie vers %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>La sauvegarde est réussie</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Les données du porte-monnaie ont été enregistrées avec succès vers %1</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1748,7 +2995,19 @@
</message>
<message>
<source>Accept command line and JSON-RPC commands</source>
- <translation>Accepter les commandes de JSON-RPC et de la ligne de commande</translation>
+ <translation>Accepter les commandes JSON-RPC et en ligne de commande</translation>
+ </message>
+ <message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Accepter des connexions de l'extérieur (par défaut : 1 si aucun -proxy ou -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>Se connecter seulement aux nœuds précisés ; -noconnect ou -connect=0 seul pour désactiver les connexions automatiques</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Distribué sous la licence MIT d'utilisation d'un logiciel. Consulter le fichier joint %s ou %s</translation>
</message>
<message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
@@ -1791,16 +3050,12 @@
<translation>Impossible de démarrer le serveur HTTP. Voir le journal de débogage pour plus de détails.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accepter les connexions entrantes (par défaut : 1 si aucun -proxy ou -connect )</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>La valeur -fallbackfee est très élevée ! Elle représente les frais de transaction que vous pourriez acquitter si aucune estimation de frais n'est proposée.</translation>
+ <source>The %s developers</source>
+ <translation>Les développeurs de %s</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1812,21 +3067,25 @@
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
- <translation>Se lier à l'adresse donnée et toujours l'écouter. Utilisez la notation [host]:port pour l'IPv6</translation>
+ <translation>Se lier à l'adresse donnée et toujours l'écouter. Utiliser la notation [host]:port pour l'IPv6</translation>
</message>
<message>
- <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
- <translation>Supprimer toutes les transactions du porte-monnaie et ne récupérer que ces parties de la chaîne de blocs avec -rescan au démarrage</translation>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>Impossible d’obtenir un verrou sur le répertoire de données %s. %s fonctionne probablement déjà.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribué sous la licence MIT d'utilisation d'un logiciel. Consultez le fichier joint COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
+ <translation>Supprimer toutes les transactions du porte-monnaie et ne récupérer que ces parties de la chaîne de blocs avec -rescan au démarrage</translation>
</message>
<message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Erreur de chargement de %s : vous ne pouvez pas activer HD sur un porte-monnaie non HD existant</translation>
</message>
<message>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>Erreur de lecture de %s ! Toutes les clés ont été lues correctement, mais les données transactionnelles ou les entrées du carnet d'adresses sont peut-être manquantes ou incorrectes.</translation>
+ </message>
+ <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Exécuter la commande lorsqu'une transaction de porte-monnaie change (%s dans la commande est remplacée par TxID)</translation>
</message>
@@ -1839,12 +3098,16 @@
<translation>Frais totaux maximaux (en %s) à utiliser en une seule transaction de porte-monnaie ou transaction brute ; les définir trop bas pourrait interrompre les grosses transactions (par défaut : %s)</translation>
</message>
<message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Veuillez vérifier que l'heure et la date de votre ordinateur sont justes ! Si votre horloge n'est pas à l'heure, %s ne fonctionnera pas correctement.</translation>
+ </message>
+ <message>
<source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
<translation>Si vous trouvez %s utile, vous pouvez y contribuer. Vous trouverez davantage d'informations à propos du logiciel sur %s.</translation>
</message>
<message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
- <translation>Définir le nombre d'exétrons de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
+ <translation>Définir le nombre de fils de vérification des scripts (%u à %d, 0 = auto, &lt; 0 = laisser ce nombre de cœurs inutilisés, par défaut : %d)</translation>
</message>
<message>
<source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
@@ -1852,7 +3115,7 @@
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Ceci est une pré-version de test - l'utiliser à vos risques et périls - ne pas l'utiliser pour miner ou pour des applications marchandes</translation>
+ <translation>Ceci est une préversion de test - son utilisation est entièrement à vos risques - ne pas l'utiliser pour miner ou pour des applications marchandes</translation>
</message>
<message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
@@ -1860,19 +3123,19 @@
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
- <translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 lors de l'écoute et pas de mandataire -proxy)</translation>
+ <translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : 1 en écoute et sans -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Avertissement : le réseau ne semble pas totalement d'accord ! Quelques mineurs semblent éprouver des difficultés.</translation>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>Un porte-monnaie ne créera aucune transaction qui enfreint les limites de chaîne de la réserve de mémoire (par défaut : %u)</translation>
</message>
<message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Avertissement : nous ne semblons pas être en accord complet avec nos pairs ! Vous pourriez avoir besoin d'effectuer une mise à niveau, ou d'autres nœuds du réseau pourraient avoir besoin d'effectuer une mise à niveau.</translation>
+ <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
+ <translation>Avertissement : le réseau ne semble pas totalement d'accord ! Certains mineurs semblent éprouver des problèmes.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Pairs de la liste blanche se connectant à partir du masque réseau ou de l'IP donné. Peut être spécifié plusieurs fois.</translation>
+ <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+ <translation>Avertissement : nous ne semblons pas être en accord complet avec nos pairs ! Une mise à niveau pourrait être nécessaire pour vous ou pour d'autres nœuds du réseau.</translation>
</message>
<message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
@@ -1896,23 +3159,23 @@
</message>
<message>
<source>Attempt to recover private keys from a corrupt wallet on startup</source>
- <translation>Tenter de récupérer les clefs privées d'un porte-monnaie corrompu lors du démarrage</translation>
+ <translation>Tenter de récupérer les clés privées d'un porte-monnaie corrompu lors du démarrage</translation>
</message>
<message>
<source>Block creation options:</source>
- <translation>Options de création de bloc :</translation>
+ <translation>Options de création de blocs :</translation>
</message>
<message>
<source>Cannot resolve -%s address: '%s'</source>
<translation>Impossible de résoudre l'adresse -%s : « %s »</translation>
</message>
<message>
- <source>Change index out of range</source>
- <translation>L'index de changement est hors échelle</translation>
+ <source>Chain selection options:</source>
+ <translation>Options de sélection de la chaîne :</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Ne se connecter qu'au(x) nœud(s) spécifié(s)</translation>
+ <source>Change index out of range</source>
+ <translation>L'index de changement est hors échelle</translation>
</message>
<message>
<source>Connection options:</source>
@@ -1924,7 +3187,7 @@
</message>
<message>
<source>Corrupted block database detected</source>
- <translation>Base corrompue de données des blocs détectée</translation>
+ <translation>Une base de données de blocs corrompue a été détectée</translation>
</message>
<message>
<source>Debugging/Testing options:</source>
@@ -1936,7 +3199,7 @@
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
- <translation>Voulez-vous reconstruire la base de données des blocs maintenant ?</translation>
+ <translation>Voulez-vous reconstruire la base de données de blocs maintenant ?</translation>
</message>
<message>
<source>Enable publish hash block in &lt;address&gt;</source>
@@ -1955,24 +3218,28 @@
<translation>Activer la publication de la transaction brute dans &lt;address&gt;</translation>
</message>
<message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Activer le remplacement de transactions dans la réserve de mémoire (par défaut : %u)</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
- <translation>Erreur lors de l'initialisation de la base de données des blocs</translation>
+ <translation>Erreur d'initialisation de la base de données de blocs</translation>
</message>
<message>
<source>Error initializing wallet database environment %s!</source>
- <translation>Erreur lors de l'initialisation de l'environnement de la base de données du porte-monnaie %s !</translation>
+ <translation>Erreur d'initialisation de l'environnement de la base de données du porte-monnaie %s !</translation>
</message>
<message>
<source>Error loading %s</source>
- <translation>Erreur lors du chargement de %s</translation>
+ <translation>Erreur de chargement de %s</translation>
</message>
<message>
<source>Error loading %s: Wallet corrupted</source>
- <translation>Erreur lors du chargement de %s : porte-monnaie corrompu</translation>
+ <translation>Erreur de chargement de %s : porte-monnaie corrompu</translation>
</message>
<message>
<source>Error loading %s: Wallet requires newer version of %s</source>
- <translation>Erreur lors du chargement de %s : le porte-monnaie exige une version plus récente de %s</translation>
+ <translation>Erreur de chargement de %s : le porte-monnaie exige une version plus récente de %s</translation>
</message>
<message>
<source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
@@ -1980,11 +3247,11 @@
</message>
<message>
<source>Error loading block database</source>
- <translation>Erreur du chargement de la base de données des blocs</translation>
+ <translation>Erreur de chargement de la base de données de blocs</translation>
</message>
<message>
<source>Error opening block database</source>
- <translation>Erreur lors de l'ouverture de la base de données des blocs</translation>
+ <translation>Erreur d'ouverture de la base de données de blocs</translation>
</message>
<message>
<source>Error: Disk space is low!</source>
@@ -1992,7 +3259,7 @@
</message>
<message>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
- <translation>Échec de l'écoute sur un port quelconque. Utilisez -listen=0 si vous voulez ceci.</translation>
+ <translation>Échec d'écoute sur un port quelconque. Utiliser -listen=0 si vous le voulez.</translation>
</message>
<message>
<source>Importing...</source>
@@ -2000,7 +3267,11 @@
</message>
<message>
<source>Incorrect or no genesis block found. Wrong datadir for network?</source>
- <translation>Bloc de genèse incorrect ou introuvable. Mauvais répertoire de données pour le réseau ?</translation>
+ <translation>Bloc de genèse incorrect ou introuvable. Mauvais datadir pour le réseau ?</translation>
+ </message>
+ <message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>L'initialisation du test de cohérence a échoué. %s est en cours de fermeture. </translation>
</message>
<message>
<source>Invalid -onion address: '%s'</source>
@@ -2027,10 +3298,6 @@
<translation>Emplacement du fichier témoin auth (par défaut : data dir)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Octets minimaux par sigop dans les transactions que nous relayons et minons (par défaut : %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Pas assez de descripteurs de fichiers proposés.</translation>
</message>
@@ -2068,11 +3335,7 @@
</message>
<message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
- <translation>Définir la taille du cache de la base de données en mégaoctets (%d to %d, default: %d)</translation>
- </message>
- <message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Définir le coût maximal de bloc (par défaut : %d)</translation>
+ <translation>Définir la taille du cache de la base de données en mégaoctets (%d à %d, default: %d)</translation>
</message>
<message>
<source>Set maximum block size in bytes (default: %d)</source>
@@ -2087,6 +3350,10 @@
<translation>Le code source est disponible sur %s.</translation>
</message>
<message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>Impossible de se lier à %s sur cet ordinateur. %s fonctionne probablement déjà.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Argument non pris en charge -benchmark ignoré, utiliser -debug=bench.</translation>
</message>
@@ -2103,16 +3370,20 @@
<translation>Utiliser l'UPnP pour mapper le port d'écoute (par défaut : %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Utiliser la chaîne de test</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Le commentaire d'agent utilisateur (%s) contient des caractères dangereux.</translation>
</message>
<message>
<source>Verifying blocks...</source>
- <translation>Vérification des blocs en cours...</translation>
+ <translation>Vérification des blocs... </translation>
</message>
<message>
<source>Verifying wallet...</source>
- <translation>Vérification du porte-monnaie en cours...</translation>
+ <translation>Vérification du porte-monnaie...</translation>
</message>
<message>
<source>Wallet %s resides outside data directory %s</source>
@@ -2123,6 +3394,10 @@
<translation>Options de débogage/de test du porte-monnaie :</translation>
</message>
<message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Le porte-monnaie devait être réécrit : redémarrer %s pour terminer l'opération.</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Options du porte-monnaie :</translation>
</message>
@@ -2152,7 +3427,7 @@
</message>
<message>
<source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
- <translation>Exécuter une commande lorsqu'une alerte pertinente est reçue ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
+ <translation>Exécuter une commande lorsqu'une alerte pertinente est reçue, ou si nous voyons une bifurcation vraiment étendue (%s dans la commande est remplacé par le message)</translation>
</message>
<message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source>
@@ -2171,28 +3446,20 @@
<translation>Quantité maximale de données dans les transactions du porteur de données que nous relayons et minons (par défaut : %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Demander les adresses des pairs par recherche DNS si l'on manque d'adresses (par défaut : 1 sauf si -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
- <translation>Aléer les authentifiants pour chaque connexion mandataire. Ceci active l'isolement de flux de Tor (par défaut : %u) </translation>
+ <translation>Aléer les authentifiants pour chaque connexion mandataire. Cela active l'isolement de flux de Tor (par défaut : %u) </translation>
</message>
<message>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
- <translation>Définir la taille maximale en octets des transactions prioritaires/à frais modiques (par défaut : %d)</translation>
+ <translation>Définir la taille maximale en octets des transactions à priorité élevée et frais modiques (par défaut : %d)</translation>
</message>
<message>
<source>The transaction amount is too small to send after the fee has been deducted</source>
<translation>Le montant de la transaction est trop bas pour être envoyé une fois que les frais ont été déduits</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Ce produit comprend des logiciels développés par le projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL &lt;https://www.openssl.org/&gt; et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
- <translation>Utiliser une génération de clef hiérarchique déterministe (HD) après BIP32. N'a d'effet que lors de la création/premier lancement du porte-monnaie</translation>
+ <translation>Utiliser une génération de clé hiérarchique déterministe (HD) après BIP32. N'a d'effet que lors de la création ou du lancement intitial du porte-monnaie</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2200,7 +3467,7 @@
</message>
<message>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
- <translation>Vous devez reconstruire la base de données en utilisant -reindex afin de revenir au mode sans élagage. Ceci retéléchargera complètement la chaîne de blocs.</translation>
+ <translation>Vous devez reconstruire la base de données en utilisant -reindex afin de revenir au mode sans élagage. Cela retéléchargera complètement la chaîne de blocs.</translation>
</message>
<message>
<source>(default: %u)</source>
@@ -2224,7 +3491,7 @@
</message>
<message>
<source>Imports blocks from external blk000??.dat file on startup</source>
- <translation>Importe des blocs depuis un fichier blk000??.dat externe lors du démarrage</translation>
+ <translation>Importe des blocs à partir d'un fichier blk000??.dat externe lors du démarrage</translation>
</message>
<message>
<source>Information</source>
@@ -2264,7 +3531,7 @@
</message>
<message>
<source>Send trace/debug info to console instead of debug.log file</source>
- <translation>Envoyer les informations de débogage/trace à la console au lieu du fichier debug.log</translation>
+ <translation>Envoyer les infos de débogage/trace à la console au lieu du fichier debug.log</translation>
</message>
<message>
<source>Send transactions as zero-fee transactions if possible (default: %u)</source>
@@ -2276,11 +3543,11 @@
</message>
<message>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
- <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 lorsque -debug n'est pas présent)</translation>
+ <translation>Réduire le fichier debug.log lors du démarrage du client (par défaut : 1 sans -debug)</translation>
</message>
<message>
<source>Signing transaction failed</source>
- <translation>La signature de la transaction a échoué</translation>
+ <translation>Échec de signature de la transaction</translation>
</message>
<message>
<source>The transaction amount is too small to pay the fee</source>
@@ -2300,11 +3567,7 @@
</message>
<message>
<source>Transaction amount too small</source>
- <translation>Montant de la transaction trop bas</translation>
- </message>
- <message>
- <source>Transaction amounts must be positive</source>
- <translation>Les montants de transaction doivent être positifs</translation>
+ <translation>Le montant de la transaction est trop bas</translation>
</message>
<message>
<source>Transaction too large for fee policy</source>
@@ -2312,7 +3575,7 @@
</message>
<message>
<source>Transaction too large</source>
- <translation>Transaction trop volumineuse</translation>
+ <translation>La transaction est trop grosse</translation>
</message>
<message>
<source>Unable to bind to %s on this computer (bind returned error %s)</source>
@@ -2364,25 +3627,29 @@
</message>
<message>
<source>(1 = keep tx meta data e.g. account owner and payment request information, 2 = drop tx meta data)</source>
- <translation>(1 = conserver les métadonnées de transmission, par ex. les informations du propriétaire du compte et de la demande de paiement, 2 = abandonner les métadonnées de transmission)</translation>
+ <translation>(1 = conserver les métadonnées de transmission, p. ex. les informations du propriétaire du compte et de demande de paiement, 2 = abandonner les métadonnées de transmission)</translation>
</message>
<message>
<source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
- <translation>-maxtxfee est défini très haut ! Des frais aussi élevés pourraient être payés en une seule transaction.</translation>
- </message>
- <message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee est réglé sur un montant très élevé ! Il s'agit des frais de transaction que vous payerez si vous envoyez une transaction.</translation>
+ <translation>La valeur -maxtxfee est très élevée ! Des frais aussi élevés pourraient être payés en une seule transaction.</translation>
</message>
<message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Ne pas conserver de transactions dans la réserve de mémoire plus de &lt;n&gt; heures (par défaut : %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Octets équivalents par sigop dans les transactions pour relayer et miner (par défaut : %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Les frais (en %s/Ko) inférieurs à ce seuil sont considérés comme étant nuls pour la création de transactions (par défaut : %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Forcer le relais de transactions des pairs de la liste blanche même s'ils transgressent la politique locale de relais (par défaut : %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Degré de profondeur de la vérification des blocs -checkblocks (0-4, par défaut : %u)</translation>
</message>
@@ -2396,13 +3663,29 @@
</message>
<message>
<source>Output debugging information (default: %u, supplying &lt;category&gt; is optional)</source>
- <translation>Extraire les informations de débogage (par défaut : %u, fournir &lt;category&gt; est optionnel)</translation>
+ <translation>Extraire les informations de débogage (par défaut : %u, fournir &lt;category&gt; est facultatif)</translation>
+ </message>
+ <message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Requête d'adresses de paires par recherche DNS, si il y a peu d'adresses (par défaut : 1 sauf si -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>Définit la sérialisation de la transaction brute ou les données hexa de bloc retournées en mode non-verbose, non-segwit(0) ou segwit(1) (par défaut : %d)</translation>
</message>
<message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Prendre en charge le filtrage des blocs et des transactions avec les filtres bloom (par défaut : %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Il s'agit des frais de transaction que vous pourriez payer si aucune estimation de frais n'est proposée.</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>Ce produit comprend des logiciels développés par le Projet OpenSSL pour être utilisés dans la boîte à outils OpenSSL %s, et un logiciel cryptographique écrit par Eric Young, ainsi qu'un logiciel UPnP écrit par Thomas Bernard.</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>La taille totale de la chaîne de version de réseau (%i) dépasse la longueur maximale (%i). Réduire le nombre ou la taille des commentaires uacomments.</translation>
</message>
@@ -2423,10 +3706,6 @@
<translation>Utiliser un serveur mandataire SOCKS5 séparé pour atteindre les pairs par les services cachés de Tor (par défaut : %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Nom d'utilisateur et mot de passe haché pour les connexions JSON-RPC. Le champ &lt;userpw&gt; vient au format : &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Un script python canonique est inclus dans share/rpcuser. Cette option peut être spécifiée plusieurs fois.</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Avertissement : des versions de blocs inconnues sont minées ! Il est possible que des règles inconnues soient en vigeur</translation>
</message>
@@ -2435,6 +3714,14 @@
<translation>Avertissement : le fichier du porte-monnaie est corrompu, les données ont été récupérées ! Le fichier %s original a été enregistré en tant que %s dans %s ; si votre solde ou vos transactions sont incorrects, vous devriez restaurer une sauvegarde.</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Pairs de la liste blanche se connectant à partir de l'adresse IP donnée (p. ex. 1.2.3.4) ou du réseau noté CIDR (p. ex. 1.2.3.0/24). Peut être spécifié plusieurs fois.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>La valeur %s est très élevée !</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(par défaut : %s)</translation>
</message>
@@ -2455,6 +3742,10 @@
<translation>Adresse -proxy invalide : « %s »</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>La réserve de clés est épuisée, veuillez d'abord appeler « keypoolrefill »</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>Écouter les connexions JSON-RPC sur &lt;port&gt; (par défaut : %u ou tesnet : %u)</translation>
</message>
@@ -2491,16 +3782,20 @@
<translation>Relayer les multisignatures non-P2SH (par défaut : %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>Envoyer des transactions avec « RBF opt-in » complet activé (par défaut : %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
- <translation>Définir la taille de la réserve de clefs à &lt;n&gt; (par défaut : %u)</translation>
+ <translation>Définir la taille de la réserve de clés à &lt;n&gt; (par défaut : %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Définir la taille de bloc minimale en octets (par défaut : %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Définir le poids maximal de bloc BIP141 (par défaut : %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
- <translation>Définir le nombre d'exétrons pour desservir les appels RPC (par défaut : %d)</translation>
+ <translation>Définir le nombre de fils pour les appels RPC (par défaut : %d)</translation>
</message>
<message>
<source>Specify configuration file (default: %s)</source>
@@ -2519,12 +3814,40 @@
<translation>Dépenser la monnaie non confirmée lors de l'envoi de transactions (par défaut : %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Démarrage des processus réseau...</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>Le porte-monnaie évitera de payer moins que les frais minimaux de relais. </translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Il s'agit des frais minimaux que vous payez pour chaque transaction. </translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Il s'agit des frais minimaux que vous payez si vous envoyez une transaction.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Seuil de déconnexion des pairs présentant un mauvais comportement (par défaut : %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Les montants transactionnels ne doivent pas être négatifs</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>La chaîne de la réserve de mémoire de la transaction est trop longue</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>La transaction doit comporter au moins un destinataire</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
- <translation>Réseau inconnu spécifié sur -onlynet : « %s »</translation>
+ <translation>Réseau inconnu spécifié dans -onlynet : « %s »</translation>
</message>
<message>
<source>Insufficient funds</source>
diff --git a/src/qt/locale/bitcoin_fr_CA.ts b/src/qt/locale/bitcoin_fr_CA.ts
index fca1e62883..02701cbf1d 100644
--- a/src/qt/locale/bitcoin_fr_CA.ts
+++ b/src/qt/locale/bitcoin_fr_CA.ts
@@ -13,7 +13,10 @@
<source>&amp;Delete</source>
<translation>&amp;Supprimer</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -28,7 +31,7 @@
<source>Repeat new passphrase</source>
<translation>Répéter Mot de Passe</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -52,7 +55,7 @@
<source>&amp;Address</source>
<translation>Addresse</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -67,6 +70,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -76,12 +82,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -91,12 +106,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -109,12 +130,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_fr_FR.ts b/src/qt/locale/bitcoin_fr_FR.ts
index a6f6ac4fd1..d53baed462 100644
--- a/src/qt/locale/bitcoin_fr_FR.ts
+++ b/src/qt/locale/bitcoin_fr_FR.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Supprimer</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Répétez la phrase de passe</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -262,26 +265,6 @@
<source>No block source available...</source>
<translation>Aucun bloc source disponible</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n heure</numerusform><numerusform>%n heures</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n jour</numerusform><numerusform>%n jours</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semaine</numerusform><numerusform>%n semaines</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 et %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n an</numerusform><numerusform>%n années</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>en retard de %1</translation>
@@ -364,7 +347,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Le porte-monnaie est &lt;b&gt;chiffré&lt;/b&gt; et est actuellement &lt;b&gt;verrouillé&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -384,10 +367,6 @@
<translation>Montant :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorité:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Frais:</translation>
</message>
@@ -439,11 +418,7 @@
<source>Confirmed</source>
<translation>Confirmée</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Priorité</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -458,7 +433,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresse</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -549,6 +524,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulaire</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Cacher</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -566,7 +552,7 @@
<source>Select payment request file</source>
<translation>Sélectionner un fichier de demande de paiement</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -754,6 +740,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -763,11 +752,7 @@
<source>Node/Service</source>
<translation>Nœud/Service </translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Temps du ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -806,7 +791,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 et %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1064,7 +1059,7 @@
<source>Remove</source>
<translation>Retirer</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1083,7 +1078,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Sauvegarder image</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1115,10 +1113,6 @@
<translation>Montant :</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorité:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Frais:</translation>
</message>
@@ -1155,10 +1149,6 @@
<translation>Recommandé: </translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Temps de confirmation:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1190,6 +1180,10 @@
<source>Confirm the send action</source>
<translation>Confirmer l'action d'envoi</translation>
</message>
+ <message>
+ <source>S&amp;end</source>
+ <translation>E&amp;voyer</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1241,7 +1235,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
</context>
@@ -1311,16 +1308,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ce panneau affiche une description détaillée de la transaction</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1420,10 +1435,6 @@ Importation ...</translation>
<translation>Montant de la transaction trop bas</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Les montants de la transaction doivent être positif</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Montant de la transaction trop élevé pour la politique de frais</translation>
</message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 9aa7b55096..5d31c632ac 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;Borrar</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Repite novo contrasinal</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -274,7 +277,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>O moedeiro está &lt;b&gt;encriptado&lt;/b&gt; e actualmente &lt;b&gt;bloqueado&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -290,10 +293,6 @@
<translation>Importe:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Pago:</translation>
</message>
@@ -329,11 +328,7 @@
<source>Confirmed</source>
<translation>Confirmado</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioridade</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -356,7 +351,7 @@
<source>&amp;Address</source>
<translation>&amp;Dirección</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -419,6 +414,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulario</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora do último bloque</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -436,7 +442,7 @@
<source>Select payment request file</source>
<translation>Seleccionar ficheiro de solicitude de pago</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -572,6 +578,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -594,6 +603,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -749,7 +764,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Gardar Imaxe...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -773,10 +791,6 @@
<translation>Importe:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Pago:</translation>
</message>
@@ -816,7 +830,7 @@
<source>S&amp;end</source>
<translation>&amp;Enviar</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -871,7 +885,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
</context>
@@ -945,7 +962,7 @@
<source>Reset all verify message fields</source>
<translation>Restaurar todos os campos de verificación de mensaxe</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -961,16 +978,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Este panel amosa unha descripción detallada da transacción</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -997,10 +1032,6 @@
<translation>Executar no fondo como un demo e aceptar comandos</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Aceptar conexións de fóra (por defecto: 1 se non -proxy ou -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Core de Bitcoin</translation>
</message>
@@ -1013,18 +1044,6 @@
<translation>Executar comando cando unha transacción do moedeiro cambia (%s no comando é substituído por TxID)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta é unha build de test pre-lanzamento - emprégaa baixo o teu propio risco - non empregar para minado ou aplicacións de comerciantes</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Precaución: A rede non parece estar totalmente de acordo! Algúns mineitos parecen estar experimentando problemas.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Precaución: Non parece que esteamos totalmente de acordo cos nosos pares! Pode que precises actualizar, ou outros nodos poden precisar actualizarse.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;categoría&gt; pode ser:</translation>
</message>
@@ -1033,10 +1052,6 @@
<translation>Opcións de creación de bloque:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conectar so ao(s) nodo(s) especificado(s)</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Detectada base de datos de bloques corrupta.</translation>
</message>
@@ -1121,10 +1136,6 @@
<translation>A cantidade da transacción é demasiado pequena</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>As cantidades da transacción deben ser positivas</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>A transacción é demasiado grande</translation>
</message>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 4a293c1c3f..9293b794ad 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -41,6 +41,69 @@
<source>&amp;Delete</source>
<translation>מ&amp;חיקה</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>בחר את הכתובת אליה תרצה לשלוח את המטבעות</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>בחר את הכתובת בה תקבל את המטבעות</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>בחר</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>כתובת לשליחה</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>מקבל כתובות</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>אלה הם כתובות הביטקוין שלך לשליחת תשלומים. חשוב לבדוק את הכמות של הכתובות המקבלות לפני שליחת מטבעות</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>אלה הן כתובות הביטקוין שלך לקבלת תשלומים. מומלץ להשתמש בכתובת חדשה לכל העברה.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;העתק כתובת</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>העתק &amp;תוית</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;ערוך</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>יצוא נכשל</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>אירעה שגיאה בעת הניסיון לשמור את רשימת הכתובת אל %1. נא לנסות שוב.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>תוית</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>כתובת</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ללא תוית)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +123,7 @@
<source>Repeat new passphrase</source>
<translation>נא לחזור על מילת הצופן החדשה</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -259,10 +322,6 @@
<translation>אין מקור מקטעים זמין…</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 ו%2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 מאחור</translation>
</message>
@@ -310,7 +369,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>הארנק &lt;b&gt;מוצפן&lt;/b&gt; ו&lt;b&gt;נעול&lt;/b&gt; כרגע</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -330,10 +389,6 @@
<translation>סכום:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>עדיפות:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>עמלה:</translation>
</message>
@@ -386,10 +441,10 @@
<translation>מאושר</translation>
</message>
<message>
- <source>Priority</source>
- <translation>עדיפות</translation>
+ <source>(no label)</source>
+ <translation>(ללא תוית)</translation>
</message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -412,7 +467,7 @@
<source>&amp;Address</source>
<translation>&amp;כתובת</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -467,6 +522,10 @@
<translation>התחל ממוזער</translation>
</message>
<message>
+ <source>Show splash screen on startup (default: %u)</source>
+ <translation>הצג מסך פתיחה בעת הפעלה (ברירת מחדל: %u)</translation>
+ </message>
+ <message>
<source>Reset all settings changed in the GUI</source>
<translation>איפוס כל שינויי הגדרות התצוגה</translation>
</message>
@@ -499,6 +558,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>טופס</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>זמן המקטע האחרון</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>הסתר</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -516,7 +590,7 @@
<source>Select payment request file</source>
<translation>בחירת קובץ בקשת תשלום</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -776,16 +850,15 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
<translation>סוכן משתמש</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>זמן המענה</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -824,7 +897,17 @@
<source>%1 ms</source>
<translation>%1 מילישניות</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 ו%2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1012,8 +1095,8 @@
<translation>ניקוי מסוף הבקרה</translation>
</message>
<message>
- <source>Ban Node for</source>
- <translation>חסום משתמש ל</translation>
+ <source>1 &amp;hour</source>
+ <translation>1 שעה</translation>
</message>
<message>
<source>1 &amp;day</source>
@@ -1150,7 +1233,7 @@
<source>Remove</source>
<translation>הסרה</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1169,7 +1252,26 @@
<source>&amp;Save Image...</source>
<translation>&amp;שמירת תמונה…</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>כתובת</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>תוית</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>תוית</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ללא תוית)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1205,10 +1307,6 @@
<translation>סכום:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>עדיפות:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>עמלה:</translation>
</message>
@@ -1257,10 +1355,6 @@
<translation>מותאם אישית:</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>זמן האישור:</translation>
- </message>
- <message>
<source>normal</source>
<translation>רגיל</translation>
</message>
@@ -1300,6 +1394,10 @@
<source>S&amp;end</source>
<translation>&amp;שליחה</translation>
</message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ללא תוית)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1367,7 +1465,10 @@
<source>Memo:</source>
<translation>תזכורת:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1453,7 +1554,7 @@
<source>Reset all verify message fields</source>
<translation>איפוס כל שדות אימות ההודעה</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1469,12 +1570,41 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>חלונית זו מציגה תיאור מפורט של ההעברה</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>תוית</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ללא תוית)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Label</source>
+ <translation>תוית</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>כתובת</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>יצוא נכשל</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1483,6 +1613,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1513,10 +1652,6 @@
<translation>ריצה כסוכן ברקע וקבלת פקודות</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>קבלת חיבורים מבחוץ (בררת מחדל: 1 ללא ‎-proxy או ‎-connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>ליבת ביטקוין</translation>
</message>
@@ -1537,18 +1672,6 @@
<translation>ביצוע פקודה כאשר העברה בארנק משתנה (%s ב־cmd יוחלף ב־TxID)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>זוהי בניית ניסיון טרום-שחרור - השימוש בה על אחריותך - אין להשתמש לצורך כריה או יישומי מסחר</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>אזהרה: נראה שלא כל הרשת מסכימה! נראה שישנם כורים שנתקלים בבעיות.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>אזהרה: נראה שישנה אי־הסכמה בינינו לבין שאר העמיתים שלנו! יתכן שעדיף לשדרג או שכל שאר העמיתים צריכים לשדרג.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;קטגוריה&gt; יכולה להיות:</translation>
</message>
@@ -1561,10 +1684,6 @@
<translation>אינדקס העודף מחוץ לתחום</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>התחבר רק לצמתים המצוינים</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>הגדרות חיבור:</translation>
</message>
@@ -1737,10 +1856,6 @@
<translation>סכום ההעברה קטן מדי</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>סכומי ההעברות חייבים להיות חיוביים</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>ההעברה גבוהה מדי עבור מדיניות העמלות</translation>
</message>
diff --git a/src/qt/locale/bitcoin_hi_IN.ts b/src/qt/locale/bitcoin_hi_IN.ts
index 86c53b4ce3..20fbd0e0ae 100644
--- a/src/qt/locale/bitcoin_hi_IN.ts
+++ b/src/qt/locale/bitcoin_hi_IN.ts
@@ -13,7 +13,10 @@
<source>&amp;Delete</source>
<translation>&amp;मिटाए !!</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -28,7 +31,7 @@
<source>Repeat new passphrase</source>
<translation>दोबारा नया पहचान शब्द/अक्षर डालिए !</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -135,7 +138,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>वॉलेट एन्क्रिप्टेड है तथा अभी लॉक्ड है</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -169,7 +172,7 @@
<source>&amp;Address</source>
<translation>&amp;पता</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -192,6 +195,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>फार्म</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -221,6 +231,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -236,6 +249,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -266,6 +285,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -320,6 +342,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -352,16 +377,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation> ये खिड़की आपको लेन-देन का विस्तृत विवरण देगी !</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index f5accfb0b8..3956669ad4 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -41,7 +41,34 @@
<source>&amp;Delete</source>
<translation>Iz&amp;briši</translation>
</message>
-</context>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Odaberi adresu na koju šalješ novac</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Odaberi adresu na koju primaš novac</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Odaberi</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Ovo su vaše Bitcoin adrese za slanje novca. Uvijek provjerite iznos i adresu primatelja prije slanja novca.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiraj adresu</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Izvoz neuspješan</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +87,7 @@
<source>Repeat new passphrase</source>
<translation>Ponovite novu lozinku</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -250,26 +277,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Obrađen %n blok povijesti transakcije.</numerusform><numerusform>Obrađeno %n bloka povijesti transakcije.</numerusform><numerusform>Obrađeno %n blokova povijesti transakcije.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n sat</numerusform><numerusform>%n sata</numerusform><numerusform>%n sati</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dan</numerusform><numerusform>%n dana</numerusform><numerusform>%n dana</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n tjedan</numerusform><numerusform>%n tjedna</numerusform><numerusform>%n tjedana</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 i %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n godina</numerusform><numerusform>%n godine</numerusform><numerusform>%n godina</numerusform></translation>
- </message>
<message>
<source>Last received block was generated %1 ago.</source>
<translation>Zadnji primljeni blok je bio ustvaren prije %1.</translation>
@@ -344,7 +351,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Novčanik je &lt;b&gt;šifriran&lt;/b&gt; i trenutno &lt;b&gt;zaključan&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -364,10 +371,6 @@
<translation>Iznos:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteta:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Naknada:</translation>
</message>
@@ -407,11 +410,7 @@
<source>Confirmed</source>
<translation>Potvrđeno</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioriteta</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -434,7 +433,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresa</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -485,6 +484,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Oblik</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Posljednje vrijeme bloka</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -502,7 +512,7 @@
<source>Select payment request file</source>
<translation>Izaberi datoteku zahtjeva za plaćanje</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -642,6 +652,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -654,6 +667,16 @@
<source>N/A</source>
<translation>N/A</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 i %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -791,7 +814,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Spremi sliku...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -815,10 +841,6 @@
<translation>Iznos:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteta:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Naknada:</translation>
</message>
@@ -862,7 +884,7 @@
<source>S&amp;end</source>
<translation>&amp;Pošalji</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -899,6 +921,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -955,16 +980,38 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ovaj prozor prikazuje detaljni opis transakcije</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Izvoz neuspješan</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -995,10 +1042,6 @@
<translation>Opcije za kreiranje bloka:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Poveži se samo sa određenim čvorom/čvorovima</translation>
- </message>
- <message>
<source>Error: Disk space is low!</source>
<translation>Pogreška: Nema dovoljno prostora na disku!</translation>
</message>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 9eb0cf76c4..49b9dc7d1c 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Törlés</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,10 +63,18 @@
<source>Repeat new passphrase</source>
<translation>Új jelszó újra</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP-cím/maszk</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Kitiltás vége</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
@@ -254,26 +265,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n blokk feldolgozva a tranzakció előzményből.</numerusform><numerusform>%n blokk feldolgozva a tranzakció előzményből.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n óra</numerusform><numerusform>%n óra</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n nap</numerusform><numerusform>%n nap</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n hét</numerusform><numerusform>%n hét</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 és %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n év</numerusform><numerusform>%n év</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 lemaradás</translation>
@@ -352,7 +343,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Tárca &lt;b&gt;kódolva&lt;/b&gt; és jelenleg &lt;b&gt;zárva&lt;/b&gt;.</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -372,10 +363,6 @@
<translation>Összeg:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritás:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Díj:</translation>
</message>
@@ -427,11 +414,7 @@
<source>Confirmed</source>
<translation>Megerősítve</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritás</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -454,7 +437,7 @@
<source>&amp;Address</source>
<translation>&amp;Cím</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -525,6 +508,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Űrlap</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Utolsó blokk ideje</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Elrejtés</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -542,7 +540,7 @@
<source>Select payment request file</source>
<translation>Fizetési kérelmi fájl kiválasztása</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -754,16 +752,15 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
<translation>User Agent</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping idő</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -802,7 +799,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 és %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -870,6 +877,10 @@
<translation>&amp;Peerek</translation>
</message>
<message>
+ <source>Banned peers</source>
+ <translation>Kitiltott felek</translation>
+ </message>
+ <message>
<source>Select a peer to view detailed information.</source>
<translation>Peer kijelölése a részletes információkért</translation>
</message>
@@ -1052,7 +1063,7 @@
<source>Remove</source>
<translation>Eltávolítás</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1071,7 +1082,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Kép mentése</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1103,10 +1117,6 @@
<translation>Összeg:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritás:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Díjak:</translation>
</message>
@@ -1182,7 +1192,7 @@
<source>S&amp;end</source>
<translation>&amp;Küldés</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1229,7 +1239,10 @@
<source>Memo:</source>
<translation>Jegyzet:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1311,16 +1324,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ez a mező a tranzakció részleteit mutatja</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1351,10 +1382,6 @@
</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Kívülről érkező kapcsolatok elfogadása (alapértelmezett: 1, ha nem használt a -proxy vagy a -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1363,8 +1390,8 @@
<translation>Parancs, amit akkor hajt végre, amikor egy tárca-tranzakció megváltozik (%s a parancsban lecserélődik a blokk TxID-re)</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Csatlakozás csak a megadott csomóponthoz</translation>
+ <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
+ <translation>UPnP használata porttovábbításra (alapértelmezett: 1, amikor kiszolgál és nem használt a -proxy)</translation>
</message>
<message>
<source>Corrupted block database detected</source>
@@ -1407,6 +1434,10 @@
<translation>Helytelen vagy nemlétező genézis blokk. Helytelen hálózati adatkönyvtár?</translation>
</message>
<message>
+ <source>Loading banlist...</source>
+ <translation>Tiltólista betöltése...</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Nincs elég fájlleíró. </translation>
</message>
@@ -1423,6 +1454,18 @@
<translation>Tárca beállítások:</translation>
</message>
<message>
+ <source>Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)</source>
+ <translation>Saját IP-cím felfedezése (alapértelmezett: 1, amikor kiszolgál és nem használt a -externalip)</translation>
+ </message>
+ <message>
+ <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+ <translation>A fehérlistán szereplő felek nem lesznek automatikusan kitiltva és a tranzakcióik is mindig továbbítva lesznek, akkor is ha már a megerősítésre váró listán (mempool) vannak. Hasznos például összekötő csomópontokon (gateway).</translation>
+ </message>
+ <message>
+ <source>(default: %u)</source>
+ <translation>(alapértelmezett: %u)</translation>
+ </message>
+ <message>
<source>Error reading from database, shutting down.</source>
<translation>Hiba az adatbázis olvasásakor, leállítás</translation>
</message>
@@ -1447,10 +1490,6 @@
<translation>Tranzakció összege túl alacsony</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Tranzakció összege pozitív kell legyen</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Túl nagy tranzakció</translation>
</message>
@@ -1481,6 +1520,14 @@
<translation>Címek betöltése...</translation>
</message>
<message>
+ <source>(default: %s)</source>
+ <translation>(alapértelmezett: %s)</translation>
+ </message>
+ <message>
+ <source>Include IP addresses in debug output (default: %u)</source>
+ <translation>IP-címek megjelenítése a naplóban (alapértelmezett: %u)</translation>
+ </message>
+ <message>
<source>Invalid -proxy address: '%s'</source>
<translation>Érvénytelen -proxy cím: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index feb6f690c4..5cc5d71c6d 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Hapus</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Ulangi kata kunci baru</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -258,26 +261,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n blok dari riwayat transaksi diproses.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n jam</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n hari</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n minggu</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 dan %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n tahun</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>kurang %1</translation>
@@ -356,7 +339,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Dompet saat ini &lt;b&gt;terenkripsi&lt;/b&gt; dan &lt;b&gt;terkunci&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -376,10 +359,6 @@
<translation>Jumlah:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritas:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Biaya:</translation>
</message>
@@ -431,11 +410,7 @@
<source>Confirmed</source>
<translation>Terkonfirmasi</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritas</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -458,7 +433,7 @@
<source>&amp;Address</source>
<translation>&amp;Alamat</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -561,6 +536,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulir</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Waktu blok terakhir</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -578,7 +564,7 @@
<source>Select payment request file</source>
<translation>Pilih data permintaan pembayaran</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -822,6 +808,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -850,6 +839,16 @@
<source>N/A</source>
<translation>T/S</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 dan %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -1070,7 +1069,7 @@
<source>Remove</source>
<translation>Menghapus</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1089,7 +1088,14 @@
<source>&amp;Save Image...</source>
<translation>&amp;Simpan Gambaran...</translation>
</message>
-</context>
+ <message>
+ <source>Amount</source>
+ <translation>Jumlah</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1125,10 +1131,6 @@
<translation>Nilai:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritas:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Biaya:</translation>
</message>
@@ -1157,10 +1159,6 @@
<translation>Disarankan</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Waktu konfirmasi:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1200,7 +1198,7 @@
<source>S&amp;end</source>
<translation>K&amp;irim</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1255,7 +1253,10 @@
<source>Memo:</source>
<translation>Catatan Peringatan:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1329,7 +1330,7 @@
<source>Reset all verify message fields</source>
<translation>Hapus semua bidang verifikasi pesan</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1345,16 +1346,38 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Amount</source>
+ <translation>Jumlah</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Jendela ini menampilkan deskripsi rinci dari transaksi tersebut</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1381,10 +1404,6 @@
<translation>Berjalan dibelakang sebagai daemin dan menerima perintah</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Terima hubungan dari luar (standar: 1 kalau -proxy atau -connect tidak dipilih)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1393,22 +1412,10 @@
<translation>Jalankan perintah ketika perubahan transaksi dompet (%s di cmd digantikan oleh TxID)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Peringatan: Jaringan tidak semua bersetuju! Beberapa penambang dapat persoalan.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Peringatan: Kami tidak bersetujuh dengan peer-peer kami! Kemungkinan Anda harus upgrade, atau node-node lain yang harus diupgrade.</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Pilihan pembuatan blok:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Jangan menghubungkan node(-node) selain yang di daftar</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Pilih koneksi:</translation>
</message>
@@ -1513,10 +1520,6 @@
<translation>Nilai transaksi terlalu kecil</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Nilai transaksi harus positif</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transaksi terlalu besar</translation>
</message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 55bc9c3c82..76cfdfafa5 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -3,7 +3,7 @@
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
- <translation>Fare clic con il tasto destro del mouse per modificare l'indirizzo o l'etichetta</translation>
+ <translation>Fare clic con il tasto destro del mouse per modificare l'indirizzo o l'etichettadefault</translation>
</message>
<message>
<source>Create a new address</source>
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Elimina</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Scegli l'indirizzo a cui inviare bitcoin</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Scegli l'indirizzo con cui ricevere bitcoin</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Sc&amp;egli</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Indirizzi d'invio</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Indirizzi di ricezione</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Questo è un elenco di indirizzi Bitcoin a cui puoi inviare pagamenti. Controlla sempre l'importo e l'indirizzo del beneficiario prima di inviare bitcoin.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Questi sono i tuoi indirizzi Bitcoin che puoi usare per ricevere pagamenti. Si raccomanda di generare un nuovo indirizzo per ogni transazione.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copia l'indirizzo</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copia &amp;l'etichetta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Modifica</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Esporta Lista Indirizzi</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Testo CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Esportazione Fallita</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Si è verificato un errore tentando di salvare la lista degli indirizzi su %1. Si prega di riprovare.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etichetta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Indirizzo</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(nessuna etichetta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +131,67 @@
<source>Repeat new passphrase</source>
<translation>Ripeti la nuova passphrase</translation>
</message>
-</context>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Inserisci la nuova passphrase per il portamonete.&lt;br/&gt;Si consiglia di utilizzare &lt;b&gt;almeno dieci caratteri casuali&lt;/b&gt; oppure &lt;b&gt;otto o più parole&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Cifra il portamonete</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Questa operazione necessita della passphrase per sbloccare il portamonete.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Sblocca il portamonete</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Quest'operazione necessita della passphrase per decifrare il portamonete,</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Decifra il portamonete</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Cambia la passphrase</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Inserisci la vecchia e la nuova passphrase per il portamonete.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Conferma la cifratura del portamonete</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Attenzione: perdendo la passphrase di un portamonete cifrato &lt;b&gt;TUTTI I PROPRI BITCOIN ANDRANNO PERSI&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Si è sicuri di voler cifrare il portamonete?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Portamonete cifrato</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Il processo di crittografia del tuo portafogli è fallito</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Sbloccaggio del portafoglio fallito</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>La frase inserita per decrittografare il tuo portafoglio è incorretta</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -115,6 +246,10 @@
<translation>&amp;Informazioni su %1</translation>
</message>
<message>
+ <source>Show information about %1</source>
+ <translation>Mostra informazioni su %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Informazioni su &amp;Qt</translation>
</message>
@@ -127,6 +262,10 @@
<translation>&amp;Opzioni...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Modifica le opzioni di configurazione per %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Cifra il portamonete...</translation>
</message>
@@ -255,6 +394,14 @@
<translation><numerusform>%n connessione attiva alla rete Bitcoin</numerusform><numerusform>%n connessioni alla rete Bitcoin attive</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Indicizzando i blocchi su disco...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Processando i blocchi su disco...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>Nessuna fonte di blocchi disponibile...</translation>
</message>
@@ -262,26 +409,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Elaborato %n blocco dello storico transazioni.</numerusform><numerusform>Elaborati %n blocchi dello storico transazioni.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n ora</numerusform><numerusform>%n ore</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n giorno</numerusform><numerusform>%n giorni</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n settimana</numerusform><numerusform>%n settimane</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 e %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n anno</numerusform><numerusform>%n anni</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>Indietro di %1</translation>
@@ -311,6 +438,14 @@
<translation>Aggiornato</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Mostra il messaggio di aiuto di %1 per ottenere una lista di opzioni di comando per Bitcoin </translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 client</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>In aggiornamento...</translation>
</message>
@@ -360,7 +495,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Il portamonete è &lt;b&gt;cifrato&lt;/b&gt; ed attualmente &lt;b&gt;bloccato&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -380,10 +515,6 @@
<translation>Importo:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorità:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Commissione:</translation>
</message>
@@ -436,10 +567,10 @@
<translation>Confermato</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorità</translation>
+ <source>(no label)</source>
+ <translation>(nessuna etichetta)</translation>
</message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -462,7 +593,7 @@
<source>&amp;Address</source>
<translation>&amp;Indirizzo</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -497,6 +628,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>Informazioni %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Opzioni della riga di comando</translation>
</message>
@@ -532,7 +667,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Mostra schermata iniziale all'avvio (default: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Reimposta tutti i campi dell'interfaccia grafica</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -540,6 +679,18 @@
<translation>Benvenuto</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Benvenuto su %1.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Dato che questa è la prima volta che il programma viene lanciato, puoi scegliere dove %1 salverà i suoi dati.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 scaricherà e salverà una copia della Blockchain di Bitcoin. Saranno salvati almeno %2GB di dati in questo percorso e continueranno ad aumentare col tempo. Anche il portafoglio verrà salvato in questo percorso.</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Usa la cartella dati predefinita</translation>
</message>
@@ -565,6 +716,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Modulo</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Ora del blocco più recente</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Nascondi</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +748,7 @@
<source>Select payment request file</source>
<translation>Seleziona il file di richiesta di pagamento</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -594,6 +760,14 @@
<translation>&amp;Principale</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Avvia automaticamente %1 una volta effettuato l'accesso al sistema.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Start %1 all'accesso al sistema</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>Dimensione della cache del &amp;database.</translation>
</message>
@@ -731,6 +905,14 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>&amp;Finestra</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>&amp;Nascondi l'icona nella barra delle applicazioni.</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Nascondi l'icona della barra applicazioni</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Mostra solo nella tray bar quando si riduce ad icona.</translation>
</message>
@@ -751,6 +933,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>&amp;Lingua Interfaccia Utente:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>La lingua dell'interfaccia utente può essere impostata qui. L'impostazione avrà effetto dopo il riavvio %1.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>&amp;Unità di misura con cui visualizzare gli importi:</translation>
</message>
@@ -875,6 +1061,9 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -884,11 +1073,7 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Node/Service</source>
<translation>Nodo/Servizio</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Tempo di ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -927,7 +1112,17 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 e %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -955,6 +1150,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Versione BerkeleyDB in uso</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Datadir</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Ora di avvio</translation>
</message>
@@ -1039,6 +1238,18 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>User Agent</translation>
</message>
<message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>Apri il file log del debug di %1 dalla cartella dati attuale. Può richiedere alcuni secondi per file di log di grandi dimensioni.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>Riduci dimensioni font.</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Aumenta dimensioni font</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Servizi</translation>
</message>
@@ -1115,14 +1326,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Cancella console</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Nodo Disconnesso</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Nodo Bannato perché</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;ora</translation>
</message>
@@ -1139,8 +1342,8 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>1 &amp;anno</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Elimina Ban Nodo</translation>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>Benvenuto nella console RPC di %1.</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
@@ -1269,7 +1472,7 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Remove</source>
<translation>Rimuovi</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1288,7 +1491,26 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>&amp;Save Image...</source>
<translation>&amp;Salva Immagine...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Indirizzo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etichetta</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etichetta</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(nessuna etichetta)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1324,10 +1546,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Importo:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorità:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Commissione:</translation>
</message>
@@ -1396,10 +1614,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>(Commissione intelligente non ancora inizializzata. Normalmente richiede un'attesa di alcuni blocchi...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Tempo di conferma:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normale</translation>
</message>
@@ -1439,6 +1653,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>S&amp;end</source>
<translation>&amp;Invia</translation>
</message>
+ <message>
+ <source>(no label)</source>
+ <translation>(nessuna etichetta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1518,10 +1736,17 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>Arresto di %1 in corso...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>Non spegnere il computer fino a quando questa finestra non si sarà chiusa.</translation>
</message>
@@ -1612,7 +1837,7 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Reset all verify message fields</source>
<translation>Reimposta tutti i campi della verifica messaggio</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1628,12 +1853,45 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Questo pannello mostra una descrizione dettagliata della transazione</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etichetta</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(nessuna etichetta)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Testo CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etichetta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Indirizzo</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Esportazione Fallita</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1642,6 +1900,15 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1704,30 +1971,62 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Impossibile avviare il server HTTP. Dettagli nel log di debug.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accetta connessioni dall'esterno (predefinito: 1 se -proxy o -connect non sono utilizzati)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
+ <source>The %s developers</source>
+ <translation>Sviluppatori di %s</translation>
+ </message>
+ <message>
+ <source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
+ <translation>Un importo (in %s/kB) che sarà utilizzato quando la stima delle commissioni non ha abbastanza dati (default: %s)</translation>
+ </message>
+ <message>
+ <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
+ <translation>Accetta le transazioni trasmesse ricevute da peers in whitelist anche se non si stanno trasmettendo transazioni (default: %d)</translation>
+ </message>
+ <message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Associa all'indirizzo indicato e resta permanentemente in ascolto su di esso. Usa la notazione [host]:porta per l'IPv6</translation>
</message>
<message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>Non è possibile ottenere i dati sulla cartella %s. Probabilmente %s è già in esecuzione.</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>Elimina tutte le transazioni dal portamonete e recupera solo quelle che fanno parte della blockchain attraverso il comando -rescan all'avvio.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuito secondo la licenza software MIT, vedi il file COPYING incluso oppure &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Errore caricamento %s: Non puoi abilitare HD in un portafoglio non-HD già esistente</translation>
+ </message>
+ <message>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>Errore lettura %s! Tutte le chiavi sono state lette correttamente, ma i dati delle transazioni o della rubrica potrebbero essere mancanti o non corretti.</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Esegue un comando quando lo stato di una transazione del portamonete cambia (%s in cmd è sostituito da TxID)</translation>
</message>
<message>
+ <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
+ <translation>Regolazione della massima differenza media di tempo dei peer consentita. L'impostazione dell'orario locale può essere impostata in avanti o indietro di questa quantità. (default %u secondi)</translation>
+ </message>
+ <message>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>Totale massimo di commissioni (in %s) da usare in una transazione singola o di gruppo del wallet; valori troppo bassi possono abortire grandi transazioni (default: %s)</translation>
+ </message>
+ <message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Per favore controllate che la data del computer e l'ora siano corrette! Se il vostro orologio è sbagliato %s non funzionerà correttamente.</translation>
+ </message>
+ <message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Per favore contribuite se ritenete %s utile. Visitate %s per maggiori informazioni riguardo il software.</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Imposta il numero di thread per la verifica degli script (da %u a %d, 0 = automatico, &lt;0 = lascia questo numero di core liberi, predefinito: %d)</translation>
</message>
@@ -1736,24 +2035,20 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Il database dei blocchi contiene un blocco che sembra provenire dal futuro. Questo può essere dovuto alla data e ora del tuo computer impostate in modo scorretto. Ricostruisci il database dei blocchi se sei certo che la data e l'ora sul tuo computer siano corrette</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Questa versione è una compilazione pre-rilascio - usala a tuo rischio - non utilizzarla per la generazione o per applicazioni di commercio</translation>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Impossibile riportare il database ad un livello pre-fork. Dovrai riscaricare tutta la blockchain</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Utilizza UPnP per mappare la porta in ascolto (default: 1 quando in ascolto e -proxy non è specificato)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Attenzione: La rete non sembra trovarsi in pieno consenso! Alcuni minatori sembrano riscontrare problemi.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Attenzione: Sembra che non vi sia pieno consenso con i nostri peer! Un aggiornamento da parte tua o degli altri nodi potrebbe essere necessario.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>È necessario ricostruire il database usando -reindex per cambiare -txindex</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Inserisce in whitelist i peer che si connettono da un dato indirizzo IP o netmask. Può essere specificato più volte.</translation>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s corrotto, recupero fallito</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1764,18 +2059,34 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Valori possibili per &lt;category&gt;:</translation>
</message>
<message>
+ <source>Append comment to the user agent string</source>
+ <translation>Aggiungi commento alla stringa dell'applicazione utente</translation>
+ </message>
+ <message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>Prova a recuperare le chiavi private da un portafoglio corrotto all'avvio</translation>
+ </message>
+ <message>
<source>Block creation options:</source>
<translation>Opzioni creazione blocco:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Connessione ai soli nodi specificati</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>Impossobile risolvere l'indirizzo -%s: '%s'</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>Cambio indice fuori paramentro</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Opzioni di connessione:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>Rilevato database blocchi corrotto</translation>
</message>
@@ -1808,6 +2119,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Abilita pubblicazione transazione raw in &lt;address&gt;</translation>
</message>
<message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Abilita la sostituzione della transazione nel pool della memoria (default: %u)</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
<translation>Errore durante l'inizializzazione del database dei blocchi</translation>
</message>
@@ -1816,6 +2131,22 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Errore durante l'inizializzazione dell'ambiente del database del portamonete %s!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>Errore caricamento %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>Errore caricamento %s: Portafoglio corrotto</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>Errore caricamento %s: il Portafoglio richiede una versione aggiornata di %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Errore caricamento %s: Non puoi disabilitare HD in un portafoglio HD già esistente</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Errore durante il caricamento del database blocchi</translation>
</message>
@@ -1840,14 +2171,34 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Blocco genesi non corretto o non trovato. È possibile che la cartella dati appartenga ad un'altra rete.</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>Test di integrità iniziale fallito. %s si arresterà.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Indirizzo -onion non valido: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>Importo non valido per -%s=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
+ <translation>Importo non valido per -fallbackfee=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
<source>Keep the transaction memory pool below &lt;n&gt; megabytes (default: %u)</source>
<translation>Mantieni la memory pool delle transazioni al di sotto di &lt;n&gt; megabytes (default: %u)</translation>
</message>
<message>
+ <source>Loading banlist...</source>
+ <translation>Caricamento bloccati...</translation>
+ </message>
+ <message>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Posizione del cookie di aiutorizzazione (default: data dir)</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Non ci sono abbastanza descrittori di file disponibili.</translation>
</message>
@@ -1856,6 +2207,14 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Connessione ai soli nodi appartenenti alla rete &lt;net&gt; (ipv4, ipv6 o Tor)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Mostra questo messaggio di aiuto ed esci</translation>
+ </message>
+ <message>
+ <source>Print version and exit</source>
+ <translation>Mostra la versione ed esci</translation>
+ </message>
+ <message>
<source>Prune cannot be configured with a negative value.</source>
<translation>La modalità prune non può essere configurata con un valore negativo.</translation>
</message>
@@ -1864,6 +2223,18 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>La modalità prune è incompatibile con l'opzione -txindex.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Ricostruisci lo stato della catena e l'indice dei blocchi partendo dai file blk*.dat presenti sul disco</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Ricrea l'indice della catena dei blocchi partendo da quelli già indicizzati</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>Verifica blocchi...</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Imposta la dimensione della cache del database in megabyte (%d a %d, predefinito: %d)</translation>
</message>
@@ -1876,6 +2247,14 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Specifica il file del portamonete (all'interno della cartella dati)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Il codice sorgente è disponibile in %s</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>Impossibile collegarsi a %s su questo computer. Probabilmente %s è già in esecuzione.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Ignorata opzione -benchmark non supportata, utilizzare -debug=bench.</translation>
</message>
@@ -1908,6 +2287,14 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Il portamonete %s si trova al di fuori dalla cartella dati %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Opzioni di Debug/Test del portafoglio:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Il portamonete necessita di essere riscritto: riavviare %s per completare</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Opzioni portamonete:</translation>
</message>
@@ -1956,10 +2343,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Dimensione massima dei dati in transazioni di trasporto dati che saranno trasmesse ed incluse nei blocchi (predefinito: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Ottiene gli indirizzi dei peer attraverso interrogazioni DNS, in caso di scarsa disponibilità (predefinito: 1 a meno che -connect non sia specificato)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Randomizza le credenziali per ogni connessione proxy. Permette la Tor stream isolation (predefinito: %u)</translation>
</message>
@@ -1972,8 +2355,8 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>L'importo della transazione risulta troppo basso per l'invio una volta dedotte le commissioni.</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Questo prodotto include software sviluppato dal progetto OpenSSL per l'uso del Toolkit OpenSSL &lt;https://www.openssl.org/&gt;, software crittografico scritto da Eric Young e software UPnP scritto da Thomas Bernard.</translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Usa la generazione gerarchica deterministica (HD) della chiave dopo BIP32. Valido solamente durante la creazione del portafoglio o al primo avvio</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2084,10 +2467,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Importo transazione troppo piccolo</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Gli importi della transazione devono essere positivi</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transazione troppo grande in base alla policy sulle commissioni</translation>
</message>
@@ -2112,6 +2491,10 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Attenzione</translation>
</message>
<message>
+ <source>Warning: unknown new rules activated (versionbit %i)</source>
+ <translation>Attenzione: nuove regole non conosciute attivate (versionbit %i)</translation>
+ </message>
+ <message>
<source>Whether to operate in a blocks only mode (default: %u)</source>
<translation>Imposta se operare in modalità solo blocchi (default: %u)</translation>
</message>
@@ -2148,14 +2531,14 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>-maxtxfee è impostato molto alto! Commissioni così alte possono venir pagate anche su una singola transazione.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee è impostato su un valore molto elevato. Questa è la commissione che si paga quando si invia una transazione.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Non mantenere le transazioni nella mempool più a lungo di &lt;n&gt; ore (default: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Byte equivalenti per ottimizzazione segnale dedicati a ritrasmissione ed estrazione (default: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Le commissioni (in %s/kB) inferiori a questo valore sono considerate pari a zero per la creazione della transazione (default: %s)</translation>
</message>
@@ -2192,12 +2575,20 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Argomento -socks non supportato. Non è più possibile impostare la versione SOCKS, solamente i proxy SOCKS5 sono supportati.</translation>
</message>
<message>
+ <source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
+ <translation>Argomento non supportato -whitelistalwaysrelay è stato ignorato, utilizzare -whitelistrelay e/o -whitelistforcerelay.</translation>
+ </message>
+ <message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
<translation>Usa un proxy SOCKS5 a parte per raggiungere i peer attraverso gli hidden services di Tor (predefinito: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Username e hash password per connessioni JSON-RPC. Il campo &lt;userpw&gt; utilizza il formato: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Uno script python standard è incluso in share/rpcuser. Questa opzione può essere specificata più volte</translation>
+ <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
+ <translation>Attenzione: si stanno minando versioni sconocsiute di blocchi! E' possibile che siano attive regole sconosciute</translation>
+ </message>
+ <message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>Attenzione: file del Portafoglio corrotto, dati recuperati! %s originale salvato come %s in %s; se il saldo o le transazioni non sono corrette effettua un ripristino da un backup.</translation>
</message>
<message>
<source>(default: %s)</source>
@@ -2260,8 +2651,8 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Imposta la dimensione del pool di chiavi a &lt;n&gt; (predefinito: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Imposta la dimensione minima del blocco in byte (predefinito: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Imposta la dimensione massima del blocco BIP141 (default: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
diff --git a/src/qt/locale/bitcoin_it_IT.ts b/src/qt/locale/bitcoin_it_IT.ts
index f89f4bdc48..09d40497fa 100644
--- a/src/qt/locale/bitcoin_it_IT.ts
+++ b/src/qt/locale/bitcoin_it_IT.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>Cancella</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,10 +59,18 @@
<source>Repeat new passphrase</source>
<translation>Ripeti nuova passphrase</translation>
</message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Attenzione: Il tasto blocco delle maiuscole è attivo!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
<message>
+ <source>IP/Netmask</source>
+ <translation>IP/Netmask</translation>
+ </message>
+ <message>
<source>Banned Until</source>
<translation>bannato fino </translation>
</message>
@@ -87,6 +98,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -96,12 +110,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -111,12 +134,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -129,12 +158,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index 4948cc3067..3b56a76855 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>削除(&amp;D)</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>先のアドレスを選択</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>支払いを受け取るアドレスを指定する</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>選択 (&amp;C)</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>送金用</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>受け取りアドレス</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>これらは支払いを送信するためのあなたの Bitcoin アドレスです。コインを送信する前に、常に額と受信アドレスを確認してください。</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>これらは支払いを受け取るためのビットコインアドレスです。トランザクションごとに新しい受け取り用アドレスを作成することが推奨されます。</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>アドレスをコピー (&amp;C)</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>ラベルをコピー (&amp;L)</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>編集 (&amp;E)</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>アドレス帳をエクスポート</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>テキスト CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>エクスポートに失敗しました</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>トランザクション履歴を %1 へ保存する際にエラーが発生しました。再試行してください。</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>アドレス</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ラベル無し)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>新しいパスフレーズをもう一度</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>ウォレットの新しいパスフレーズを入力してください。&lt;br/&gt;&lt;b&gt;10文字以上のランダムな文字&lt;/b&gt;で構成されたものか、&lt;b&gt;8単語以上の単語&lt;/b&gt;で構成されたパスフレーズを使用してください。</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>ウォレットを暗号化する</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>この操作はウォレットをアンロックするためにパスフレーズが必要です。</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>ウォレットをアンロックする</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>この操作はウォレットの暗号化解除のためにパスフレーズが必要です。</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>ウォレットの暗号化を解除する</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>パスフレーズの変更</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>ウォレットの古いパスフレーズおよび新しいパスフレーズを入力してください。</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>ウォレットの暗号化を確認する</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>警告: もしもあなたのウォレットを暗号化してパスフレーズを失ってしまったなら、&lt;b&gt;あなたの Bitcoin はすべて失われます&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>本当にウォレットを暗号化しますか?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>ウォレットは暗号化されました</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>暗号化処理を完了させるため %1 をいますぐ終了します。ウォレットの暗号化では、コンピュータに感染したマルウェアなどによるビットコインの盗難から完全に守ることはできないことにご注意ください。</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>重要: 過去のウォレット ファイルのバックアップは、暗号化された新しいウォレット ファイルに取り替える必要があります。セキュリティ上の理由により、暗号化された新しいウォレットを使い始めると、暗号化されていないウォレット ファイルのバックアップはすぐに使えなくなります。</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>ウォレットの暗号化に失敗しました</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>内部エラーによりウォレットの暗号化が失敗しました。ウォレットは暗号化されませんでした。</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>パスフレーズが同じではありません。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>ウォレットのアンロックに失敗しました</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>ウォレットの暗号化解除のパスフレーズが正しくありません。</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>ウォレットの暗号化解除に失敗しました</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>ウォレットのパスフレーズの変更が成功しました。</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>警告: Caps Lock キーがオンになっています!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -159,6 +318,18 @@
<translation>URI を開く (&amp;U)...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>クリックするとネットワーク活動を無効化します。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>ネットワーク活動は無効化されました。</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>クリックするとネットワーク活動を再び有効化します。</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>ディスク上のブロックのインデックスを再作成中...</translation>
</message>
@@ -278,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>トランザクション履歴の %n ブロックを処理しました。</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n 時間</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n 日</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n 週間</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 と %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n 年</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 遅延</translation>
@@ -377,6 +528,14 @@
<translation>着金取引</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>HD鍵生成は&lt;b&gt;有効化&lt;/b&gt;されています</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>HD鍵生成は&lt;b&gt;無効化&lt;/b&gt;されています</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>ウォレットは&lt;b&gt;暗号化されて、アンロックされています&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>ウォレットは&lt;b&gt;暗号化されて、ロックされています&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>致命的なエラーが発生しました。Bitcoin は安全に継続することができず終了するでしょう。</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>総額:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>優先度:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>手数料:</translation>
</message>
@@ -460,8 +619,84 @@
<translation>検証済み</translation>
</message>
<message>
- <source>Priority</source>
- <translation>優先度</translation>
+ <source>Copy address</source>
+ <translation>アドレスをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>ラベルをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>総額のコピー</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>取引 ID をコピー</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>未使用トランザクションをロックする</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>未使用トランザクションをアンロックする</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>数量をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>手数料をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>手数料差引後の値をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>バイト数をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>ダストをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>釣り銭をコピー</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 がロック済み)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>はい</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>いいえ</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>少なくともひとつの受取額が現在のダスト閾値を下回る場合にはこのラベルは赤くなります。</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>ひとつの入力につき %1 satoshi 前後ずれることがあります。</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ラベル無し)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>%1 (%2) からのおつり</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(おつり)</translation>
</message>
</context>
<context>
@@ -486,6 +721,38 @@
<source>&amp;Address</source>
<translation>アドレス帳 (&amp;A)</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>新しい受信アドレス</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>新しい送信アドレス</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>入金アドレスを編集</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>送信アドレスを編集</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>入力されたアドレス "%1" は無効な Bitcoin アドレスです。</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>入力されたアドレス "%1" は既にアドレス帳にあります。</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>ウォレットをアンロックできませんでした。</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>新しいキーの生成に失敗しました。</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +876,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>フォーム</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>確認できない最近のトランザクションがあるかもしれません。これによりウォレットの残高は不正確なものである可能性があります。この情報はウォレットが一度ビットコインネットワークへの同期が完了すると正確なものとなります。詳細は下記を参照してください。</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>まだ表示されていないトランザクションが影響するビットコインを使用しようとすると、ネットワークから認証がなされないでしょう。</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>残りのブロック数</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>未知...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>最終ブロックの日時</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>進捗</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>進捗状況は一時間ごとに増加します</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>計算しています...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>同期完了までの推定残り時間</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>隠す</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>未知。ヘッダを同期しています (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +944,10 @@
<source>Select payment request file</source>
<translation>支払いリクエストファイルを選択してください</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>開きたい支払いリクエストファイルを選択してください</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -938,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>支払いのリクエストのエラーです</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Bitcoin を起動できません: click-to-pay handler</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI の操作</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>支払い要求の取得先URLが無効です: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>支払いのアドレス「%1」は無効です</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI を解析できません! これは無効な Bitcoin アドレスあるいや不正な形式の URI パラメーターによって引き起こされる場合があります。</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>支払いリクエストファイルを処理しています</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>支払いリクエストファイルを読み込めませんでした!無効な支払いリクエストファイルにより引き起こされた可能性があります。</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>支払い要求は拒否されました</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>支払いリクエストのネットワークは現在のクライアントのネットワークに一致しません。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>支払いリクエストの期限が切れました。</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>支払いリクエストは開始されていません。</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>カスタム支払いスクリプトに対する、検証されていない支払いリクエストはサポートされていません。</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>無効な支払いリクエスト。</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>要求された支払額 %1 は少なすぎます (ダストとみなされてしまいます)。</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>%1 からの返金</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>支払リクエスト %1 は大きすぎます(%2バイトですが、%3バイトまでが許されています)。</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>%1: %2とコミュニケーション・エラーです</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>支払リクエストを読み込めませんでした!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>サーバーの返事は無効 %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>ネットワーク・リクエストのエラーです</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>支払いは確認しました</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -948,8 +1361,12 @@
<translation>ノード・サービス</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Ping時間</translation>
+ <source>NodeId</source>
+ <translation>ノードID</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Ping</translation>
</message>
</context>
<context>
@@ -990,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1ミリ秒</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n 秒</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n 分</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n 時間</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n 日</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n 週間</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 と %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n 年</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 はまだ安全に終了していません...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>エラー: 指定のデータ ディレクトリ "%1" は存在しません。</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>エラー: 設定ファイルをパースできません: %1。key=value という記法のみを利用してください。</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>エラー: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>画像を保存(&amp;S)</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>画像をコピー(&amp;C)</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>QR コードの保存</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG画像ファイル(*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1150,6 +1633,10 @@
<translation>Ping待ち</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>最小 Ping</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>時間オフセット</translation>
</message>
@@ -1194,14 +1681,6 @@
<translation>コンソールをクリア</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>ノードを切断する (&amp;D)</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>ノードをbanする:</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1時間 (&amp;H)</translation>
</message>
@@ -1218,8 +1697,16 @@
<translation>1年 (&amp;Y)</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>ノードのbanを解除する (&amp;U)</translation>
+ <source>&amp;Disconnect</source>
+ <translation>切断 (&amp;D)</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Banする:</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>Banを解除する (&amp;U)</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1234,6 +1721,14 @@
<translation>使用可能なコマンドを見るには &lt;b&gt;help&lt;/b&gt; と入力します。</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>警告: 詐欺師が活動しており、ユーザに対してここにコマンドを入力させることでウォレットの中身を盗もうとしています。コマンドの結果を完全に理解していない限り、このコンソールは利用しないでください。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>ネットワーク活動は無効化されました</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
@@ -1352,6 +1847,22 @@
<source>Remove</source>
<translation>削除</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>URI をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>ラベルをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>メッセージをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>総額のコピー</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,6 +1882,73 @@
<source>&amp;Save Image...</source>
<translation>画像を保存(&amp;S)</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>%1 への支払いリクエストを行う</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>支払い情報</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>アドレス</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>総額</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>メッセージ</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI が長くなり過ぎます。ラベルやメッセージのテキストを短くしてください。</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>QR コード用の URI エンコードでエラー。</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日付</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>メッセージ</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ラベル無し)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(メッセージなし)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(金額指定なし)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>要求</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1407,10 +1985,6 @@
<translation>総額:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>優先度:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>手数料:</translation>
</message>
@@ -1479,10 +2053,6 @@
<translation>(スマート手数料はまだ初期化されていません。これにはおおよそ数ブロックほどかかります……)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>検証時間:</translation>
- </message>
- <message>
<source>normal</source>
<translation>普通</translation>
</message>
@@ -1507,6 +2077,10 @@
<translation>ダスト:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>検証時間のターゲット:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>すべてクリア (&amp;A)</translation>
</message>
@@ -1522,6 +2096,118 @@
<source>S&amp;end</source>
<translation>送金 (&amp;E)</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>数量をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>総額のコピー</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>手数料をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>手数料差引後の値をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>バイト数をコピーする</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>ダストをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>釣り銭をコピー</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 から %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>送ってよろしいですか?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>取引手数料として追加された</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>合計: %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>または</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>コインを送る確認</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>受取アドレスが不正です。再チェックしてください。</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>支払額は0より大きくないといけません。</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>額が残高を超えています。</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>%1 の取引手数料を含めると額が残高を超えています。</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>重複したアドレスが見つかりました: アドレスはそれぞれ一度のみ使用することができます。</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>トラザクションの作成に失敗しました!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>トランザクションは以下の理由により拒絶されました: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>%1 よりも高い手数料の場合、手数料が高すぎると判断されます。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>支払いリクエストの期限が切れました。</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n ブロック</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>要求手数料 %1 のみを支払う</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>%n ブロック以内に検証が開始されると予想されます。</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>警告:無効なBitcoinアドレスです</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>警告:未知のおつりアドレスです</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ラベル無し)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,6 +2287,17 @@
<source>Memo:</source>
<translation>メモ:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>アドレス帳に追加するには、このアドレスのラベルを入力します</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>はい</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1699,6 +2396,58 @@
<source>Reset all verify message fields</source>
<translation>入力項目の内容をすべて消去します</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>署名を作成するには"メッセージの署名"をクリック</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>不正なアドレスが入力されました。</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>アドレスを確かめてからもう一度試してください。</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>入力されたアドレスに関連するキーがありません。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>ウォレットのアンロックはキャンセルされました。</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>入力されたアドレスのプライベート キーが無効です。</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>メッセージの署名に失敗しました。</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>メッセージに署名しました。</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>署名がデコードできません。</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>署名を確認してからもう一度試してください。</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>署名はメッセージ ダイジェストと一致しませんでした。</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>メッセージの検証に失敗しました。</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>メッセージは検証されました。</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1715,11 +2464,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>%n 以上のブロックを開く</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>ユニット %1 を開く</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>%1 検証のトランザクションと衝突</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/オフライン</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/未検証, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>メモリプール内</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>メモリプール外</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>中止</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/未検証</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 確認</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>ステータス</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>まだブロードキャストが成功していません</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>%n ノードにブロードキャスト</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日付</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>ソース</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>生成された</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>送信</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>未確認</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>受信</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>自分のアドレス</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>監視限定</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>クレジット</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>あと %n ブロックで成熟します</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>承認されなかった</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>引き落とし額</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>総出金額</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>総入金額</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>取引手数料</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>正味金額</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>メッセージ</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>コメント</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>取引 ID</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>トランザクションの全体サイズ</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>出力インデックス</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>商人</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>生成されたコインは使う前に%1のブロックを完成させる必要があります。あなたが生成した時、このブロックはブロック チェーンに追加されるネットワークにブロードキャストされました。チェーンに追加されるのが失敗した場合、状態が"不承認"に変更されて使えなくなるでしょう。これは、別のノードがあなたの数秒前にブロックを生成する場合に時々起こるかもしれません。</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>デバッグ情報</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>取引</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>入力</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>総額</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>正しい</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>正しくない</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>ここでは取引の詳細を表示しています</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>%1 の詳細</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日付</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>タイプ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>%n 以上のブロックを開く</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>ユニット %1 を開く</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>オフライン</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>未検証</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>中止</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>検証中(%2の推奨検証数のうち、%1検証が完了)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>検証されました (%1 検証済み)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>衝突</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>未成熟(%1検証。%2検証完了後に使用可能となります)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>このブロックは他のどのノードによっても受け取られないで、多分受け入れられないでしょう!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>生成されましたが承認されませんでした</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>送り主</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>送り主</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>送り先</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>自分自身への支払い</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>発掘した</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>監視限定</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(ラベル無し)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>取引の状況。このフィールドの上にカーソルを置くと検証の数を表示します。</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>取引を受信した日時。</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>取引の種類。</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>監視限定アドレスがこのトランザクションに含まれているかどうか</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>ユーザ定義のトランザクションの意図や目的。</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>残高に追加または削除された総額。</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>すべて</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>今日</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>今週</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>今月</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>先月</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>今年</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>期間...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>送り主</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>送り先</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>自分自身</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>発掘した</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>その他</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>検索するアドレスまたはラベルを入力</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>最小の額</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>取引の中止</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>アドレスをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>ラベルをコピーする</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>総額のコピー</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>取引 ID をコピー</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>生トランザクションをコピー</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>トランザクションの詳細すべてをコピー</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>ラベルの編集</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>取引の詳細を表示</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>トランザクション履歴をエクスポートする</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>テキスト CSV (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>検証済み</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>監視限定</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日付</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>タイプ</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>ラベル</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>アドレス</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>エクスポートに失敗しました</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>トランザクション履歴を %1 へ保存する際にエラーが発生しました。</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>エクスポートに成功しました</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>トランザクション履歴は正常に%1に保存されました。</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>期間:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>から</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1729,6 +2927,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>ウォレットがロードされていません</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>コインを送る</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>エクスポート (&amp;E)</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>ファイルに現在のタブのデータをエクスポート</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>ウォレットのバックアップ</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>ウォレット データ (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>バックアップに失敗しました</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>ウォレットデータを%1へ保存する際にエラーが発生しました。</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>バックアップ成功</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>ウォレット データは正常に%1に保存されました。</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1751,6 +2998,18 @@
<translation>コマンドラインと JSON-RPC コマンドを許可</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>外部からの接続を許可 (初期値: -proxy または -connect/-noconnect を使用していない場合は1)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>指定されたノードにのみ接続を行う; -noconnect または -connect=0 だけを指定すると自動接続を無効化します</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>MITソフトウェアライセンスのもとで配布されています。付属のファイル %s または %s を参照してください</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>&lt;category&gt; が与えられなかった場合や &lt;category&gt; = 1 の場合には、すべてのデバッグ情報が出力されます。</translation>
</message>
@@ -1791,10 +3050,6 @@
<translation>HTTPサーバを開始できませんでした。詳細はデバッグログをご確認ください。</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>外部からの接続を許可 (初期値: -proxy または -connect を使用していない場合は1)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin のコア</translation>
</message>
@@ -1803,10 +3058,6 @@
<translation>%s の開発者</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee が高すぎます!これは手数料の推定機能が利用できない場合に支払うトランザクション手数料です。</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>十分なデータが蓄積されていない場合に手数料推定機能が利用する手数料レート (%s/kB) (デフォルト: %s)</translation>
</message>
@@ -1827,10 +3078,6 @@
<translation>ウォレットの全トランザクションを削除し、これらを-rescanオプションを用いることで起動時にブロックチェインのデータのみからリカバリします。</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>MITソフトウェアライセンスのもとで配布されています。付属のCOPYINGファイルまたは&lt;http://www.opensource.org/licenses/mit-license.php&gt;を参照してください。</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>%s の読み込みエラー: 非HDウォレットが既に存在するため、HDウォレットを有効化できません</translation>
</message>
@@ -1843,10 +3090,6 @@
<translation>ウォレットの取引を変更する際にコマンドを実行 (cmd の %s は TxID に置換される)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>ホワイトリストのピアから受け取ったトランザクションに関しては、たとえローカルの中継ポリシーに違反しているとしても中継を行うようにする (デフォルト: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>時間オフセット調整値のピア中央値に対する最大の許容値。ローカル時間の見込み値は、接続するピアにより前方ないし後方へ影響されます。(初期値: %u 秒)</translation>
</message>
@@ -1883,16 +3126,16 @@
<translation>リスン ポートの割当に UPnP を使用 (初期値: リスン中および-proxyが指定されていない場合は1)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>警告: ネットワークは完全に同意しないみたいです。マイナーは何かの問題を経験してるみたいなんです。</translation>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>ウォレットがmempoolチェーン制限数を超えてトランザクションを作らないようにする (初期値: %u)</translation>
</message>
<message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>警告: ピアーと完全に同意しないみたいです!アップグレードは必要かもしれません、それとも他のノードはアップグレードは必要かもしれません。</translation>
+ <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
+ <translation>警告: ネットワークは完全に合意が取れていないようです。幾人かのマイナーに何らかの障害が発生しているようです。</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>与えられたネットマスクやIPアドレスから接続を行う、ホワイトリストのピア。複数回指定できます。</translation>
+ <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+ <translation>警告: ピアと完全に合意が取れていないようです!このノードまたは他のノードのアップグレードが必要なようです。</translation>
</message>
<message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
@@ -1927,12 +3170,12 @@
<translation>-%s アドレス '%s' を解決できません</translation>
</message>
<message>
- <source>Change index out of range</source>
- <translation>おつりのインデックスが範囲外です</translation>
+ <source>Chain selection options:</source>
+ <translation>チェイン選択オプション:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>指定したノードだけに接続</translation>
+ <source>Change index out of range</source>
+ <translation>おつりのインデックスが範囲外です</translation>
</message>
<message>
<source>Connection options:</source>
@@ -2056,10 +3299,6 @@
<translation>認証クッキーの場所 (デフォルト: )</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>中継や採掘を行ってもよい、sigopあたりの最小バイト数 (デフォルト: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>使用可能なファイルディスクリプタが不足しています。</translation>
</message>
@@ -2100,10 +3339,6 @@
<translation>データベースのキャッシュサイズをメガバイトで設定 (%dから%d。初期値: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>最大ブロックコストを設定 (初期値: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>最大ブロックサイズをバイトで設定 (初期値: %d)</translation>
</message>
@@ -2136,6 +3371,10 @@
<translation>リッスンポートの割当に UPnP を使用 (初期値: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>テストチェインを利用する</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>ユーザエージェントのコメント (%s) には安全でない文字が含まれています。</translation>
</message>
@@ -2208,10 +3447,6 @@
<translation>中継および採掘を行う際の、データ運送トランザクションの中のデータの最大サイズ (初期値: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>保有するピアアドレスが少ない場合、DNS ルックアップによりピアアドレスを問い合わせる (-connect を使っていない場合の初期値: 1)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>認証情報をプロキシー接続ごとにランダム化する。これによりTorストリーム分離をすることができます (規定値: %u)</translation>
</message>
@@ -2224,10 +3459,6 @@
<translation>手数料差引後のトランザクションの金額が小さすぎるため、送金できません。</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>この製品はOpenSSLプロジェクトにより開発されたソフトウェアをOpenSSLツールキットとして利用しています &lt;https://www.openssl.org/&gt;。また、Eric Young氏により開発された暗号ソフトウェア、Thomas Bernard氏により書かれたUPnPソフトウェアを用いています。</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>BIP32 に従った階層的決定性鍵生成方式 (HD) を利用します。ウォレットの生成時ないし最初に起動した時にのみ有効です。</translation>
</message>
@@ -2340,10 +3571,6 @@
<translation>取引の額が小さ過ぎます</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>取引の額は0より大きくしてください</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>手数料ポリシーに対してトランザクションが大きすぎます</translation>
</message>
@@ -2408,18 +3635,22 @@
<translation>-maxtxfee が非常に高く設定されています!ひとつのトランザクションでこの量の手数料が支払われてしまうことがあります。</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee が非常に高く設定されています! これは取引を送信する場合に支払う取引手数料です。</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>mempool内でトランザクションを &lt;n&gt; 時間以上保持しない (初期値: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>中継や採掘を行う際のトランザクション内の、sigopあたりバイト数の相当量 (初期値: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>トランザクション作成の際、この値未満の手数料 (%s/kB単位) はゼロであるとみなす (デフォルト: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>ホワイトリストのピアから受け取ったトランザクションに関しては、たとえローカルの中継ポリシーに違反しているとしても中継を行うようにする (デフォルト: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>-checkblocks のブロックの検証レベル (0-4, 初期値: %u)</translation>
</message>
@@ -2436,10 +3667,26 @@
<translation>デバッグ情報を出力する (初期値: %u, &lt;category&gt; の指定は任意です)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>保有するピアアドレスが少ない場合、DNS ルックアップによりピアアドレスを問い合わせる (-connect/-noconnect を使っていない場合の初期値: 1)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>非冗長モードで返却する生トランザクションやブロックの16進数表現のシリアライゼーションフォーマットを非 segwit (0) または segwit (1) のものに設定する (デフォルト: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Bloomフィルタによる、ブロックおよびトランザクションのフィルタリングを有効化する (初期値: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>これは手数料の推定機能が利用できない場合に支払うトランザクション手数料です。</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>この製品はOpenSSLプロジェクトにより開発されたソフトウェアをOpenSSLツールキット %s として利用しています &lt;https://www.openssl.org/&gt;。また、Eric Young氏により開発された暗号ソフトウェア、Thomas Bernard氏により書かれたUPnPソフトウェアを用いています。</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>ネットワークバージョン文字 (%i) の長さが最大の長さ (%i) を超えています。UAコメントの数や長さを削減してください。</translation>
</message>
@@ -2460,10 +3707,6 @@
<translation>Tor 秘匿サービスを通し、別々の SOCKS5 プロキシを用いることでピアに到達する (初期値: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>JSON-RPC接続時のユーザ名とハッシュ化されたパスワード。&lt;userpw&gt; フィールドのフォーマットは &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;。標準的な Python スクリプトが share/rpcuser 内に含まれています。このオプションは複数回指定できます。</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>警告: 未知のバージョンのブロックが採掘されました。未知のルールが導入された可能性があります</translation>
</message>
@@ -2472,6 +3715,14 @@
<translation>警告: ウォレットファイルが破損していましたのでデータを復旧しました!元の %s は %s として %s に保存されました; 残高やトランザクションが正しくない場合にはバックアップから復元してください。</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>ホワイトリストとして登録するピアノ、接続元の IP アドレス (例: 1.2.3.4) または CIDR 表現のネットワーク (例: 1.2.3.0/24)。複数回指定することもできる</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s の設定値は高すぎます</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(デフォルト: %s)</translation>
</message>
@@ -2492,6 +3743,10 @@
<translation>無効な -proxy アドレス: '%s'</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>鍵プールが枯渇しました。まずはじめに keypoolrefill を呼び出してください</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>&lt;port&gt; で JSON-RPC 接続をリスン (初期値: %u、testnet は %u)</translation>
</message>
@@ -2528,12 +3783,16 @@
<translation>P2SHでないマルチシグトランザクションをリレーする (初期値: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>full-RBF opt-in を利用してトランザクションを送信する (初期値: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>key pool のサイズを &lt;n&gt; (初期値: %u) にセット</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>最小ブロックサイズをバイトで設定 (初期値: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>BIP141ブロック重みの最大値を設定 (初期値: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2556,10 +3815,38 @@
<translation>トランザクション送信時に未検証のおつりを使用する (デフォルト: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>ネットワークのスレッドを起動しています...</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>ウォレットは最小中継手数料を下回る額の支払を拒否します。</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>これはすべてのトランザクションに対して最低限支払うべき手数料です。</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>これは取引を送信する場合に支払う取引手数料です。</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>不正なピアを切断するためのしきい値 (初期値: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>取引の額は負であってはいけません</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>トランザクションのmempoolチェインが長過ぎます</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>トランザクションは最低ひとつの受取先が必要です</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>-onlynet で指定された '%s' は未知のネットワークです</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 80508be8ee..920f44758a 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;წაშლა</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>გაიმეორეთ ახალი ფრაზა-პაროლი</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -239,10 +242,6 @@
<translation>ბლოკების წყარო მიუწვდომელია...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 და %2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 გავლილია</translation>
</message>
@@ -290,7 +289,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>საფულე &lt;b&gt;დაშიფრულია&lt;/b&gt; და ამჟამად &lt;b&gt;დაბლოკილია&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -306,10 +305,6 @@
<translation>თანხა:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>პრიორიტეტი:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>საკომისიო:</translation>
</message>
@@ -349,11 +344,7 @@
<source>Confirmed</source>
<translation>დადასტურებულია</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>პრიორიტეტი</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -376,7 +367,7 @@
<source>&amp;Address</source>
<translation>მის&amp;ამართი</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -439,6 +430,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>ფორმა</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>ბოლო ბლოკის დრო</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -456,7 +458,7 @@
<source>Select payment request file</source>
<translation>გადახდის მოთხოვნის ფაილის არჩევა</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -640,6 +642,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -660,6 +665,16 @@
<source>N/A</source>
<translation>მიუწვდ.</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 და %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -842,7 +857,7 @@
<source>Remove</source>
<translation>წაშლა</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -861,7 +876,10 @@
<source>&amp;Save Image...</source>
<translation>გამო&amp;სახულების შენახვა...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -897,10 +915,6 @@
<translation>თანხა:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>პრიორიტეტი:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>საკომისიო:</translation>
</message>
@@ -952,7 +966,7 @@
<source>S&amp;end</source>
<translation>გაგ&amp;ზავნა</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1011,7 +1025,10 @@
<source>Memo:</source>
<translation>შენიშვნა:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1089,7 +1106,7 @@
<source>Reset all verify message fields</source>
<translation>ვერიფიკაციის ყველა ველის წაშლა</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1105,16 +1122,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>ტრანსაქციის დაწვრილებითი აღწერილობა</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1141,10 +1176,6 @@
<translation>რეზიდენტულად გაშვება და კომანდების მიღება</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>გარედან შეერთებების დაშვება (ნაგულისხმევი: 1 თუ არ გამოიყენება -proxy ან -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1157,18 +1188,6 @@
<translation>კომანდის შესრულება საფულის ტრანსაქციის ცვლილებისას (%s კომანდაში ჩანაცვლდება TxID-ით)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>ეს არის წინასწარი სატესტო ვერსია - გამოიყენეთ საკუთარი რისკით - არ გამოიყენოთ მოპოვებისა ან კომერციული მიზნებისათვის</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>ყურადღება: ქსელში შეუთანხმებლობაა. შესაძლოა ცალკეულ მომპოვებლებს პრობლემები ექმნებათ!</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>ყურადღება: ჩვენ არ ვეთანხმებით ყველა პირს. შესაძლოა თქვენ ან სხვა კვანძებს განახლება გჭირდებათ.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; შეიძლება იყოს:</translation>
</message>
@@ -1177,10 +1196,6 @@
<translation>ბლოკის შექმნის ოპციები:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>შეერთება მხოლოდ მითითებულ კვანძ(ებ)თან</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>შენიშნულია ბლოკთა ბაზის დაზიანება</translation>
</message>
@@ -1281,10 +1296,6 @@
<translation>ტრანსაქციების რაოდენობა ძალიან ცოტაა</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>ტრანსაქციების რაოდენობა დადებითი რიცხვი უნდა იყოს</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>ტრანსაქცია ძალიან დიდია</translation>
</message>
diff --git a/src/qt/locale/bitcoin_kk_KZ.ts b/src/qt/locale/bitcoin_kk_KZ.ts
index ff02521264..2c9d228401 100644
--- a/src/qt/locale/bitcoin_kk_KZ.ts
+++ b/src/qt/locale/bitcoin_kk_KZ.ts
@@ -25,7 +25,10 @@
<source>&amp;Delete</source>
<translation>Жою</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -40,7 +43,7 @@
<source>Repeat new passphrase</source>
<translation>Жаңа құпия сөзді қайта енгізу</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -90,26 +93,6 @@
<source>&amp;Help</source>
<translation>Көмек</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n сағат</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n күн</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n апта</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 немесе %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n жыл</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 қалмады</translation>
@@ -138,10 +121,6 @@
<translation>Саны</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Басымдық</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комиссия</translation>
</message>
@@ -169,11 +148,7 @@
<source>Confirmed</source>
<translation>Растық</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Басымдық</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -184,7 +159,7 @@
<source>&amp;Address</source>
<translation>Адрес</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -199,6 +174,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -212,6 +190,9 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -220,6 +201,16 @@
<source>Amount</source>
<translation>Саны</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 немесе %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -239,16 +230,15 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Amount:</source>
<translation>Саны</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Басымдық</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комиссия:</translation>
</message>
@@ -269,6 +259,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -281,12 +274,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Information</source>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index 012632c0e0..a80c6ccc45 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>삭제(&amp;D)</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>코인을 보내실 주소를 선택하세요</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>코인을 받으실 주소를 선택하세요</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>선택 (&amp;H)</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>보내는 주소들</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>받은 주소들</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>비트코인을 보내는 계좌 주소입니다. 코인을 보내기 전에 잔고와 받는 주소를 항상 확인하세요.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>비트코인을 받을 수 있는 계좌 주소입니다. 매 거래마다 새로운 주소 사용을 권장합니다. </translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>계좌 복사(&amp;C)</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>라벨 복사(&amp;L)</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>편집 (&amp;E)</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>주소 목록 내보내기</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>쉼표로 구분된 파일 (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>내보내기 실패</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>%1으로 주소 리스트를 저장하는 동안 오류가 발생했습니다. 다시 시도해주세요.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>라벨</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>주소</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(라벨 없음)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>새로운 암호 재확인</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>지갑에 새로운 비밀문구를 입력하세요.&lt;br/&gt;비밀문구를 &lt;b&gt;열 개 이상의 무작위 글자&lt;/b&gt; 혹은 &lt;b&gt;여덟개 이상의 단어로&lt;b&gt; 정하세요.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>지갑 암호화</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>이 작업을 실행하려면 사용자 지갑의 암호가 필요합니다.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>지갑 잠금해제</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>이 작업은 지갑을 해독하기 위해 사용자 지갑의 암호가 필요합니다.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>지갑 복호화</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>암호 변경</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>지갑의 기존 암호와 새로운 암호를 입력해주세요.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>지갑 암호화 승인</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>경고: 만약 암호화 된 지갑의 비밀번호를 잃어버릴 경우, &lt;b&gt;모든 비트코인들을 잃어버릴 수 있습니다&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>지갑 암호화를 허용하시겠습니까?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>지갑 암호화 완료</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>암호화 처리 과정을 끝내기 위해 %1을 종료합니다. 지갑 암호화는 컴퓨터로의 멀웨어 감염으로 인한 비트코인 도난을 완전히 방지할 수 없음을 기억하세요.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>중요: 본인 지갑 파일에서 만든 예전 백업들은 새로 생성한 암호화된 지갑 파일로 교체됩니다. 보안상 이유로 이전에 암호화하지 않은 지갑 파일 백업은 사용할 수 없게 되니 이른 시일 내로 새로 암호화된 지갑을 사용하시기 바랍니다.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>지갑 암호화 실패</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>지갑 암호화는 내부 에러로 인해 실패했습니다. 당신의 지갑은 암호화 되지 않았습니다.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>지정한 암호가 일치하지 않습니다.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>지갑 잠금해제 실패</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>지갑 해독을 위한 암호가 틀렸습니다.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>지갑 복호화 실패</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>지갑 비밀번호가 성공적으로 변경되었습니다.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>경고: Caps Lock키가 켜져있습니다!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -111,6 +270,14 @@
<translation>어플리케이션 종료</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>%1 정보(&amp;A)</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>%1 정보를 표시합니다</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>&amp;Qt 정보</translation>
</message>
@@ -123,6 +290,10 @@
<translation>옵션(&amp;O)</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>%1 설정 옵션 수정</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>지갑 암호화(&amp;E)...</translation>
</message>
@@ -251,6 +422,14 @@
<translation><numerusform>비트코인 네트워크에 %n개의 연결이 활성화되어 있습니다.</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>디스크에서 블록 색인중...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>디스크에서 블록 처리중...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>사용 가능한 블록이 없습니다...</translation>
</message>
@@ -258,26 +437,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n 블럭 만큼의 거래 기록이 처리됨.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n시간</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n일</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n주</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 그리고 %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n년</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 뒤에</translation>
@@ -307,6 +466,14 @@
<translation>현재까지</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>사용할 수 있는 비트코인 명령줄 옵션 목록을 가져오기 위해 %1 도움말 메시지를 표시합니다.</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 클라이언트</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>블록 따라잡기...</translation>
</message>
@@ -356,7 +523,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>지갑이 암호화 되었고 현재 잠겨져 있습니다</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -376,10 +543,6 @@
<translation>금액:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>우선순위:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>수수료:</translation>
</message>
@@ -432,8 +595,80 @@
<translation>확인됨</translation>
</message>
<message>
- <source>Priority</source>
- <translation>우선순위</translation>
+ <source>Copy address</source>
+ <translation>주소 복사</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>라벨 복사</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>거래액 복사</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>거래 아이디 복사</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>사용되지 않은 주소를 잠금 처리합니다.</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>사용되지 않은 주소를 잠금 해제합니다. </translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>수량 복사</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>수수료 복사</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>수수료 이후 복사</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>bytes 복사</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>더스트 복사</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>잔돈 복사</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 잠금)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>예</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>아니요</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>입력마다 +/- %1 사토시(s)가 변할 수 있습니다.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(라벨 없음)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>%1로부터 변경 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(잔돈)</translation>
</message>
</context>
<context>
@@ -458,6 +693,38 @@
<source>&amp;Address</source>
<translation>주소(&amp;A)</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>새 받는 주소</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>새 보내는 주소</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>받는 주소 편집</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>보내는 주소 편집</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>입력한 "%1" 주소는 올바른 비트코인 주소가 아닙니다.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>입력된 주소는"%1" 이미 주소록에 있습니다.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>지갑을 잠금해제 할 수 없습니다.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>새로운 키 생성이 실패하였습니다.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -493,6 +760,10 @@
<translation>(%1-비트)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>%1 정보(&amp;A)</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>명령줄 옵션</translation>
</message>
@@ -528,7 +799,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>실행시 시작화면 보기 (기본값: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>GUI를 통해 수정된 모든 설정을 초기화</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -536,6 +811,18 @@
<translation>환영합니다</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>%1에 오신것을 환영합니다.</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>프로그램이 처음으로 실행되고 있습니다. %1가 어디에 데이터를 저장할지 선택할 수 있습니다. </translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1가 블럭체인의 복사본을 다운로드 저장합니다. 적어도 %2GB의 데이터가 이 폴더에 저장되며 시간이 경과할수록 점차 증가합니다. 그리고 지갑 또한 이 폴더에 저장됩니다. </translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>기본 데이터 폴더를 사용하기</translation>
</message>
@@ -561,6 +848,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>유형</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>최종 블럭 시각</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>숨기기</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -578,6 +880,10 @@
<source>Select payment request file</source>
<translation>지불 요청 파일을 선택하세요</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>지불 요청 파일을 열기 위해서 선택하세요</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -590,6 +896,14 @@
<translation>메인(&amp;M)</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>시스템 로그인후에 %1을 자동으로 시작합니다.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>시스템 로그인시 %1 시작(&amp;S)</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>데이터베이스 캐시 크기(&amp;D)</translation>
</message>
@@ -691,7 +1005,7 @@
</message>
<message>
<source>Port of the proxy (e.g. 9050)</source>
- <translation>프록시의 포트번호입니다(예: 9050)</translation>
+ <translation>프록시의 포트번호입니다 (예: 9050)</translation>
</message>
<message>
<source>Used for reaching peers via:</source>
@@ -726,6 +1040,14 @@
<translation>창(&amp;W)</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>시스템 트레이 로 부터 아이콘 숨기기(&amp;H)</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>트레이 아이콘 숨기기</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>창을 최소화 하면 트레이에 아이콘만 표시합니다.</translation>
</message>
@@ -746,6 +1068,10 @@
<translation>사용자 인터페이스 언어(&amp;L):</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>사용자 인터페이스 언어를 여기서 설정할 수 있습니다. 이 설정은 %1을 다시 시작할때 적용됩니다.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>거래액을 표시할 단위(&amp;U):</translation>
</message>
@@ -870,6 +1196,21 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>지불 요청 오류</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>비트코인을 시작할 수 없습니다: 지급제어기를 클릭하시오</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI 핸들링</translation>
+ </message>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -879,11 +1220,7 @@
<source>Node/Service</source>
<translation>노드/서비스</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping 시간</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -922,7 +1259,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 그리고 %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -950,6 +1297,10 @@
<translation>사용 중인 BerkeleyDB 버전</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>데이터 폴더</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>시작 시간</translation>
</message>
@@ -1034,6 +1385,18 @@
<translation>유저 에이전트</translation>
</message>
<message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>%1 디버그 로그파일을 현재 데이터 폴더에서 엽니다. 용량이 큰 로그 파일들은 몇 초가 걸릴 수 있습니다.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>글자 크기 축소</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>글자 크기 확대</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>서비스</translation>
</message>
@@ -1110,14 +1473,6 @@
<translation>콘솔 초기화</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>끊긴 노드(&amp;D)</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>추방된 노드:</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1시간(&amp;H)</translation>
</message>
@@ -1134,8 +1489,8 @@
<translation>1년(&amp;Y)</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>노드 추방 취소(&amp;U)</translation>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>%1 RPC 콘솔에 오신걸 환영합니다</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
@@ -1264,6 +1619,14 @@
<source>Remove</source>
<translation>삭제</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>라벨 복사</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>거래액 복사</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1283,7 +1646,30 @@
<source>&amp;Save Image...</source>
<translation>이미지 저장(&amp;S)...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>주소</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>라벨</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>날짜</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>라벨</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(라벨 없음)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1319,10 +1705,6 @@
<translation>거래액:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>우선순위:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>수수료:</translation>
</message>
@@ -1391,10 +1773,6 @@
<translation>(Smart fee가 아직 초기화되지 않았습니다. 블록 분석이 완료될 때 까지 기다려주십시오...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>승인 시간:</translation>
- </message>
- <message>
<source>normal</source>
<translation>일반</translation>
</message>
@@ -1434,6 +1812,38 @@
<source>S&amp;end</source>
<translation>보내기(&amp;E)</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>수량 복사</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>거래액 복사</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>수수료 복사</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>수수료 이후 복사</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>bytes 복사</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>더스트 복사</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>잔돈 복사</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(라벨 없음)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1443,11 +1853,11 @@
</message>
<message>
<source>Pay &amp;To:</source>
- <translation>송금할 대상(&amp;T) : </translation>
+ <translation>송금할 대상(&amp;T):</translation>
</message>
<message>
<source>&amp;Label:</source>
- <translation>라벨(&amp;L)</translation>
+ <translation>라벨(&amp;L):</translation>
</message>
<message>
<source>Choose previously used address</source>
@@ -1507,16 +1917,23 @@
</message>
<message>
<source>Pay To:</source>
- <translation>송금할 대상 : </translation>
+ <translation>송금할 대상:</translation>
</message>
<message>
<source>Memo:</source>
<translation>메모:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>%1이 종료 중입니다...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>창이 사라지기 전까지 컴퓨터를 끄지마시오.</translation>
</message>
@@ -1607,7 +2024,7 @@
<source>Reset all verify message fields</source>
<translation>모든 검증 메시지 필드 재설정</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1623,11 +2040,152 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>날짜</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>이 창은 거래의 세부내역을 보여줍니다</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>날짜</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>형식</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>라벨</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>받은 주소</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>보낸 주소</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(라벨 없음)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Received with</source>
+ <translation>받은 주소</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>보낸 주소</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>버려진 트랜잭션</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>주소 복사</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>라벨 복사</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>거래액 복사</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>트랜잭션 아이디 복사</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>로우 트랜잭션 복사</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>거래 세부 내역 복사</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>라벨 수정</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>거래 세부 내역 보기</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>거래 기록 내보내기</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>쉼표로 구분된 파일 (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>확인됨</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>모니터링 지갑</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>날짜</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>형식</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>라벨</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>주소</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>아이디</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>내보내기 실패</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>%1으로 거래 기록을 저장하는데 에러가 있었습니다.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>내보내기 성공</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>거래 기록이 성공적으로 %1에 저장되었습니다.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>범위:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>상대방</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1637,6 +2195,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>지갑 불러오기가 안됩니다.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>코인 보내기</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>내보내기 (&amp;E)</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>현재 탭에 있는 데이터를 파일로 내보내기</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>지갑 백업</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>지갑 데이터 (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>백업 실패</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>지갑 데이터를 %1 폴더에 저장하는 동안 오류가 발생했습니다. </translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>백업 성공</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>지갑 정보가 %1에 성공적으로 저장되었습니다.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1699,16 +2306,12 @@
<translation>HTTP 서버를 시작할 수 없습니다. 자세한 사항은 디버그 로그를 확인 하세요.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>외부 접속을 승인합니다</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>비트코인 코어</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee은 너무 높습니다! 이것은 수수료 예측을 이용할 수 없을 때 지불되는 트랜잭션 수수료입니다.</translation>
+ <source>The %s developers</source>
+ <translation>%s 코어 개발자</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1723,20 +2326,36 @@
<translation>선택된 주소로 고정하며 항상 리슨(Listen)합니다. IPv6 프로토콜인 경우 [host]:port 방식의 명령어 표기법을 사용합니다.</translation>
</message>
<message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>%s 데이터 디렉토리에 락을 걸 수 없었습니다. %s가 이미 실행 중인 것으로 보입니다.</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>시작시 모든 지갑 트랜잭션을 삭제하고 -rescan을 통하여 블록체인만 복구합니다.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>MIT 소프트웨어 라이센스에 따라 배포됩니다. 동봉된 파일 혹은 &lt;http://www.opensource.org/licenses/mit-license.php&gt;를 참조하세요.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>%s 불러오기 오류: 비-HD 지갑이 존재하는 상태에서 HD 지갑을 활성화 할 수 없습니다</translation>
+ </message>
+ <message>
+ <source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <translation>%s 불러오기 오류: 주소 키는 모두 정확하게 로드되었으나 거래 데이터와 주소록 필드에서 누락이나 오류가 존재할 수 있습니다.</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>지갑 거래가 바뀌면 명령을 실행합니다.(%s 안의 명령어가 TxID로 바뀝니다)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>피어들이 로컬 중계 정책을 위반하더라도 화이트 리스트에 포함된 피어인경우 강제로 중계하기 (기본값: %d)</translation>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>하나의 지갑 트랜잭션에서의 총 수수료(%s)의 최대치; 너무 낮게 설정하면 큰 트랜잭션이 중지 됩니다 (기본값: %s)</translation>
+ </message>
+ <message>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>컴퓨터의 날짜와 시간이 올바른지 확인하십시오! 시간이 잘못되면 %s은 제대로 동작하지 않습니다.</translation>
+ </message>
+ <message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>%s가 유용하다고 생각한다면 프로젝트에 공헌해주세요. 이 소프트웨어에 대한 보다 자세한 정보는 %s를 방문해주십시오.</translation>
</message>
<message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
@@ -1747,24 +2366,20 @@
<translation>블록 데이터베이스에 미래의 블록이 포함되어 있습니다. 이것은 사용자의 컴퓨터의 날짜와 시간이 올바르게 설정되어 있지 않을때 나타날 수 있습니다. 만약 사용자의 컴퓨터의 날짜와 시간이 올바르다고 확신할 때에만 블록 데이터 베이스의 재구성을 하십시오</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>이 빌드 버전은 정식 출시 전 테스트의 목적이며, 예기치 않은 위험과 오류가 발생할 수 있습니다. 채굴과 상점용 소프트웨어로 사용하는 것을 권하지 않습니다.</translation>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>데이터베이스를 포크 전 상태로 돌리지 못했습니다. 블록체인을 다시 다운로드 해주십시오.</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>리슨(Listen) 포트를 할당하기 위해 UPnP 사용 (기본값: 열려있거나 -proxy 옵션을 사용하지 않을 시 1)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>경고 : 모든 네트워크가 동의해야 하나, 일부 채굴자들에게 문제가 있는 것으로 보입니다. </translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>경고: 현재 비트코인 버전이 다른 네트워크 참여자들과 동일하지 않는 것 같습니다. 당신 또는 다른 참여자들이 동일한 비트코인 버전으로 업그레이드 할 필요가 있습니다.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>-txindex를 바꾸기 위해서는 -reindex-chainstate를 사용해서 데이터베이스를 재구성해야 합니다. </translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>설정된 넷마스크 혹은 IP 주소로 화이트리스트에 포함된 피어에 접속합니다. 이 설정은 복수로 지정 할 수 있습니다.</translation>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s 손상되었고 복구가 실패하였습니다</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1779,18 +2394,26 @@
<translation>사용자 에이전트 문자열에 코멘트 첨부</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>시작시 망가진 wallet.dat에서 개인키 복원을 시도합니다</translation>
+ </message>
+ <message>
<source>Block creation options:</source>
<translation>블록 생성 옵션:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>지정된 노드에만 연결하기</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>%s 주소를 확인할 수 없습니다: '%s'</translation>
</message>
<message>
<source>Connection options:</source>
<translation>연결 설정 : </translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>손상된 블록 데이터베이스가 감지되었습니다</translation>
</message>
@@ -1835,6 +2458,22 @@
<translation>지갑 데이터베이스 환경 초기화하는데 오류 %s</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>%s 불러오기 오류</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>%s 불러오기 오류: 지갑 오류</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>%s 불러오기 에러: 지갑은 새 버전의 %s이 필요합니다</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>%s 불러오기 오류: 이미 HD 지갑이 존재하는 상태에서 HD 지갑을 비활성화 할 수 없습니다</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>블록 데이터베이스를 불러오는데 오류</translation>
</message>
@@ -1859,10 +2498,18 @@
<translation>올바르지 않거나 생성된 블록을 찾을 수 없습니다. 잘못된 네트워크 자료 디렉토리?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>무결성 확인 초기화가 실패했습니다. %s가 종료됩니다.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>잘못된 -onion 주소입니다: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>유효하지 않은 금액 -%s=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
<source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
<translation>유효하지 않은 금액 -fallbackfee=&lt;amount&gt;: '%s'</translation>
</message>
@@ -1871,12 +2518,12 @@
<translation>트랜잭션 메모리 풀의 용량을 &lt;n&gt;메가바이트 아래로 유지하기 (기본값: %u)</translation>
</message>
<message>
- <source>Location of the auth cookie (default: data dir)</source>
- <translation>인증 쿠키의 위치 (기본값: data dir)</translation>
+ <source>Loading banlist...</source>
+ <translation>추방리스트를 불러오는 중...</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>중계 및 채굴을 할 때 트랜잭션에서의 sigop 당 데이터의 최소 크기 (기본값: %u)</translation>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>인증 쿠키의 위치 (기본값: data dir)</translation>
</message>
<message>
<source>Not enough file descriptors available.</source>
@@ -1887,6 +2534,10 @@
<translation>오직 &lt;net&gt; 네트워크로 로만 접속 (IPv4, IPv6 혹은 onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>도움말 메시지 출력 후 종료</translation>
+ </message>
+ <message>
<source>Print version and exit</source>
<translation>버전 출력후 종료</translation>
</message>
@@ -1899,6 +2550,18 @@
<translation>블록 축소 모드는 -txindex와 호환되지 않습니다.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>현재의 blk*.dat 파일들로부터 블록체인 색인을 재구성합니다.</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>현재 색인 된 블록들로부터 블록체인을 재구성합니다.</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>블록 되감는중...</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>데이터베이스 케시 크기를 메가바이트로 설정(%d 부터 %d, 기본값: %d)</translation>
</message>
@@ -1911,6 +2574,14 @@
<translation>데이터 폴더 안에 지갑 파일을 선택하세요.</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>소스코드는 %s 에서 확인하실 수 있습니다.</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>이 컴퓨터의 %s에 바인딩 할 수 없습니다. 아마도 %s이 실행중인 것 같습니다.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>지원하지 않는 인수 -benchmark 은 무시됩니다, -debug=bench 형태로 사용하세요.</translation>
</message>
@@ -1947,6 +2618,10 @@
<translation>지갑 디버깅/테스트 옵션:</translation>
</message>
<message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>지갑을 새로 써야 합니다: 완성하기 위하여 %s을 다시 시작하십시오.</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>지갑 옵션:</translation>
</message>
@@ -1995,10 +2670,6 @@
<translation>중계 및 채굴을 할 때 데이터 운송 트랜잭션에서 데이터의 최대 크기 (기본값: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>DNS lookup를 통해 피어 주소에 대한 쿼리 보내기 (기본값: 1 -connect 예외)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>인증정보를 프록시 연결마다 무작위로 합니다. 이는 Tor 스트림을 격리시킬 수 있습니다 (기본값: %u)</translation>
</message>
@@ -2011,10 +2682,6 @@
<translation>거래액이 수수료를 지불하기엔 너무 작습니다</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>이 프로그램에는 OpenSSL 툴킷&lt;https://www.openssl.org/&gt; 사용 목적으로 개발한 OpenSSL 프로젝트를 포함하고 있으며, 암호화 프로그램은 Eric Young이, UPnP 프로그램은 Thomas Bernard가 작성했습니다.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>화이트리스트에 포함된 피어는 이미 메모리풀에 포함되어 있어도 DoS 추방이 되지 않으며 그들의 트랜잭션이 항상 중계됩니다, 이는 예를 들면 게이트웨이에서 유용합니다.</translation>
</message>
@@ -2123,10 +2790,6 @@
<translation>거래액이 너무 적습니다</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>거래액은 반드시 정수여야합니다.</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>수수료 정책에 비해 트랜잭션이 너무 큽니다</translation>
</message>
@@ -2187,10 +2850,6 @@
<translation>-maxtxfee값이 너무 큽니다! 하나의 트랜잭션에 너무 큰 수수료가 지불 됩니다.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee값이 너무 큽니다! 이 값은 송금할때 지불할 송금 수수료입니다.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>메모리 풀에 있는 트랜잭션 기록을 &lt;n&gt;시간 후 부터는 유지하지 않기 (기본값: %u)</translation>
</message>
@@ -2239,14 +2898,22 @@
<translation>Tor 서비스를 이용하여 피어에게 연결하기 위해 분리된 SOCKS5 프록시를 사용 (기본값: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>JSON-RPC 연결시 사용자 이름과 해시화된 암호문. &lt;userpw&gt; 필드는 &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt; 포멧으로 구성되어 있습니다. 전형적 파이썬 스크립트에선 share/rpcuser가 포함되어 있습니다. 이 옵션은 여러번 지정할 수 있습니다.</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>경고: 알려지지 않은 버전의 블록이 채굴되었습니다. 알려지지 않은 규칙이 적용되었을 가능성이 있습니다.</translation>
</message>
<message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>경고 : 지갑파일이 손상되어 데이터가 복구되었습니다. 원래의 %s 파일은 %s 후에 %s 이름으로 저장됩니다. 잔액과 거래 내역이 정확하지 않다면 백업 파일로 부터 복원해야 합니다. </translation>
+ </message>
+ <message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>설정된 IP주소 (보기 1.2.3.4) 혹은 CIDR로 작성된 네트워크 (보기 1.2.3.0/24)로 화이트리스트에 포함된 피어에 접속합니다. 이 설정은 복수로 지정 할 수 있습니다.</translation>
+ </message>
+ <message>
+ <source>(default: %s)</source>
+ <translation>(기본값: %s)</translation>
+ </message>
+ <message>
<source>Always query for peer addresses via DNS lookup (default: %u)</source>
<translation>DNS lookup을 통해 항상 피어주소에 대한 쿼리 보내기 (기본값: %u)</translation>
</message>
@@ -2323,6 +2990,10 @@
<translation>트랜잭션을 보낼 때 검증되지 않은 잔돈 쓰기 (기본값: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>네트워크 스레드 시작중...</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>이상행동 네트워크 참여자의 연결을 차단시키기 위한 한계치 (기본값: %u)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ku_IQ.ts b/src/qt/locale/bitcoin_ku_IQ.ts
index da5e41a358..a0d8510413 100644
--- a/src/qt/locale/bitcoin_ku_IQ.ts
+++ b/src/qt/locale/bitcoin_ku_IQ.ts
@@ -25,7 +25,14 @@
<source>&amp;Delete</source>
<translation>&amp;سڕینەوە</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Address</source>
+ <translation>ناوونیشان</translation>
+ </message>
+ </context>
<context>
<name>AskPassphraseDialog</name>
</context>
@@ -70,10 +77,6 @@
<translation>کۆ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>لەپێشی:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>تێچوون:</translation>
</message>
@@ -86,10 +89,14 @@
<translation>رێکەت</translation>
</message>
<message>
- <source>Priority</source>
- <translation>لەپێشی</translation>
+ <source>yes</source>
+ <translation>بەڵێ</translation>
</message>
-</context>
+ <message>
+ <source>no</source>
+ <translation>نەخێر</translation>
+ </message>
+ </context>
<context>
<name>EditAddressDialog</name>
</context>
@@ -119,6 +126,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -136,6 +146,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -146,20 +159,42 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>&amp;Information</source>
<translation>&amp;زانیاری</translation>
</message>
<message>
+ <source>General</source>
+ <translation>گشتی</translation>
+ </message>
+ <message>
+ <source>Network</source>
+ <translation>تۆڕ</translation>
+ </message>
+ <message>
<source>Name</source>
<translation>ناو</translation>
</message>
<message>
+ <source>Sent</source>
+ <translation>نێدرا</translation>
+ </message>
+ <message>
<source>Version</source>
<translation>وەشان</translation>
</message>
<message>
+ <source>Services</source>
+ <translation>خزمەتگوزاریەکان</translation>
+ </message>
+ <message>
<source>&amp;Open</source>
<translation>&amp;کردنەوە</translation>
</message>
@@ -172,6 +207,34 @@
<translation>گشتییەکان</translation>
</message>
<message>
+ <source>In:</source>
+ <translation>لە ناو</translation>
+ </message>
+ <message>
+ <source>Out:</source>
+ <translation>لەدەرەوە</translation>
+ </message>
+ <message>
+ <source>1 &amp;hour</source>
+ <translation>1&amp;سات</translation>
+ </message>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1&amp;ڕۆژ</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1&amp;هەفتە</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1&amp;ساڵ</translation>
+ </message>
+ <message>
+ <source>never</source>
+ <translation>هەرگیز</translation>
+ </message>
+ <message>
<source>Yes</source>
<translation>بەڵێ</translation>
</message>
@@ -202,9 +265,24 @@
<source>Remove</source>
<translation>سڕینەوە</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>Address</source>
+ <translation>ناوونیشان</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>سەرجەم</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>رێکەت</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -213,10 +291,6 @@
<translation>کۆ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>لەپێشی:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>تێچوون:</translation>
</message>
@@ -233,6 +307,13 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>بەڵێ</translation>
+ </message>
+</context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -245,12 +326,54 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>رێکەت</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>سەرجەم</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>رێکەت</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Date</source>
+ <translation>رێکەت</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>ناوونیشان</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;هەناردن</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index 14cb9c2020..da364c3bbc 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -9,6 +9,17 @@
<source>&amp;Delete</source>
<translation>Ө&amp;чүрүү</translation>
</message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Address</source>
+ <translation>Дарек</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(аты жок)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -65,6 +76,10 @@
<source>Date</source>
<translation>Дата</translation>
</message>
+ <message>
+ <source>(no label)</source>
+ <translation>(аты жок)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
@@ -72,7 +87,7 @@
<source>&amp;Address</source>
<translation>&amp;Дарек</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -91,6 +106,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -136,12 +154,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>&amp;Information</source>
@@ -181,6 +208,29 @@
</context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>Address</source>
+ <translation>Дарек</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Билдирүү</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Билдирүү</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(аты жок)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -192,6 +242,10 @@
<source>S&amp;end</source>
<translation>&amp;Жөнөтүү</translation>
</message>
+ <message>
+ <source>(no label)</source>
+ <translation>(аты жок)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -205,6 +259,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -225,12 +282,58 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/тармакта эмес</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Билдирүү</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(аты жок)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Дарек</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Information</source>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index dc532fe011..3b67fa1e74 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -25,7 +25,10 @@
<source>&amp;Delete</source>
<translation>&amp;Dele</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -44,7 +47,7 @@
<source>Repeat new passphrase</source>
<translation>Itera novam tesseram</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -242,7 +245,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Cassidile &lt;b&gt;cifratum&lt;/b&gt; est et iam nunc &lt;b&gt;seratum&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -276,7 +279,7 @@
<source>&amp;Address</source>
<translation>&amp;Inscriptio</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -307,6 +310,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Schema</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Hora postremi frusti</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -428,6 +442,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -442,6 +459,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -531,6 +554,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -572,7 +598,7 @@
<source>S&amp;end</source>
<translation>&amp;Mitte</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -609,6 +635,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -677,7 +706,7 @@
<source>Reset all verify message fields</source>
<translation>Reconstitue omnes campos verificandi nuntii</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -689,16 +718,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Haec tabula monstrat descriptionem verbosam transactionis</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -725,10 +772,6 @@
<translation>Operare infere sicut daemon et mandata accipe</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accipe conexiones externas (praedefinitum: 1 nisi -proxy neque -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Nucleus</translation>
</message>
@@ -741,18 +784,10 @@
<translation>Facere mandatum quotiescumque cassidilis transactio mutet (%s in mandato sbstituitur ab TxID)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Hoc est prae-dimittum experimentala aedes - utere eo periculo tuo proprio - nolite utere fodendo vel applicationibus mercatoriis</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Optiones creandi frustorum:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conecte sole ad nodos specificatos (vel nodum specificatum)</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Corruptum databasum frustorum invenitur</translation>
</message>
@@ -817,10 +852,6 @@
<translation>Magnitudo transactionis nimis parva</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Necesse est magnitudines transactionum positivas esse.</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transactio nimis magna</translation>
</message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index 1f6cda1f52..67fee9ae42 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Trinti</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Pakartokite naują slaptafrazę</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -258,7 +261,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Piniginė &lt;b&gt;užšifruota&lt;/b&gt; ir šiuo metu &lt;b&gt;užrakinta&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -278,10 +281,6 @@
<translation>Suma:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Pirmumas:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Mokestis:</translation>
</message>
@@ -321,11 +320,7 @@
<source>Confirmed</source>
<translation>Patvirtintas</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Pirmumas</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -340,7 +335,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresas</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -379,6 +374,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Forma</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Paskutinio bloko laikas</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -540,6 +546,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -562,6 +571,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -703,6 +718,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -725,10 +743,6 @@
<translation>Suma:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Pirmumas:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Mokestis:</translation>
</message>
@@ -768,7 +782,7 @@
<source>S&amp;end</source>
<translation>&amp;Siųsti</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -805,6 +819,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -869,16 +886,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Šis langas sandorio detalų aprašymą</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -905,10 +940,6 @@
<translation>Bitcoin branduolys</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Prisijungti tik prie nurodyto mazgo</translation>
- </message>
- <message>
<source>Error opening block database</source>
<translation>Klaida atveriant blokų duombazę</translation>
</message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index 38333531e4..750e0ff28d 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;Dzēst</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Jaunā parole vēlreiz</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -231,10 +234,6 @@
<translation>Nav pieejams neviens bloku avots...</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 un %2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 aizmugurē</translation>
</message>
@@ -278,7 +277,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Maciņš ir &lt;b&gt;šifrēts&lt;/b&gt; un pašlaik &lt;b&gt;slēgts&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -294,10 +293,6 @@
<translation>Daudzums:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritāte:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Maksa:</translation>
</message>
@@ -337,11 +332,7 @@
<source>Confirmed</source>
<translation>Apstiprināts</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritāte</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -356,7 +347,7 @@
<source>&amp;Address</source>
<translation>&amp;Adrese</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -419,6 +410,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Forma</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Pēdējā bloka laiks</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -436,7 +438,7 @@
<source>Select payment request file</source>
<translation>Izvēlies maksājuma pieprasījuma datni</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -628,6 +630,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -648,6 +653,16 @@
<source>N/A</source>
<translation>N/A</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 un %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -810,7 +825,7 @@
<source>Remove</source>
<translation>Noņemt</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -829,7 +844,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Saglabāt Attēlu...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -865,10 +883,6 @@
<translation>Daudzums:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritāte:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Maksa:</translation>
</message>
@@ -916,7 +930,7 @@
<source>S&amp;end</source>
<translation>&amp;Sūtīt</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -967,7 +981,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1041,7 +1058,7 @@
<source>Reset all verify message fields</source>
<translation>Atiestatīt visus laukus</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1057,16 +1074,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Šis panelis parāda transakcijas detaļas</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1105,10 +1140,6 @@
<translation>Bloka izveidošanas iestatījumi:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Savienoties tikai ar norādītajām nodēm.</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Savienojuma iestatījumi:</translation>
</message>
@@ -1161,10 +1192,6 @@
<translation>Transakcijas summa ir pārāk maza</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transakcijas summai ir jābūt pozitīvai</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transakcija ir pārāk liela</translation>
</message>
diff --git a/src/qt/locale/bitcoin_mk_MK.ts b/src/qt/locale/bitcoin_mk_MK.ts
index b696111a53..e11e415ec5 100644
--- a/src/qt/locale/bitcoin_mk_MK.ts
+++ b/src/qt/locale/bitcoin_mk_MK.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Избриши</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>Повторете ја новата тајна фраза</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -178,26 +181,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Обработен %n блок од историјата на трансакции.</numerusform><numerusform>Обработени %n блокови од историјата на трансакции.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n час</numerusform><numerusform>%n часови</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n ден</numerusform><numerusform>%n денови</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n недела</numerusform><numerusform>%n недели</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 и %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 позади</translation>
@@ -256,10 +239,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Провизија:</translation>
</message>
@@ -283,11 +262,7 @@
<source>Date</source>
<translation>Дата</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Приоритет</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -302,7 +277,7 @@
<source>&amp;Address</source>
<translation>&amp;Адреса</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -329,6 +304,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -382,6 +360,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -410,7 +391,17 @@
<source>%1 ms</source>
<translation>%1 мс</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 и %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -495,7 +486,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Сними Слика...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -507,10 +501,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Провизија:</translation>
</message>
@@ -543,6 +533,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -555,12 +548,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index d9ef0d127b..6e13d21288 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -37,7 +37,10 @@
<source>&amp;Delete</source>
<translation>&amp;Устгах</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -52,7 +55,7 @@
<source>Repeat new passphrase</source>
<translation>Шинэ нууц үгийг давтана уу</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -174,7 +177,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Түрүйвч &lt;b&gt;цоожтой&lt;/b&gt; ба одоогоор цоож &lt;b&gt;хаалттай&lt;/b&gt; байна</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -212,7 +215,7 @@
<source>&amp;Address</source>
<translation>&amp;Хаяг</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -235,6 +238,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Last block time</source>
+ <translation>Сүүлийн блокийн хугацаа</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -276,6 +286,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -290,6 +303,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -370,7 +389,7 @@
<source>Remove</source>
<translation>Устгах</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -379,6 +398,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -424,7 +446,7 @@
<source>S&amp;end</source>
<translation>Яв&amp;уул</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -461,6 +483,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
<message>
<source>Do not shut down the computer until this window disappears.</source>
@@ -493,16 +518,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Гүйлгээний дэлгэрэнгүйг энэ бичил цонх харуулж байна</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_ms_MY.ts b/src/qt/locale/bitcoin_ms_MY.ts
index acfb38e418..0108332dd7 100644
--- a/src/qt/locale/bitcoin_ms_MY.ts
+++ b/src/qt/locale/bitcoin_ms_MY.ts
@@ -34,7 +34,10 @@ Alihkan fail data ke dalam tab semasa</translation>
<source>&amp;Delete</source>
<translation>&amp;Padam</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
</context>
@@ -61,7 +64,7 @@ Alihkan fail data ke dalam tab semasa</translation>
<source>&amp;Address</source>
<translation>Alamat</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -72,6 +75,9 @@ Alihkan fail data ke dalam tab semasa</translation>
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -81,12 +87,21 @@ Alihkan fail data ke dalam tab semasa</translation>
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -100,6 +115,9 @@ Alihkan fail data ke dalam tab semasa</translation>
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Balance:</source>
@@ -110,6 +128,9 @@ Alihkan fail data ke dalam tab semasa</translation>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -122,12 +143,35 @@ Alihkan fail data ke dalam tab semasa</translation>
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>
+Alihkan fail data ke dalam tab semasa</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 4538fd6e1e..f98cdd32d2 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Slett</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Gjenta ny adgangsfrase</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -115,6 +118,10 @@
<translation> &amp;Om %1</translation>
</message>
<message>
+ <source>Show information about %1</source>
+ <translation>Vis informasjon om %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Om &amp;Qt</translation>
</message>
@@ -127,6 +134,10 @@
<translation>&amp;Innstillinger...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Endre innstilinger for %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Krypter Lommebok...</translation>
</message>
@@ -262,26 +273,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Lastet %n blokk med transaksjonshistorikk.</numerusform><numerusform>Lastet %n blokker med transaksjonshistorikk.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n time</numerusform><numerusform>%n timer</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dag</numerusform><numerusform>%n dager</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n uke</numerusform><numerusform>%n uker</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 og %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n år</numerusform><numerusform>%n år</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 bak</translation>
@@ -311,6 +302,10 @@
<translation>Oppdatert</translation>
</message>
<message>
+ <source>%1 client</source>
+ <translation>%1 klient</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Laster ned...</translation>
</message>
@@ -360,7 +355,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Lommeboken er &lt;b&gt;kryptert&lt;/b&gt; og for tiden &lt;b&gt;låst&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -380,10 +375,6 @@
<translation>Beløp:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Avgift:</translation>
</message>
@@ -435,11 +426,7 @@
<source>Confirmed</source>
<translation>Bekreftet</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritet</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -462,7 +449,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresse</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -497,6 +484,10 @@
<translation> (%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>Om %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Kommandolinjevalg</translation>
</message>
@@ -540,6 +531,10 @@
<translation>Velkommen</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Velkommen til %1.</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Bruk standard datamappe</translation>
</message>
@@ -565,6 +560,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Skjema</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Tidspunkt for siste blokk</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Skjul</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +592,7 @@
<source>Select payment request file</source>
<translation>Velg fil for betalingsetterspørring</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -730,6 +740,10 @@
<translation>&amp;Vindu</translation>
</message>
<message>
+ <source>Hide tray icon</source>
+ <translation>Skjul søppel ikon</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Vis kun ikon i systemkurv etter minimering av vinduet.</translation>
</message>
@@ -874,6 +888,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -883,11 +900,7 @@
<source>Node/Service</source>
<translation>Node/Tjeneste</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping-tid</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -926,7 +939,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 og %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1038,6 +1061,14 @@
<translation>Brukeragent</translation>
</message>
<message>
+ <source>Decrease font size</source>
+ <translation>Forminsk font størrelsen</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Forstørr font størrelse</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Tjenester</translation>
</message>
@@ -1114,14 +1145,6 @@
<translation>Tøm konsoll</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Koble fra node</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Steng node ute for</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;time</translation>
</message>
@@ -1138,10 +1161,6 @@
<translation>1 &amp;år</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>Fjern &amp;Utestengning av Node</translation>
- </message>
- <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Bruk opp og ned pil for å navigere historikken, og &lt;b&gt;Ctrl-L&lt;/b&gt; for å tømme skjermen.</translation>
</message>
@@ -1268,7 +1287,7 @@
<source>Remove</source>
<translation>Fjern</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1287,7 +1306,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Lagre Bilde...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1323,10 +1345,6 @@
<translation>Beløp:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Gebyr:</translation>
</message>
@@ -1395,10 +1413,6 @@
<translation>(Smartgebyr ikke innført ennå. Dette tar vanligvis noen blokker...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Bekreftelsestid:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1438,7 +1452,7 @@
<source>S&amp;end</source>
<translation>S&amp;end</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1517,7 +1531,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1611,7 +1628,7 @@
<source>Reset all verify message fields</source>
<translation>Tilbakestill alle felter for meldingsverifikasjon</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1627,12 +1644,21 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Her vises en detaljert beskrivelse av transaksjonen</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1641,6 +1667,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1703,10 +1738,6 @@
<translation>Kunne ikke starte HTTP server. Se debug logg for detaljer.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Ta imot tilkoblinger fra utsiden (standardverdi: 1 hvis uten -proxy eller -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1719,10 +1750,6 @@
<translation>Slett alle transaksjoner i lommeboken og gjenopprett kun de delene av blokkjeden gjennom -rescan ved oppstart</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuert under MIT programvarelisensen, se medfølgende fil COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Kjør kommando når en lommeboktransaksjon endres (%s i kommando er erstattet med TxID)</translation>
</message>
@@ -1735,26 +1762,10 @@
<translation>Blokkdatabasen inneholder en blokk som ser ut til å være fra fremtiden. Dette kan være fordi dato og tid på din datamaskin er satt feil. Gjenopprett kun blokkdatabasen når du er sikker på at dato og tid er satt riktig.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Dette er en forhåndssluppet testversjon - bruk på egen risiko - ikke for bruk til blokkutvinning eller bedriftsapplikasjoner</translation>
- </message>
- <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Bruk UPnP for lytteport (standardverdi: 1 ved lytting og uten -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Advarsel: Nettverket ser ikke ut til å være enig! Noen minere ser ut til å ha problemer.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Advarsel: Vi ser ikke ut til å være enige med våre noder! Du må oppgradere, eller andre noder må oppgradere.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Hvitelist noder som kobler til fra den oppgitte nettmasken eller IP-adressen. Kan oppgis flere ganger.</translation>
- </message>
- <message>
<source>-maxmempool must be at least %d MB</source>
<translation>-maxmempool må være minst %d MB</translation>
</message>
@@ -1767,10 +1778,6 @@
<translation>Valg for opprettelse av blokker:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Koble kun til angitt(e) node(r)</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Innstillinger for tilkobling:</translation>
</message>
@@ -1815,6 +1822,10 @@
<translation>Feil under oppstart av lommeboken sitt databasemiljø %s!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>Feil ved lasting av %s</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Feil ved lasting av blokkdatabase</translation>
</message>
@@ -1855,6 +1866,14 @@
<translation>Bare koble til noder i nettverket &lt;net&gt; (IPv4, IPv6 eller onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Skriv ut denne hjelpemeldingen og avslutt</translation>
+ </message>
+ <message>
+ <source>Print version and exit</source>
+ <translation>Skriv ut denne versjonen og avslutt</translation>
+ </message>
+ <message>
<source>Prune cannot be configured with a negative value.</source>
<translation>Beskjæringsmodus kan ikke konfigureres med en negativ verdi.</translation>
</message>
@@ -1875,6 +1894,10 @@
<translation>Angi lommebokfil (inne i datamappe)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Kildekoden er tilgjengelig fra %s.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Ustøttet argument -benchmark ble ignorert, bruk -debug=bench.</translation>
</message>
@@ -1955,10 +1978,6 @@
<translation>Maksimal størrelse på data i databærende transaksjoner vi videresender og ufører graving på (standardverdi: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Søk etter nodeadresser via DNS-oppslag, hvis vi har få adresser å koble til (standard: 1 med mindre -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Bruk tilfeldig identitet for hver proxytilkobling. Dette muliggjør TOR stream isolasjon (standardverdi: %u)</translation>
</message>
@@ -1971,10 +1990,6 @@
<translation>Transaksjonsbeløpet er for lite til å sendes etter at gebyret er fratrukket</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Dette produktet inneholder programvare utviklet av OpenSSL Project for bruk i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; og kryptografisk programvare skrevet av Eric Young og UPnP-programvare skrevet av Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Hvitlistede noder kan ikke DoS-blokkeres, og deres transaksjoner videresendes alltid, selv om de allerede er i minnelageret. Nyttig f.eks. for en gateway.</translation>
</message>
@@ -2083,10 +2098,6 @@
<translation>Transaksjonen er for liten</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transaksjonsbeløpet må være positivt</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transaksjon for stor for gebyrpolitikken</translation>
</message>
@@ -2147,10 +2158,6 @@
<translation>-maxtxfee er satt veldig høyt! Så stort gebyr kan bli betalt ved en enkelt transaksjon.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee er satt veldig høyt! Dette er transaksjonsgebyret du betaler når du sender transaksjoner.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Ikke hold transaksjoner i minnet lenger enn &lt;n&gt; timer (standard: %u)</translation>
</message>
@@ -2195,10 +2202,6 @@
<translation>Bruk separate SOCKS5 proxyer for å nå noder via Tor skjulte tjenester (standardverdi: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Brukernavn og hashet passord for JSON-RPC tilkoblinger. Feltet &lt;userpw&gt; kommer i formatet: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Et Python-skript er inkludert i share/rpcuser. Dette alternativet kan angis flere ganger</translation>
- </message>
- <message>
<source>(default: %s)</source>
<translation>(standardverdi: %s)</translation>
</message>
@@ -2259,10 +2262,6 @@
<translation>Angi størrelse på nøkkel-lager til &lt;n&gt; (standardverdi: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Sett minimum blokkstørrelse i bytes (standardverdi: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Sett antall tråder til betjening av RPC-kall (standardverdi: %d)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ne.ts b/src/qt/locale/bitcoin_ne.ts
new file mode 100644
index 0000000000..f7fb0e5a6e
--- /dev/null
+++ b/src/qt/locale/bitcoin_ne.ts
@@ -0,0 +1,555 @@
+<TS language="ne" version="2.1">
+<context>
+ <name>AddressBookPage</name>
+ <message>
+ <source>Right-click to edit address or label</source>
+ <translation>ठेगाना वा लेबल सम्पादन गर्न दायाँ-क्लिक गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Create a new address</source>
+ <translation>नयाँ ठेगाना सिर्जना गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;New</source>
+ <translation>&amp;amp;नयाँ</translation>
+ </message>
+ <message>
+ <source>Copy the currently selected address to the system clipboard</source>
+ <translation>भर्खरै चयन गरेको ठेगाना प्रणाली क्लिपबोर्डमा कपी गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;Copy</source>
+ <translation>&amp;amp;कपी गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>C&amp;lose</source>
+ <translation>बन्द गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Delete the currently selected address from the list</source>
+ <translation>भर्खरै चयन गरेको ठेगाना सूचीबाट मेटाउनुहोस्</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>वर्तमान ट्याबको डाटालाई फाइलमा निर्यात गर्नुहोस् </translation>
+ </message>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;amp;निर्यात गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;Delete</source>
+ <translation>&amp;amp;मेटाउनुहोस्</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
+<context>
+ <name>AskPassphraseDialog</name>
+ <message>
+ <source>Passphrase Dialog</source>
+ <translation>पासफ्रेज संवाद</translation>
+ </message>
+ <message>
+ <source>Enter passphrase</source>
+ <translation>पासफ्रेज प्रवेश गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>New passphrase</source>
+ <translation>नयाँ पासफ्रेज</translation>
+ </message>
+ <message>
+ <source>Repeat new passphrase</source>
+ <translation>नयाँ पासफ्रेज दोहोर्याउनुहोस्</translation>
+ </message>
+ </context>
+<context>
+ <name>BanTableModel</name>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/नेटमास्क</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>प्रतिबन्धित समय</translation>
+ </message>
+</context>
+<context>
+ <name>BitcoinGUI</name>
+ <message>
+ <source>Sign &amp;message...</source>
+ <translation>सन्देशमा &amp;amp;हस्ताक्षर गर्नुहोस्...</translation>
+ </message>
+ <message>
+ <source>Synchronizing with network...</source>
+ <translation>नेटवर्कमा समिकरण हुँदै...</translation>
+ </message>
+ <message>
+ <source>&amp;Overview</source>
+ <translation>शारांश</translation>
+ </message>
+ <message>
+ <source>Node</source>
+ <translation>नोड</translation>
+ </message>
+ <message>
+ <source>Show general overview of wallet</source>
+ <translation>वालेटको साधारण शारांश देखाउनुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;Transactions</source>
+ <translation>&amp;amp;कारोबार</translation>
+ </message>
+ <message>
+ <source>Browse transaction history</source>
+ <translation>कारोबारको इतिहास हेर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>E&amp;xit</source>
+ <translation>बाहिर निस्कनुहोस्</translation>
+ </message>
+ <message>
+ <source>Quit application</source>
+ <translation>एप्लिकेसन बन्द गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;About %1</source>
+ <translation>&amp;amp;बारेमा %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>%1 को बारेमा सूचना देखाउनुहोस्</translation>
+ </message>
+ <message>
+ <source>About &amp;Qt</source>
+ <translation>&amp;amp;Qt</translation>
+ </message>
+ <message>
+ <source>Show information about Qt</source>
+ <translation>Qt को बारेमा सूचना देखाउनुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;Options...</source>
+ <translation>&amp;amp;विकल्प...</translation>
+ </message>
+ <message>
+ <source>Modify configuration options for %1</source>
+ <translation>%1 का लागि कन्फिगुरेसनको विकल्प परिमार्जन गर्नुहोस</translation>
+ </message>
+ <message>
+ <source>&amp;Encrypt Wallet...</source>
+ <translation>&amp;amp;वालेटलाई इन्क्रिप्ट गर्नुहोस्...</translation>
+ </message>
+ <message>
+ <source>&amp;Backup Wallet...</source>
+ <translation>&amp;amp;वालेटलाई ब्याकअप गर्नुहोस्...</translation>
+ </message>
+ <message>
+ <source>&amp;Change Passphrase...</source>
+ <translation>&amp;amp;पासफ्रेज परिवर्तन गर्नुहोस्...</translation>
+ </message>
+ <message>
+ <source>&amp;Sending addresses...</source>
+ <translation>&amp;amp;पठाउने ठेगानाहरू...</translation>
+ </message>
+ <message>
+ <source>&amp;Receiving addresses...</source>
+ <translation>&amp;amp;प्राप्त गर्ने ठेगानाहरू...</translation>
+ </message>
+ <message>
+ <source>Open &amp;URI...</source>
+ <translation>URI &amp;amp;खोल्नुहोस्...</translation>
+ </message>
+ <message>
+ <source>Reindexing blocks on disk...</source>
+ <translation>डिस्कमा ब्लकलाई पुनः सूचीकरण गरिँदै...</translation>
+ </message>
+ <message>
+ <source>Send coins to a Bitcoin address</source>
+ <translation>बिटकोइन ठेगानामा सिक्का पठाउनुहोस्</translation>
+ </message>
+ <message>
+ <source>Backup wallet to another location</source>
+ <translation>वालेटलाई अर्को ठेगानामा ब्याकअप गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Change the passphrase used for wallet encryption</source>
+ <translation>वालेट इन्क्रिप्सनमा प्रयोग हुने इन्क्रिप्सन पासफ्रेज परिवर्तन गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>&amp;Debug window</source>
+ <translation>&amp;amp;डिबग विन्डो</translation>
+ </message>
+ <message>
+ <source>Open debugging and diagnostic console</source>
+ <translation>डिबगिङ र डायाग्नोस्टिक कन्सोल खोल्नुहोस्</translation>
+ </message>
+ </context>
+<context>
+ <name>CoinControlDialog</name>
+ <message>
+ <source>Amount</source>
+ <translation>रकम</translation>
+ </message>
+ </context>
+<context>
+ <name>EditAddressDialog</name>
+ </context>
+<context>
+ <name>FreespaceChecker</name>
+ </context>
+<context>
+ <name>HelpMessageDialog</name>
+ </context>
+<context>
+ <name>Intro</name>
+ </context>
+<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
+ <name>OpenURIDialog</name>
+ </context>
+<context>
+ <name>OptionsDialog</name>
+ </context>
+<context>
+ <name>OverviewPage</name>
+ <message>
+ <source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
+ <translation>देखाइएको सूचना पूरानो हुन सक्छ । कनेक्सन स्थापित भएपछि, तपाईंको वालेट बिटकोइन नेटवर्कमा स्वचालित रूपमा समिकरण हुन्छ , तर यो प्रक्रिया अहिले सम्म पूरा भएको छैन ।</translation>
+ </message>
+ <message>
+ <source>Watch-only:</source>
+ <translation>हेर्ने-मात्र:</translation>
+ </message>
+ <message>
+ <source>Available:</source>
+ <translation>उपलब्ध:</translation>
+ </message>
+ <message>
+ <source>Your current spendable balance</source>
+ <translation>तपाईंको खर्च गर्न मिल्ने ब्यालेन्स</translation>
+ </message>
+ <message>
+ <source>Pending:</source>
+ <translation>विचाराधिन:</translation>
+ </message>
+ <message>
+ <source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
+ <translation>अझै पुष्टि हुन बाँकी र खर्च गर्न मिल्ने ब्यालेन्समा गणना गर्न नमिल्ने जम्मा कारोबार</translation>
+ </message>
+ <message>
+ <source>Immature:</source>
+ <translation>अपरिपक्व:</translation>
+ </message>
+ <message>
+ <source>Mined balance that has not yet matured</source>
+ <translation>अझै परिपक्व नभएको खनन गरिएको ब्यालेन्स</translation>
+ </message>
+ <message>
+ <source>Balances</source>
+ <translation>ब्यालेन्स</translation>
+ </message>
+ <message>
+ <source>Mined balance in watch-only addresses that has not yet matured</source>
+ <translation>अहिलेसम्म परिपक्व नभएको खनन गरिएको, हेर्ने-मात्र ठेगानामा रहेको ब्यालेन्स</translation>
+ </message>
+ <message>
+ <source>Current total balance in watch-only addresses</source>
+ <translation>हेर्ने-मात्र ठेगानामा रहेको हालको जम्मा ब्यालेन्स</translation>
+ </message>
+</context>
+<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
+ <name>PeerTableModel</name>
+ <message>
+ <source>User Agent</source>
+ <translation>प्रयोगकर्ता एजेन्ट</translation>
+ </message>
+ <message>
+ <source>Node/Service</source>
+ <translation>नोड/सेव</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject</name>
+ <message>
+ <source>Amount</source>
+ <translation>रकम</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
+ <name>RPCConsole</name>
+ <message>
+ <source>User Agent</source>
+ <translation>प्रयोगकर्ता एजेन्ट</translation>
+ </message>
+ <message>
+ <source>Ping Time</source>
+ <translation>पिङ समय</translation>
+ </message>
+ </context>
+<context>
+ <name>ReceiveCoinsDialog</name>
+ </context>
+<context>
+ <name>ReceiveRequestDialog</name>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
+ <name>SendCoinsDialog</name>
+ </context>
+<context>
+ <name>SendCoinsEntry</name>
+ <message>
+ <source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
+ <translation>पठाइँदै गरेको रकमबाट शुल्क कटौती गरिनेछ । प्राप्तकर्ताले तपाईंले रकम क्षेत्रमा प्रवेष गरेको भन्दा थोरै बिटकोइन प्राप्त गर्ने छन् । धेरै प्राप्तकर्ता चयन गरिएको छ भने समान रूपमा शुल्क विभाजित गरिनेछ ।</translation>
+ </message>
+ <message>
+ <source>A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+ <translation>बिटकोइनमा संलग्न गरिएको सन्देश: तपाईंको मध्यस्थको लागि कारोबारको साथमा भण्डारण गरिने URI । नोट: यो सन्देश बिटकोइन नेटवर्क मार्फत पठाइने छैन ।</translation>
+ </message>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
+ <name>ShutdownWindow</name>
+ </context>
+<context>
+ <name>SignVerifyMessageDialog</name>
+ <message>
+ <source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+ <translation>आफ्नो ठेगानामा पठाइएको बिटकोइन प्राप्त गर्न सकिन्छ भनेर प्रमाणित गर्न तपाईंले ती ठेगानाले सन्देश/सम्झौताहरूमा हस्ताक्षर गर्न सक्नुहुन्छ । फिसिङ आक्रमणले तपाईंलाई छक्याएर अरूका लागि तपाईंको परिचयमा हस्ताक्षर गराउने प्रयास गर्न सक्ने भएकाले अस्पष्ट वा जथाभावीमा हस्ताक्षर गर्दा ध्यान दिनुहोस् । आफू सहमत भएको पूर्ण विस्तृत-कथनमा मात्र हस्ताक्षर गर्नुहोस् ।</translation>
+ </message>
+ </context>
+<context>
+ <name>SplashScreen</name>
+ </context>
+<context>
+ <name>TrafficGraphWidget</name>
+ </context>
+<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
+ <name>TransactionDescDialog</name>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
+ <name>UnitDisplayStatusBarControl</name>
+ </context>
+<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
+ <name>bitcoin-core</name>
+ <message>
+ <source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
+ <translation>ब्लक डाटाबेसमा भविष्यबाट आए जस्तो देखिने एउटा ब्लक हुन्छ । तपाईंको कम्प्युटरको मिति र समय गलत तरिकाले सेट गरिएकाले यस्तो हुन सक्छ । तपाईं आफ्नो कम्प्युटरको मिति र समय सही छ भनेर पक्का हुनुहुन्छ भने मात्र ब्लक डाटाबेस पुनर्निर्माण गर्नुहोस् ।</translation>
+ </message>
+ <message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>प्रि-फर्क अवस्थामा डाटाबेस रिवाइन्ड गर्न सकिएन । तपाईंले फेरि ब्लकचेन डाउनलोड गर्नु पर्ने हुन्छ</translation>
+ </message>
+ <message>
+ <source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
+ <translation>UPnP प्रयोग गरेर सुन्ने पोर्टलाई म्याप गर्नुहोस् (सुन्दा र -प्रोक्सी नहुँदा डिफल्ट: 1)</translation>
+ </message>
+ <message>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>तपाईंले -चेनस्टेट-पुनः सूचकांकबाट -txindex परिवर्तन प्रयोग गरेर डाटाबेस पुनर्निर्माण गर्नु आवश्यक छ</translation>
+ </message>
+ <message>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s मा क्षति, बचाव विफल भयो</translation>
+ </message>
+ <message>
+ <source>-maxmempool must be at least %d MB</source>
+ <translation>-maxmempool कम्तिमा %d MB को हुनुपर्छ ।</translation>
+ </message>
+ <message>
+ <source>&lt;category&gt; can be:</source>
+ <translation>&amp;lt;वर्ग&amp;gt; निम्न आकारको हुनसक्छ:</translation>
+ </message>
+ <message>
+ <source>Append comment to the user agent string</source>
+ <translation>प्रयोगकर्ता एजेन्ट स्ट्रिङमा टिप्पणी जोड्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Attempt to recover private keys from a corrupt wallet on startup</source>
+ <translation>स्टार्टअपमा क्षति पूगेको वालेटबाट निजी की प्राप्त गर्न प्रयास गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Block creation options:</source>
+ <translation>ब्लक सिर्जनाको बिकल्प:</translation>
+ </message>
+ <message>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>-%s ठेगाना: &amp;apos;%s&amp;apos; निश्चय गर्न सकिँदैन</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>सूचकांक परिवर्तन सीमा भन्दा बाहर</translation>
+ </message>
+ <message>
+ <source>Connection options:</source>
+ <translation>कनेक्सनको विकल्प:</translation>
+ </message>
+ <message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>सर्वाधिकार (C) %i-%i</translation>
+ </message>
+ <message>
+ <source>Corrupted block database detected</source>
+ <translation>क्षति पुगेको ब्लक डाटाबेस फेला पर</translation>
+ </message>
+ <message>
+ <source>Debugging/Testing options:</source>
+ <translation>डिबगिङ/परीक्षणका विकल्पहरू:</translation>
+ </message>
+ <message>
+ <source>Do not load the wallet and disable wallet RPC calls</source>
+ <translation>वालेट लोड नगर्नुहोस् र वालेट RPC कलहरू अक्षम गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Do you want to rebuild the block database now?</source>
+ <translation>तपाईं अहिले ब्लक डेटाबेस पुनर्निर्माण गर्न चाहनुहुन्छ ?</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>यो कम्प्युटरको %s मा बाँध्न सकिएन । %s सम्भवित रूपमा पहिलैबाट चलिरहेको छ ।</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
+ <translation>असमर्थित तर्क -बेन्चमार्कलाई बेवास्ता गरियो, -डिबग=बेन्च प्रयोग गर्नुहोस् ।</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -debugnet ignored, use -debug=net.</source>
+ <translation>असमर्थित तर्क -डिबगनेटलाई बेवास्ता गरियो, -डिबग=नेट प्रयोग गर्नुहोस् । </translation>
+ </message>
+ <message>
+ <source>Unsupported argument -tor found, use -onion.</source>
+ <translation>असमर्थित तर्क -टोर फेला पर्यो, -ओनियन प्रयोग गर्नुहोस् । </translation>
+ </message>
+ <message>
+ <source>Use UPnP to map the listening port (default: %u)</source>
+ <translation>UPnP प्रयोग गरेर सुन्ने पोर्ट म्याप गर्नुहोस् (डिफल्ट: %u) </translation>
+ </message>
+ <message>
+ <source>Verifying blocks...</source>
+ <translation>ब्लक प्रमाणित गरिँदै...</translation>
+ </message>
+ <message>
+ <source>Verifying wallet...</source>
+ <translation>वालेट प्रमाणित गरिँदै...</translation>
+ </message>
+ <message>
+ <source>Wallet %s resides outside data directory %s</source>
+ <translation>वालेट %s डाटा निर्देशिका %s बाहिरमा बस्छ</translation>
+ </message>
+ <message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>वालेट डिबगिङ/परीक्षणका विकल्पहरू:</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>वालेट फेरि लेख्नु आवश्यक छ: पूरा गर्न %s लाई पुन: सुरु गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Wallet options:</source>
+ <translation>वालेटका विकल्पहरू:</translation>
+ </message>
+ <message>
+ <source>Allow JSON-RPC connections from specified source. Valid for &lt;ip&gt; are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times</source>
+ <translation>निर्दिष्ट गरिएको स्रोतबाट आएको JSON-RPC कनेक्सनलाई अनुमति दिनुहोस् । एकल IP (e.g. 1.2.3.4), नेटवर्क/नेटमास्क (उदाहरण 1.2.3.4/255.255.255.0) वा नेटवर्क/CIDR (उदाहरण 1.2.3.4/24) &amp;lt;ip&amp;gt; का लागि मान्य छन् । यो विकल्पलाई धेरै पटक निर्दिष्ट गर्न सकिन्छ</translation>
+ </message>
+ <message>
+ <source>Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6</source>
+ <translation>दिइएको ठेगानामा बाँध्नुहोस् र यसमा कनेक्ट गर्ने सहकर्मीलाई श्वेतसूचीमा राख्नुहोस् । IPv6 लागि [होस्ट]:पोर्ट संकेतन प्रयोग गर्नुहोस्</translation>
+ </message>
+ <message>
+ <source>Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)</source>
+ <translation>JSON-RPC कनेक्सन सुन्नको लागि दिइएको ठेगानामा बाँध्नुहोस् । IPv6 लागि [होस्ट]:पोर्ट संकेतन प्रयोग गर्नुहोस् । यो विकल्पलाई धेरै पटक निर्दिष्ट गर्न सकिन्छ (डिफल्ट: सबै इन्टरफेसमा बाँध्नुहोस्)</translation>
+ </message>
+ <message>
+ <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+ <translation>umask 077 को सट्टामा प्रणालीको डिफल्ट अनुमतिको साथमा नयाँ फाइलहरू सिर्जना गर्नुहोस् । (असक्षम गरिएको वालेट कार्यक्षमतामा मात्र प्रभावकारी हुने)</translation>
+ </message>
+ <message>
+ <source>Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)</source>
+ <translation>आफ्नै IP ठेगाना पत्ता लगाउनुहोस् (सुन्दा र -बाहिरीआइपी वा -प्रोक्सी नहुँदा डिफल्ट: 1 )</translation>
+ </message>
+ <message>
+ <source>Error: Listening for incoming connections failed (listen returned error %s)</source>
+ <translation>त्रुटि: आगमन कनेक्सनमा सुन्ने कार्य असफल भयो (सुन्ने कार्यले त्रुटि %s फर्कायो)</translation>
+ </message>
+ <message>
+ <source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
+ <translation>सान्दर्भिक चेतावनी प्राप्त गर्दा आदेश कार्यान्वयन गर्नुहोस् नभए धेरै लामो फोर्क देखा पर्न सक्छ । (cmd को %s लाई सन्देशले प्रतिस्थापन गर्छ)</translation>
+ </message>
+ <message>
+ <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source>
+ <translation>रिले, खनन वा कारोबारको सिर्जनाको लागि यो भन्दा कम शुल्क (%s/kB मा) लाई शून्य शुल्कको रूपमा लिइन्छ । (डिफल्ट: %s)</translation>
+ </message>
+ <message>
+ <source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
+ <translation>paytxfee सेट गरिएको छैन भने, औसतमा n ब्लक भित्र कारोबार पुष्टिकरण सुरु होस् भन्नका लागि पर्याप्त शुल्क समावेश गर्नुहोस् (डिफल्ट: %u)</translation>
+ </message>
+ <message>
+ <source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+ <translation>maxtxfee=&amp;lt;रकम&amp;gt;: का लागि अमान्य रकम &amp;apos;%s&amp;apos; (कारोबारलाई अड्कन नदिन अनिवार्य रूपमा कम्तिमा %s को न्यूनतम रिले शुल्क हुनु पर्छ)</translation>
+ </message>
+ <message>
+ <source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
+ <translation>हामीले रिले र खनन गर्ने डाटा वाहक कारोबारको डाटाको अधिकतम आकार (डिफल्ट: %u)</translation>
+ </message>
+ <message>
+ <source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
+ <translation>हरेक प्रोक्सी कनेक्सनका लागि क्रेडिन्सियल अनियमित बनाउनुहोस् । यसले टोर स्ट्रिमको अलगावलाई सक्षम पार्छ (डिफल्ट: %u)</translation>
+ </message>
+ <message>
+ <source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
+ <translation>बाइटमा उच्च-प्राथमिकता/कम शुल्कको कारोबारको अधिकतम आकार सेट गर्नुहोस् (डिफल्ट: %d)</translation>
+ </message>
+ <message>
+ <source>The transaction amount is too small to send after the fee has been deducted</source>
+ <translation>कारोबार रकम शुल्क कटौती गरेपछि पठाउँदा धेरै नै सानो हुन्छ</translation>
+ </message>
+ <message>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>BIP32 पछि पदानुक्रमित निर्धारक की सिर्जना (HD) प्रयोग गर्नुहोस् ।. केवल वालेट सिर्जना/पहिलो सुरुवातको समयमा प्रभाव पार्छ</translation>
+ </message>
+ <message>
+ <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+ <translation>श्वेतसूचीका सहकर्मी पहिलैबाट मेमपूल, उपयोगीमा भए पनि उनीहरूलाई DoS banned गर्न सकिँदैन र उनीहरूको कारोबार सधैं रिले हुन्छ, उदाहरण, गेटवेको लाग</translation>
+ </message>
+ <message>
+ <source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
+ <translation>तपाईंले काटछाँट नगरेको मोडमा जान पुनः सूचकांक प्रयोग गरेर डाटाबेस पुनर्निर्माण गर्नु पर्ने हुन्छ । यसले सम्पूर्ण ब्लकचेनलाई फेरि डाउनलोड गर्नेछ</translation>
+ </message>
+ </context>
+</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index 781c5a8fd6..8a09bed2ce 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Verwijder</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Kies het adres om munten naar te versturen</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Kies het adres om munten op te ontvangen</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>K&amp;iezen</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Verzendadressen</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Ontvangstadressen</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Dit zijn uw Bitcoinadressen om betalingen mee te verzenden. Controleer altijd het bedrag en het ontvangstadres voordat u uw bitcoins verzendt.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Dit zijn uw Bitcoin-adressen waarmee u betalingen kunt ontvangen. We raden u aan om een nieuw ontvangstadres voor elke transactie te gebruiken.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiëer Adres</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopieer &amp;Label</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Bewerk</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exporteer adreslijst</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommagescheiden bestand (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Export mislukt</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Een fout is opgetreden tijdens het opslaan van deze adreslijst naar %1. Probeer het nogmaals.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen label)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Herhaal nieuw wachtwoord</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Voer een nieuw wachtwoord in voor uw portemonnee.&lt;br/&gt;Gebruik een wachtwoord van &lt;b&gt;tien of meer willekeurige karakters&lt;/b&gt;, of &lt;b&gt;acht of meer woorden&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Versleutel portemonnee</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Deze operatie vereist uw portemonneewachtwoord om de portemonnee te openen.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Open portemonnee</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Deze operatie vereist uw portemonneewachtwoord om de portemonnee te ontsleutelen</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Ontsleutel portemonnee</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Wijzig wachtwoord</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Voer het oude en nieuwe wachtwoord in voor uw portemonnee.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Bevestig versleuteling van de portemonnee</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Waarschuwing: Als u uw portemonnee versleutelt en uw wachtwoord vergeet, zult u &lt;b&gt;AL UW BITCOINS VERLIEZEN&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Weet u zeker dat u uw portemonnee wilt versleutelen?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Portemonnee versleuteld</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 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 bitcoins stelen.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>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.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Portemonneeversleuteling mislukt</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Portemonneeversleuteling mislukt door een interne fout. Uw portemonnee is niet versleuteld.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>De opgegeven wachtwoorden komen niet overeen</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Portemonnee openen mislukt</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Het opgegeven wachtwoord voor de portemonnee-ontsleuteling is niet correct.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Portemonnee-ontsleuteling mislukt</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Portemonneewachtwoord is met succes gewijzigd.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Waarschuwing: De Caps-Lock-toets staat aan!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -278,26 +437,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n blok aan transactiegeschiedenis verwerkt.</numerusform><numerusform>%n blokken aan transactiegeschiedenis verwerkt.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n uur</numerusform><numerusform>%n uren</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dag</numerusform><numerusform>%n dagen</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n week</numerusform><numerusform>%n weken</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 en %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n jaar</numerusform><numerusform>%n jaren</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 achter</translation>
@@ -384,7 +523,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Portemonnee is &lt;b&gt;versleuteld&lt;/b&gt; en momenteel &lt;b&gt;gesloten&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +543,6 @@
<translation>Bedrag:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteit:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Transactiekosten:</translation>
</message>
@@ -460,8 +595,84 @@
<translation>Bevestigd</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioriteit</translation>
+ <source>Copy address</source>
+ <translation>Kopieer adres</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopieer label</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopieer transactie-ID</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Blokeer ongebruikte</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Deblokkeer ongebruikte</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopieer aantal</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopieer vergoeding</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopieer na vergoeding</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopieer bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopieër stof</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopieer wijziging</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 geblokkeerd)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>ja</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>nee</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Dit label wordt rood, als een ontvanger een bedrag van minder dan de huidige dust-drempel gekregen heeft.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Kan per input +/- %1 satoshi(s) variëren.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen label)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>wijzig van %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(wijzig)</translation>
</message>
</context>
<context>
@@ -486,6 +697,38 @@
<source>&amp;Address</source>
<translation>&amp;Adres</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nieuw ontvangstadres</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nieuw verzendadres</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Bewerk ontvangstadres</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Bewerk verzendadres</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Het opgegeven adres "%1" is een ongeldig Bitcoinadres.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Het opgegeven adres "%1" bestaat al in uw adresboek.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Kon de portemonnee niet openen.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Genereren nieuwe sleutel mislukt.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +852,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Vorm</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Tijd laatste blok</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Verbergen</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +884,10 @@
<source>Select payment request file</source>
<translation>Selecteer betalingsverzoek bestand</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Selecteer betalingsverzoekbestand om te openen</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -938,6 +1200,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Fout bij betalingsverzoek</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Kan bitcoin niet starten: click-to-pay handler</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI-behandeling</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>URL om betalingsverzoek te verkrijgen is ongeldig: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Ongeldig betalingsadres %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI kan niet verwerkt worden! Dit kan het gevolg zijn van een ongeldig Bitcoin adres of misvormde URI parameters.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Betalingsverzoek bestandsafhandeling</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Betalingsverzoekbestand kan niet gelezen of verwerkt worden! Dit kan veroorzaakt worden door een ongeldig betalingsverzoekbestand.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Betalingsverzoek geweigerd</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Betalingsaanvraagnetwerk komt niet overeen met klantennetwerk.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Betalingsverzoek verlopen.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Betalingsaanvraag is niet geïnitialiseerd.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Niet-geverifieerde betalingsverzoeken naar aangepaste betalingsscripts worden niet ondersteund.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Ongeldig betalingsverzoek.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Het gevraagde betalingsbedrag van %1 is te weinig (beschouwd als stof).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Restitutie van %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Betalingsverzoek %1 is te groot (%2 bytes, toegestaan ​​%3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Fout bij communiceren met %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Betalingsverzoek kan niet worden verwerkt!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Ongeldige respons van server %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Fout bij netwerkverzoek</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Betaling bevestigd</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -947,11 +1300,7 @@
<source>Node/Service</source>
<translation>Node/Dienst</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping tijd</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -990,6 +1339,32 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 en %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Sla afbeelding op...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Afbeelding kopiëren</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Sla QR-code op</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG afbeelding (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1194,14 +1569,6 @@
<translation>Maak console leeg</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Verbreek Verbinding Node</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Ban Node voor</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;uur</translation>
</message>
@@ -1218,10 +1585,6 @@
<translation>1 &amp;jaar</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Maak Ban Ongedaan voor Node</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>Welkom bij de %1 RPC-console.</translation>
</message>
@@ -1352,6 +1715,18 @@
<source>Remove</source>
<translation>Verwijder</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopieer label</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Kopieer bericht</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,6 +1746,73 @@
<source>&amp;Save Image...</source>
<translation>&amp;Sla afbeelding op...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Betalingsverzoek tot %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Betalingsinformatie</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Bedrag</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Bericht</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>Resulterende URI te lang, probeer de tekst korter te maken voor het label/bericht.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Fout tijdens encoderen URI in QR-code</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Bericht</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen label)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(geen bericht)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(geen bedrag aangevraagd)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Verzoek ingediend</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1407,10 +1849,6 @@
<translation>Bedrag:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteit:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Kosten:</translation>
</message>
@@ -1479,10 +1917,6 @@
<translation>(Slimme transactiekosten is nog niet geïnitialiseerd. Dit duurt meestal een paar blokken...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Bevestigings tijd:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normaal</translation>
</message>
@@ -1522,6 +1956,106 @@
<source>S&amp;end</source>
<translation>V&amp;erstuur</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Kopieer aantal</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Kopieer vergoeding</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Kopieer na vergoeding</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Kopieer bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopieër stof</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Kopieer wijziging</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 tot %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Weet u zeker dat u wilt verzenden?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>toegevoegd als transactiekosten</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Totaalbedrag %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>of</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Bevestig versturen munten</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Het adres van de ontvanger is niet geldig. Gelieve opnieuw te controleren.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Het ingevoerde bedrag moet groter zijn dan 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Het bedrag is hoger dan uw huidige saldo.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Het totaal overschrijdt uw huidige saldo wanneer de %1 transactiekosten worden meegerekend.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Dubbel adres gevonden: adressen mogen maar één keer worden gebruikt worden.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Transactiecreatie mislukt</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Een vergoeding van meer dan %1 wordt beschouwd als een absurd hoge vergoeding.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Betalingsverzoek verlopen.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Betaal alleen de verplichte transactiekosten van %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Waarschuwing: Ongeldig Bitcoinadres</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Waarschuwing: Onbekend wisselgeldadres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen label)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,6 +2135,17 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Vul een label in voor dit adres om het toe te voegen aan uw adresboek</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Ja</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1699,6 +2244,58 @@
<source>Reset all verify message fields</source>
<translation>Verwijder alles in de invulvelden</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Klik op "Onderteken Bericht" om de handtekening te genereren</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Het opgegeven adres is ongeldig.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Controleer het adres en probeer het opnieuw.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Het opgegeven adres verwijst niet naar een sleutel.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Portemonnee-ontsleuteling is geannuleerd.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Geheime sleutel voor het ingevoerde adres is niet beschikbaar.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Ondertekenen van het bericht is mislukt.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Bericht ondertekend.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>De handtekening kon niet worden gedecodeerd.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Controleer de handtekening en probeer het opnieuw.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>De handtekening hoort niet bij het bericht.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Berichtverificatie mislukt.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Bericht geverifiëerd.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1715,11 +2312,440 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Open tot %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>geconflicteerd met een transactie met %1 confirmaties</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/onbevestigd, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>in geheugenpoel</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>niet in geheugenpoel</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>opgegeven</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/onbevestigd</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 bevestigingen</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Status</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, is nog niet met succes uitgezonden</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Bron</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Gegenereerd</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Van</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>onbekend</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Aan</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>eigen adres</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>alleen-bekijkbaar</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>label</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Credit</translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>niet geaccepteerd</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Debet</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Totaal debit</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Totaal credit</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Transactiekosten</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Netto bedrag</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Bericht</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Opmerking</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>Transactie-ID</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Output index</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Handelaar</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Gegenereerde munten moeten %1 blokken rijpen voordat ze kunnen worden besteed. Toen dit blok gegenereerd werd, werd het uitgezonden naar het netwerk om aan de blokketen toegevoegd te worden. Als het niet lukt om in de keten toegevoegd te worden, zal de status te veranderen naar "niet geaccepteerd" en zal het niet besteedbaar zijn. Dit kan soms gebeuren als een ander knooppunt een blok genereert binnen een paar seconden na die van u.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Debug-informatie</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transactie</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Inputs</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Bedrag</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>waar</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>onwaar</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Dit venster laat een uitgebreide beschrijving van de transactie zien</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Details voor %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Open tot %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Onbevestigd</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Opgegeven</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Bevestigen (%1 van %2 aanbevolen bevestigingen)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Bevestigd (%1 bevestigingen)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>Conflicterend</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Niet beschikbaar (%1 bevestigingen, zal beschikbaar zijn na %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Dit blok is niet ontvangen bij andere nodes en zal waarschijnlijk niet worden geaccepteerd!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Gegenereerd maar niet geaccepteerd</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Ontvangen met</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Ontvangen van</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Verzonden aan</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Betaling aan uzelf</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Gedolven</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>alleen-bekijkbaar</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(nvt)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(geen label)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Transactiestatus. Houd de cursor boven dit veld om het aantal bevestigingen te laten zien.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Datum en tijd waarop deze transactie is ontvangen.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Type transactie.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Of er een alleen-bekijken-adres is betrokken bij deze transactie.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Door gebruiker gedefinieerde intentie/doel van de transactie.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Bedrag verwijderd van of toegevoegd aan saldo.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Alles</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Vandaag</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Deze week</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Deze maand</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Vorige maand</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Dit jaar</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Bereik...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Ontvangen met</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Verzonden aan</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Aan uzelf</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Gedolven</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Anders</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Vul adres of label in om te zoeken</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Min. bedrag</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Doe afstand van transactie</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopieer adres</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopieer label</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopieer bedrag</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Kopieer transactie-ID</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Kopieer ruwe transactie</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Kopieer volledige transactiedetials</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Bewerk label</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Toon transactiedetails</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exporteer transactiegeschiedenis</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommagescheiden bestand (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Bevestigd</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Alleen-bekijkbaar</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Datum</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Type</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Label</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Export mislukt</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Er is een fout opgetreden bij het opslaan van de transactiegeschiedenis naar %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Export succesvol</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>De transactiegeschiedenis was succesvol bewaard in %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Bereik:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>naar</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1729,6 +2755,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Er is geen portemonnee geladen.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Verstuur munten</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exporteer</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exporteer de data in de huidige tab naar een bestand</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Portemonnee backuppen</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Portemonneedata (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Backup mislukt</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Er is een fout opgetreden bij het wegschrijven van de portemonneedata naar %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Backup succesvol</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>De portemonneedata is succesvol opgeslagen in %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1791,16 +2866,12 @@
<translation>Niet mogelijk ok HTTP-server te starten. Zie debuglogboek voor details.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Accepteer verbindingen van buitenaf (standaard: 1 als geen -proxy of -connect is opgegeven)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee is zeer hoog ingesteld! Dit zijn de transactie kosten die u mogelijk betaald wanneer de schattingen niet beschikbaar zijn.</translation>
+ <source>The %s developers</source>
+ <translation>De %s ontwikkelaars</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1823,8 +2894,8 @@
<translation>Verwijder alle transacties van de portemonnee en herstel alleen de delen van de blokketen door -rescan tijdens het opstarten</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Uitgegeven onder de MIT-softwarelicentie, zie het bijgevoegde bestand COPYING of &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Fout bij het laden van %s: Je kan HD niet activeren voor een reeds bestaande niet-HD portemonnee</translation>
</message>
<message>
<source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -1835,10 +2906,6 @@
<translation>Voer opdracht uit zodra een portemonneetransactie verandert (%s in cmd wordt vervangen door TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Forceer het doorsturen van transacties van goedgekeurde peers, zelfs wanneer deze niet voldoen aan de lokale doorstuur regels (standaard: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Maximum toegestane peer tijd compensatie. Lokaal perspectief van tijd mag worden beinvloed door peers die met deze hoeveelheid voor of achter lopen. (standaard: %u seconden)</translation>
</message>
@@ -1851,6 +2918,10 @@
<translation>Waarschuwing: Controleer dat de datum en tijd van uw computer correct zijn ingesteld! Bij een onjuist ingestelde klok zal %s niet goed werken.</translation>
</message>
<message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Gelieve bij te dragen als je %s nuttig vindt. Bezoek %s voor meer informatie over de software.</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Kies het aantal scriptverificatie processen (%u tot %d, 0 = auto, &lt;0 = laat dit aantal kernen vrij, standaard: %d)</translation>
</message>
@@ -1859,30 +2930,22 @@
<translation>De blokdatabase bevat een blok dat lijkt uit de toekomst te komen. Dit kan gebeuren omdat de datum en tijd van uw computer niet goed staat. Herbouw de blokdatabase pas nadat u de datum en tijd van uw computer correct heeft ingesteld.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Dit is een prerelease testversie – gebruik op eigen risico! Gebruik deze niet voor het delven van munten of handelsdoeleinden</translation>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Niet mogelijk om de databank terug te draaien naar een staat voor de vork. Je zal je blokketen opnieuw moeten downloaden</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Gebruik UPnP om de luisterende poort te mappen (standaard: 1 als er geluisterd worden en geen -proxy is meegegeven)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Waarschuwing: Het lijkt erop dat het netwerk geen consensus kan vinden! Sommige delvers lijken problemen te ondervinden.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Waarschuwing: Het lijkt erop dat we geen consensus kunnen vinden met onze peers! Mogelijk dient u te upgraden, of andere nodes moeten wellicht upgraden.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Goedgekeurde peers die verbinden van het ingegeven netmask of IP adres. Kan meerdere keren gespecificeerd worden.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Om -txindex te kunnen veranderen dient u de database opnieuw te bouwen met gebruik van -reindex-chainstate.</translation>
</message>
<message>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s corrupt, veiligstellen mislukt</translation>
+ </message>
+ <message>
<source>-maxmempool must be at least %d MB</source>
<translation>-maxmempool moet tenminste %d MB zijn</translation>
</message>
@@ -1911,10 +2974,6 @@
<translation>Wijzigingsindex buiten bereik</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Verbind alleen naar de gespecificeerde node(s)</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Verbindingsopties:</translation>
</message>
@@ -1979,6 +3038,10 @@
<translation>Fout bij laden %s: Portemonnee vereist een nieuwere versie van %s</translation>
</message>
<message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Fout bij het laden van %s: Je kan HD niet deactiveren voor een reeds bestaande HD portemonnee</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Fout bij het laden van blokkendatabase</translation>
</message>
@@ -2031,10 +3094,6 @@
<translation>Locatie van de auth cookie (standaard: data dir)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Minimum aantal bytes dat er per sigop in een transactie gerelayed en gemined worden (standaard: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Niet genoeg file descriptors beschikbaar.</translation>
</message>
@@ -2067,6 +3126,10 @@
<translation>Herbouw ketenstaat vanuit de huidige geindexeerde blokken</translation>
</message>
<message>
+ <source>Rewinding blocks...</source>
+ <translation>Blokken aan het terugdraaien...</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Zet database cache grootte in megabytes (%d tot %d, standaard: %d)</translation>
</message>
@@ -2079,6 +3142,10 @@
<translation>Specificeer het portemonnee bestand (vanuit de gegevensmap)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>De broncode is beschikbaar van %s.</translation>
+ </message>
+ <message>
<source>Unable to bind to %s on this computer. %s is probably already running.</source>
<translation>Niet in staat om %s te verbinden op deze computer. %s draait waarschijnlijk al.</translation>
</message>
@@ -2171,10 +3238,6 @@
<translation>Maximale grootte va n de gegevens in gegevensdragertransacties die we doorgeven en mijnen (standaard: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Query voor peeradressen via DNS- lookup , als laag op adressen (standaard: 1 unless -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Gebruik willekeurige inloggegevens voor elke proxyverbinding. Dit maakt streamislatie voor Tor mogelijk (standaard: %u)</translation>
</message>
@@ -2187,8 +3250,8 @@
<translation>Het transactiebedrag is te klein om te versturen nadat de transactiekosten in mindering zijn gebracht</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Dit product bevat software dat ontwikkeld is door het OpenSSL Project voor gebruik in de OpenSSL Toolkit &lt;https://www.openssl.org/&gt; en cryptografische software geschreven door Eric Young en UPnP software geschreven door Thomas Bernard.</translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Gebruik hiërarchische deterministische sleutelgeneratie (HD) na BIP32. Dit heeft enkel effect bij het aanmaken van portemonnees of het eerste gebruik</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2196,7 +3259,7 @@
</message>
<message>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
- <translation>U moet de database herbouwen met -reindex om terug te gaan naar de ongesnoeide modus. Dit zal de gehele blokkketen opnieuw downloaden.</translation>
+ <translation>U moet de database herbouwen met -reindex om terug te gaan naar de ongesnoeide modus. Dit zal de gehele blokketen opnieuw downloaden.</translation>
</message>
<message>
<source>(default: %u)</source>
@@ -2299,10 +3362,6 @@
<translation>Transactiebedrag te klein</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transactiebedragen moeten positief zijn</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>De transactie is te groot voor het transactiekostenbeleid</translation>
</message>
@@ -2367,18 +3426,22 @@
<translation>-maxtxfee staat zeer hoog! Transactiekosten van de grootte kunnen worden gebruikt in een enkele transactie.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee staat zeer hoog! Dit is de transactiekosten die u betaalt als u een transactie doet.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Bewaar transactie niet langer dan &lt;n&gt; uren in de geheugenpool (standaard: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Equivalent byter per sigop in transactions voor doorsturen en mijnen (standaard: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Transactiekosten (in %s/kB) kleiner dan dit worden beschouwd dat geen transactiekosten in rekening worden gebracht voor transactiecreatie (standaard: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Forceer het doorsturen van transacties van goedgekeurde peers, zelfs wanneer deze niet voldoen aan de lokale doorstuurregels (standaard: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Hoe grondig de blokverificatie van -checkblocks is (0-4, standaard: %u)</translation>
</message>
@@ -2419,10 +3482,6 @@
<translation>Gebruik een aparte SOCKS5 proxy om verborgen diensten van Tor te bereiken (standaard: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Gebruikersnaam en gehasht wachtwoord voor JSON-RPC-verbindingen. De velden &lt;userpw&gt; is in het formaat: &lt;GEBRUIKERSNAAM&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Een kanoniek Pythonscript is inbegrepen in de share/rpcuser. Deze optie kan meerdere keren worden meegegeven</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Waarschuwing: Onbekende blok versies worden gemined! Er zijn mogelijk onbekende regels in werking getreden</translation>
</message>
@@ -2491,8 +3550,8 @@
<translation>Stel sleutelpoelgrootte in op &lt;n&gt; (standaard: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Stel minimum blokgrootte in in bytes (standaard: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Zet het BIP141 maximum gewicht van een blok (standaard: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2515,6 +3574,10 @@
<translation>Besteed onbevestigd wisselgeld bij het doen van transacties (standaard: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Netwerkthread starten...</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Drempel om verbinding te verbreken naar zich misdragende peers (standaard: %u)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 5351543338..f09978f6b0 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -33,7 +33,10 @@
<source>&amp;Delete</source>
<translation>&amp;Ilako</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -52,7 +55,7 @@
<source>Repeat new passphrase</source>
<translation>Pasibayuan ya ing bayung passphrase</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -222,7 +225,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Maka-&lt;b&gt;encrypt&lt;/b&gt; ya ing wallet at kasalukuyan yang maka-&lt;b&gt;locked&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -256,7 +259,7 @@
<source>&amp;Address</source>
<translation>&amp;Address</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -291,6 +294,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Tatauling oras na ning block</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -412,6 +426,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -426,6 +443,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>N/A</source>
@@ -511,6 +534,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -552,7 +578,7 @@
<source>S&amp;end</source>
<translation>Ipadala</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -589,6 +615,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -657,7 +686,7 @@
<source>Reset all verify message fields</source>
<translation>Ibalik king dati reng ngan fields na ning pamag beripikang mensayi</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -669,16 +698,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ining pane a ini magpakit yang detalyadung description ning transaksion</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -705,10 +752,6 @@
<translation>Gumana king gulut bilang daemon at tumanggap commands</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Tumanggap koneksion menibat king kilwal (default: 1 if no -proxy or -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Kapilubluban ning Bitcoin</translation>
</message>
@@ -717,10 +760,6 @@
<translation>Pipamilian king pamag-gawang block:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Kumunekta mu king mepiling node(s)</translation>
- </message>
- <message>
<source>Corrupted block database detected</source>
<translation>Mekapansin lang me-corrupt a block database</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index 09f748b83c..b7369c5093 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Usuń</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Wybierz adres, na który chcesz wysłać monety</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Wybierz adres, na który chcesz otrzymać monety</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>W&amp;ybierz</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Adresy wysyłania</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Adresy odbioru</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Tutaj znajdują się adresy Bitcoin na które wysyłasz płatności. Zawsze sprawdzaj ilość i adres odbiorcy przed wysyłką monet.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>To są twoje adresy Bitcoin do odbierania płatności. Zaleca się używanie nowych adresów odbiorczych dla każdej transakcji.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiuj adres</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopiuj &amp;Etykietę</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Edytuj</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Eksportuj listę adresów</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Plik *.CSV (dane rozdzielane przecinkami)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksportowanie nie powiodło się</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Wystąpił błąd podczas próby zapisu listy adresów do %1. Proszę spróbować ponownie.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etykieta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(brak etykiety)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,74 @@
<source>Repeat new passphrase</source>
<translation>Powtórz nowe hasło</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Wprowadź nowe hasło do portfela.&lt;br/&gt;Proszę używać hasła złożonego z &lt;b&gt;10 lub więcej losowych znaków&lt;/b&gt; albo &lt;b&gt;8 lub więcej słów.&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Zaszyfruj portfel</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Ta operacja wymaga hasła do portfela aby odblokować portfel.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Odblokuj portfel</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Ta operacja wymaga hasła portfela, aby go odszyfrować.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Odszyfruj portfel</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Zmień hasło</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Podaj stare i nowe hasło do portfela.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Potwierdź szyfrowanie portfela</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Portfel zaszyfrowany</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Szyfrowanie portfela nie powiodło się</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Podane hasła nie są takie same.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Odblokowanie portfela nie powiodło się</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Wprowadzone hasło do odszyfrowania portfela jest niepoprawne.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Odszyfrowanie portfela nie powiodło się</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Hasło do portfela zostało pomyślnie zmienione.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Ostrzeżenie: Caps Lock jest włączony!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -278,26 +417,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Przetworzono %n bloków historii transakcji.</numerusform><numerusform>Przetworzono %n bloków historii transakcji.</numerusform><numerusform>Przetworzono %n bloków historii transakcji.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform><numerusform>%n godzin</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>dzień</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n tygodni</numerusform><numerusform>%n tygodni</numerusform><numerusform>%n tygodni</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 i %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n lat</numerusform><numerusform>%n lat</numerusform><numerusform>%n lat</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 za</translation>
@@ -384,7 +503,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Portfel jest &lt;b&gt;zaszyfrowany&lt;/b&gt; i obecnie &lt;b&gt;zablokowany&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +523,6 @@
<translation>Kwota:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorytet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Opłata:</translation>
</message>
@@ -460,8 +575,84 @@
<translation>Potwierdzony</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorytet</translation>
+ <source>Copy address</source>
+ <translation>Kopiuj adres</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiuj etykietę</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiuj kwotę</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Skopiuj ID transakcji</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Zablokuj niewydane</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Odblokuj niewydane</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Skopiuj ilość</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Skopiuj prowizję</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Skopiuj ilość po opłacie</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Skopiuj ilość bajtów</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopiuj pył</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Skopiuj resztę</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 zablokowane)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>tak</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>nie</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Ta etykieta staje się czerwona jeżeli którykolwiek odbiorca otrzymuje kwotę mniejszą niż obecny próg pyłu.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Waha się +/- %1 satoshi na wejście.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(brak etykiety)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>reszta z %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(reszta)</translation>
</message>
</context>
<context>
@@ -486,6 +677,30 @@
<source>&amp;Address</source>
<translation>&amp;Adres</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Nowy adres odbiorczy</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Nowy adres wysyłania</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Zmień adres odbioru</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Zmień adres wysyłania</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Nie można było odblokować portfela.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Generowanie nowego klucza nie powiodło się.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +824,49 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formularz</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Pozostało bloków</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Nienznane...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Czas ostatniego bloku</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Postęp</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Przyrost postępu na godzinę</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>obliczanie...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Przewidywany czas zakończenia synchronizacji</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ukryj</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Nieznane. Synchronizowanie nagłówków (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +884,10 @@
<source>Select payment request file</source>
<translation>Otwórz żądanie zapłaty z pliku</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Wybierz plik żądania zapłaty do otwarcia</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -938,6 +1200,17 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Błąd żądania płatności</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Nie można uruchomić protokołu bitcoin: kliknij-by-zapłacić</translation>
+ </message>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -947,11 +1220,7 @@
<source>Node/Service</source>
<translation>Węzeł/Usługi</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Czas odpowiedzi</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -990,7 +1259,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 i %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1142,6 +1421,10 @@
<translation>Czas odpowiedzi</translation>
</message>
<message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>Czas trwania nadmiarowego pingu</translation>
+ </message>
+ <message>
<source>Ping Wait</source>
<translation>Czas odpowiedzi</translation>
</message>
@@ -1190,14 +1473,6 @@
<translation>Wyczyść konsolę</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>Odłącz Nod</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Blokuj węzeł na okres</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;godzina</translation>
</message>
@@ -1214,10 +1489,6 @@
<translation>1 &amp;rok</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>Odblokuj węzeł</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>Witaj w konsoli %1 RPC.</translation>
</message>
@@ -1348,6 +1619,14 @@
<source>Remove</source>
<translation>Usuń</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiuj etykietę</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiuj kwotę</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1367,7 +1646,30 @@
<source>&amp;Save Image...</source>
<translation>&amp;Zapisz obraz...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etykieta</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etykieta</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(brak etykiety)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1403,10 +1705,6 @@
<translation>Kwota:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorytet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Opłata:</translation>
</message>
@@ -1475,10 +1773,6 @@
<translation>(Sprytne opłaty nie są jeszcze zainicjowane. Trwa to zwykle kilka bloków...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Czas potwierdzenia:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normalnie</translation>
</message>
@@ -1518,6 +1812,38 @@
<source>S&amp;end</source>
<translation>Wy&amp;syłka</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Skopiuj ilość</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiuj kwotę</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Skopiuj prowizję</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Skopiuj ilość po opłacie</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Skopiuj ilość bajtów</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Kopiuj pył</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Skopiuj resztę</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(brak etykiety)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1597,7 +1923,10 @@
<source>Memo:</source>
<translation>Notatka:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1696,7 +2025,7 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<source>Reset all verify message fields</source>
<translation>Resetuje wszystkie pola weryfikacji wiadomości</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1712,12 +2041,165 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Źródło</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Wygenerowano</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>Od</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>nieznane</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Do</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>własny adres</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>tylko-obserwowany</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>etykieta</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ten panel pokazuje szczegółowy opis transakcji</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etykieta</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Niepotwierdzone</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Porzucone</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>Skonfliktowane</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Wygenerowane ale nie zaakceptowane</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Wysłane do</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>tylko-obserwowany</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(brak etykiety)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Wszystko</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Dzisiaj</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>W tym tygodniu</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>W tym miesiącu</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>W zeszłym miesiącu</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>W tym roku</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Zakres...</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Wysłane do</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopiuj adres</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiuj etykietę</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiuj kwotę</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Skopiuj ID transakcji</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Plik *.CSV (dane rozdzielane przecinkami)</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etykieta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksportowanie nie powiodło się</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1726,6 +2208,15 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1756,6 +2247,18 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Przycinanie skonfigurowano poniżej minimalnych %d MiB. Proszę użyć wyższej liczby.</translation>
</message>
<message>
+ <source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
+ <translation>Prune: ostatnia synchronizacja portfela jest za danymi. Muszisz -reindexować (pobrać cały ciąg bloków ponownie w przypadku przyciętego węzła)</translation>
+ </message>
+ <message>
+ <source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
+ <translation>Zredukuj wymaganą ilość miejsca na dysku poprzez usuwanie starych bloków. Ten tryb jest niekompatybilny z -txindex oraz -rescan. Ostrzeżenie: Wycofanie tego ustawienia wymaga ponownego pobrania całego łańcucha bloków. (domyślnie: 0 = wyłącz usuwanie bloków, &gt;%u = docelowy rozmiar w MiB jaki wykorzystać na pliki z blokami)</translation>
+ </message>
+ <message>
+ <source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
+ <translation>Ponowne skanowanie nie jest możliwe w trybie przycinania. Będzie trzeba użyć -reindex, co pobierze ponownie cały łańcuch bloków.</translation>
+ </message>
+ <message>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation>Błąd: Wystąpił fatalny błąd wewnętrzny, sprawdź szczegóły w debug.log</translation>
</message>
@@ -1776,10 +2279,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Uruchomienie serwera HTTP nie powiodło się. Zobacz dziennik debugowania, aby uzyskać więcej szczegółów.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Akceptuj połączenia z zewnątrz (domyślnie: 1 jeśli nie ustawiono -proxy lub -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Rdzeń Bitcoina</translation>
</message>
@@ -1788,8 +2287,12 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Deweloperzy %s</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee ma ustawioną bardzo dużą wartość! Jest to prowizja za transakcje, którą możesz zapłacić gdy oszacowanie opłaty jest niemożliwe.</translation>
+ <source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
+ <translation>Stawka prowizji (w %s/kB), która będzie użyta, gdy oszacowane dane o prowizjach nie będą wystarczające (domyślnie: %s)</translation>
+ </message>
+ <message>
+ <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
+ <translation>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</translation>
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
@@ -1804,10 +2307,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Usuwa wszystkie transakcje w portfelu i tylko odtwarza te części z łańcucha bloków poprzez -rescan przy starcie</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Rozprowadzane na licencji MIT, zobacz dołączony plik COPYING lub &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Błąd odczytu %s! Wszystkie klucze zostały odczytane poprawnie, ale może brakować danych transakcji lub wpisów w książce adresowej, lub mogą one być nieprawidłowe.</translation>
</message>
@@ -1816,10 +2315,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Wykonaj polecenie, kiedy transakcja portfela ulegnie zmianie (%s w poleceniu zostanie zastąpione przez TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Wymuś przekazywanie transakcji od osób z białej listy, nawet jeśli narusza to lokalną politykę przekazywania (default: %d)</translation>
- </message>
- <message>
<source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
<translation>Proszę sprawdzić czy data i czas na Twoim komputerze są poprawne! Jeżeli ustawienia zegara będą złe, %s nie będzie działał prawidłowo.</translation>
</message>
@@ -1828,26 +2323,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Ustaw liczbę wątków skryptu weryfikacyjnego (%u do %d, 0 = auto, &lt;0 = zostaw tyle rdzeni wolnych, domyślnie: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>To jest testowa wersja - używaj na własne ryzyko - nie używaj do wykopywania oraz przy aplikacjach kupieckich</translation>
- </message>
- <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Użyj UPnP do mapowania portu nasłuchu (domyślnie: 1 gdy nasłuchuje i brak -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Ostrzeżenie: Sieć nie wydaje się w pełni zgodna! Niektórzy górnicy wydają się doświadczać problemów.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Uwaga: Wygląda na to, że nie ma pełnej zgodności z naszymi peerami! Możliwe, że potrzebujesz aktualizacji bądź inne węzły jej potrzebują</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Dodawaj do białej listy węzły łączące się z podanej maski sieciowej lub adresu IP. Może być określona kilka razy.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Musisz przebudować bazę używając -reindex-chainstate aby zmienić -txindex</translation>
</message>
@@ -1864,6 +2343,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>&lt;category&gt; mogą być:</translation>
</message>
<message>
+ <source>Append comment to the user agent string</source>
+ <translation>Dodaj komentarz do pola user agent</translation>
+ </message>
+ <message>
<source>Attempt to recover private keys from a corrupt wallet on startup</source>
<translation>Próbuj odzyskać klucze prywatne z uszkodzonego portfela podczas uruchamiania.</translation>
</message>
@@ -1872,8 +2355,8 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Opcje tworzenia bloku:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Łącz się tylko do wskazanego węzła/węzłów</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>Nie można rozpoznać -%s adresu: '%s'</translation>
</message>
<message>
<source>Connection options:</source>
@@ -1968,6 +2451,14 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Utrzymuj obszar pamięci dla transakcji poniżej &lt;n&gt; MB (default: %u)</translation>
</message>
<message>
+ <source>Loading banlist...</source>
+ <translation>Ładowanie listy zablokowanych...</translation>
+ </message>
+ <message>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Lokalizacja autoryzacyjnego pliku cookie (domyślnie: ścieżka danych)</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Brak wystarczającej liczby deskryptorów plików. </translation>
</message>
@@ -2012,6 +2503,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Określ plik portfela (w obrębie folderu danych)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Kod źródłowy dostępny jest z %s.</translation>
+ </message>
+ <message>
<source>Unable to bind to %s on this computer. %s is probably already running.</source>
<translation>Nie można przywiązać do %s na tym komputerze. %s prawdopodobnie jest już uruchomiony.</translation>
</message>
@@ -2100,10 +2595,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Maksymalny rozmiar danych w transakcji przekazującej dane które przekazujemy i wydobywamy (domyślnie: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Wyszukaj adresy węzłów wykorzystując zapytanie DNS, jeżeli masz mało adresów (domyślnie: 1 jeśli nie użyto -connect)</translation>
- </message>
- <message>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
<translation>Ustaw maksymalny rozmiar transakcji o wysokim priorytecie/niskiej prowizji w bajtach (domyślnie: %d)</translation>
</message>
@@ -2112,10 +2603,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Zbyt niska kwota transakcji do wysłania po odjęciu opłaty</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Program ten zawiera oprogramowanie stworzone przez OpenSSL Project do użycia w OpensSSL Toolkit &lt;https://www.openssl.org/&gt;, oprogramowanie kryptograficzne napisane przez Eric Young oraz oprogramowanie UPnP napisane przez Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Węzły z białej listy nie mogą zostać zbanowane za ataki DoS, a ich transakcje będą zawsze przekazywane, nawet jeżeli będą znajdywać się już w pamięci, przydatne np. dla bramek płatniczych</translation>
</message>
@@ -2212,12 +2699,12 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Hasło zabezpieczające portu kontrolnego Tora (domyślnie: puste)</translation>
</message>
<message>
- <source>Transaction amount too small</source>
- <translation>Zbyt niska kwota transakcji </translation>
+ <source>Tor control port to use if onion listening enabled (default: %s)</source>
+ <translation>Port kontrolny sieci Tor jeśli onion listening jest włączone (domyślnie: %s)</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Kwota transakcji musi być dodatnia</translation>
+ <source>Transaction amount too small</source>
+ <translation>Zbyt niska kwota transakcji </translation>
</message>
<message>
<source>Transaction too large for fee policy</source>
@@ -2276,10 +2763,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>-maxtxfee ma ustawioną badzo dużą wartość! Tak wysokie opłaty mogą być zapłacone w jednej transakcji.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee ma ustawioną bardzo dużą wartość! Jest to prowizja za transakcje, którą płacisz, gdy wysyłasz monety.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Nie trzymaj w pamięci transakcji starszych niż &lt;n&gt; godz. (domyślnie: %u)</translation>
</message>
@@ -2332,6 +2815,10 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Ostrzeżenie: Odtworzono dane z uszkodzonego pliku portfela! Oryginalny %s został zapisany jako %s w %s; jeśli twoje saldo lub transakcje są niepoprawne powinieneś odtworzyć kopię zapasową.</translation>
</message>
<message>
+ <source>%s is set very high!</source>
+ <translation>%s jest ustawione bardzo wysoko!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(domyślnie: %s)</translation>
</message>
@@ -2392,10 +2879,6 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Ustaw rozmiar puli kluczy na &lt;n&gt; (domyślnie: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Ustaw minimalny rozmiar bloku w bajtach (domyślnie: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Ustaw liczbę wątków do obsługi RPC (domyślnie: %d)</translation>
</message>
@@ -2420,6 +2903,14 @@ Zwróć uwagę, że poprawnie zweryfikowana wiadomość potwierdza to, że nadaw
<translation>Próg, po którym nastąpi rozłączenie węzłów nietrzymających się zasad (domyślnie: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Kwota transakcji musi być dodatnia</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>Transakcja wymaga co najmniej jednego odbiorcy</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Nieznana sieć w -onlynet: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index ee48c67341..4d49399c11 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -23,7 +23,7 @@
</message>
<message>
<source>C&amp;lose</source>
- <translation>&amp;Fechar</translation>
+ <translation>Fechar</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Excluir</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Escoha o endereço para enviar moedas</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Escolha o enereço para receber moedas</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Escol&amp;ha</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Endereços de envio</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Endereços de recebimento</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Estes são os seus endereços para enviar pagamentos. Sempre cheque a quantia e o endereço do destinatário antes de enviar moedas.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Estes são os seus endereços para receber pagamentos. É recomendado usar um novo para cada transação.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copiar endereço</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copiar rótu&amp;lo</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editar</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exportar lista de endereços</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falha na exportação</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Erro ao salvar a lista de endereço para %1. Tente novamente.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Rótuo</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem rótuo)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,90 @@
<source>Repeat new passphrase</source>
<translation>Repita a nova frase de segurança</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Insira a nova senha para a carteira.&lt;br/&gt;Favor usar uma senha com &lt;b&gt;dez ou mais caracteres aleatórios&lt;/b&gt;, ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Criptografar carteira</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Esta operação precisa da sua senha para desbloquear a carteira.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloquear carteira</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Esta operação precisa da sua senha para descriptografar a carteira</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Descriptografar carteira</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Alterar senha</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Insira a senha antiga e a nova para a carteira.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirmar criptografia da carteira</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Aviso: Se você criptografar sua carteira e perder sua senha, você vai &lt;b&gt;PERDER TODOS OS SEUS BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Tem certeza que deseja criptografar a carteira?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Carteira criptografada</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>IMPORTANTE: Qualquer backup prévio que você tenha feito da sua carteira deve ser substituído pelo novo e encriptado arquivo gerado. Por razões de segurança, qualquer backup do arquivo não criptografado se tornará inútil assim que você começar a usar uma nova carteira criptografada.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Falha ao criptografar carteira</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Falha na criptografia devido a um erro inerno. Sua carteira não foi criptografada.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>As senhas não conferem.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Falha ao desbloquear carteira</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>A senha inserida para descriptografar a carteira está incorreta.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Falha ao descriptografar a carteira</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>A senha da carteira foi alterada com êxito.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Aviso: Tecla Caps Lock ativa!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -159,6 +314,18 @@
<translation>Abrir &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Clique para desativar a atividade de rede.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Atividade de rede desativada.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Clique para ativar a atividade de rede.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Reindexando blocos no disco...</translation>
</message>
@@ -176,7 +343,7 @@
</message>
<message>
<source>&amp;Debug window</source>
- <translation>Janela de &amp;Depuração</translation>
+ <translation>Janela de &amp;depuração</translation>
</message>
<message>
<source>Open debugging and diagnostic console</source>
@@ -278,26 +445,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n bloco processado do histórico de transações.</numerusform><numerusform>%n blocos processados do histórico de transações.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dia</numerusform><numerusform>%n dias</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 e %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n ano</numerusform><numerusform>%n anos</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 atrás</translation>
@@ -332,7 +479,7 @@
</message>
<message>
<source>%1 client</source>
- <translation>cliente %1</translation>
+ <translation>%1</translation>
</message>
<message>
<source>Catching up...</source>
@@ -377,6 +524,14 @@
<translation>Transação recebida</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>Geração de chave HD está &lt;b&gt;ativada&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>Geração de chave HD está &lt;b&gt;desativada&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Carteira está &lt;b&gt;criptografada&lt;/b&gt; e atualmente &lt;b&gt;desbloqueada&lt;/b&gt;</translation>
</message>
@@ -384,6 +539,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Carteira está &lt;b&gt;criptografada&lt;/b&gt; e atualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Um erro fatal ocorreu. Bitcoin não pode continuar em segurança e irá fechar.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +563,6 @@
<translation>Quantia:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxa:</translation>
</message>
@@ -441,11 +596,11 @@
</message>
<message>
<source>Received with label</source>
- <translation>Recebido com rótulo</translation>
+ <translation>Rótulo</translation>
</message>
<message>
<source>Received with address</source>
- <translation>Recebido com endereço </translation>
+ <translation>Endereço </translation>
</message>
<message>
<source>Date</source>
@@ -460,8 +615,84 @@
<translation>Confirmado</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioridade</translation>
+ <source>Copy address</source>
+ <translation>Copiar endereço</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar rótulo</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar quantia</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID da transação</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Boquear saída</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desboquear saída</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar quantia</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar taxa</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar pós taxa</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar poeira</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar troco</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloqueada)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sim</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>não</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Este texto fica vermelho se qualquer destinatário receber uma quantidade menor que que o dust.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Pode variar +/- %1 satoshi(s) por entrada</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem rótuo)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>troco de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(troco)</translation>
</message>
</context>
<context>
@@ -486,6 +717,38 @@
<source>&amp;Address</source>
<translation>&amp;Endereço</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Novo endereço de recebimento</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Novo endereço de envio</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Editar endereço de recebimento</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Editar endereço de envio</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>O endereço digitado "%1" não é um endereço válido.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>O endereço digitado "%1" já se encontra no catálogo de endereços.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Não foi possível desbloquear a carteira</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Falha ao gerar chave</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +872,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulário</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Transações recentes podem não estar visíveis ainda, portanto o seu saldo pode estar incorreto. Esta informação será corrigida assim que sua carteira for sincronizada com a rede, como detalhado abaixo.</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>Gastar moedas de transações desconhecidas podem não ser aceitas pela rede.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Número de blocos restantes</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Desconhecido...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Horário do último bloco</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progresso</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Aumento do progresso por hora</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>calculando...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Tempo estimado para sincronizar</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ocultar</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Desconhecido. Sincroniando cabeçahos (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +940,10 @@
<source>Select payment request file</source>
<translation>Selecione o arquivo de cobrança</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Selecione o arquivo de cobrança para ser aberto</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -643,7 +961,7 @@
</message>
<message>
<source>&amp;Start %1 on system login</source>
- <translation>$Iniciar %1 ao fazer login no sistema</translation>
+ <translation>&amp;Iniciar %1 ao fazer login no sistema</translation>
</message>
<message>
<source>Size of &amp;database cache</source>
@@ -938,6 +1256,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Erro no pedido de pagamento</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Não foi possível iniciar bitcoin: manipulador click-to-pay</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Manipulação de URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>URL de cobrança é inválida: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Endereço de pagamento %1 inválido</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI não pode ser analisado! Isto pode ser causado por um endereço inválido ou parâmetros URI informados incorretamente.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Manipulação de arquivo de cobrança</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Arquivo de pedido de pagamento não pode ser lido! Isto pode ser causado por uma requisição de pagamento inválida.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Pedido de pagamento rejeitado</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Rede do pedido de pagamento não corresponde rede do cliente.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Pedido de pagamento expirado</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Pedido de pagamento não inicializado</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Pedidos de pagamento não verificados para scripts de pagamento personalizados não são suportados.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Pedido de pagamento inválido</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Valor do pagamento solicitado de %1 é muito pequeno (Considerado poeira).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reembolso de %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Pedido de pagamento %1 é muito grande (%2 bytes, permitido %3 bytes).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Erro na comunicação com %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Pedido de pagamento não pode ser analisado!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Erro na resposta do servidor: %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Erro de solicitação de rede</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Pagamento reconhecido</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -948,7 +1357,7 @@
<translation>Nó/Serviço</translation>
</message>
<message>
- <source>Ping Time</source>
+ <source>Ping</source>
<translation>Ping</translation>
</message>
</context>
@@ -990,6 +1399,72 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n segundo</numerusform><numerusform>%n segundos</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n minuto</numerusform><numerusform>%n minutos</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n dia</numerusform><numerusform>%n dias</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 e %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n ano</numerusform><numerusform>%n anos</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 ainda não terminou com segurança...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Erro: diretório de dados especificado "%1" não existe.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Erro: Não foi possível interpretar arquivo de configuração: %1. Utilize apenas a sintaxe chave=valor.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Erro: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Savar imagem</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>&amp;Copiar imagem</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Salvar código QR</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Imagem PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1150,6 +1625,10 @@
<translation>Espera de ping</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Ping min</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Offset de tempo</translation>
</message>
@@ -1187,21 +1666,13 @@
</message>
<message>
<source>Debug log file</source>
- <translation>Arquivo de log de Depuração</translation>
+ <translation>Arquivo de log de depuração</translation>
</message>
<message>
<source>Clear console</source>
<translation>Limpar console</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Desconectar Nó</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Banir nó por</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hora</translation>
</message>
@@ -1218,8 +1689,16 @@
<translation>1 &amp;ano</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Desbanir nó</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Desconectar</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Banir por</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>&amp;Desbanir</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1234,6 +1713,14 @@
<translation>Digite &lt;b&gt;help&lt;/b&gt; para uma visão geral dos comandos disponíveis.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>AVISO: Scammers atacam essa área, dizendo aos usuários que comandos digitar aqui, roubando informações da carteira. Não use este console sem entender completamente as ramificações do comando.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>Atividade da rede disativada</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B</translation>
</message>
@@ -1352,6 +1839,22 @@
<source>Remove</source>
<translation>Remover</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>Copiar URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar rótulo</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copiar mensagem</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar quantia</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,6 +1874,73 @@
<source>&amp;Save Image...</source>
<translation>&amp;Salvar Imagem...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Pedido de pagamento para %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Informação do pagamento</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Quantia</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Rótuo</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensagem</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI resultante muito longa. Tente reduzir o texto do rótulo ou da mensagem.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Erro ao codigicar o URI em código QR</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Rótuo</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensagem</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem rótuo)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(sem mensagem)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(nenhuma quantia solicitada)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Solicitado</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1407,10 +1977,6 @@
<translation>Quantia:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxa:</translation>
</message>
@@ -1479,10 +2045,6 @@
<translation>(Smart fee não iniciado. Isso requer alguns blocos...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Tempo de confirmação:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1507,6 +2069,10 @@
<translation>Poeira:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Confirmando tempo alvo:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>Limpar Tudo</translation>
</message>
@@ -1522,6 +2088,122 @@
<source>S&amp;end</source>
<translation>Enviar</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar quantia</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar quantia</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar taxa</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar pós taxa</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Copiar poeira</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar troco</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 a %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Tem certeza que deseja enviar?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>adicionado como taxa da transação </translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Quantia tota %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>ou</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Confirme o envio de moedas</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Endereço de envio inváido. Favor checar.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>A quantia à pagar deve ser maior que 0</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>A quantia excede o seu saldo</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>O total excede o seu saldo quando a taxa da transação %1 é incluída</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Endereço duplicado encontrado: Endereços devem ser usados somente uma vez cada.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Falha na criação da transação</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>A transação foi negada pela seguinte razão: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Uma taxa maior que %1 é considerada uma taxa absurdamente alta.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Pedido de pagamento expirado</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n bloco</numerusform><numerusform>%n blocos</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Pagar somente a taxa requerida de %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Confirmação em %n bloco.</numerusform><numerusform>Confirmação em %n blocos.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Aviso: Endereço inválido</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Aviso: Endereço de troco inválido</translation>
+ </message>
+ <message>
+ <source>Confirm custom change address</source>
+ <translation>Confirmar endereço de troco personalizado</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem rótuo)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1567,7 +2249,7 @@
</message>
<message>
<source>The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
- <translation>A taxa será deduzida da quantia sendo enviada. O destinatário receberá menos bitcoins do que você colocou no campo de quantidade. Se varios destinatários estão selecionados, a taxa é dividida igualmente.</translation>
+ <translation>A taxa será deduzida da quantia que está sendo enviada. O destinatário receberá menos bitcoins do que você colocou no campo de quantidade. Se vários destinatários estão selecionados, a taxa é dividida igualmente.</translation>
</message>
<message>
<source>S&amp;ubtract fee from amount</source>
@@ -1601,10 +2283,25 @@
<source>Memo:</source>
<translation>Memorizar:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Digite um rótulo para este endereço para adicioná-lo ao catálogo de endereços</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Sim</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 está desligando...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>Não desligue o computador até que esta janela desapareça.</translation>
</message>
@@ -1695,6 +2392,58 @@
<source>Reset all verify message fields</source>
<translation>Limpar todos os campos de assinatura da mensagem</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Clique em "Assinar mensagem" para gerar a assinatura</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>O endereço digitado é inválido</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Favor checar o endereço e tente novamente</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>O endereço fornecido não se refere a uma chave.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>O desbloqueio da carteira foi cancelado</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>A chave privada do endereço inserido não está disponível</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Falha ao assinar mensagem</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Mensagem assinada</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>A assinatura não pode ser descodificada</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Favor checar a assinatura e tente novamente</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>A assinatura não corresponde a mensagem</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Falha na verificação da mensagem</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Mensagem verificada</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1711,11 +2460,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Abrir para mais %n bloco</numerusform><numerusform>Abrir para mais %n blocos</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Aberto até %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>conflitado com uma transação com %1 confirmações</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/offline</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/não confirmado, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>na memória</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>não na memóra</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>abandonado</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/não confirmado</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 confirmações</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Status</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, ainda não foi propagada na rede com êxito.</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, transmitido aravés de %n nó</numerusform><numerusform>, transmitido aravés de %n nós</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Fonte</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Gerado</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>De</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>desconhecido</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Para</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>próprio endereço</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>monitorado</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>rótulo</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Crédito</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>maduro em mais %n bloco</numerusform><numerusform>maduro em mais %n blocos</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>não aceito</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Débito</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Débito total</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Crédito total</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Taxa da transação</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Valor líquido</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Mensagem</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Comentário</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID da transação</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Tamanho tota da transação</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Index da saída</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Mercador</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Moedas recém minerados precisam aguardar %1 blocos antes de serem gastos. Quando o bloco foi gerado, ele foi disseminado pela rede para ser adicionado à blockchain. Se ele falhar em ser inserido na cadeia, seu estado será modificado para "não aceito" e ele não poderá ser gasto. Isso pode acontecer eventualmente quando blocos são gerados quase que simultaneamente.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Depurar informação</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Transação</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Entradas</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Quantia</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>verdadeiro</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>falso</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Este painel mostra uma descrição detalhada da transação</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Detalhes para %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Rótuo</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Aberto por mais %n bloco</numerusform><numerusform>Aberto por mais %n blocos</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Aberto até %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Offline</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Não confirmado</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Abandonado</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Confirmando (%1 de %2 confirmações recomendadas)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Confirmado (%1 confirmações)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>Conflitado</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Recém-criado (%1 confirmações, disponível somente após %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Este bloco não foi recebido por nenhum outro participante da rede e provavelmente não será aceito!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Gerado mas não aceito</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recebido</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Recebido</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado para</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pagamento para você mesmo</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minerado</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>monitorado</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(n/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem rótuo)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Status da transação. Passe o mouse sobre este campo para mostrar o número de confirmações.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Data e hora em que a transação foi recebida.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Tipo de transação</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Mostrar ou não endereços monitorados na lista de transações.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Intenção/Propósito definido pelo usuário para a transação</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Quantidade debitada ou creditada ao saldo.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Todos</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Hoje</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>Essa semana</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>Esse mês</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>Último mês</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>Este ano</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Intervalo...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Recebido</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Enviado para</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Para você mesmo</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minerado</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Outro</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Procure um endereço ou rótulo</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Quantia mínima</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Transação abandonada</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar endereço</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar rótulo</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar quantia</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar ID da transação</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Copiar o raw da transação</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Copiar dados completos da transação</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Editar rótulo</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Mostrar detalhes da transação</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Exportar histórico de transações</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Comma separated file (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmado</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Monitorado</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Tipo</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Rótuo</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Falha na exportação</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Ocorreu um erro ao tentar salvar o histórico de transações em %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Exportação feita com êxito</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>O histórico de transação foi gravado com êxito em %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Intervalo: </translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>para</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1725,6 +2923,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Nenhuma carteira carregada</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Enviar moedas</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Exportar</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exportar os dados da guia atual para um arquivo</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Backup da carteira</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Dados da carteira (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Falha no backup</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Ocorreu um erro ao tentar salvar os dados da carteira em %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Êxito no backup</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Os dados da carteira foram salvos com êxito em %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1747,24 +2994,36 @@
<translation>Aceitar linha de comando e comandos JSON-RPC</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Aceitar conecções de entrada (padrão: 1 sem -proxy ou -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>Conectar somente a nós específicos; -noconnect ou -connect=0 sozinhos para desativar conecções automáticas</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Distribuído sob a MIT software license, veja o arquivo %s ou %s</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Se &lt;category&gt; não for suprida ou se &lt;category&gt; = 1, mostrar toda informação de depuração.</translation>
</message>
<message>
<source>Prune configured below the minimum of %d MiB. Please use a higher number.</source>
- <translation>Corte configurado abaixo do nível mínimo de %d de MiB. Por favor use um número mais alto.</translation>
+ <translation>Prune configurado abaixo do mínimo de %d MiB. Por favor use um número mais alto.</translation>
</message>
<message>
<source>Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
- <translation>Corte: a ultima sincronização da carteira foi além do dado comprimido. Você precisa reindexar ( -reindex , faça o download de toda a blockchain novamente)</translation>
+ <translation>Prune: A ultima sincronização da carteira foi além do dado comprimido. Você precisa reindexar (fazer o download de toda a blockchain novamente)</translation>
</message>
<message>
<source>Reduce storage requirements by pruning (deleting) old blocks. This mode is incompatible with -txindex and -rescan. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
- <translation>Reduza os requerimentos de armazenamento de dados (cortando) deletando blocos mais antigos. Esse modo é incompatível com -txindex e -rescan. Cuidado: Reverter essa configuração requer um novo download de toda a blockchain. (Padrão: 0 = desabilita o corte de blocos, &gt;%u = tamanho alvo em MiB para o uso de blocos cortados)</translation>
+ <translation>Reduza o armazenamento de dados apagando os blocos mais antigos. Esse modo é incompatível com -txindex e -rescan. Cuidado: Reverter essa configuração requer um novo download de toda a blockchain. (Padrão: 0 = desabilitado, &gt;%u = tamanho em MiB para o uso de blocos cortados)</translation>
</message>
<message>
<source>Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.</source>
- <translation>Rescans não são possíveis no modo de corte. Você precisa usar -reindex, que irá fazer o download de toda a blockchain novamente.</translation>
+ <translation>Rescans não são possíveis no modo prune. Você precisa usar -reindex, que irá fazer o download de toda a blockchain novamente.</translation>
</message>
<message>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
@@ -1787,16 +3046,12 @@
<translation>Não foi possível iniciar o servidor HTTP. Veja o log para detaihes.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Aceitar conexões externas (padrão: 1 se opções -proxy ou -connect não estiverem presentes)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
- <translation>Bitcoin</translation>
+ <translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee está muito alta! Essa é a taxa de transação que você vai pagar quando a taxa estimada não estiver disponível.</translation>
+ <source>The %s developers</source>
+ <translation>Desenvolvedores do %s</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1819,10 +3074,6 @@
<translation>Apaga todas as transações da carteira e somente recupera essas partes da blockchain usando o comando -rescan na inicialização</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuido sob a licença MIT software license. Veja os termos em &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Erro ao carregar %s. Não é permitido habilitar HD em carteiras não-HD pre existentes.</translation>
</message>
@@ -1835,12 +3086,8 @@
<translation>Executa um comando quando uma transação da carteira mudar (%s no comando será substituído por TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Força a retransmissão de transações de pares da lista branca, mesmo quando violam a política local de retransmissão (default: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
- <translation>A mediana máxima permitida de peer time compensa o ajuste. Perspectiva local de horário pode ser influenciada por pares à frente ou atrás neste montante. (padrão: %u segundos)</translation>
+ <translation>A media máxima permitida de peer time compensa o ajuste. Perspectiva local de horário pode ser influenciada por pares à frente ou atrás neste montante. (padrão: %u segundos)</translation>
</message>
<message>
<source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
@@ -1864,23 +3111,35 @@
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>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.</translation>
+ <translation>Este é um build de teste pré-lançamento - use por sua conta e risco - não use para mineração ou comércio.</translation>
+ </message>
+ <message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Não foi possível reanalisar o banco de dados para o estado pre-fork. Você precisa rebaixar o blockchain</translation>
</message>
<message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Use UPnP para mapear a porta escutada (padrão: 1 quando escutando e sem -proxy)</translation>
</message>
<message>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>A carteira não irá criar transações que vioem o imite de memória (padrão: %u)</translation>
+ </message>
+ <message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
<translation>Atenção: A rede não parecem concordar plenamente! Alguns mineiros parecem estar enfrentando problemas.</translation>
</message>
<message>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Atenção: Nós não parecemos concordar plenamente com nossos colegas! Você pode precisar atualizar ou outros nós podem precisar atualizar.</translation>
+ <translation>Atenção: Nós não parecemos concordar plenamente com nossos nós! Você pode precisar atualizar ou outros nós podem precisar atualizar.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Lista Branca pares de ligação da máscara de rede dado ou o endereço IP . Pode ser especificado várias vezes.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>Você precisa reconstruir o banco de dados utilizando -reindex-chainstate para mudar -txindex</translation>
+ </message>
+ <message>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s corrompido, recuperação falhou</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1903,14 +3162,26 @@
<translation>Opções de criação de blocos:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conectar apenas a cliente(s) específico(s)</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>Impossível resolver -%s endereço: '%s'</translation>
+ </message>
+ <message>
+ <source>Chain selection options:</source>
+ <translation>Opções da rede:</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>Índice de mudança fora da faixa.</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Opções de conexão:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>Detectado Banco de dados de blocos corrompido</translation>
</message>
@@ -1955,6 +3226,22 @@
<translation>Erro ao inicializar ambiente de banco de dados de carteira %s!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>Erro ao carregar %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet corrupted</source>
+ <translation>Erro ao carregar %s Carteira corrompida</translation>
+ </message>
+ <message>
+ <source>Error loading %s: Wallet requires newer version of %s</source>
+ <translation>Erro ao carregar %s A carteira requer a versão mais nova do %s</translation>
+ </message>
+ <message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Erro ao carregar %s: Você não pode desabilitar HD numa já existente carteira HD.</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Erro ao carregar banco de dados de blocos</translation>
</message>
@@ -1979,10 +3266,18 @@
<translation>Bloco gênese incorreto ou não encontrado. Datadir errado para a rede?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>O teste de integridade de inicialização falhou. O %s está sendo desligado.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Endereço -onion inválido: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -%s=&lt;amount&gt;: '%s'</source>
+ <translation>Valor inválido para -%s=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
<source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
<translation>Valor inválido para -fallbackfee=&lt;amount&gt;: '%s'</translation>
</message>
@@ -1991,12 +3286,12 @@
<translation>Mantenha a mempool de transações abaixo de &lt;n&gt; megabytes (padrão: %u)</translation>
</message>
<message>
- <source>Location of the auth cookie (default: data dir)</source>
- <translation>Localização do cookie de autenticação (padrão: diretório de dados)</translation>
+ <source>Loading banlist...</source>
+ <translation>Carregando lista de banidos...</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Número mínimo de bytes por sigop em transações que transmitimos e mineramos (default: %u)</translation>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Localização do cookie de autenticação (padrão: diretório de dados)</translation>
</message>
<message>
<source>Not enough file descriptors available.</source>
@@ -2007,16 +3302,32 @@
<translation>Somente conectar a clientes na rede &lt;net&gt; (ipv4, ipv6 ou onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Mostra essa mensagem de ajuda e sai</translation>
+ </message>
+ <message>
<source>Print version and exit</source>
- <translation>Mostra a versão e sai</translation>
+ <translation>Mostra a versão e fecha</translation>
</message>
<message>
<source>Prune cannot be configured with a negative value.</source>
- <translation>O modo Prune não pode ser configurado com um valor negativo.</translation>
+ <translation>O modo prune não pode ser configurado com um valor negativo.</translation>
</message>
<message>
<source>Prune mode is incompatible with -txindex.</source>
- <translation>O modo Prune é incompatível com -txindex.</translation>
+ <translation>O modo prune é incompatível com -txindex.</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Reconstruir índice de cadeia de bloco a partir dos arquivos blk*.dat no disco</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Reconstruir estado a partir dos blocos indexados</translation>
+ </message>
+ <message>
+ <source>Rewinding blocks...</source>
+ <translation>Reanalizando blocos...</translation>
</message>
<message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
@@ -2031,6 +3342,10 @@
<translation>Especifique o arquivo da carteira (dentro do diretório de dados)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>O código fonte está disponível pelo %s</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Argumento não suportado -benchmark ignorado, use -debug=bench.</translation>
</message>
@@ -2047,6 +3362,10 @@
<translation>Use UPnP para mapear a porta de entrada (padrão: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Usar a rede de testes</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Comentário do Agente de Usuário (%s) contém caracteres inseguros.</translation>
</message>
@@ -2063,6 +3382,14 @@
<translation>Carteira %s reside fora do diretório de dados %s</translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Opções de depuração/teste da Carteira</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>A Carteira precisou ser reescrita: reinicie o %s para completar</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Opções da carteira:</translation>
</message>
@@ -2092,7 +3419,7 @@
</message>
<message>
<source>Execute command when a relevant alert is received or we see a really long fork (%s in cmd is replaced by message)</source>
- <translation>Executa um comando quando um alerta relevante é recebido ou vemos uma longa segregação (%s em cmd é substituído pela mensagem)</translation>
+ <translation>Executa um comando quando um alerta relevante é recebido ou vemos uma longa segregação (%s é substituída pela mensagem)</translation>
</message>
<message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source>
@@ -2104,17 +3431,13 @@
</message>
<message>
<source>Invalid amount for -maxtxfee=&lt;amount&gt;: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
- <translation>Valor inválido para -maxtxfee = &lt;valor&gt;: '%s'( precisa ser pelo menos a comissão mínima de %s para prevenir travamento de transações)</translation>
+ <translation>Valor inválido para -maxtxfee=&lt;valor&gt;: '%s' (precisa ser pelo menos a taxa mínima de %s para prevenir que a transação nunca seja confirmada)</translation>
</message>
<message>
<source>Maximum size of data in data carrier transactions we relay and mine (default: %u)</source>
<translation>Tamanho máximo de dados em transações de dados de operadora (padrão %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Buscar por endereços de peers via busca DNS, se estiver baixo em endereços (padrão: 1 a não ser que -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Gerar credenciais aleatórias para cada conexão por proxy. Isto habilita o isolamento de stream do Tor (padrão: %u)</translation>
</message>
@@ -2127,8 +3450,8 @@
<translation>A quantia da transação é muito pequena para mandar </translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Esse produto inclui software desenvolvido pelo Open SSL Project para uso na OpenSSL Toolkit &lt;https://www.openssl.org&gt; e software criptográfico escrito por Eric Young e software UPnP escrito por Thomas Bernard. </translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Usar carteira HD. Somente tem efeito na criação de uma nova carteira</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2239,10 +3562,6 @@
<translation>Quantidade da transação muito pequena.</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>As quantidades das transações devem ser positivas.</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transação muito grande para enviar sem taxa</translation>
</message>
@@ -2307,18 +3626,22 @@
<translation>-maxtxfee é muito alto! Essa quantia poderia ser paga em uma única transação.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee é muito alto! Este é o valor da taxa de transação que você irá pagar se enviar a transação.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Não manter transações na mempool por mais que &lt;n&gt; horas (padrão: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Número mínimo de bytes por assinatura em transações que transmitimos e mineramos (default: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Comissões (em %s/kB) menores serão consideradas como zero para criação de transação (padrão %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Força a retransmissão de transações de pares da lista branca, mesmo quando violam a política local de retransmissão (default: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Quão completa a verificação de blocos do -checkblocks é (0-4, padrão: %u)</translation>
</message>
@@ -2335,10 +3658,26 @@
<translation>Informação de saída de debug (padrão: %u, definir &lt;category&gt; é opcional)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Buscar por endereços de peers via DNS, se estiver baixo em endereços (padrão: 1 a não ser que -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>Define a criação do raw da transação ou bloco em modo não verbal, não segwit (0) ou segwit (1) (padrão: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Suportar filtragem de blocos e transações com filtros bloom (padrão: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Esta é a taxa que você deve pagar quando a taxa estimada não está disponível.</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>Esse produto inclui um software desenvolvido pelo OpenSSL Project para uso na OpenSSL Toolkit %s e software criptográfico escrito por Eric Young e software UPnP escrito por Thomas Bernard. </translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>O tamanho total da string de versão da rede (%i) excede o tamanho máximo (%i). Reduza o numero ou tamanho de uacomments.</translation>
</message>
@@ -2359,14 +3698,22 @@
<translation>Use um proxy SOCKS5 separado para alcançar participantes da rede via serviços ocultos Tor (padrão: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Nome de usuário e senha hash para conexões JSON-RPC. O campo &lt;userpw&gt; vem com o formato: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Um script python canônico é incluído em share/rpcuser. Essa opção pode ser especificada múltiplas vezes.</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Aviso: Versões de bloco desconhecidas sendo mineradas! É possível que regras estranhas estejam ativas</translation>
</message>
<message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>Atenção: Arquivo da carteira corrompido, dados recuperados! Original %s salvo como %s em %s; se seu saldo ou transações estiverem incorretos, você deve restaurar o backup.</translation>
+ </message>
+ <message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Lista Branca de conecções do endereço IP informado (ex: 1.2.3.4) ou com máscara de rede (ex: 1.2.3.0/24). Pode ser especificado várias vezes.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s está muito alto!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(padrão: %s)</translation>
</message>
@@ -2387,6 +3734,10 @@
<translation>Endereço -proxy inválido: '%s'</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>Erro na Keypool, favor executar keypoolrefill primeiro</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>Escutar por conexões JSON-RPC na porta &lt;port&gt; (padrão: %u ou testnet: %u)</translation>
</message>
@@ -2427,8 +3778,8 @@
<translation>Defina o tamanho da chave para piscina&lt;n&gt; (padrão: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Definir tamanho mínimo do bloco, em bytes (padrão: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Define a altura máxima BIP141 do bloco (padrão: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2451,10 +3802,38 @@
<translation>Gastar troco não confirmado quando enviar transações (padrão: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Iniciando análise da rede...</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>A carteira irá evitar pagar menos que a taxa mínima.</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Esta é a taxa mínima que você deve pagar em cada transação.</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Esta é a taxa que você irá pagar se enviar a transação.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Limite para desconectar peers mal comportados (padrão: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>As quantidades das transações devem ser positivas.</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>A transação demorou muito na memória</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>A transação deve ter ao menos um destinatário</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Rede desconhecida especificada em -onlynet: '%s'</translation>
</message>
@@ -2488,7 +3867,7 @@
</message>
<message>
<source>Done loading</source>
- <translation>Carregamento terminado</translation>
+ <translation>Carregamento terminado!</translation>
</message>
<message>
<source>Error</source>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index eed262e010..7bfb3e710d 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -41,24 +41,159 @@
<source>&amp;Delete</source>
<translation>&amp;Eliminar</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Escolha o endereço para enviar as moedas</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Escolha o endereço para receber as moedas</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>Escol&amp;her</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>A enviar endereços</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>A receber endereços</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Copiar Endereço</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Copiar &amp;Etiqueta</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Editar</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exportar Lista de Endereços</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Ficheiro separado por vírgulas (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportação Falhou</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Ocorreu um erro ao tentar guardar a lista de endereços para %1. Por favor, tente novamente.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem etiqueta)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
- <translation>Janela da frase de palavra-passe</translation>
+ <translation>Janela da Frase de Segurança</translation>
</message>
<message>
<source>Enter passphrase</source>
- <translation>Insira a frase de palavra-passe</translation>
+ <translation>Insira a frase de segurança</translation>
</message>
<message>
<source>New passphrase</source>
- <translation>Nova frase de palavra-passe</translation>
+ <translation>Nova frase de frase de segurança</translation>
</message>
<message>
<source>Repeat new passphrase</source>
- <translation>Repita a nova frase de palavra-passe</translation>
+ <translation>Repita a nova frase de frase de segurança</translation>
+ </message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Insira a nova frase de segurança para a carteira. &lt;br/&gt; Por favor, utilize uma frase de segurança de &lt;b&gt;10 ou mais carateres aleatórios,&lt;/b&gt; ou &lt;b&gt;oito ou mais palavras&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Encriptar carteira</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Esta operação precisa da sua frase de segurança da carteira para desbloquear a mesma.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Desbloquear carteira</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Esta operação precisa da sua frase de segurança da carteira para desencriptar a mesma.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Desencriptar carteira</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Alterar frase de segurança</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Insira a frase de segurança antiga e a nova frase de segurança para a carteira.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Confirmar encriptação da carteira</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Aviso: se encriptar a sua carteira e perder a sua frase de segurnça, &lt;b&gt;PERDERÁ TODOS OS SEUS BITCOINS&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Tem a certeza que deseja encriptar a sua carteira?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Carteira encriptada</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Encriptação da carteira falhou</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>As frases de segurança fornecidas não coincidem.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Desbloqueio da carteira falhou</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Desencriptação da carteira falhou</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>A frase de segurança da carteira foi alterada com sucesso.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Aviso: a tecla Caps Lock está ligada!</translation>
</message>
</context>
<context>
@@ -84,7 +219,7 @@
</message>
<message>
<source>&amp;Overview</source>
- <translation>&amp;Sinopse</translation>
+ <translation>&amp;Resumo</translation>
</message>
<message>
<source>Node</source>
@@ -92,7 +227,7 @@
</message>
<message>
<source>Show general overview of wallet</source>
- <translation>Mostrar sinopse geral da carteira</translation>
+ <translation>Mostrar resumo geral da carteira</translation>
</message>
<message>
<source>&amp;Transactions</source>
@@ -112,19 +247,19 @@
</message>
<message>
<source>&amp;About %1</source>
- <translation>&amp;Acerca de %1</translation>
+ <translation>&amp;Sobre o %1</translation>
</message>
<message>
<source>Show information about %1</source>
- <translation>Mostrar informação sobre %1</translation>
+ <translation>Mostrar informação sobre o %1</translation>
</message>
<message>
<source>About &amp;Qt</source>
- <translation>Sobre &amp;Qt</translation>
+ <translation>Sobre o &amp;Qt</translation>
</message>
<message>
<source>Show information about Qt</source>
- <translation>Mostrar informação sobre Qt</translation>
+ <translation>Mostrar informação sobre o Qt</translation>
</message>
<message>
<source>&amp;Options...</source>
@@ -140,11 +275,11 @@
</message>
<message>
<source>&amp;Backup Wallet...</source>
- <translation>&amp;Guardar Carteira...</translation>
+ <translation>Efetuar &amp;Cópia de Segurança da Carteira...</translation>
</message>
<message>
<source>&amp;Change Passphrase...</source>
- <translation>Alterar &amp;Frase de Palavra-passe...</translation>
+ <translation>Alterar &amp;Frase de Segurança...</translation>
</message>
<message>
<source>&amp;Sending addresses...</source>
@@ -159,12 +294,24 @@
<translation>Abrir &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Clique para desativar a atividade de rede.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Atividade de rede desativada.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Clique para ativar novamente a atividade de rede.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>A reindexar os blocos no disco...</translation>
</message>
<message>
<source>Send coins to a Bitcoin address</source>
- <translation>Enviar moedas para um endereço bitcoin</translation>
+ <translation>Enviar moedas para um endereço Bitcoin</translation>
</message>
<message>
<source>Backup wallet to another location</source>
@@ -172,11 +319,11 @@
</message>
<message>
<source>Change the passphrase used for wallet encryption</source>
- <translation>Alterar a frase de palavra-passe utilizada na encriptação da carteira</translation>
+ <translation>Alterar a frase de segurança utilizada na encriptação da carteira</translation>
</message>
<message>
<source>&amp;Debug window</source>
- <translation>Janela de &amp;depuração</translation>
+ <translation>Janela de &amp;Depuração</translation>
</message>
<message>
<source>Open debugging and diagnostic console</source>
@@ -216,7 +363,7 @@
</message>
<message>
<source>Sign messages with your Bitcoin addresses to prove you own them</source>
- <translation>Assine mensagens com os seus endereços Bitcoin para provar que os controla</translation>
+ <translation>Assine as mensagens com os seus endereços Bitcoin para provar que é o proprietário dos mesmos</translation>
</message>
<message>
<source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
@@ -278,26 +425,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Processado %n bloco do histórico de transações.</numerusform><numerusform>Processados %n blocos do histórico de transações.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hora</numerusform><numerusform>%n horas</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dia</numerusform><numerusform>%n dias</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n semana</numerusform><numerusform>%n semanas</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 e %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n ano</numerusform><numerusform>%n anos</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 em atraso</translation>
@@ -327,6 +454,10 @@
<translation>Atualizado</translation>
</message>
<message>
+ <source>%1 client</source>
+ <translation>Cliente %1</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Recuperando o atraso...</translation>
</message>
@@ -369,6 +500,14 @@
<translation>Transação recebida</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>Criação de chave HD está &lt;b&gt;ativada&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>Criação de chave HD está &lt;b&gt;desativada&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>A carteira está &lt;b&gt;encriptada&lt;/b&gt; e atualmente &lt;b&gt;desbloqueada&lt;/b&gt;</translation>
</message>
@@ -376,7 +515,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>A carteira está &lt;b&gt;encriptada&lt;/b&gt; e atualmente &lt;b&gt;bloqueada&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -396,10 +535,6 @@
<translation>Valor:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxa:</translation>
</message>
@@ -452,8 +587,72 @@
<translation>Confirmada</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioridade</translation>
+ <source>Copy address</source>
+ <translation>Copiar endereço</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar valor</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar Id. da transação</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Bloquear não gasto</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Desbloquear não gasto</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar quantidade</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar taxa</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar depois da taxa</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar troco</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 bloqueado)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>sim</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>não</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem etiqueta)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>troco de %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(troco)</translation>
</message>
</context>
<context>
@@ -478,12 +677,20 @@
<source>&amp;Address</source>
<translation>E&amp;ndereço</translation>
</message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Não foi possível desbloquear a carteira.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>A criação da nova chave falhou.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
<message>
<source>A new data directory will be created.</source>
- <translation>Irá ser criada uma nova diretoria de dados.</translation>
+ <translation>Será criada uma nova diretoria de dados.</translation>
</message>
<message>
<source>name</source>
@@ -495,7 +702,7 @@
</message>
<message>
<source>Path already exists, and is not a directory.</source>
- <translation>Caminho já existe, e não é uma pasta.</translation>
+ <translation>O caminho já existe, e este não é uma pasta.</translation>
</message>
<message>
<source>Cannot create data directory here.</source>
@@ -514,7 +721,7 @@
</message>
<message>
<source>About %1</source>
- <translation>Sobre %1</translation>
+ <translation>Sobre o %1</translation>
</message>
<message>
<source>Command-line options</source>
@@ -534,11 +741,11 @@
</message>
<message>
<source>Choose data directory on startup (default: %u)</source>
- <translation>Escolha a diretoria dos dados no arranque (predefinição: %u)</translation>
+ <translation>Escolher a pasta de dados no arranque (predefinição: %u)</translation>
</message>
<message>
<source>Set language, for example "de_DE" (default: system locale)</source>
- <translation>Definir linguagem, por exemplo "pt_PT" (por defeito: linguagem do sistema)</translation>
+ <translation>Definir idioma, por exemplo "pt_PT" (predefinição: idioma do sistema)</translation>
</message>
<message>
<source>Start minimized</source>
@@ -546,13 +753,17 @@
</message>
<message>
<source>Set SSL root certificates for payment request (default: -system-)</source>
- <translation>Configurar certificados SSL root para pedido de pagamento (default: -system-)</translation>
+ <translation>Definir certificados de raiz SSL para pedidos de pagamento (predefinição: -system-)</translation>
</message>
<message>
<source>Show splash screen on startup (default: %u)</source>
<translation>Mostrar o ecrã de abertura no arranque (predefinição: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Redefinir todas as definições alteradas na GUI</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -561,19 +772,19 @@
</message>
<message>
<source>Welcome to %1.</source>
- <translation>Bem-vindo a %1.</translation>
+ <translation>Bem-vindo ao %1.</translation>
</message>
<message>
<source>Use the default data directory</source>
- <translation>Utilizar a diretoria de dados predefinida</translation>
+ <translation>Utilizar a pasta de dados predefinida</translation>
</message>
<message>
<source>Use a custom data directory:</source>
- <translation>Utilizar uma diretoria de dados personalizada:</translation>
+ <translation>Utilizar uma pasta de dados personalizada:</translation>
</message>
<message>
<source>Error: Specified data directory "%1" cannot be created.</source>
- <translation>Erro: não pode ser criada a diretoria de dados especificada como "%1.</translation>
+ <translation>Erro: não pode ser criada a pasta de dados especificada como "%1.</translation>
</message>
<message>
<source>Error</source>
@@ -589,6 +800,45 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulário</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Número de blocos restantes</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Desconhecido...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Data do último bloco</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Progresso</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>a calcular...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>tempo restante estimado até à sincronização</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ocultar</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Desconhecido. Sincronização de Cabeçalhos (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -604,7 +854,11 @@
</message>
<message>
<source>Select payment request file</source>
- <translation>Seleccione o ficheiro de pedido de pagamento</translation>
+ <translation>Selecione o ficheiro de pedido de pagamento</translation>
+ </message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Selecione o ficheiro de pedido de pagamento para abrir</translation>
</message>
</context>
<context>
@@ -619,7 +873,7 @@
</message>
<message>
<source>Automatically start %1 after logging in to the system.</source>
- <translation>Começar o %1 automaticamente ao iniciar a sessão no sistema.</translation>
+ <translation>Iniciar automaticamente o %1 depois de iniciar a sessão no sistema.</translation>
</message>
<message>
<source>&amp;Start %1 on system login</source>
@@ -647,7 +901,7 @@
</message>
<message>
<source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
- <translation>Endereço IP do proxy (p.ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+ <translation>Endereço de IP do proxy (exemplo, IPv4: 127.0.0.1 / IPv6: ::1)</translation>
</message>
<message>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source>
@@ -688,15 +942,15 @@
</message>
<message>
<source>Expert</source>
- <translation> Especialistas </translation>
+ <translation> Técnicos</translation>
</message>
<message>
<source>Enable coin &amp;control features</source>
- <translation>Ativar as funcionalidades de controlo de moedas</translation>
+ <translation>Ativar as funcionalidades de &amp;controlo de moedas</translation>
</message>
<message>
<source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
- <translation>No caso de desativar o gasto de troco não confirmado, o troco de uma transação não poderá ser utilizado até que essa transação tenha pelo menos uma confirmação. Isto também afeta o cálculo do seu saldo.</translation>
+ <translation>Se desativar o gasto de troco não confirmado, o troco de uma transação não pode ser utilizado até que essa transação tenha pelo menos uma confirmação. Isto também afeta o cálculo do seu saldo.</translation>
</message>
<message>
<source>&amp;Spend unconfirmed change</source>
@@ -763,6 +1017,10 @@
<translation>&amp;Janela</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>&amp;Ocultar o ícone da bandeja do sistema.</translation>
+ </message>
+ <message>
<source>Hide tray icon</source>
<translation>Ocultar ícone da bandeja</translation>
</message>
@@ -828,7 +1086,7 @@
</message>
<message>
<source>This change would require a client restart.</source>
- <translation>Esta alteração requer um reinício do cliente.</translation>
+ <translation>Esta alteração obrigará a um reinício do cliente.</translation>
</message>
<message>
<source>The supplied proxy address is invalid.</source>
@@ -911,6 +1169,37 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Erro do pedido de pagamento</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Pedido de pagamento rejeitado</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Pedido de pagamento expirado.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>O pedido de pagamento não foi inicializado.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Pedido de pagamento inválido.</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Reembolso de %1</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Erro ao comunicar com %1: %2</translation>
+ </message>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -920,11 +1209,7 @@
<source>Node/Service</source>
<translation>Nó/Serviço</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Tempo de Latência</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -963,7 +1248,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 e %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1159,14 +1454,6 @@
<translation>Limpar consola</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Desligar Nó</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Banir Nó por</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hora</translation>
</message>
@@ -1183,10 +1470,6 @@
<translation>1 &amp;ano</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Desbloquear Nó</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>Bem-vindo à consola RPC da %1.</translation>
</message>
@@ -1317,6 +1600,14 @@
<source>Remove</source>
<translation>Remover</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar valor</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1336,7 +1627,30 @@
<source>&amp;Save Image...</source>
<translation>&amp;Salvar Imagem...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Valor</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem etiqueta)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1372,10 +1686,6 @@
<translation>Quantia:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioridade:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxa:</translation>
</message>
@@ -1389,7 +1699,7 @@
</message>
<message>
<source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
- <translation>Se isto estiver ativo, mas o endereço de troco estiver vazio ou for inválido, o troco irá ser enviado para um novo endereço.</translation>
+ <translation>Se isto estiver ativo, mas o endereço de troco estiver vazio ou for inválido, o troco será enviado para um novo endereço gerado.</translation>
</message>
<message>
<source>Custom change address</source>
@@ -1397,7 +1707,7 @@
</message>
<message>
<source>Transaction Fee:</source>
- <translation>Custo da Transação:</translation>
+ <translation>Taxa da transação:</translation>
</message>
<message>
<source>Choose...</source>
@@ -1405,7 +1715,7 @@
</message>
<message>
<source>collapse fee-settings</source>
- <translation>fechar definições-de custos</translation>
+ <translation>ocultar definições de taxa</translation>
</message>
<message>
<source>per kilobyte</source>
@@ -1413,7 +1723,7 @@
</message>
<message>
<source>If the custom fee is set to 1000 satoshis and the transaction is only 250 bytes, then "per kilobyte" only pays 250 satoshis in fee, while "total at least" pays 1000 satoshis. For transactions bigger than a kilobyte both pay by kilobyte.</source>
- <translation>Se a taxa fixa for 1000 satoshis e a transação for somente 250 bytes, pagará somente 250 satoshis "por kilobyte" em custos se trasacionar "pelo menos" 1000 satoshis. Transações superiores a um kilobyte são cobradas por kilobyte.</translation>
+ <translation>Se a taxa personalizada estiver definida para 1.000 satoshis e a transação é de apenas 250 bytes, então paga apenas 250 satoshis "por kilobyte" na taxa, enquanto em "total pelo menos" paga 1.000 satoshis. Para transações superiores a um kilobyte ambos pagam por kilobyte.</translation>
</message>
<message>
<source>Hide</source>
@@ -1441,11 +1751,7 @@
</message>
<message>
<source>(Smart fee not initialized yet. This usually takes a few blocks...)</source>
- <translation>(Taxa inteligente ainda não foi acionada. Normalmente demora alguns blocos...)</translation>
- </message>
- <message>
- <source>Confirmation time:</source>
- <translation>Tempo de confirmação:</translation>
+ <translation>(A taxa inteligente ainda não foi inicializada. Isto normalmente demora alguns blocos...)</translation>
</message>
<message>
<source>normal</source>
@@ -1487,6 +1793,62 @@
<source>S&amp;end</source>
<translation>E&amp;nviar</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Copiar quantidade</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar valor</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Copiar taxa</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Copiar depois da taxa</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Copiar bytes</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Copiar troco</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>adicionado como taxa de transação</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>O total excede o seu saldo quando a taxa de transação %1 está incluída.</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Uma taxa superior a %1 é considerada uma taxa altamente absurda.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Pedido de pagamento expirado.</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Pague apenas a taxa obrigatória de %1</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Aviso: endereço de troco desconhecido</translation>
+ </message>
+ <message>
+ <source>Confirm custom change address</source>
+ <translation>Confirmar endereço de troco personalizado</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem etiqueta)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1536,7 +1898,7 @@
</message>
<message>
<source>S&amp;ubtract fee from amount</source>
- <translation>S&amp;ubtrair taxa ao montante</translation>
+ <translation>S&amp;ubtrair a taxa ao montante</translation>
</message>
<message>
<source>Message:</source>
@@ -1566,7 +1928,10 @@
<source>Memo:</source>
<translation>Memorando:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1664,7 +2029,7 @@
<source>Reset all verify message fields</source>
<translation>Repor todos os campos de verificação de mensagem</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1680,12 +2045,69 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Taxa de transação</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Valor</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Esta janela mostra uma descrição detalhada da transação</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(sem etiqueta)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Copy address</source>
+ <translation>Copiar endereço</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Copiar etiqueta</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Copiar valor</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Copiar Id. da transação</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Ficheiro separado por vírgulas (*.csv)</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiqueta</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Endereço</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Exportação Falhou</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1694,6 +2116,19 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Exportar os dados no separador atual para um ficheiro</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1741,7 +2176,7 @@
</message>
<message>
<source>Fee (in %s/kB) to add to transactions you send (default: %s)</source>
- <translation>Taxa (em %s/kB) a adicionar às transacções que envia (padrão: %s)</translation>
+ <translation>Taxa (em %s/kB) para adicionar às transações que envia (predefinição: %s)</translation>
</message>
<message>
<source>Pruning blockstore...</source>
@@ -1756,18 +2191,10 @@
<translation>Não é possível iniciar o servidor HTTP. Verifique o debug.log para detalhes.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Aceitar ligações externas (padrão: 1 sem -proxy ou -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee está definida muito elevada! Esta é a taxa de transação pode poderá pagar quando as estimativas de taxas não estão disponíveis.</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>Uma percentagem da taxa (em %s/kB) que será utilizada quando a estimativa da taxa tiver dados insuficientes (predefinição: %s)</translation>
</message>
@@ -1784,16 +2211,8 @@
<translation>Apague todas as transações da carteira e somente restore aquelas que façam parte do blockchain através de re-scan ao reiniciar o programa</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuido através da licença de software MIT, verifique o ficheiro anexado COPYING ou &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
- <translation>Executar comando quando uma das transações na carteira mudar (no comando, %s é substituído pelo ID da Transação)</translation>
- </message>
- <message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Forçar retransmissão das transações a partir dos pares da lista branca, mesmo que estes violem a política de retransmissão local (predefinição: %d)</translation>
+ <translation>Executar o comando quando uma transação da carteira muda (no comando, %s é substituído pela Id. da Transação)</translation>
</message>
<message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
@@ -1804,26 +2223,10 @@
<translation>A base de dados de blocos contém um bloco que aparenta ser do futuro. Isto pode ser causado por uma data incorrecta definida no seu computador. Reconstrua apenas a base de dados de blocos caso tenha a certeza de que a data e hora do seu computador estão correctos.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Esta é uma versão de testes pré-lançamento - use à sua responsabilidade - não usar para minar ou aplicações comerciais</translation>
- </message>
- <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Utilizar UPnP para mapear a porta de escuta (predefinição: 1 quando escutar e sem -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Aviso: A rede não parece estar completamente de acordo! Parece que alguns mineiros estão com dificuldades técnicas.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Atenção: Parecemos não estar de acordo com os nossos pares! Poderá ter que atualizar o seu cliente, ou outros nós poderão ter que atualizar os seus clientes.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Ligações na lista branca conectam desde a seguinte netmask ou endereço IP. Posse ser especificado varias vezes.</translation>
- </message>
- <message>
<source>-maxmempool must be at least %d MB</source>
<translation>- máximo do banco de memória deverá ser pelo menos %d MB</translation>
</message>
@@ -1844,10 +2247,6 @@
<translation>Opções da criação de bloco:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Apenas ligar ao(s) nó(s) especificado(s)</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opções de ligação:</translation>
</message>
@@ -1952,10 +2351,6 @@
<translation>Localização de cookie de autorização (predefinição: diretoria de dados)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Mínimo de bytes por sigop nas transações que nós transmitimos e mine (predefinição: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Os descritores de ficheiros disponíveis são insuficientes.</translation>
</message>
@@ -2057,7 +2452,7 @@
</message>
<message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for relaying, mining and transaction creation (default: %s)</source>
- <translation>Taxas (em %s/kB) abaixo deste valor são consideradas nulas para propagação, mineração e criação de transacções (padrão: %s)</translation>
+ <translation>Taxas (em %s/kB) inferiores a este valor são consideradas nulas para propagação, mineração e criação de transações (predefinição: %s)</translation>
</message>
<message>
<source>If paytxfee is not set, include enough fee so transactions begin confirmation on average within n blocks (default: %u)</source>
@@ -2072,10 +2467,6 @@
<translation>Tamanho máximo dos dados em transacções que incluem dados que propagamos e mineramos (padrão: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Encontrar pares usando DNS lookup, caso o número de endereços seja reduzido (padrão: 1 excepto -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Usar credenciais aleatórias por cada ligação proxy. Permite que o Tor use stream isolation (padrão: %u)</translation>
</message>
@@ -2088,10 +2479,6 @@
<translation>O montante da transacção é demasiado baixo após a dedução da taxa</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Este produto inclui software desenvolvido pelo OpenSSL Project para utilização no OpenSSL Toolkit &lt;https://www.openssl.org/&gt; e software criptográfico escrito por Eric Young e software UPnP escrito por Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Os pares enviados para a lista branca não podem ser DoS banidos e as suas transações são sempre retransmitidas, mesmo que já estejam no banco de memória, útil, por exemplo, para um acesso</translation>
</message>
@@ -2200,10 +2587,6 @@
<translation>Quantia da transação é muito baixa</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Quantia da transação deverá ser positiva</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transacção demasiado grande para a política de taxas</translation>
</message>
@@ -2249,7 +2632,7 @@
</message>
<message>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
- <translation>Executar comando quando o melhor bloco mudar (no comando, %s é substituído pela hash do bloco)</translation>
+ <translation>Executar o comando quando o melhor bloco muda (no comando, %s é substituído pela hash do bloco)</translation>
</message>
<message>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
@@ -2268,10 +2651,6 @@
<translation>-maxtxfee está definido com um valor muito alto! Taxas desta magnitude podem ser pagas numa única transacção.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee está definido com um valor muito alto! Esta é a taxa que irá pagar se enviar uma transacção.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Não guardar transações no banco de memória por mais de &lt;n&gt; horas (predefinição: %u)</translation>
</message>
@@ -2320,10 +2699,6 @@
<translation>Use um proxy SOCKS5 separado para alcançar pares via serviços ocultos do Tor (padrão: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Username e hash da password para ligações JSON-RPC. O campo &lt;userpw&gt; está no formato: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Um script python está incluido em share/rpcuser. Esta opção pode ser especificada múltiplas vezes.</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Atenção: Versões desconhecidas de blocos estão a ser mineradas! É possível que regras desconhecias estão a ser efetuadas</translation>
</message>
@@ -2388,10 +2763,6 @@
<translation>Definir tamanho do banco de memória da chave para &lt;n&gt; (predefinição: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Definir tamanho minímo de um bloco em bytes (por defeito: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Defina o número de processos para servir as chamadas RPC (por defeito: %d)</translation>
</message>
@@ -2409,7 +2780,7 @@
</message>
<message>
<source>Spend unconfirmed change when sending transactions (default: %u)</source>
- <translation>Gastar troco não confirmado ao enviar transacções (padrão: %u)</translation>
+ <translation>Gastar o troco não confirmado quando enviar transações (predefinição: %u)</translation>
</message>
<message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
diff --git a/src/qt/locale/bitcoin_ro.ts b/src/qt/locale/bitcoin_ro.ts
index 270a4ba062..ef87f1056a 100644
--- a/src/qt/locale/bitcoin_ro.ts
+++ b/src/qt/locale/bitcoin_ro.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>Șterge</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,59 +63,653 @@
<source>Repeat new passphrase</source>
<translation>Repetati noua parolă</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Netmask</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Blocat până</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
+ <message>
+ <source>Sign &amp;message...</source>
+ <translation>Semnează &amp;mesajul...</translation>
+ </message>
+ <message>
+ <source>Synchronizing with network...</source>
+ <translation>Se sincronizează cu rețeaua</translation>
+ </message>
+ <message>
+ <source>Node</source>
+ <translation>Nod</translation>
+ </message>
+ <message>
+ <source>Show general overview of wallet</source>
+ <translation>Arată o prezentare generală a portofelului.</translation>
+ </message>
+ <message>
+ <source>&amp;Transactions</source>
+ <translation>&amp;Tranzacții</translation>
+ </message>
+ <message>
+ <source>Browse transaction history</source>
+ <translation>Navighează în istoricul tranzacțiilor</translation>
+ </message>
+ <message>
+ <source>Quit application</source>
+ <translation>Părăsește aplicația</translation>
+ </message>
+ <message>
+ <source>About &amp;Qt</source>
+ <translation>Despre &amp;Qt</translation>
+ </message>
+ <message>
+ <source>Show information about Qt</source>
+ <translation>Arată informații despre Qt</translation>
+ </message>
+ <message>
+ <source>&amp;Options...</source>
+ <translation>&amp;Opțiuni...</translation>
+ </message>
+ <message>
+ <source>&amp;Encrypt Wallet...</source>
+ <translation>&amp;Criptează portofelul...</translation>
+ </message>
+ <message>
+ <source>&amp;Backup Wallet...</source>
+ <translation>&amp;Backup portofel</translation>
+ </message>
+ <message>
+ <source>&amp;Change Passphrase...</source>
+ <translation>&amp;Schimbă parola...</translation>
+ </message>
+ <message>
+ <source>&amp;Sending addresses...</source>
+ <translation>&amp;Trimite adresele...</translation>
+ </message>
+ <message>
+ <source>&amp;Receiving addresses...</source>
+ <translation>&amp;Primește adresele...</translation>
+ </message>
+ <message>
+ <source>Open &amp;URI...</source>
+ <translation>Deschide &amp;URI...</translation>
+ </message>
+ <message>
+ <source>Send coins to a Bitcoin address</source>
+ <translation>Trimite monedele către o adresă Bitcoin</translation>
+ </message>
+ <message>
+ <source>Backup wallet to another location</source>
+ <translation>Fă o copie de rezervă a portofelului într-o altă locație</translation>
+ </message>
+ <message>
+ <source>Change the passphrase used for wallet encryption</source>
+ <translation>Schimbă parola folosită pentru criptarea portofelului</translation>
+ </message>
+ <message>
+ <source>&amp;Debug window</source>
+ <translation>&amp;Fereastra pentru depanare</translation>
+ </message>
+ <message>
+ <source>Open debugging and diagnostic console</source>
+ <translation>Pornește consola pentru depanare si diagnoză</translation>
+ </message>
+ <message>
+ <source>&amp;Verify message...</source>
+ <translation>&amp;Verifică mesajul...</translation>
+ </message>
+ <message>
+ <source>Bitcoin</source>
+ <translation>Bitcoin</translation>
+ </message>
+ <message>
+ <source>Wallet</source>
+ <translation>Portofel</translation>
+ </message>
+ <message>
+ <source>&amp;Send</source>
+ <translation>&amp;Trimite</translation>
+ </message>
+ <message>
+ <source>&amp;Receive</source>
+ <translation>&amp;Primește</translation>
+ </message>
+ <message>
+ <source>&amp;Show / Hide</source>
+ <translation>&amp;Arată/Ascunde</translation>
+ </message>
+ <message>
+ <source>Show or hide the main Window</source>
+ <translation>Arată sau ascunde fereastra principală</translation>
+ </message>
+ <message>
+ <source>Encrypt the private keys that belong to your wallet</source>
+ <translation>Criptează cheile private care aparțin portofelului tău.</translation>
+ </message>
+ <message>
+ <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+ <translation>Semnează mesajele cu adresa ta de Bitcoin pentru a face dovada că îți aparțin.</translation>
+ </message>
+ <message>
+ <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+ <translation>Verifică mesajele cu scopul de a asigura faptul că au fost semnate cu adresa de Bitcoin specificată.</translation>
+ </message>
+ <message>
+ <source>&amp;File</source>
+ <translation>&amp;Fișier</translation>
+ </message>
+ <message>
+ <source>&amp;Settings</source>
+ <translation>&amp;Setări</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Ajutor</translation>
+ </message>
+ <message>
+ <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+ <translation>Cerere plată (generează coduri QR și bitcoin: URIs)</translation>
+ </message>
+ <message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Deschide un bitcoin: URI sau cerere de plată</translation>
+ </message>
+ <message>
+ <source>%1 behind</source>
+ <translation>%1 în urmă</translation>
+ </message>
+ <message>
+ <source>Last received block was generated %1 ago.</source>
+ <translation>Ultimul bloc primit a fost generat acum %1</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Eroare</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Atenționare</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Informație</translation>
+ </message>
+ <message>
+ <source>Up to date</source>
+ <translation>Actual</translation>
+ </message>
+ <message>
+ <source>Date: %1
+</source>
+ <translation>Data: %1</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Cantitate: %1</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tip: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Etichetă: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Adresa: %1
+</translation>
+ </message>
+ <message>
+ <source>Sent transaction</source>
+ <translation>Trimite tranzacția</translation>
+ </message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+ <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; și în prezent &lt;b&gt;deblocat&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+ <translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; și în prezent &lt;b&gt;blocat&lt;/b&gt;</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
+ <message>
+ <source>Coin Selection</source>
+ <translation>Selecția monedelor</translation>
+ </message>
+ <message>
+ <source>Quantity:</source>
+ <translation>Cantitatea:</translation>
+ </message>
+ <message>
+ <source>Bytes:</source>
+ <translation>Biți:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Cantitate:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Taxa:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>După taxă:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Schimbă:</translation>
+ </message>
+ <message>
+ <source>Tree mode</source>
+ <translation>Mod arbore</translation>
+ </message>
+ <message>
+ <source>List mode</source>
+ <translation>Mod listă</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Cantitate</translation>
+ </message>
+ <message>
+ <source>Received with address</source>
+ <translation>Primit cu adresa</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Confirmations</source>
+ <translation>Confirmări</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Confirmat</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
+ <message>
+ <source>Edit Address</source>
+ <translation>Modifică adresa</translation>
+ </message>
+ <message>
+ <source>&amp;Address</source>
+ <translation>&amp;Adresa</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
+ <message>
+ <source>name</source>
+ <translation>Nume</translation>
+ </message>
+ <message>
+ <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <translation>Directoriul există deja. Adaugă %1 dacă ai intenționat să creezi aici un directoriu nou.</translation>
+ </message>
</context>
<context>
<name>HelpMessageDialog</name>
+ <message>
+ <source>version</source>
+ <translation>versiune</translation>
+ </message>
+ <message>
+ <source>(%1-bit)</source>
+ <translation>(%1-bit)</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Pornește minimalizat</translation>
+ </message>
</context>
<context>
<name>Intro</name>
+ <message>
+ <source>Welcome</source>
+ <translation>Bine ai venit!</translation>
+ </message>
+ <message>
+ <source>Use the default data directory</source>
+ <translation>Folosește directoriul pentru date din modul implicit.</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Eroare</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n GB of free space available</source>
+ <translation><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform><numerusform>%n GB de spațiu liber disponibil</numerusform></translation>
+ </message>
+ </context>
+<context>
+ <name>ModalOverlay</name>
</context>
<context>
<name>OpenURIDialog</name>
+ <message>
+ <source>Open URI</source>
+ <translation>Deschide URI</translation>
+ </message>
+ <message>
+ <source>URI:</source>
+ <translation>URI:</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
+ <message>
+ <source>Options</source>
+ <translation>Opțiuni</translation>
+ </message>
+ <message>
+ <source>MB</source>
+ <translation>MB</translation>
+ </message>
+ <message>
+ <source>Accept connections from outside</source>
+ <translation>Acceptă conexiuni externe</translation>
+ </message>
+ <message>
+ <source>Allow incoming connections</source>
+ <translation>Acceptă conexiunea care sosește</translation>
+ </message>
+ <message>
+ <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+ <translation>Adresa IP a proxy-ului (ex. IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+ </message>
+ <message>
+ <source>&amp;Reset Options</source>
+ <translation>&amp;Resetează opțiunile</translation>
+ </message>
+ <message>
+ <source>&amp;Network</source>
+ <translation>&amp;Rețea</translation>
+ </message>
+ <message>
+ <source>Expert</source>
+ <translation>Expert</translation>
+ </message>
+ <message>
+ <source>Proxy &amp;IP:</source>
+ <translation>Proxy &amp;IP:</translation>
+ </message>
+ <message>
+ <source>&amp;Port:</source>
+ <translation>&amp;Port:</translation>
+ </message>
+ <message>
+ <source>Port of the proxy (e.g. 9050)</source>
+ <translation>Portul pentru proxy (ex.: 9050)</translation>
+ </message>
+ <message>
+ <source>IPv4</source>
+ <translation>IPv4</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
+ <source>&amp;Window</source>
+ <translation>&amp;Fereastra</translation>
+ </message>
+ <message>
+ <source>&amp;OK</source>
+ <translation>&amp;OK</translation>
+ </message>
+ <message>
+ <source>&amp;Cancel</source>
+ <translation>&amp;Anulează</translation>
+ </message>
+ <message>
+ <source>default</source>
+ <translation>inițial</translation>
+ </message>
+ <message>
+ <source>none</source>
+ <translation>fără</translation>
+ </message>
+ <message>
+ <source>Confirm options reset</source>
+ <translation>Confirmă resetarea opțiunilor</translation>
+ </message>
+ <message>
+ <source>Client restart required to activate changes.</source>
+ <translation>Repornirea clientului este necesară pentru ca schimbările să fie activate</translation>
+ </message>
+ <message>
+ <source>Client will be shut down. Do you want to proceed?</source>
+ <translation>Clientul va fi oprit. Dorești sa continui?</translation>
+ </message>
+ <message>
+ <source>This change would require a client restart.</source>
+ <translation>Această schimbare necesită repornirea clientului.</translation>
+ </message>
</context>
<context>
<name>OverviewPage</name>
+ <message>
+ <source>Available:</source>
+ <translation>Disponibil:</translation>
+ </message>
+ <message>
+ <source>Total:</source>
+ <translation>Total:</translation>
+ </message>
+ <message>
+ <source>Recent transactions</source>
+ <translation>Tranzacții recente</translation>
+ </message>
+ </context>
+<context>
+ <name>PaymentServer</name>
</context>
<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
+ <message>
+ <source>Amount</source>
+ <translation>Cantitate</translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 și %2</translation>
+ </message>
</context>
<context>
- <name>RPCConsole</name>
+ <name>QObject::QObject</name>
</context>
<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
+ <name>RPCConsole</name>
+ <message>
+ <source>Client version</source>
+ <translation>Versiunea clientului</translation>
+ </message>
+ <message>
+ <source>&amp;Information</source>
+ <translation>&amp;Informații</translation>
+ </message>
+ <message>
+ <source>Debug window</source>
+ <translation>Fereastra pentru depanare</translation>
+ </message>
+ <message>
+ <source>General</source>
+ <translation>General</translation>
+ </message>
+ <message>
+ <source>Network</source>
+ <translation>Rețea</translation>
+ </message>
+ <message>
+ <source>Name</source>
+ <translation>Nume</translation>
+ </message>
+ <message>
+ <source>Number of connections</source>
+ <translation>Numărul de conexiuni</translation>
+ </message>
+ <message>
+ <source>Received</source>
+ <translation>Primit</translation>
+ </message>
+ <message>
+ <source>Sent</source>
+ <translation>Trimis</translation>
+ </message>
+ <message>
+ <source>Direction</source>
+ <translation>Direcția</translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation>Versiune</translation>
+ </message>
+ <message>
+ <source>Connection Time</source>
+ <translation>Durata conexiunii</translation>
+ </message>
+ <message>
+ <source>&amp;Open</source>
+ <translation>&amp;Deschide</translation>
+ </message>
+ <message>
+ <source>&amp;Console</source>
+ <translation>&amp;Consolă</translation>
+ </message>
+ <message>
+ <source>1 &amp;hour</source>
+ <translation>1 &amp;ore</translation>
+ </message>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1 &amp;zi</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1 &amp;săptămână</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1 &amp;an</translation>
+ </message>
+ <message>
+ <source>%1 B</source>
+ <translation>%1 B</translation>
+ </message>
+ <message>
+ <source>%1 KB</source>
+ <translation>%1 KB</translation>
+ </message>
+ <message>
+ <source>%1 MB</source>
+ <translation>%1 MB</translation>
+ </message>
+ <message>
+ <source>%1 GB</source>
+ <translation>%1 GB</translation>
+ </message>
+ <message>
+ <source>Yes</source>
+ <translation>Da</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Nu</translation>
+ </message>
+ <message>
+ <source>Unknown</source>
+ <translation>Necunoscut</translation>
+ </message>
+</context>
+<context>
<name>ReceiveCoinsDialog</name>
+ <message>
+ <source>&amp;Message:</source>
+ <translation>&amp;Mesaj:</translation>
+ </message>
+ <message>
+ <source>Show</source>
+ <translation>Arată</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Elimină</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Salvează imaginea...</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
</context>
<context>
<name>SendCoinsDialog</name>
+ <message>
+ <source>Quantity:</source>
+ <translation>Cantitatea:</translation>
+ </message>
+ <message>
+ <source>Bytes:</source>
+ <translation>Biți:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Cantitate:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Taxa:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>După taxă:</translation>
+ </message>
+ <message>
+ <source>Change:</source>
+ <translation>Schimbă:</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -125,12 +722,46 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
- <name>bitcoin-core</name>
+ <name>WalletFrame</name>
</context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
+ <name>bitcoin-core</name>
+ <message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Informație</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Atenționare</translation>
+ </message>
+ <message>
+ <source>Error</source>
+ <translation>Eroare</translation>
+ </message>
+</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 489ed07639..92fc87f4f2 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Şterge</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Repetaţi noua frază de acces</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -258,26 +261,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>S-a procesat %n bloc din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n blocuri din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n de blocuri din istoricul tranzacţiilor.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n oră</numerusform><numerusform>%n ore</numerusform><numerusform>%n ore</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n zi</numerusform><numerusform>%n zile</numerusform><numerusform>%n de zile</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n săptămână</numerusform><numerusform>%n săptămâni</numerusform><numerusform>%n de săptămâni</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 şi %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n an</numerusform><numerusform>%n ani</numerusform><numerusform>%n de ani</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 în urmă</translation>
@@ -356,7 +339,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Portofelul este &lt;b&gt;criptat&lt;/b&gt; iar în momentul de faţă este &lt;b&gt;blocat&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -376,10 +359,6 @@
<translation>Sumă:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritate:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxă:</translation>
</message>
@@ -431,11 +410,7 @@
<source>Confirmed</source>
<translation>Confirmat</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioritate</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -458,7 +433,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresă</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -565,6 +540,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Data ultimului bloc</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ascunde</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +572,7 @@
<source>Select payment request file</source>
<translation>Selectaţi fişierul cerere de plată</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -858,6 +848,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -867,11 +860,7 @@
<source>Node/Service</source>
<translation>Nod/Serviciu</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Timp ping</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -910,7 +899,21 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 şi %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Salvează imaginea...</translation>
+ </message>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1074,10 +1077,6 @@
<translation>Curăţă consola</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Deconectare nod</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;oră</translation>
</message>
@@ -1216,7 +1215,7 @@
<source>Remove</source>
<translation>Înlătură</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1235,7 +1234,14 @@
<source>&amp;Save Image...</source>
<translation>&amp;Salvează imaginea...</translation>
</message>
-</context>
+ <message>
+ <source>Amount</source>
+ <translation>Cantitate</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1271,10 +1277,6 @@
<translation>Sumă:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritate:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Taxă:</translation>
</message>
@@ -1323,10 +1325,6 @@
<translation>Personalizat:</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Timp confirmare:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1366,7 +1364,7 @@
<source>S&amp;end</source>
<translation>Trimit&amp;e</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1429,7 +1427,10 @@
<source>Memo:</source>
<translation>Memo:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1519,7 +1520,7 @@
<source>Reset all verify message fields</source>
<translation>Resetează toate cîmpurile mesajelor semnate</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1535,12 +1536,25 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Amount</source>
+ <translation>Cantitate</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Acest panou arată o descriere detaliată a tranzacţiei</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1549,6 +1563,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1575,10 +1598,6 @@
<translation>Rulează în fundal ca un demon şi acceptă comenzi</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Acceptă conexiuni din afară (implicit: 1 dacă nu se foloseşte -proxy sau -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Nucleul Bitcoin</translation>
</message>
@@ -1587,10 +1606,6 @@
<translation>Ataşaţi adresei date şi ascultaţi totdeauna pe ea. Folosiţi notaţia [host]:port pentru IPv6</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuit sub licenţa de programe MIT/X11, vezi fişierul însoţitor COPYING sau &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Execută comanda cînd o tranzacţie a portofelului se schimbă (%s în cmd este înlocuit de TxID)</translation>
</message>
@@ -1599,18 +1614,6 @@
<translation>Setează numărul de thread-uri de verificare a script-urilor (%u la %d, 0 = auto, &lt;0 = lasă atîtea nuclee libere, implicit: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Aceasta este o versiune de test preliminară - vă asumaţi riscul folosind-o - nu folosiţi pentru minerit sau aplicaţiile comercianţilor</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Atenţie: Reţeaua nu pare să fie de acord în totalitate! Aparent nişte mineri au probleme.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Atenţie: Aparent, nu sîntem de acord cu toţi partenerii noştri! Va trebui să faceţi o actualizare, sau alte noduri necesită actualizare.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; poate fi:</translation>
</message>
@@ -1619,10 +1622,6 @@
<translation>Opţiuni creare bloc:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Conectare doar la nod(urile) specificate</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Opţiuni conexiune:</translation>
</message>
@@ -1731,10 +1730,6 @@
<translation>Setează mărimea pentru tranzacţiile prioritare/taxe mici în octeţi (implicit: %d)</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Acest produs include programe dezvoltate de către Proiectul OpenSSL pentru a fi folosite în OpenSSL Toolkit &lt;https://www.openssl.org/&gt; şi programe criptografice scrise de către Eric Young şi programe UPnP scrise de către Thomas Bernard.</translation>
- </message>
- <message>
<source>(default: %u)</source>
<translation>(implicit: %u)</translation>
</message>
@@ -1803,10 +1798,6 @@
<translation>Suma tranzacţionată este prea mică</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Sumele tranzacţionate trebuie să fie pozitive</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Tranzacţie prea mare pentru politică gratis</translation>
</message>
@@ -1863,10 +1854,6 @@
<translation>Adresa -proxy nevalidă: '%s'</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Setare mărime minimă bloc în octeţi (implicit: %u)</translation>
- </message>
- <message>
<source>Specify configuration file (default: %s)</source>
<translation>Specificaţi fişierul configuraţie (implicit: %s)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 60f5d5dfa2..11fa2f7fea 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>&amp;Удалить</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Выберите адрес для отправки перевода</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Выберите адрес для получения перевода</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>&amp;Выбрать</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Адреса отправки</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Адреса получения</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Это ваши адреса Bitcoin для отправки платежей. Всегда проверяйте количество и адрес получателя перед отправкой перевода.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Это ваши адреса Bitcoin для приёма платежей. Рекомендуется использовать новый адрес получения для каждой транзакции.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>Копировать &amp;адрес</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Копировать &amp;метку</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Правка</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Экспортировать список адресов</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Текст, разделённый запятыми (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Экспорт не удался</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Произошла ошибка при сохранении списка адресов в %1. Пожалуйста, попробуйте еще раз.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(нет метки)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>Повторите новый пароль</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Введите новый пароль бумажника.&lt;br/&gt;Используйте пароль, состоящий из &lt;b&gt;десяти или более случайных символов&lt;/b&gt;, или &lt;b&gt;восьми или более слов&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Зашифровать бумажник</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Для выполнения операции требуется пароль вашего бумажника.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Разблокировать бумажник</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Для выполнения операции требуется пароль вашего бумажника.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Расшифровать бумажник</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Сменить пароль</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Введите старый и новый пароль для бумажника.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Подтвердите шифрование бумажника</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Предупреждение: если вы зашифруете бумажник и потеряете пароль, вы &lt;b&gt;ПОТЕРЯЕТЕ ВСЕ ВАШИ БИТКОИНЫ&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Вы уверены, что хотите зашифровать ваш бумажник?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Бумажник зашифрован</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>Сейчас %1 закроется для завершения процесса шифрования. Помните, что шифрование вашего бумажника не может полностью защитить ваши биткоины от кражи с помощью инфицирования вашего компьютера вредоносным ПО.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>ВАЖНО: все предыдущие резервные копии вашего бумажника должны быть заменены новым зашифрованным файлом. В целях безопасности предыдущие резервные копии незашифрованного бумажника станут бесполезны, как только вы начнёте использовать новый зашифрованный бумажник.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Не удалось зашифровать бумажник</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Шифрование бумажника не удалось из-за внутренней ошибки. Ваш бумажник не был зашифрован.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Введённые пароли не совпадают.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Разблокировка бумажника не удалась</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Неверный пароль для расшифровки бумажника.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Расшифровка бумажника не удалась</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Пароль бумажника успешно изменён.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Внимание: Caps Lock включен!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -159,6 +318,18 @@
<translation>Открыть &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>Кликните, чтобы запретить сетевую активность.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>Сетевая активность запрещена.</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>Кликните, чтобы снова разрешить сетевую активность.</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>Идёт переиндексация блоков на диске...</translation>
</message>
@@ -278,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Обработан %n блок истории транзакций.</numerusform><numerusform>Обработано %n блока истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform><numerusform>Обработано %n блоков истории транзакций.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform><numerusform>%n часов</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n день</numerusform><numerusform>%n дня</numerusform><numerusform>%n дней</numerusform><numerusform>%n дней</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n неделю</numerusform><numerusform>%n недели</numerusform><numerusform>%n недель</numerusform><numerusform>%n недель</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 и %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n год</numerusform><numerusform>%n лет</numerusform><numerusform>%n лет</numerusform><numerusform>%n года</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 позади</translation>
@@ -327,6 +478,10 @@
<translation>Синхронизировано</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Показать помощь по %1, чтобы получить список доступных параметров командной строки</translation>
+ </message>
+ <message>
<source>%1 client</source>
<translation>%1 клиент</translation>
</message>
@@ -373,6 +528,14 @@
<translation>Входящая транзакция</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>Генерация HD-ключей &lt;b&gt;разрешена&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>Генерация HD-ключей &lt;b&gt;запрещена&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;разблокирован&lt;/b&gt;</translation>
</message>
@@ -380,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Бумажник &lt;b&gt;зашифрован&lt;/b&gt; и в настоящее время &lt;b&gt;заблокирован&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>Произошла неисправимая ошибка. Bitcoin не может безопасно продолжать работу и будет закрыт.</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -400,10 +567,6 @@
<translation>Сумма:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комиссия:</translation>
</message>
@@ -456,8 +619,84 @@
<translation>Подтверждено</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Приоритет</translation>
+ <source>Copy address</source>
+ <translation>Копировать адрес</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копировать метку</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копировать сумму</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Копировать ID транзакции</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>Заблокировать непотраченное</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Разблокировать непотраченное</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Копировать количество</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Копировать комиссию</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Копировать после комиссии</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Копировать байты</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Копировать пыль</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Копировать сдачу</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(%1 заблокировано)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>да</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>нет</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>Эта метка станет красной, если любой получатель получит сумму меньше, чем текущий порог пыли.</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>Может отличаться на +/- %1 сатоши на вход.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(нет метки)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>сдача с %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(сдача)</translation>
</message>
</context>
<context>
@@ -482,6 +721,38 @@
<source>&amp;Address</source>
<translation>&amp;Адрес</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Новый адрес получения</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Новый адрес отправки</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Изменить адрес получения</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>Изменить адрес отправки</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>Введённый адрес "%1" не является правильным Bitcoin-адресом.</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Введённый адрес "%1" уже находится в адресной книге.</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Не удается разблокировать бумажник.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Генерация нового ключа не удалась.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -605,6 +876,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Форма</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>Недавние транзакции могут быть пока не видны, поэтому ваш баланс может отображаться некорректно. Эта информация станет корректной, как только ваш бумажник будет синхронизирован с сетью, см. подробности ниже.</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>Попытка потратить биткоины из ещё не отображённых транзакций будет отвергнута сетью.</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>Число оставшихся блоков</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>Неизвестно...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Время последнего блока</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>Прогресс</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>Прогресс за час</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>расчёт...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>Примерное время до завершения синхронизации</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Скрыть</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>Неизвестно. Синхронизация заголовков (%1)...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -622,6 +944,10 @@
<source>Select payment request file</source>
<translation>Выбрать файл запроса платежа</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>Выберите файл запроса платежа</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -655,7 +981,7 @@
</message>
<message>
<source>Accept connections from outside</source>
- <translation>Разрешать соединения извне</translation>
+ <translation>Принимать входящие соединения</translation>
</message>
<message>
<source>Allow incoming connections</source>
@@ -934,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>Ошибка запроса платежа</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>Не удаётся запустить bitcoin: обработчик click-to-pay</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>Обработка URI</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>Неверный URL запроса платежа: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>Неверный адрес платежа %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>Не удалось обработать URI! Это может быть связано с неверным адресом Bitcoin или неправильными параметрами URI.</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>Обработка файла запроса платежа</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>Файл запроса платежа не может быть прочитан! Обычно это происходит из-за неверного файла запроса платежа.</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>Запрос платежа отклонён</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>Сеть запроса платежа не совпадает с сетью клиента.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Запрос платежа просрочен.</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>Запрос платежа не инициализирован.</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>Непроверенные запросы платежей с нестандартными платёжными сценариями не поддерживаются.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Неверный запрос платежа.</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Запрошенная сумма платежа %1 слишком мала (считается пылью).</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>Возврат от %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>Запрос платежа %1 слишком большой (%2 байтов, разрешено %3 байтов).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Ошибка связи с %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Запрос платежа не может быть разобран!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Плохой ответ сервера %1</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>Ошибка сетевого запроса</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>Платёж принят</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -944,8 +1361,12 @@
<translation>Узел/сервис</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Время задержки</translation>
+ <source>NodeId</source>
+ <translation>Id узла</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Пинг</translation>
</message>
</context>
<context>
@@ -986,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1 мс</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n секунда</numerusform><numerusform>%n секунды</numerusform><numerusform>%n секунд</numerusform><numerusform>%n секунд</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n минута</numerusform><numerusform>%n минут</numerusform><numerusform>%n минут</numerusform><numerusform>%n минут</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n час</numerusform><numerusform>%n часа</numerusform><numerusform>%n часов</numerusform><numerusform>%n часов</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n день</numerusform><numerusform>%n дня</numerusform><numerusform>%n дней</numerusform><numerusform>%n дней</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n неделя</numerusform><numerusform>%n недели</numerusform><numerusform>%n недель</numerusform><numerusform>%n недель</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 и %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n год</numerusform><numerusform>%n года</numerusform><numerusform>%n лет</numerusform><numerusform>%n лет</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 ещё не завершился безопасно...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>Ошибка: указанный каталог "%1" не существует.</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>Ошибка: не удалось разобрать конфигурационный файл: %1. Используйте синтаксис вида ключ=значение.</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>Ошибка: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>&amp;Сохранить изображение...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>Копировать &amp;изображение</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>Сохранить QR-код</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>Изображение PNG (*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1146,6 +1633,10 @@
<translation>Время задержки</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Мин. пинг</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>Смещение времени</translation>
</message>
@@ -1190,14 +1681,6 @@
<translation>Очистить консоль</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Отключить узел</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Заблокировать узел на</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;час</translation>
</message>
@@ -1214,8 +1697,16 @@
<translation>1 &amp;год</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Разблокировать узел</translation>
+ <source>&amp;Disconnect</source>
+ <translation>&amp;Отключиться</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>Бан на</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>&amp;Разбанить</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1230,6 +1721,14 @@
<translation>Напишите &lt;b&gt;help&lt;/b&gt; для просмотра доступных команд.</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>ВНИМАНИЕ: мошенники предлагали пользователям вводить сюда команды, похищая таким образом содержимое их бумажников. Не используйте эту консоль без полного понимания смысла команд.</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>Сетевая активность запрещена</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 Б</translation>
</message>
@@ -1348,6 +1847,22 @@
<source>Remove</source>
<translation>Удалить</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>Копировать URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копировать метку</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Копировать сообщение</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копировать сумму</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1367,6 +1882,73 @@
<source>&amp;Save Image...</source>
<translation>&amp;Сохранить изображение...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Запросить платёж на %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Информация платежа</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Сумма</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Сообщение</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>Получившийся URI слишком длинный, попробуйте сократить текст метки / сообщения.</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Ошибка кодирования URI в QR-код</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Сообщение</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(нет метки)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(нет сообщения)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(нет запрошенной суммы)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>Запрошено</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1403,10 +1985,6 @@
<translation>Сумма:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Приоритет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комиссия:</translation>
</message>
@@ -1475,10 +2053,6 @@
<translation>(Умная комиссия пока не инициализирована. Обычно для этого требуется несколько блоков...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Время подтверждения:</translation>
- </message>
- <message>
<source>normal</source>
<translation>обычный</translation>
</message>
@@ -1503,6 +2077,10 @@
<translation>Пыль:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>Время подтверждения:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>Очистить &amp;всё</translation>
</message>
@@ -1518,6 +2096,126 @@
<source>S&amp;end</source>
<translation>&amp;Отправить</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Копировать количество</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копировать сумму</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Копировать комиссию</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Копировать после комиссии</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Копировать байты</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Копировать пыль</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>Копировать сдачу</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>С %1 на %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>Вы уверены, что хотите отправить?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>добавлено как комиссия</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Общая сумма %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>или</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Подтвердите отправку монет</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>Адрес получателя неверный. Пожалуйста, перепроверьте.</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Сумма для отправки должна быть больше 0.</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>Сумма превышает ваш баланс.</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>Сумма с учётом комиссии %1 превысит ваш баланс.</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>Обнаружен дублирующийся адрес: используйте каждый адрес только один раз.</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>Не удалось создать транзакцию!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>Транзакция была отвергнута по следующей причине: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Комиссия больше чем %1 считается невероятно большой.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Запрос платежа просрочен.</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n блок</numerusform><numerusform>%n блока</numerusform><numerusform>%n блоков</numerusform><numerusform>%n блоков</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Заплатить только обязательную комиссию %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Начало подтверждения ожидается через %n блок.</numerusform><numerusform>Начало подтверждения ожидается через %n блока.</numerusform><numerusform>Начало подтверждения ожидается через %n блоков.</numerusform><numerusform>Начало подтверждения ожидается через %n блоков.</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>Внимание: неверный адрес Bitcoin</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>Внимание: неизвестный адрес для сдачи</translation>
+ </message>
+ <message>
+ <source>Confirm custom change address</source>
+ <translation>Подтвердите свой адрес для сдачи</translation>
+ </message>
+ <message>
+ <source>The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source>
+ <translation>Выбранный вами адрес для сдачи не принадлежит этому кошельку. Часть или все средства могут быть отправлены на этот адрес. Вы уверены?</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(нет метки)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1597,6 +2295,17 @@
<source>Memo:</source>
<translation>Примечание:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Введите метку для данного адреса, чтобы добавить его в адресную книгу</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Да</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1695,6 +2404,58 @@
<source>Reset all verify message fields</source>
<translation>Сбросить все поля проверки сообщения</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>Нажмите "Подписать сообщение" для создания подписи</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>Введённый адрес неверен.</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>Пожалуйста, проверьте адрес и попробуйте ещё раз.</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>Введённый адрес не связан с ключом.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>Разблокировка бумажника была отменена.</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>Недоступен секретный ключ для введённого адреса.</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>Не удалось подписать сообщение.</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>Сообщение подписано.</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>Подпись не может быть раскодирована.</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>Пожалуйста, проверьте подпись и попробуйте ещё раз.</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>Подпись не соответствует отпечатку сообщения.</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>Сообщение не прошло проверку.</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>Сообщение проверено.</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1711,11 +2472,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Открыто до %1</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>конфликт с транзакцией с %1 подтверждений</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1/отключен</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/не подтверждено, %1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>В памяти</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>Не в памяти</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>заброшено</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/не подтверждено</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 подтверждений</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>Статус</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, ещё не было успешно разослано</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, разослано через %n узел</numerusform><numerusform>, разослано через %n узла</numerusform><numerusform>, разослано через %n узлов</numerusform><numerusform>, разослано через %n узлов</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Источник</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>Сгенерированно</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>От</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>неизвестно</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>Для</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>свой адрес</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>только наблюдение</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>метка</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>Кредит</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>будет доступно через %n блок</numerusform><numerusform>будет доступно через %n блока</numerusform><numerusform>будет доступно через %n блоков</numerusform><numerusform>будет доступно через %n блоков</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>не принято</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>Дебет</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>Всего дебет</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>Всего кредит</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>Комиссия</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>Чистая сумма</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Сообщение</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>Комментарий</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID транзакции</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>Общий размер транзакции</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>Номер выхода</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>Продавец</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>Сгенерированные монеты должны подождать %1 блоков, прежде чем они могут быть потрачены. Когда вы сгенерировали этот блок, он был отправлен в сеть для добавления в цепочку блоков. Если он не попадёт в цепь, его статус изменится на "не принят", и монеты будут недействительны. Это иногда происходит в случае, если другой узел сгенерирует блок на несколько секунд раньше вас.</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>Отладочная информация</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>Транзакция</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>Входы</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Сумма</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>истина</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>ложь</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Эта панель отображает детальное описание транзакции.</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>Подробности %1</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тип</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>Открыто для ещё %n блока</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform><numerusform>Открыто для ещё %n блоков</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Открыто до %1</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>Отключен</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>Не подтверждено</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>Заброшено</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>Подтверждается (%1 из %2 рекомендуемых подтверждений)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>Подтверждено (%1 подтверждений)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>В противоречии</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>Незрелый (%1 подтверждений, будет доступно после %2)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Этот блок не был получен другими узлами и, возможно, не будет принят!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>Сгенерировано, но не принято</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Получено на</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>Получено от</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Отправлено на</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Отправлено себе</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Добыто</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>только наблюдение</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(недоступно)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(нет метки)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>Статус транзакции. Подведите курсор к этому полю, чтобы увидеть количество подтверждений.</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>Дата и время получения транзакции.</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>Тип транзакции.</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>Использовался ли в транзакции адрес для наблюдения.</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>Определяемое пользователем намерение/цель транзакции.</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>Снятая или добавленная к балансу сумма.</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>Все</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>Сегодня</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>На этой неделе</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>В этом месяце</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>В прошлом месяце</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>В этом году</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>Диапазон...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Получено на</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Отправлено на</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>Себе</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Добыто</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>Другое</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>Введите адрес или метку для поиска</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>Мин. сумма</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>Отказаться от транзакции</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Копировать адрес</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Копировать метку</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Копировать сумму</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>Копировать ID транзакции</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>Копировать исходный код транзакции</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>Копировать все подробности транзакции</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>Изменить метку</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>Показать подробности транзакции</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>Экспортировать историю транзакций</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Текст, разделённый запятыми (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>Подтверждено</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>Для наблюдения</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Дата</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Тип</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Метка</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Адрес</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Экспорт не удался</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>Произошла ошибка при сохранении истории транзакций в %1.</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>Экспорт успешно завершён</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>История транзакций была успешно сохранена в %1.</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>Диапазон:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>до</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1725,6 +2935,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>Не был загружен ни один бумажник.</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Отправка</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>&amp;Экспорт</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Экспортировать данные текущей вкладки в файл</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>Резервная копия бумажника</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>Данные бумажника (*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>Резервное копирование не удалось</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Произошла ошибка при сохранении данных бумажника в %1.</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>Резервное копирование успешно завершено</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>Данные бумажника были успешно сохранены в %1.</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1747,6 +3006,18 @@
<translation>Принимать командную строку и команды JSON-RPC</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>Принимать подключения снаружи (по умолчанию: 1, если не -proxy или -connect/-disconnect)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>Подключаться только к указанному узлу(ам); -noconnect или -connect=0 для запрета автоматических подключений</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>Распространяется под лицензией MIT, см. приложенный файл %s или %s</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Если &lt;category&gt; не предоставлена или равна 1, выводить всю отладочную информацию.</translation>
</message>
@@ -1787,10 +3058,6 @@
<translation>Невозможно запустить HTTP сервер. Смотри debug лог для подробностей.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Принимать подключения извне (по умолчанию: 1, если не используется -proxy или -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1799,8 +3066,8 @@
<translation>Разработчики %s</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>Установлено очень большое значение -fallbackfee! Это комиссия за транзацию, которую вы можете заплатить, если оценка размера комиссии не доступна. </translation>
+ <source>Accept relayed transactions received from whitelisted peers even when not relaying transactions (default: %d)</source>
+ <translation>Принимать транзакции пересылаемые от узлов из белого списка даже если они не удовлетворяют требованиям ретрансляции (по умолчанию: %d)</translation>
</message>
<message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
@@ -1815,8 +3082,8 @@
<translation>Удалить все транзакции бумажника с возможностью восстановить эти части цепи блоков с помощью -rescan при запуске</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Распространяется под лицензией MIT, см. приложенный файл COPYING или &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Ошибка загрузки %s: Вы не можете включить HD в уже существующем не-HD кошельке</translation>
</message>
<message>
<source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
@@ -1827,14 +3094,22 @@
<translation>Выполнить команду, когда меняется транзакция в бумажнике (%s в команде заменяется на TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Всегда разрешать транзакции, полученные от участников из белого списка (по умолчанию: %d)</translation>
+ <source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
+ <translation>Максимально допустимое среднее отклонение времени участников. Локальное представление времени может меняться вперед или назад на это количество. (по умолчанию: %u секунд)</translation>
+ </message>
+ <message>
+ <source>Maximum total fees (in %s) to use in a single wallet transaction or raw transaction; setting this too low may abort large transactions (default: %s)</source>
+ <translation>Максимальная сумма комиссий (%s) для одной транзакции в бумажнике или сырой транзакции; слишком низкое значение может вызвать прерывание больших транзакций (по умолчанию: %s)</translation>
</message>
<message>
<source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
<translation>Пожалуйста убедитесь в корректности установки времени и даты на вашем компьютере! Если время установлено неверно, %s не будет работать правильно.</translation>
</message>
<message>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Пожалуйста, внести свой вклад, если вы найдете %s полезными. Посетите %s для получения дополнительной информации о программном обеспечении.</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Задать число потоков проверки скрипта (от %u до %d, 0=авто, &lt;0 = оставить столько ядер свободными, по умолчанию: %d)</translation>
</message>
@@ -1847,20 +3122,32 @@
<translation>Это пре-релизная тестовая сборка - используйте на свой страх и риск - не используйте для добычи или торговых приложений</translation>
</message>
<message>
+ <source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <translation>Невозможно отмотать базу данных до пред-форкового состояния. Вам будет необходимо перекачать цепочку блоков.</translation>
+ </message>
+ <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Использовать UPnP для проброса порта (по умолчанию: 1, если используется прослушивание и нет -proxy)</translation>
</message>
<message>
+ <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. The client then connects normally using the rpcuser=&lt;USERNAME&gt;/rpcpassword=&lt;PASSWORD&gt; pair of arguments. This option can be specified multiple times</source>
+ <translation>Имя пользователя и хэш пароля для JSON-RPC соединений. Поле &lt;userpw&gt; использует формат: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Каноничный пример скрипта на питоне находится в share/rpcuser. Эта опция может быть указана несколько раз</translation>
+ </message>
+ <message>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>Бумажник не будет создавать транзакции, которые нарушают лимиты цепочки пула в памяти (по умолчанию: %u)</translation>
+ </message>
+ <message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Внимание: похоже, в сети нет полного согласия! Некоторый майнеры, возможно, испытывают проблемы.</translation>
+ <translation>Внимание: похоже, в сети нет полного согласия! Некоторые майнеры, возможно, испытывают проблемы.</translation>
</message>
<message>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Внимание: мы не полностью согласны с подключенными участниками! Вам или другим участникам, возможно, следует обновиться.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Вносить в белый список участников, подключающихся с указанной маски сети или IP. Можно использовать многократно.</translation>
+ <source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
+ <translation>Вам необходимо пересобрать базы данных с помощью -reindex-chainstate, чтобы изменить -txindex</translation>
</message>
<message>
<source>%s corrupt, salvage failed</source>
@@ -1887,8 +3174,16 @@
<translation>Параметры создания блоков:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Подключаться только к указанному узлу(ам)</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>Не удаётся разрешить адрес в параметре -%s: '%s'</translation>
+ </message>
+ <message>
+ <source>Chain selection options:</source>
+ <translation>Параметры выбора цепочки:</translation>
+ </message>
+ <message>
+ <source>Change index out of range</source>
+ <translation>Изменение индекса вне диапазона</translation>
</message>
<message>
<source>Connection options:</source>
@@ -1931,6 +3226,10 @@
<translation>Включить публичную сырую транзакцию в &lt;address&gt;</translation>
</message>
<message>
+ <source>Enable transaction replacement in the memory pool (default: %u)</source>
+ <translation>Включить замену транзакций в пуле памяти (по умолчанию:%u)</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
<translation>Ошибка инициализации БД блоков</translation>
</message>
@@ -1951,6 +3250,10 @@
<translation>Ошибка загрузки %s: Для бумажника требуется более новая версия %s</translation>
</message>
<message>
+ <source>Error loading %s: You can't disable HD on a already existing HD wallet</source>
+ <translation>Ошибка загрузки %s: Вы не можете включить HD в уже существующем не-HD кошельке</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>Ошибка чтения базы данных блоков</translation>
</message>
@@ -1975,6 +3278,10 @@
<translation>Неверный или отсутствующий начальный блок. Неправильный каталог данных для сети?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>Начальная проверка исправности не удалась. %s завершает работу.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Неверный -onion адрес: '%s'</translation>
</message>
@@ -1983,6 +3290,10 @@
<translation>Неверная сумма для -%s=&lt;amount&gt;: '%s'</translation>
</message>
<message>
+ <source>Invalid amount for -fallbackfee=&lt;amount&gt;: '%s'</source>
+ <translation>Недопустимая сумма для -fallbackfee=&lt;amount&gt;: '%s'</translation>
+ </message>
+ <message>
<source>Keep the transaction memory pool below &lt;n&gt; megabytes (default: %u)</source>
<translation>Сбрасывать транзакции из памяти на диск каждые &lt;n&gt; мегабайт (по умолчанию: %u)</translation>
</message>
@@ -2019,16 +3330,20 @@
<translation>Режим удаления блоков несовместим с -txindex.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Перестроить состояние цепи блоков и индекс блоков из blk*.dat файлов с диска</translation>
+ </message>
+ <message>
<source>Rebuild chain state from the currently indexed blocks</source>
<translation>Перестроить индекс цепи из текущих индексированных блоков</translation>
</message>
<message>
- <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
- <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
+ <source>Rewinding blocks...</source>
+ <translation>Перемотка блоков...</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Задать максимальную стоимость блока (по умолчанию: %d)</translation>
+ <source>Set database cache size in megabytes (%d to %d, default: %d)</source>
+ <translation>Установить размер кэша БД в мегабайтах(от %d до %d, по умолчанию: %d)</translation>
</message>
<message>
<source>Set maximum block size in bytes (default: %d)</source>
@@ -2063,6 +3378,10 @@
<translation>Использовать UPnP для проброса порта (по умолчанию: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>Использовать тестовую цепочку</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>Комментарий пользователя (%s) содержит небезопасные символы.</translation>
</message>
@@ -2135,10 +3454,6 @@
<translation>Наибольший размер данных в носителе данных транзакций, которые мы передаем и генерируем (по умолчанию: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Использовать случайные учётные данные для каждого прокси-подключения. Эта функция позволяет изолировать потоки Tor (по умолчанию: %u)</translation>
</message>
@@ -2151,8 +3466,8 @@
<translation>Сумма транзакции за вычетом комиссии слишком мала</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit &lt;https://www.openssl.org/&gt; и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
+ <source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
+ <translation>Использовать иерархическую детерминированную генерацию ключей (HD) после BIP32. Применяется в процессе создания бумажника / первого запуска</translation>
</message>
<message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
@@ -2263,10 +3578,6 @@
<translation>Сумма транзакции слишком мала</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Сумма транзакции должна быть положительна</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Транзакция слишком большая для правил комиссии.</translation>
</message>
@@ -2331,18 +3642,22 @@
<translation>Установлено очень большое значение -maxtxfee. Такие большие комиссии могут быть уплачены в отдельной транзакции.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>Установлено очень большое значение -paytxfee. Такие большие комиссии могут быть уплачены в отдельной транзакции.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Не хранить транзакции в памяти дольше, чем &lt;n&gt; часов (по умолчанию %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Эквивалентных байт на sigop в транзакциях для ретрансляции или добычи (по умолчанию: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Комиссии (в %s/Кб) меньшие этого значения считаются нулевыми при создании транзакций (по умолчанию: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>Всегда ретранслировать транзакции, полученные из белого списка участников, даже если они нарушают локальную политику ретрансляции (по умолчанию: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>Насколько тщательна проверка контрольных блоков -checkblocks (0-4, по умолчанию: %u)</translation>
</message>
@@ -2359,10 +3674,26 @@
<translation>Выводить отладочную информацию (по умолчанию: %u, указание &lt;category&gt; необязательно)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>Запрашивать адреса участников с помощью DNS, если адресов мало (по умолчанию: 1, если не указан -connect/-noconnect)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>Задаёт сериализацию сырой транзакции или хекса блока, возвращённого в не подробном режиме, non-segwit(0) или segwit(1) (по умолчанию: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>Поддерживать фильтрацию блоков и транзакций с помощью фильтра Блума (по умолчанию: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>Это комиссия за транзакцию, которую вы можете заплатить, когда расчёт комиссии недоступен.</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>Этот продукт включает ПО, разработанное OpenSSL Project для использования в OpenSSL Toolkit %s и криптографическое ПО, написанное Eric Young и ПО для работы с UPnP, написанное Thomas Bernard.</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>Текущая длина строки версии сети (%i) превышает максимальную длину (%i). Увеливается количество или размер uacomments.</translation>
</message>
@@ -2375,12 +3706,12 @@
<translation>Обнаружен не поддерживаемый аргумент -socks. Выбор версии SOCKS более невозможен, поддерживаются только прокси SOCKS5.</translation>
</message>
<message>
- <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
- <translation>Использовать отдельный прокси SOCKS5 для соединения с участниками через скрытые сервисы Tor (по умолчанию: %s)</translation>
+ <source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
+ <translation>Не поддерживаемый аргумент -whitelistalwaysrelay игнорируется, используйте -whitelistrelay и/или -whitelistforcerelay.</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Имя пользователя и хэш пароля для JSON-RPC соединений. Поле &lt;userpw&gt; использует формат: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Каноничный пример скрипта на питоне включен в "share/rpcuser". Эта опция может быть указана несколько раз</translation>
+ <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
+ <translation>Использовать отдельный прокси SOCKS5 для соединения с участниками через скрытые сервисы Tor (по умолчанию: %s)</translation>
</message>
<message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
@@ -2391,6 +3722,14 @@
<translation>Внимание: Файл бумажника поврежден, данные восстановлены! Оригинальный %s сохранен как %s в %s; Если баланс или транзакции некорректны, вы должны восстановить файл из резервной копии.</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>Вносить в белый список участников, подключающихся с указанного IP (напр. 1.2.3.4) или CIDR-адреса сети (напр. 1.2.3.0/24). Можно использовать многократно.</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s задан слишком высоким!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(по умолчанию: %s)</translation>
</message>
@@ -2411,6 +3750,10 @@
<translation>Неверный адрес -proxy: '%s'</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>Пул ключей опустел, пожалуйста, выполните keypoolrefill</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>Прослушивать подключения JSON-RPC на &lt;порту&gt; (по умолчанию: %u или %u в тестовой сети)</translation>
</message>
@@ -2447,12 +3790,16 @@
<translation>Транслировать не-P2SH мультиподпись (по умолчанию: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>Отправлять транзакции с включенным full-RBF (по умолчанию: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>Установить размер пула ключей в &lt;n&gt; (по умолчанию: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Задать минимальный размер блока в байтах (по умолчанию: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Задать максимальное BIP141 значение блока (по умолчанию: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2475,10 +3822,38 @@
<translation>Тратить неподтвержденную сдачу при отправке транзакций (по умолчанию: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>Запускаем сетевые потоки...</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>Бумажник постарается не платить меньше, чем минимальная комиссия передачи.</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>Это минимальная комиссия, которую вы платите с каждой транзакцией.</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>Это комиссия, которую вы заплатите за эту транзакцию.</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>Порог для отключения неправильно ведущих себя узлов (по умолчанию: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>Сумма транзакции не должна быть негативной</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>У транзакции слишком длинная цепочка в пуле в памяти.</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>У транзакции должен быть как минимум один получатель</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>В параметре -onlynet указана неизвестная сеть: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ru_RU.ts b/src/qt/locale/bitcoin_ru_RU.ts
index 66419728e2..60d98c41d9 100644
--- a/src/qt/locale/bitcoin_ru_RU.ts
+++ b/src/qt/locale/bitcoin_ru_RU.ts
@@ -23,7 +23,7 @@
</message>
<message>
<source>C&amp;lose</source>
- <translation>Закрыть</translation>
+ <translation>&amp;Закрыть</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
@@ -41,20 +41,27 @@
<source>&amp;Delete</source>
<translation>Удалить</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Repeat new passphrase</source>
<translation>Повторите новый пароль</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
<context>
<name>BitcoinGUI</name>
<message>
+ <source>Bitcoin</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>&amp;Command-line options</source>
<translation>Опции командной строки</translation>
</message>
@@ -119,6 +126,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -136,12 +146,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
<message>
<source>&amp;Information</source>
@@ -155,12 +174,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -173,18 +198,44 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>Экспортировать</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
+ <source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
+ <translation>bitcoin-core</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>Информация</translation>
</message>
@@ -193,6 +244,10 @@
<translation>Предупреждение</translation>
</message>
<message>
+ <source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
+ <translation>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Ошибка</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index a4f0ebcb4e..15a32b2050 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -3,7 +3,7 @@
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
- <translation>Kliknutím pravým tlačidlom upravte adresu alebo popis</translation>
+ <translation>Kliknutím pravým tlačidlom upraviť adresu alebo popis</translation>
</message>
<message>
<source>Create a new address</source>
@@ -11,11 +11,11 @@
</message>
<message>
<source>&amp;New</source>
- <translation>&amp;Nové</translation>
+ <translation>&amp;Nový</translation>
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
- <translation>Kopírovať práve zvolenú adresu do systémového klipbordu</translation>
+ <translation>Zkopírovať práve zvolenú adresu</translation>
</message>
<message>
<source>&amp;Copy</source>
@@ -41,6 +41,13 @@
<source>&amp;Delete</source>
<translation>&amp;Zmazať</translation>
</message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez popisu)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +67,7 @@
<source>Repeat new passphrase</source>
<translation>Zopakujte nové heslo</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -115,6 +122,10 @@
<translation>&amp;O %1</translation>
</message>
<message>
+ <source>Show information about %1</source>
+ <translation>Ukázať informácie o %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>O &amp;Qt</translation>
</message>
@@ -127,6 +138,10 @@
<translation>&amp;Možnosti...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>Upraviť nastavenia pre %1</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>&amp;Zašifrovať Peňaženku...</translation>
</message>
@@ -255,6 +270,14 @@
<translation><numerusform>%n aktívne pripojenie do siete Bitcoin</numerusform><numerusform>%n aktívne pripojenia do siete Bitcoin</numerusform><numerusform>%n aktívnych pripojení do siete Bitcoin</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Indexujem bloky na disku...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Spracovávam bloky na disku...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>Nedostupný zdroj blokov...</translation>
</message>
@@ -262,26 +285,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Spracovaných %n blok transakčnej histórie.</numerusform><numerusform>Spracovaných %n bloky transakčnej histórie.</numerusform><numerusform>Spracovaných %n blokov transakčnej histórie.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n hodina</numerusform><numerusform>%n hodiny</numerusform><numerusform>%n hodín</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n deň</numerusform><numerusform>%n dni</numerusform><numerusform>%n dní</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n týždeň</numerusform><numerusform>%n týždne</numerusform><numerusform>%n týždňov</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation> %1 a %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n rok</numerusform><numerusform>%n roky</numerusform><numerusform>%n rokov</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 pozadu</translation>
@@ -311,6 +314,14 @@
<translation>Aktualizovaný</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Ukáž %1 zoznam možných nastavení Bitcoinu pomocou príkazového riadku</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 klient</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Sťahujem...</translation>
</message>
@@ -360,7 +371,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Peňaženka je &lt;b&gt;zašifrovaná&lt;/b&gt; a momentálne &lt;b&gt;zamknutá&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -380,10 +391,6 @@
<translation>Suma:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorita:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Poplatok:</translation>
</message>
@@ -436,10 +443,10 @@
<translation>Potvrdené</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Priorita</translation>
+ <source>(no label)</source>
+ <translation>(bez popisu)</translation>
</message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -462,7 +469,7 @@
<source>&amp;Address</source>
<translation>&amp;Adresa</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -497,6 +504,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>O %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Voľby príkazového riadku</translation>
</message>
@@ -532,7 +543,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>Zobraziť uvítaciu obrazovku pri štarte (predvolené: %u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>Zrušiť všetky zmeny v GUI</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -540,6 +555,18 @@
<translation>Vitajte</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Vitajte v %1</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>Keďže toto je prvé spustenie programu, môžete si vybrať, kam %1 bude ukladať vaše údaje.</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 stiahne a uloží kópiu Bitcoin block chain. Minimálne %2GB dát bude uložených v tejto zložke, a bude sa zväčšovať postupom času. Peňaženka bude taktiež uložená v tejto zložke.</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Použiť predvolený dátový adresár</translation>
</message>
@@ -565,6 +592,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Forma</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Čas posledného bloku</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Skryť</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +624,7 @@
<source>Select payment request file</source>
<translation>Vyberte súbor s výzvou k platbe</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -594,6 +636,14 @@
<translation>&amp;Hlavné</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>Automaticky spustiť %1 pri spustení systému.</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>&amp;Spustiť %1 pri prihlásení</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>Veľkosť vyrovnávacej pamäti &amp;databázy</translation>
</message>
@@ -730,6 +780,14 @@
<translation>&amp;Okno</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>&amp;Skryť ikonu zo systémovej lišty.</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>Skryť ikonu v oblasti oznámení</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Zobraziť len ikonu na lište po minimalizovaní okna.</translation>
</message>
@@ -750,6 +808,10 @@
<translation>Jazyk užívateľského rozhrania:</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>Jazyk uživateľského rozhrania sa dá nastaviť tu. Toto nastavenie sa uplatní až po reštarte %1.</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>&amp;Zobrazovať hodnoty v jednotkách:</translation>
</message>
@@ -874,6 +936,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -883,11 +948,7 @@
<source>Node/Service</source>
<translation>Uzol/Služba</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Čas odozvy</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -926,7 +987,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation> %1 a %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -954,6 +1025,10 @@
<translation>Používa BerkeleyDB verziu</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>Zložka s dátami</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Čas spustenia</translation>
</message>
@@ -1039,6 +1114,18 @@
<translation>Aplikácia</translation>
</message>
<message>
+ <source>Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <translation>Otvoriť %1 ladiaci výpis z aktuálnej zložky. Pre veľké súbory to môže chvíľu trvať.</translation>
+ </message>
+ <message>
+ <source>Decrease font size</source>
+ <translation>Zmenšiť písmo</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>Zväčšiť písmo</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>Služby</translation>
</message>
@@ -1063,6 +1150,10 @@
<translation>Čas odozvy</translation>
</message>
<message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>Trvanie aktuálneho pingu</translation>
+ </message>
+ <message>
<source>Ping Wait</source>
<translation>Čakanie na ping</translation>
</message>
@@ -1111,14 +1202,6 @@
<translation>Vymazať konzolu</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Odpojené uzly</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Blokovať uzol na</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;hodinu</translation>
</message>
@@ -1135,8 +1218,8 @@
<translation>1 &amp;rok</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;odblokovať uzol</translation>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>Vitajte v %1 RPC konzole</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
@@ -1265,7 +1348,7 @@
<source>Remove</source>
<translation>Odstrániť</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1284,7 +1367,14 @@
<source>&amp;Save Image...</source>
<translation>Uložiť obrázok...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez popisu)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1320,10 +1410,6 @@
<translation>Suma:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Priorita:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Poplatok:</translation>
</message>
@@ -1392,10 +1478,6 @@
<translation>(Automatický poplatok ešte nebol aktivovaný. Toto zvyčajne trvá niekoľko blokov...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Čas potvrdenia:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normálne</translation>
</message>
@@ -1435,6 +1517,14 @@
<source>S&amp;end</source>
<translation>&amp;Odoslať</translation>
</message>
+ <message>
+ <source>or</source>
+ <translation>alebo</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez popisu)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1514,10 +1604,17 @@
<source>Memo:</source>
<translation>Poznámka:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>%1 sa vypína...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>Nevypínajte počítač kým toto okno nezmizne.</translation>
</message>
@@ -1600,7 +1697,7 @@
<source>Reset all verify message fields</source>
<translation>Obnoviť všetky polia v overiť správu</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1616,12 +1713,25 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Táto časť obrazovky zobrazuje detailný popis transakcie</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>(no label)</source>
+ <translation>(bez popisu)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1630,6 +1740,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1652,6 +1771,14 @@
<translation>Prijímať príkazy z príkazového riadku a JSON-RPC</translation>
</message>
<message>
+ <source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
+ <translation>Pokiaľ &lt;category&gt; nie je nastavená, alebo &lt;category&gt; = 1, vypíš všetky informácie pre ladenie.</translation>
+ </message>
+ <message>
+ <source>Prune configured below the minimum of %d MiB. Please use a higher number.</source>
+ <translation>Redukcia nastavená pod minimálnu hodnotu %d MiB. Prosím použite vyššiu hodnotu.</translation>
+ </message>
+ <message>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation>Chyba: Vyskytla sa interná chyba, pre viac informácií zobrazte debug.log</translation>
</message>
@@ -1672,50 +1799,52 @@
<translation>Nepodarilo sa spustiť HTTP server. Pre viac detailov zobrazte debug log.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Prijať spojenia zvonku (predvolené: 1 ak žiadne -proxy alebo -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Jadro Bitcoin</translation>
</message>
<message>
+ <source>The %s developers</source>
+ <translation>Vývojári %s</translation>
+ </message>
+ <message>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Spojiť s danou adresou a vždy na nej počúvať. Použite zápis [host]:port pre IPv6</translation>
</message>
<message>
+ <source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <translation>Nemožné uzamknúť zložku %s. %s pravdepodobne už beží.</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>Vymazať všetky transakcie z peňaženky a pri spustení znova získať z reťazca blokov iba tie získané pomocou -rescan</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuované pod softvérovou licenciou MIT, viď sprievodný súbor COPYING alebo &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
+ <source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
+ <translation>Chyba počas načítavania %s: Nemôžete povoliť HD na už existujúcej non-HD peaženke</translation>
</message>
<message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Vykonaj príkaz keď sa zmení transakcia peňaženky (%s v príkaze je nahradená TxID)</translation>
</message>
<message>
- <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
- <translation>Nastaviť počeť vlákien overujúcich skripty (%u až %d, 0 = auto, &lt;0 = nechať toľkoto jadier voľných, prednastavené: %d)</translation>
+ <source>Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <translation>Prosím skontrolujte systémový čas a dátum. Keď je váš čas nesprávny, %s nebude fungovať správne.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Toto je pred-testovacia verzia - použitie je na vlastné riziko - nepoužívajte na tvorbu bitcoin ani obchodovanie.</translation>
+ <source>Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <translation>Keď si myslíte, že %s je užitočný, podporte nás. Pre viac informácií o software navštívte %s.</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Varovanie: Javí sa že sieť sieť úplne nesúhlasí! Niektorí mineri zjavne majú ťažkosti.
-
-The network does not appear to fully agree! Some miners appear to be experiencing issues.</translation>
+ <source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
+ <translation>Nastaviť počeť vlákien overujúcich skripty (%u až %d, 0 = auto, &lt;0 = nechať toľkoto jadier voľných, prednastavené: %d)</translation>
</message>
<message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Varovanie: Zjavne sa úplne nezhodujeme s našimi peer-mi! Možno potrebujete prejsť na novšiu verziu alebo ostatné uzly potrebujú vyššiu verziu.</translation>
+ <source>The block database contains a block which appears to be from the future. This may be due to your computer's date and time being set incorrectly. Only rebuild the block database if you are sure that your computer's date and time are correct</source>
+ <translation>Databáza blokov obsahuje blok, ktorý vyzerá byť z budúcnosti. Toto môže byť spôsobené nesprávnym systémovým časom vášho počítača. Obnovujte databázu blokov len keď ste si istý, že systémový čas je nastavený správne.</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Uzle na zoznam povolených, ktoré sa pripájajú z danej netmask alebo IP adresy. Môže byť zadané viac krát.</translation>
+ <source>%s corrupt, salvage failed</source>
+ <translation>%s je poškodený, záchrana zlyhala</translation>
</message>
<message>
<source>-maxmempool must be at least %d MB</source>
@@ -1730,14 +1859,18 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Voľby vytvorenia bloku:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Pripojiť sa len k určenej nóde</translation>
+ <source>Change index out of range</source>
+ <translation>Menný index mimo rozsah</translation>
</message>
<message>
<source>Connection options:</source>
<translation>Možnosti pripojenia:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>Copyright (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>Zistená poškodená databáza blokov</translation>
</message>
@@ -1766,6 +1899,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Povoliť zverejnenie raw bloku pre &lt;address&gt;</translation>
</message>
<message>
+ <source>Enable publish raw transaction in &lt;address&gt;</source>
+ <translation>Povoliť publikovať hrubý prevod v &lt;address&gt;</translation>
+ </message>
+ <message>
<source>Error initializing block database</source>
<translation>Chyba inicializácie databázy blokov</translation>
</message>
@@ -1810,6 +1947,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Nesprávny alebo žiadny genesis blok nájdený. Nesprávny dátový priečinok alebo sieť?</translation>
</message>
<message>
+ <source>Initialization sanity check failed. %s is shutting down.</source>
+ <translation>Kontrola čistoty pri inicializácií zlyhala. %s sa vypína.</translation>
+ </message>
+ <message>
<source>Invalid -onion address: '%s'</source>
<translation>Neplatná -onion adresa: '%s'</translation>
</message>
@@ -1826,6 +1967,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Načítavam banlist...</translation>
</message>
<message>
+ <source>Location of the auth cookie (default: data dir)</source>
+ <translation>Poloha overovacieho cookie súboru (predvolená: zložka s dátami)</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Nedostatok kľúčových slov súboru.</translation>
</message>
@@ -1834,6 +1979,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Pripojiť iba k uzlom v sieti &lt;net&gt; (ipv4, ipv6, alebo onion)</translation>
</message>
<message>
+ <source>Print this help message and exit</source>
+ <translation>Vytlačiť túto pomocnú správu a ukončiť</translation>
+ </message>
+ <message>
+ <source>Print version and exit</source>
+ <translation>Vytlačiť verziu a ukončiť</translation>
+ </message>
+ <message>
<source>Prune cannot be configured with a negative value.</source>
<translation>Redukovanie nemôže byť nastavené na zápornú hodnotu.</translation>
</message>
@@ -1842,6 +1995,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Redukovanie je nekompatibilné s -txindex.</translation>
</message>
<message>
+ <source>Rebuild chain state and block index from the blk*.dat files on disk</source>
+ <translation>Obnoviť stav reťazca a index blokov zo súborov blk*.dat na disku.</translation>
+ </message>
+ <message>
+ <source>Rebuild chain state from the currently indexed blocks</source>
+ <translation>Obnoviť stav reťazca z aktuálne indexovaných blokov.</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Nastaviť veľkosť pomocnej pamäti databázy v megabajtoch (%d do %d, prednastavené: %d)</translation>
</message>
@@ -1854,6 +2015,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Označ súbor peňaženky (v priečinku s dátami)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>Zdrojový kód je dostupný z %s</translation>
+ </message>
+ <message>
+ <source>Unable to bind to %s on this computer. %s is probably already running.</source>
+ <translation>Nemožné pripojiť k %s na tomto počíťači. %s už pravdepodobne beží.</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>Nepodporovaný parameter -benchmark bol ignorovaný, použite -debug=bench.</translation>
</message>
@@ -1882,6 +2051,14 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Peňaženka %s sa nachádza mimo dátového priečinka %s </translation>
</message>
<message>
+ <source>Wallet debugging/testing options:</source>
+ <translation>Ladiace / testovacie možnosti peňaženky.</translation>
+ </message>
+ <message>
+ <source>Wallet needed to be rewritten: restart %s to complete</source>
+ <translation>Peňaženka musí byť prepísaná: pre dokončenie reštartujte %s</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Voľby peňaženky:</translation>
</message>
@@ -1926,10 +2103,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Maximálna veľkosť dát v transakciách nosných dát, ktoré prenášame a ťažíme (predvolené: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Dotaz na partnerské adresy pomocou vyhľadávania DNS v prípade nedostatku adries (predvolené: 1, pokiaľ -connect)</translation>
- </message>
- <message>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
<translation>Nastaviť najväčšiu veľkosť vysoká-dôležitosť/nízke-poplatky transakcií v bajtoch (prednastavené: %d)</translation>
</message>
@@ -1938,10 +2111,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Suma je príliš malá pre odoslanie tranzakcie</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Tento produkt obsahuje softvér vyvinutý projektom OpenSSL pre použitie sady nástrojov OpenSSL &lt;https://www.openssl.org/&gt; a kryptografického softvéru napísaného Eric Young a UPnP softvér napísaný Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Uzle na zoznam povolených nemôžu byť DoS zakázané a ich transakcie vždy postúpené ďalej, aj v prípade, ak sú už pamäťovej fronte. Užitočné napr. pre brány</translation>
</message>
@@ -1998,6 +2167,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Možnosti servra RPC:</translation>
</message>
<message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>Pri spustení skontrolovať reťaz blokov pre chýbajúce transakcie peňaženky</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Odoslať trace/debug informácie na konzolu namiesto debug.info žurnálu</translation>
</message>
@@ -2034,10 +2207,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Suma transakcie príliš malá</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Hodnoty transakcie musia byť väčšie ako nula (pozitívne)</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transakcia je príliš veľká pre aktuálne podmienky poplatkov</translation>
</message>
@@ -2066,6 +2235,10 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Zmazať všetky transakcie z peňaženky...</translation>
</message>
<message>
+ <source>ZeroMQ notification options:</source>
+ <translation>Možnosti pripojenia ZeroMQ:</translation>
+ </message>
+ <message>
<source>Password for JSON-RPC connections</source>
<translation>Heslo pre JSON-rPC spojenia</translation>
</message>
@@ -2102,10 +2275,34 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Výstupné ladiace informácie (predvolené: %u, dodanie &lt;category&gt; je voliteľné)</translation>
</message>
<message>
+ <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
+ <translation>Celková dĺžka verzie sieťového reťazca (%i) prekračuje maximálnu dĺžku (%i). Znížte počet a veľkosť komentárov.</translation>
+ </message>
+ <message>
+ <source>Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)</source>
+ <translation>Sa snaží držať odchádzajúce prevádzku v rámci daného cieľa (v MB za 24h), 0 = žiadny limit (predvolený: %d)</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+ <translation>Nepodporovaný argument -socks nájdený. Nastavenie SOCKS verzie už nie je viac moźné, iba SOCKS5 proxies sú podporované.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
+ <translation>Nepodporovaný argument -whitelistalwaysrelay ignorovaný, použite -whitelistrelay a/alebo -whitelistforcerelay.</translation>
+ </message>
+ <message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)</source>
<translation>Použiť samostatný SOCKS5 proxy server na dosiahnutie počítačov cez skryté služby Tor (predvolené: %s)</translation>
</message>
<message>
+ <source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
+ <translation>Varovanie: Neznáma verzia blokov sa doluje! Je možné, že neznáme pravidlá majú efekt</translation>
+ </message>
+ <message>
+ <source>Warning: Wallet file corrupt, data salvaged! Original %s saved as %s in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
+ <translation>Varovanie: Peňaženka poškodená, dáta boli zachránené! Originálna %s ako %s v %s; ak váš zostatok alebo transakcie sú nesprávne, mali by ste obnoviť zálohu.</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(predvolené: %s)</translation>
</message>
@@ -2162,10 +2359,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Nastaviť veľkosť kľúča fronty na &lt;n&gt; (predvolené: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Nastaviť minimálnu veľkosť bloku v bajtoch (predvolené: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Nastaviť počet vlákien na obsluhu RPC volaní (predvolené: %d)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 16ef20ea3a..1c8cb4ce56 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>I&amp;zbriši</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,10 +63,18 @@
<source>Repeat new passphrase</source>
<translation>Ponovite novo geslo</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Netmaska</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Prepoved do</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
@@ -243,6 +254,14 @@
<translation><numerusform>%n aktivna povezava v omrežje Bitcoin</numerusform><numerusform>%n aktivni povezavi v omrežje Bitcoin</numerusform><numerusform>%n aktivne povezave v omrežje Bitcoin</numerusform><numerusform>%n aktivnih povezav v omrežje Bitcoin</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>Indeksirani bloki na disku ...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>Obdelava blokov na disku ...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>Ni virov za prenos blokov ...</translation>
</message>
@@ -250,26 +269,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n obdelan blok zgodovine transakcij.</numerusform><numerusform>%n obdelana bloka zgodovine transakcij.</numerusform><numerusform>%n obdelani bloki zgodovine transakcij.</numerusform><numerusform>%n obdelanih blokov zgodovine transakcij.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n uro</numerusform><numerusform>%n uri</numerusform><numerusform>%n ure</numerusform><numerusform>%n ur</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dan</numerusform><numerusform>%n dneva</numerusform><numerusform>%n dni</numerusform><numerusform>%n dni</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n teden</numerusform><numerusform>%n tedna</numerusform><numerusform>%n tedne</numerusform><numerusform>%n tednov</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 in %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n leto</numerusform><numerusform>%n leti</numerusform><numerusform>%n leta</numerusform><numerusform>%n let</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>imam še %1 zaostanka</translation>
@@ -299,6 +298,10 @@
<translation>Posodobljeno</translation>
</message>
<message>
+ <source>%1 client</source>
+ <translation>%1 odjemalec</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>Dohitevam omrežje ...</translation>
</message>
@@ -348,7 +351,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Denarnica je &lt;b&gt;šifrirana&lt;/b&gt; in trenutno &lt;b&gt;zaklenjena&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -368,10 +371,6 @@
<translation>Znesek:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteta:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Provizija:</translation>
</message>
@@ -423,11 +422,7 @@
<source>Confirmed</source>
<translation>Potrjeno</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Prioriteta</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -450,7 +445,7 @@
<source>&amp;Address</source>
<translation>&amp;Naslov</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -485,6 +480,10 @@
<translation>(%1-bit)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>O %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>Možnosti ukazne vrstice</translation>
</message>
@@ -496,6 +495,18 @@
<source>command-line options</source>
<translation>možnosti ukazne vrstice</translation>
</message>
+ <message>
+ <source>UI Options:</source>
+ <translation>UI možnosti:</translation>
+ </message>
+ <message>
+ <source>Set language, for example "de_DE" (default: system locale)</source>
+ <translation>Nastavi jezik, na primer "sl_SI" (privzeto: sistemsko)</translation>
+ </message>
+ <message>
+ <source>Start minimized</source>
+ <translation>Začni minimizirano</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -504,6 +515,10 @@
<translation>Dobrodošli</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>Dobrodošli v %1</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>Uporabi privzeto podatkovno mapo</translation>
</message>
@@ -529,6 +544,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Oblika</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Čas zadnjega bloka</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Skrij</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -546,7 +576,7 @@
<source>Select payment request file</source>
<translation>Izbiranje datoteke z zahtevkom za plačilo</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -814,6 +844,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -823,11 +856,7 @@
<source>Node/Service</source>
<translation>Naslov</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Odzivni čas</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -866,7 +895,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 in %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1136,7 +1175,7 @@
<source>Remove</source>
<translation>Odstrani</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1155,7 +1194,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Shrani sliko ...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1191,10 +1233,6 @@
<translation>Znesek:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioriteta:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Provizija:</translation>
</message>
@@ -1263,10 +1301,6 @@
<translation>(Samodejni obračun provizije še ni pripravljen. Po navadi izračun traja nekaj blokov ...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Čas do potrditve:</translation>
- </message>
- <message>
<source>normal</source>
<translation>navadno</translation>
</message>
@@ -1306,7 +1340,7 @@
<source>S&amp;end</source>
<translation>&amp;Pošlji</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1385,7 +1419,10 @@
<source>Memo:</source>
<translation>Opomba:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1479,7 +1516,7 @@
<source>Reset all verify message fields</source>
<translation>Počisti vsa polja za vnos v oknu za preverjanje</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1495,12 +1532,21 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>V tem podoknu so prikazane podrobnosti o transakciji</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1509,6 +1555,19 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Izvozi podatke v trenutnem zavihku v datoteko</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1535,10 +1594,6 @@
<translation>Teci v ozadju in sprejemaj ukaze</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Sprejemaj zunanje povezave (privzeto: 1, razen če ste vklopili opciji -proxy ali -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1547,10 +1602,6 @@
<translation>Veži dani naslov in tam vedno poslušaj. Za naslove protokola IPv6 uporabite zapis [gostitelj]:vrata.</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuirano v okviru programske licence MIT. Podrobnosti so navedene v priloženi datoteki COPYING ali na naslovu &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Izvedi ukaz, ko bo transakcija denarnice se spremenila (V cmd je bil TxID zamenjan za %s)</translation>
</message>
@@ -1559,22 +1610,6 @@
<translation>Nastavi število niti za preverjanje skript (%u do %d, 0 = samodejno, &lt;0 toliko procesorskih jeder naj ostane prostih, privzeto: %d)</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>To je preizkusna različica še neizdanega programa. Uporabljate jo na lastno odgovornost. Programa ne uporabljajte je za rudarjenje ali trgovske aplikacije.</translation>
- </message>
- <message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Opozorilo: Trenutno na omrežju ni videti konsenza! Videti je, kot da bi imeli nekateri rudarji težave.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Opozorilo: Trenutno se s soležniki ne strinjam v popolnosti! Mogoče bi morali vi ali drugi udeleženci posodobiti odjemalce.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Sprejemaj povezave samo od soležnikov, ki so na naslovih, ki ustrezajo navedeni omrežni maski ali naslovu. Opcijo lahko navedete večkrat.</translation>
- </message>
- <message>
<source>&lt;category&gt; can be:</source>
<translation>&lt;category&gt; je lahko:</translation>
</message>
@@ -1583,10 +1618,6 @@
<translation>Možnosti ustvarjanja blokov:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Poveži se samo z (enim ali več) navedenimi vozlišči</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Izbire povezave:</translation>
</message>
@@ -1763,10 +1794,6 @@
<translation>Znesek je pramajhen</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Znesek mora biti pozitiven</translation>
- </message>
- <message>
<source>Transaction too large</source>
<translation>Transkacija je prevelika</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sq.ts b/src/qt/locale/bitcoin_sq.ts
index 6c86b7d9fc..8baddf6912 100644
--- a/src/qt/locale/bitcoin_sq.ts
+++ b/src/qt/locale/bitcoin_sq.ts
@@ -33,6 +33,69 @@
<source>&amp;Delete</source>
<translation>&amp;Fshi</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Zgjidh adresen ku do te dergoni monedhat</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Duke derguar adresen</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Duke marr adresen</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Këto janë Bitcoin adresat e juaja për të dërguar pagesa. Gjithmon kontrolloni shumën dhe adresën pranuese para se të dërgoni monedha.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Këto janë Bitcoin adresat e juaja për të pranuar pagesa. Rekomandohet që gjithmon të përdorni një adresë të re për çdo transaksion.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopjo adresen</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopjo &amp;Etiketë</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Ndrysho</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Eksporto listën e adresave</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksportimi dështoj</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Gabim gjatë ruajtjes së listës së adresave në %1. Ju lutem provoni prapë.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiketë</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresë</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(pa etiketë)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -48,7 +111,67 @@
<source>Repeat new passphrase</source>
<translation>Përsërisni frazkalimin e ri</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Kripto portofolin</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Ky veprim ka nevojë per frazkalimin e portofolit tuaj që të ç'kyç portofolin.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>ç'kyç portofolin.</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Ky veprim kërkon frazkalimin e portofolit tuaj që të dekriptoj portofolin.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dekripto portofolin</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Ndrysho frazkalimin</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Konfirmoni enkriptimin e portofolit</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Jeni te sigurt te enkriptoni portofolin tuaj?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Portofoli u enkriptua</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Enkriptimi i portofolit dështoi</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Enkriptimi i portofolit dështoi për shkak të një gabimi të brëndshëm. portofoli juaj nuk u enkriptua.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>Frazkalimet e plotësuara nuk përputhen.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>ç'kyçja e portofolit dështoi</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Frazkalimi i futur për dekriptimin e portofolit nuk ishte i saktë.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Dekriptimi i portofolit dështoi</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -127,10 +250,6 @@
<translation>Shiriti i mjeteve</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 dhe %2</translation>
- </message>
- <message>
<source>%1 behind</source>
<translation>%1 Pas</translation>
</message>
@@ -166,7 +285,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i kyçur&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -185,6 +304,22 @@
<source>Date</source>
<translation>Data</translation>
</message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopjo adresën</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>po</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>jo</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(pa etiketë)</translation>
+ </message>
</context>
<context>
<name>EditAddressDialog</name>
@@ -200,6 +335,34 @@
<source>&amp;Address</source>
<translation>&amp;Adresa</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>Adresë e re pritëse</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>Adresë e re dërgimi</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>Ndrysho adresën pritëse</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>ndrysho adresën dërguese</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>Adresa e dhënë "%1" është e zënë në librin e adresave. </translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>Nuk mund të ç'kyçet portofoli.</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>Krijimi i çelësit të ri dështoi.</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -227,6 +390,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formilarë</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -248,6 +418,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -256,6 +429,16 @@
<source>Amount</source>
<translation>Sasia</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 dhe %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -301,6 +484,33 @@
<source>Copy &amp;Address</source>
<translation>&amp;Kopjo adresen</translation>
</message>
+ <message>
+ <source>Address</source>
+ <translation>Adresë</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Sasia</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketë</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketë</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(pa etiketë)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -328,7 +538,19 @@
<source>Confirm the send action</source>
<translation>Konfirmo veprimin e dërgimit</translation>
</message>
- </context>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>konfirmo dërgimin e monedhave</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>Shuma e paguar duhet të jetë më e madhe se 0.</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(pa etiketë)</translation>
+ </message>
+</context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -359,6 +581,13 @@
<source>Pay To:</source>
<translation>Paguaj drejt:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>Krijoni një etiketë për këtë adresë që t'ja shtoni librit të adresave</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
</context>
<context>
<name>ShutdownWindow</name>
@@ -389,16 +618,166 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Open until %1</source>
+ <translation>Hapur deri më %1</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/I pakonfirmuar</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 konfirmimet</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>, nuk është transmetuar me sukses deri tani</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>i/e panjohur</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>transaksionit</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Sasia</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ky panel tregon një përshkrim të detajuar të transaksionit</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Lloji</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketë</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>Hapur deri më %1</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>I/E konfirmuar(%1 konfirmime)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>Ky bllok është marrë nga ndonjë nyje dhe ka shumë mundësi të mos pranohet! </translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>I krijuar por i papranuar</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>Marrë me</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Dërguar drejt</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>Pagesë ndaj vetvetes</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minuar</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(p/a)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(pa etiketë)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Received with</source>
+ <translation>Marrë me</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>Dërguar drejt</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>Minuar</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopjo adresën</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Skedar i ndarë me pikëpresje(*.csv)</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>Data</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>Lloji</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiketë</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adresë</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Eksportimi dështoj</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Dërgo Monedha</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Eksporto të dhënat e skedës korrente në një skedar</translation>
+ </message>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index 6b6f1af6f6..0fda9b9350 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -2,6 +2,10 @@
<context>
<name>AddressBookPage</name>
<message>
+ <source>Right-click to edit address or label</source>
+ <translation>Kliknite desnim klikom radi izmene adrese ili oznake</translation>
+ </message>
+ <message>
<source>Create a new address</source>
<translation>Napravite novu adresu</translation>
</message>
@@ -18,14 +22,25 @@
<translation>Kopirajte</translation>
</message>
<message>
+ <source>C&amp;lose</source>
+ <translation>Zatvorite</translation>
+ </message>
+ <message>
<source>Delete the currently selected address from the list</source>
<translation>Izbrisite trenutno izabranu adresu sa liste</translation>
</message>
<message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>Eksportuj podatke iz izabrane kartice u fajl</translation>
+ </message>
+ <message>
<source>&amp;Delete</source>
<translation>&amp;Избриши</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -40,7 +55,7 @@
<source>Repeat new passphrase</source>
<translation>Поновите нову лозинку</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -154,7 +169,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Новчаник јс &lt;b&gt;шифрован&lt;/b&gt; и тренутно &lt;b&gt;закључан&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -188,7 +203,7 @@
<source>&amp;Address</source>
<translation>&amp;Адреса</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -207,6 +222,13 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Форма</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -236,6 +258,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -246,6 +271,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -271,6 +302,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -288,7 +322,7 @@
<source>S&amp;end</source>
<translation>&amp;Пошаљи</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -313,6 +347,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -337,16 +374,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ovaj odeljak pokazuje detaljan opis transakcije</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_sr@latin.ts b/src/qt/locale/bitcoin_sr@latin.ts
index 86243bc14c..2cfb95fb21 100644
--- a/src/qt/locale/bitcoin_sr@latin.ts
+++ b/src/qt/locale/bitcoin_sr@latin.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Izbrisati</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,55 @@
<source>Repeat new passphrase</source>
<translation>Ponovo unesite pristupnu frazu</translation>
</message>
-</context>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Unesite novu pristupnu frazu u novčanik. &lt;br/&gt;Molimo, koristite pristupnu frazu koja ima &lt;b&gt; deset ili više nasumičnih znakova&lt;/b&gt;, ili &lt;b&gt;osam ili više reči&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Šifrujte novčanik</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Da biste otključali novčanik potrebno je da unesete svoju pristupnu frazu.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Otključajte novčanik</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Da biste dešifrovali novčanik, potrebno je da unesete svoju pristupnu frazu.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dešifrujte novčanik</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Promenite pristupnu frazu</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Unesite u novčanik staru pristupnu frazu i novu pristupnu frazu.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Potvrdite šifrovanje novčanika</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>Upozorenje: Ako šifrujete svoj novčanik, i potom izgubite svoju pristupnu frazu &lt;b&gt;IZGUBIĆETE SVE SVOJE BITKOINE&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Da li ste sigurni da želite da šifrujete svoj novčanik?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Novčanik je šifrovan</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -75,13 +126,143 @@
<context>
<name>BitcoinGUI</name>
<message>
+ <source>Synchronizing with network...</source>
+ <translation>Usklađivanje sa mrežom...</translation>
+ </message>
+ <message>
+ <source>&amp;Overview</source>
+ <translation>&amp;Pregled</translation>
+ </message>
+ <message>
+ <source>Quit application</source>
+ <translation>Isključi aplikaciju</translation>
+ </message>
+ <message>
+ <source>&amp;Options...</source>
+ <translation>&amp;Opcije...</translation>
+ </message>
+ <message>
+ <source>&amp;Change Passphrase...</source>
+ <translation>&amp;Izmeni pristupnu frazu...</translation>
+ </message>
+ <message>
+ <source>&amp;Sending addresses...</source>
+ <translation>&amp;Slanje adresa...</translation>
+ </message>
+ <message>
+ <source>&amp;Receiving addresses...</source>
+ <translation>&amp;Primanje adresa...</translation>
+ </message>
+ <message>
+ <source>Open &amp;URI...</source>
+ <translation>Otvori &amp;URI...</translation>
+ </message>
+ <message>
+ <source>Send coins to a Bitcoin address</source>
+ <translation>Pošalji novčiće na Bitcoin adresu</translation>
+ </message>
+ <message>
+ <source>&amp;Verify message...</source>
+ <translation>&amp;Proveri poruku...</translation>
+ </message>
+ <message>
+ <source>Bitcoin</source>
+ <translation>Bitcoin</translation>
+ </message>
+ <message>
+ <source>Wallet</source>
+ <translation>Novčanik</translation>
+ </message>
+ <message>
+ <source>&amp;Send</source>
+ <translation>&amp;Pošalji</translation>
+ </message>
+ <message>
+ <source>&amp;Receive</source>
+ <translation>&amp;Primi</translation>
+ </message>
+ <message>
+ <source>&amp;Show / Hide</source>
+ <translation>&amp;Prikazati / Sakriti</translation>
+ </message>
+ <message>
+ <source>Show or hide the main Window</source>
+ <translation>Prikaži ili sakrij glavni prozor</translation>
+ </message>
+ <message>
+ <source>&amp;Settings</source>
+ <translation>&amp;Podešavanja</translation>
+ </message>
+ <message>
+ <source>&amp;Help</source>
+ <translation>&amp;Pomoć</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Greska</translation>
</message>
+ <message>
+ <source>Warning</source>
+ <translation>Upozorenje</translation>
+ </message>
+ <message>
+ <source>Information</source>
+ <translation>Informacije</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 klijent</translation>
+ </message>
+ <message>
+ <source>Date: %1
+</source>
+ <translation>Datum: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Iznos: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tip: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Oznaka: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Adresa: %1
+</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
+ <source>Quantity:</source>
+ <translation>Količina:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Iznos:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Naknada:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Nakon Naknade:</translation>
+ </message>
+ <message>
<source>Amount</source>
<translation>Kolicina</translation>
</message>
@@ -92,6 +273,18 @@
</context>
<context>
<name>EditAddressDialog</name>
+ <message>
+ <source>Edit Address</source>
+ <translation>Izmeni Adresu</translation>
+ </message>
+ <message>
+ <source>&amp;Label</source>
+ <translation>&amp;Oznaka</translation>
+ </message>
+ <message>
+ <source>&amp;Address</source>
+ <translation>&amp;Adresa</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -107,6 +300,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -116,6 +312,9 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -126,6 +325,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -135,12 +340,34 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
+ <message>
+ <source>Quantity:</source>
+ <translation>Količina:</translation>
+ </message>
+ <message>
+ <source>Amount:</source>
+ <translation>Iznos:</translation>
+ </message>
+ <message>
+ <source>Fee:</source>
+ <translation>Naknada:</translation>
+ </message>
+ <message>
+ <source>After Fee:</source>
+ <translation>Nakon Naknade:</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -153,18 +380,44 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
+ <source>Information</source>
+ <translation>Informacije</translation>
+ </message>
+ <message>
+ <source>Warning</source>
+ <translation>Upozorenje</translation>
+ </message>
+ <message>
<source>Insufficient funds</source>
<translation>Nedovoljno sredstava</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index ee46974d8b..4d45d20cbf 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -41,6 +41,78 @@
<source>&amp;Delete</source>
<translation>&amp;Radera</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Välj en adress att sända betalning till</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Välj en adress att ta emot betalning till</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>V&amp;älj</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Avsändaradresser</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Mottagaradresser</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>Detta är dina Bitcoin adresser för att skicka betalningar. Kolla alltid summan och den mottagande adressen innan du skickar Bitcoins.</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>Detta är dina Bitcoin adresser för att ta emot betalningar. Det rekommenderas att använda en ny mottagningsadress för varje transaktion.</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Kopiera adress</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>Kopiera &amp;etikett</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Redigera</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Exportera adresslista</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommaseparerad fil (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Export misslyckades</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>Det inträffade ett fel när adresslistan skulle sparas till %1.
+Var vänlig och försök igen.</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etikett</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adress</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(Ingen etikett)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +132,94 @@
<source>Repeat new passphrase</source>
<translation>Upprepa nytt lösenord</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>Ange plånbokens nya lösenord. &lt;br/&gt; Använd ett lösenord på &lt;b&gt;tio eller fler slumpmässiga tecken,&lt;/b&gt; eller &lt;b&gt;åtta eller fler ord.&lt;/b&gt;.</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Kryptera plånbok</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>Denna operation behöver din plånboks lösenord för att låsa upp plånboken.</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Lås upp plånbok</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Denna operation behöver din plånboks lösenord för att dekryptera plånboken.</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>Dekryptera plånbok</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Ändra lösenord</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Ge det gamla lösenordet och det nya lösenordet för plånboken.</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Bekräfta kryptering av plånbok</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>VARNING: Om du krypterar din plånbok och glömmer ditt lösenord, kommer du att &lt;b&gt;FÖRLORA ALLA DINA BITCOIN&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Är du säker på att du vill kryptera din plånbok?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Plånbok krypterad</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 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.</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>VIKTIGT: Alla tidigare säkerhetskopior du har gjort av plånboksfilen ska ersättas med den nya genererade, krypterade plånboksfilen. Av säkerhetsskäl kommer tidigare säkerhetskopior av den okrypterade plånboksfilen blir oanvändbara när du börjar använda en ny, krypterad plånbok.</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Kryptering av plånbok misslyckades</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>Kryptering av plånbok misslyckades på grund av ett internt fel. Din plånbok blev inte krypterad.</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>De angivna lösenorden överensstämmer inte.</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Misslyckades låsa upp plånboken</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>Lösenordet för dekryptering av plånboken var felaktig.</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>Dekryptering av plånbok misslyckades</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>Plånbokens lösenord har ändrats.</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>Varning: Caps Lock är påslaget!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -278,26 +438,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Bearbetade %n block av transaktionshistoriken.</numerusform><numerusform>Bearbetade %n block av transaktionshistoriken.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n timme</numerusform><numerusform>%n timmar</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n dag</numerusform><numerusform>%n dagar</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n vecka</numerusform><numerusform>%n veckor</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 och %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n år</numerusform><numerusform>%n år</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 efter</translation>
@@ -384,7 +524,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Denna plånbok är &lt;b&gt;krypterad&lt;/b&gt; och för närvarande &lt;b&gt;låst&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +544,6 @@
<translation>Belopp:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Avgift:</translation>
</message>
@@ -460,10 +596,22 @@
<translation>Bekräftad</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Prioritet</translation>
+ <source>Copy address</source>
+ <translation>Kopiera adress</translation>
</message>
-</context>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiera etikett</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiera belopp</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(Ingen etikett)</translation>
+ </message>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -486,7 +634,7 @@
<source>&amp;Address</source>
<translation>&amp;Adress</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -609,6 +757,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Formulär</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Sista blocktid</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Göm</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,7 +789,7 @@
<source>Select payment request file</source>
<translation>Välj betalningsbegäransfil</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -938,6 +1101,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -947,11 +1113,7 @@
<source>Node/Service</source>
<translation>Nod/Tjänst</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Pingtid</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -990,7 +1152,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 och %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1194,14 +1366,6 @@
<translation>Rensa konsollen</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Koppla från nod</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Banna nod i</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;timme</translation>
</message>
@@ -1218,10 +1382,6 @@
<translation>1 &amp;år</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Ta bort ban från nod</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>Välkommen till %1 RPC-konsolen.</translation>
</message>
@@ -1352,6 +1512,14 @@
<source>Remove</source>
<translation>Ta bort</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiera etikett</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiera belopp</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,7 +1539,26 @@
<source>&amp;Save Image...</source>
<translation>&amp;Spara Bild...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Adress</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etikett</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etikett</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(Ingen etikett)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1407,10 +1594,6 @@
<translation>Belopp:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Prioritet:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Avgift:</translation>
</message>
@@ -1479,10 +1662,6 @@
<translation>(Smartavgiften är inte initierad än. Detta tar vanligen några block...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Bekräftelsetid:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1522,6 +1701,14 @@
<source>S&amp;end</source>
<translation>&amp;Skicka</translation>
</message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiera belopp</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(Ingen etikett)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,7 +1788,10 @@
<source>Memo:</source>
<translation>PM:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1699,7 +1889,7 @@
<source>Reset all verify message fields</source>
<translation>Rensa alla fält</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1715,12 +1905,57 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Den här panelen visar en detaljerad beskrivning av transaktionen</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etikett</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(Ingen etikett)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Copy address</source>
+ <translation>Kopiera adress</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Kopiera etikett</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Kopiera belopp</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>Kommaseparerad fil (*.csv)</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etikett</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adress</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Export misslyckades</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1729,6 +1964,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1791,16 +2035,12 @@
<translation>Kunde inte starta HTTP-server. Se avlusningsloggen för detaljer.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Acceptera anslutningar utifrån (förvalt: 1 om ingen -proxy eller -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee är satt väldigt högt! Detta är avgiften du kan komma att betala om uppskattad avgift inte finns tillgänglig.</translation>
+ <source>The %s developers</source>
+ <translation>%s-utvecklarna</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1823,10 +2063,6 @@
<translation>Ta bort alla plånbokstransaktioner och återskapa bara dom som är en del av blockkedjan genom att ange -rescan vid uppstart</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distribuerad under MIT mjukvarulicens, se den bifogade filen COPYING eller &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>Fel vid laddning av %s: Du kan inte aktivera HD på en existerande icke-HD plånbok</translation>
</message>
@@ -1839,10 +2075,6 @@
<translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Vidarebefodra alltid transaktioner från vitlistade noder även om de bryter mot lokala reläpolicyn (förvalt: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Maximalt tillåten median-peer tidsoffset justering. Lokalt perspektiv av tiden kan bli påverkad av partners, framåt eller bakåt denna tidsrymd. (förvalt: %u sekunder)</translation>
</message>
@@ -1867,10 +2099,6 @@
<translation>Blockdatabasen innehåller ett block som verkar vara från framtiden. Detta kan vara på grund av att din dators datum och tid är felaktiga. Bygg bara om blockdatabasen om du är säker på att datorns datum och tid är korrekt</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Detta är ett förhands testbygge - använd på egen risk - använd inte för mining eller handels applikationer</translation>
- </message>
- <message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation>Kan inte spola tillbaka databasen till obeskärt läge. Du måste ladda ner blockkedjan igen</translation>
</message>
@@ -1879,18 +2107,6 @@
<translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 1 när lyssning aktiverat och utan -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Varning: Nätverket verkar inte vara helt överens! Några miners verkar ha problem.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Varning: Vi verkar inte helt överens med våra peers! Du kan behöva uppgradera, eller andra noder kan behöva uppgradera.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Vitlista klienter som ansluter från angivna nätmasker eller IP-adresser. Kan specificeras flera gånger.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>Du måste återskapa databasen med -reindex-chainstate för att ändra -txindex</translation>
</message>
@@ -1927,10 +2143,6 @@
<translation>Förändringsindexet utom räckhåll</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Koppla enbart upp till den/de specificerade noden/noder</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Anslutningsalternativ:</translation>
</message>
@@ -2051,10 +2263,6 @@
<translation>Plats för authcookie (förvalt: datamapp)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Minimum antal byte per sigop i transaktioner som vi reläar och bryter (förvalt: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Inte tillräckligt med filbeskrivningar tillgängliga.</translation>
</message>
@@ -2095,10 +2303,6 @@
<translation>Sätt databasens cachestorlek i megabyte (%d till %d, förvalt: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Sätt maximal blockkostnad (förvalt: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>Sätt maximal blockstorlek i byte (förvalt: %d)</translation>
</message>
@@ -2203,10 +2407,6 @@
<translation>Maximal storlek på data i databärartransaktioner som vi reläar och bryter (förvalt: %u) </translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Sök efter klientadresser med DNS sökningen, om det finns otillräckligt med adresser (förvalt: 1 om inte -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Slumpa autentiseringen för varje proxyanslutning. Detta möjliggör Tor ström-isolering (förvalt: %u)</translation>
</message>
@@ -2219,10 +2419,6 @@
<translation>Transaktionen är för liten att skicka efter det att avgiften har dragits</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit &lt;https://www.openssl.org/&gt; och kryptografisk mjukvara utvecklad av Eric Young samt UPnP-mjukvara skriven av Thomas Bernard.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>Använd hierarkisk deterministisk nyckel generering (HD) efter BIP32. Har bara effekt under plånbokens skapande/första användning.</translation>
</message>
@@ -2335,10 +2531,6 @@
<translation>Transaktions belopp för liten</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Transaktionens belopp måste vara positiva</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Transaktionen är för stor för avgiftspolicyn</translation>
</message>
@@ -2403,14 +2595,14 @@
<translation>-maxtxfee är väldigt högt satt! Så höga avgifter kan komma att betalas för en enstaka transaktion.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee är väldigt högt satt! Det här är avgiften du kommer betala om du skickar en transaktion.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Håll inte transaktioner i minnespoolen längre än &lt;n&gt; timmar (förvalt: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Samma antal byte per sigop i transaktioner som vi reläar och bryter (förvalt: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Avgifter (i %s/kB) mindre än detta anses vara nollavgifter vid skapande av transaktion (standard: %s)</translation>
</message>
@@ -2455,10 +2647,6 @@
<translation>Använd separat SOCKS5 proxy för att nå kollegor via dolda tjänster i Tor (förvalt: -%s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Användarnamn och hashat lösenord för JSON-RPC-anslutningar. Fältet &lt;userpw&gt; kommer i formatet: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Ett kanoniskt pythonskript finns inkluderat i share/rpcuser. Detta alternativ kan anges flera gånger</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>Varning: Okända blockversioner bryts! Det är möjligt att okända regler används</translation>
</message>
@@ -2527,8 +2715,8 @@
<translation>Sätt storleken på nyckelpoolen till &lt;n&gt; (förvalt: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Sätt minsta blockstorlek i byte (standard: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Sätt maximal BIP141 blockvikt (förvalt: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
diff --git a/src/qt/locale/bitcoin_ta.ts b/src/qt/locale/bitcoin_ta.ts
index 921171c544..ef8c26c41d 100644
--- a/src/qt/locale/bitcoin_ta.ts
+++ b/src/qt/locale/bitcoin_ta.ts
@@ -25,7 +25,22 @@
<source>&amp;Delete</source>
<translation>&amp;அழி</translation>
</message>
-</context>
+ <message>
+ <source>Sending addresses</source>
+ <translation>முகவரிகள் அனுப்பப்படுகின்றன</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>முகவரிகள் பெறப்படுகின்றன</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Address</source>
+ <translation>முகவரி</translation>
+ </message>
+ </context>
<context>
<name>AskPassphraseDialog</name>
</context>
@@ -106,14 +121,6 @@
<source>&amp;Help</source>
<translation>&amp;உதவி</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n மணி</numerusform><numerusform>%n மணி</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 மற்றும் %2</translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 பின்னால்</translation>
@@ -170,10 +177,6 @@
<translation>விலை:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>முன்னுரிமை</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>கட்டணம்:</translation>
</message>
@@ -201,11 +204,7 @@
<source>Confirmed</source>
<translation>உறுதியாக</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>முன்னுரிமை</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
</context>
@@ -231,6 +230,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>படிவம்</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>மறை</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -332,16 +342,15 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
<translation>பயனர் முகவர்</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>பிங் நேரம்</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -368,7 +377,17 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 மற்றும் %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -530,7 +549,7 @@
<source>Remove</source>
<translation>நீக்கு</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -549,7 +568,14 @@
<source>&amp;Save Image...</source>
<translation>&amp;படத்தை சேமி...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>முகவரி</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -561,10 +587,6 @@
<translation>விலை</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>முன்னுரிமை</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>கட்டணம்:</translation>
</message>
@@ -600,7 +622,7 @@
<source>S&amp;end</source>
<translation>&amp;அனுப்பு</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -625,6 +647,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -653,12 +678,34 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Address</source>
+ <translation>முகவரி</translation>
+ </message>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Bitcoin Core</source>
diff --git a/src/qt/locale/bitcoin_th_TH.ts b/src/qt/locale/bitcoin_th_TH.ts
index 34c7526341..18e78847fc 100644
--- a/src/qt/locale/bitcoin_th_TH.ts
+++ b/src/qt/locale/bitcoin_th_TH.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;ลบ</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>กรุณากรอกรหัสผ่านใหม่อีกครั้งหนึ่ง</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -278,26 +281,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>%n บล็อกในประวัติรายการ ได้รับการดำเนินการเรียบร้อยแล้ว</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n ชั่วโมง</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n วัน</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n สัปดาห์</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 และ %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n ปี</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 ตามหลัง</translation>
@@ -384,7 +367,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>กระเป๋าเงินถูก &lt;b&gt;เข้ารหัส&lt;/b&gt; และในปัจจุบัน &lt;b&gt;ล็อค &lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +387,6 @@
<translation>จำนวน:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>ความเร่งด่วน:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>ค่าธรรมเนียม:</translation>
</message>
@@ -459,11 +438,7 @@
<source>Confirmed</source>
<translation>ยืนยันแล้ว</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>ระดับความสำคัญ</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -486,7 +461,7 @@
<source>&amp;Address</source>
<translation>&amp;ที่เก็บ</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -498,6 +473,10 @@
<translation>ชื่อ</translation>
</message>
<message>
+ <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <translation>ไดเร็กทอรี่มีอยู่แล้ว ใส่เพิ่ม %1 หากท่านต้องการสร้างไดเร็กทอรี่ใหม่ที่นี่</translation>
+ </message>
+ <message>
<source>Path already exists, and is not a directory.</source>
<translation>พาธ มีอยู่แล้ว พาธนี่ไม่ใช่ไดเร็กทอรี่</translation>
</message>
@@ -605,6 +584,13 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>รูป</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -622,7 +608,7 @@
<source>Select payment request file</source>
<translation>เลือก ไฟล์การเรียกการชำระเงิน</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -798,6 +784,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -806,6 +795,16 @@
<source>Amount</source>
<translation>จำนวน</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 และ %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
</context>
<context>
<name>RPCConsole</name>
@@ -821,6 +820,9 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -839,10 +841,6 @@
<translation>จำนวน:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>ความเร่งด่วน</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>ค่าธรรมเนียม:</translation>
</message>
@@ -867,6 +865,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -883,12 +884,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index e3a811b504..d1249d09be 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -41,6 +41,61 @@
<source>&amp;Delete</source>
<translation>&amp;Sil</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>Parayı göndermek istediğiniz adresi seçiniz</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>Parayı almak istediğiniz adresi seçiniz</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>S&amp;eçiniz</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>Gönderilen adresler</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>Alınan adresler</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>&amp;Adres Kopyala</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>&amp;Etiketi kopyala</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>&amp;Değiştir</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>Adres listesini dışarı aktar</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Dışarı aktarmada hata</translation>
+ </message>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiket yok)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,7 +115,43 @@
<source>Repeat new passphrase</source>
<translation>Yeni parolayı tekrarlayınız</translation>
</message>
-</context>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>Şifrelenmiş cüzdan</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>Cüzdan kilidini kaldır</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>Bu işlem, cüzdan şifresini çözmek için cüzdan parolanıza ihtiyaç duyuyor.</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>Parola değiştir</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>Cüzdan şifrelemesini onayla</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>Cüzdanınızı şifrelemek istediğinizden emin misiniz?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>Cüzdan şifrelendi</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>Cüzdan şifreleme başarısız</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>Cüzdan kilidi kaldırma hatası</translation>
+ </message>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -278,26 +369,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Muamele tarihçesinden %n blok işlendi.</numerusform><numerusform>Muamele tarihçesinden %n blok işlendi</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n saat</numerusform><numerusform>%n saat</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n gün</numerusform><numerusform>%n gün</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n hafta</numerusform><numerusform>%n hafta</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 ve %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n yıl</numerusform><numerusform>%n yıl</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 geride</translation>
@@ -384,7 +455,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Cüzdan &lt;b&gt;şifrelenmiştir&lt;/b&gt; ve şu anda &lt;b&gt;kilitlidir&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -404,10 +475,6 @@
<translation>Meblağ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Öncelik:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Ücret:</translation>
</message>
@@ -460,10 +527,22 @@
<translation>Doğrulandı</translation>
</message>
<message>
- <source>Priority</source>
- <translation>Öncelik</translation>
+ <source>Copy address</source>
+ <translation>Adres kopyala</translation>
</message>
-</context>
+ <message>
+ <source>Copy label</source>
+ <translation>Etiket kopyala</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Miktarı kopyala</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiket yok)</translation>
+ </message>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -486,7 +565,7 @@
<source>&amp;Address</source>
<translation>&amp;Adres</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -609,6 +688,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Son blok zamanı</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Sakla</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,7 +720,7 @@
<source>Select payment request file</source>
<translation>Ödeme talebi dosyasını seç</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -938,6 +1032,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -947,11 +1044,7 @@
<source>Node/Service</source>
<translation>Düğüm/Servis</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping Süresi</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -990,7 +1083,21 @@
<source>%1 ms</source>
<translation>%1 ms</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 ve %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>Resmi ka&amp;ydet...</translation>
+ </message>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1194,14 +1301,6 @@
<translation>Konsolu temizle</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>Düğümle Bağlantıyı &amp;Kes</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Düğümü şu süre için yasakla:</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;saat</translation>
</message>
@@ -1218,10 +1317,6 @@
<translation>1 &amp;yıl</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>Düğümün Yasağını Kald&amp;ır</translation>
- </message>
- <message>
<source>Welcome to the %1 RPC console.</source>
<translation>%1 RPC konsoluna hoş geldiniz.</translation>
</message>
@@ -1352,6 +1447,14 @@
<source>Remove</source>
<translation>Kaldır</translation>
</message>
+ <message>
+ <source>Copy label</source>
+ <translation>Etiket kopyala</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Miktarı kopyala</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,7 +1474,26 @@
<source>&amp;Save Image...</source>
<translation>Resmi ka&amp;ydet...</translation>
</message>
-</context>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiket yok)</translation>
+ </message>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1407,10 +1529,6 @@
<translation>Meblağ:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Öncelik:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Ücret:</translation>
</message>
@@ -1479,10 +1597,6 @@
<translation>(Zeki ücret henüz başlatılmadı. Bu genelde birkaç blok alır...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Teyit süresi:</translation>
- </message>
- <message>
<source>normal</source>
<translation>normal</translation>
</message>
@@ -1522,6 +1636,14 @@
<source>S&amp;end</source>
<translation>G&amp;önder</translation>
</message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Miktarı kopyala</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiket yok)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,7 +1723,10 @@
<source>Memo:</source>
<translation>Not:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1699,7 +1824,7 @@
<source>Reset all verify message fields</source>
<translation>Tüm mesaj kontrolü alanlarını sıfırla</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1715,12 +1840,53 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Bu pano muamelenin ayrıntılı açıklamasını gösterir</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(etiket yok)</translation>
+ </message>
+ </context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>Copy address</source>
+ <translation>Adres kopyala</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>Etiket kopyala</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>Miktarı kopyala</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>Etiket</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>Adres</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>Dışarı aktarmada hata</translation>
+ </message>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1729,6 +1895,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1791,10 +1966,6 @@
<translation>HTTP sunucusu başlatılamadı. Ayrıntılar için debug.log dosyasına bakınız.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Dışarıdan gelen bağlantıları kabul et (varsayılan: -proxy veya -connect yoksa 1)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Çekirdeği</translation>
</message>
@@ -1803,10 +1974,6 @@
<translation>%s geliştiricileri</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfee çok yüksek bir değere ayarlanmış! Ücret tahminleri mevcut değilken ödeyebileceğiniz muamele ücretidir bu.</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>Ücret tahmini için yetersiz veri bulunduğunda kullanılacak ücret oranı (%s/kB olarak) (varsayılan: %s)</translation>
</message>
@@ -1827,10 +1994,6 @@
<translation>Tüm cüzdan muamelelerini sil ve başlangıçta -rescan ile sadece blok zincirinin parçası olanları geri getir</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>MIT yazılım lisansı kapsamında yayınlanmıştır, ekteki COPYING dosyasına ya da &lt;http://www.opensource.org/licenses/mit-license.php&gt; adresine bakınız.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>%s yüklenmesinde hata: zaten var olan ve HD olmayan bir cüzdanda HD etkinleştirilemez.</translation>
</message>
@@ -1843,10 +2006,6 @@
<translation>Bir cüzdan muamelesi değiştiğinde komutu çalıştır (komuttaki %s muamele kimliği ile değiştirilecektir)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>Yerel aktarma politikasını ihlal ettiklerinde bile beyaz listedeki eşlerden gelen muamelelerin aktarılmasını zorla (varsayılan: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>Müsaade edilen azami medyan eş zamanı değişiklik sınırının ayarlaması. Zamanın yerel perspektifi bu miktar kadar ileri ya da geri eşler tarafından etkilenebilir. (Varsayılan %u saniye)</translation>
</message>
@@ -1871,10 +2030,6 @@
<translation>Blok veritabanı gelecekten gibi görünen bir blok içermektedir. Bu, bilgisayarınızın saat ve tarihinin yanlış ayarlanmış olmasından kaynaklanabilir. Blok veritabanını sadece bilgisayarınızın tarih ve saatinin doğru olduğundan eminseniz yeniden derleyin.</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Bu yayın öncesi bir deneme sürümüdür - tüm riski siz üstlenmiş olursunuz - bitcoin oluşturmak ya da ticari uygulamalar için kullanmayınız</translation>
- </message>
- <message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
<translation>Veritabanını çatallama öncesi duruma geri sarmak mümkün değil. Blok zincirini tekrar indirmeniz gerekmektedir</translation>
</message>
@@ -1883,18 +2038,6 @@
<translation>Dinlenecek portu haritalamak için UPnP kullan (varsayılan: dinlenildiğinde ve -proxy olmadığında 1)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Uyarı: şebeke tamamen mutabık değil gibi görünüyor! Bazı madenciler sorun yaşıyor gibi görünüyor.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Uyarı: eşlerimizle tamamen mutabık değiliz gibi görünüyor! Güncelleme yapmanız gerekebilir ya da diğer düğümlerin güncelleme yapmaları gerekebilir.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Belirtilen ağ maskesi ya da IP adresinden bağlanan eşleri beyaz listeye al. Birden fazla kez belirtilebilir.</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>-txindex'i değiştirmek için veritabanını -reindex-chainstate kullanarak tekrar inşa etmeniz gerekmektedir</translation>
</message>
@@ -1931,10 +2074,6 @@
<translation>Aralık dışında değişiklik endeksi</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Sadece belirtilen düğüme veya düğümlere bağlan</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Bağlantı seçenekleri:</translation>
</message>
@@ -2055,10 +2194,6 @@
<translation>auth çerezinin konumu (varsayılan: veri klasörü)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>Aktardığımız ve oluşturduğumuz muamelelerdeki sigop başına asgari bayt (varsayılan: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>Kafi derecede dosya tanımlayıcıları mevcut değil.</translation>
</message>
@@ -2099,10 +2234,6 @@
<translation>Veritabanı önbellek boyutunu megabayt olarak belirt (%d ilâ %d, varsayılan: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>Azami blok maliyetini ayarla (varsayılan: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>Azami blok boyutunu bayt olarak ayarla (varsayılan: %d)</translation>
</message>
@@ -2207,10 +2338,6 @@
<translation>Aktardığımız ve oluşturduğumuz veri taşıyıcı muamelelerindeki azami veri boyutu (varsayılan: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Her vekil bağlantısı için kimlik verilerini rastgele yap. Bu, Tor akış izolasyonunu etkinleştirir (varsayılan: %u)</translation>
</message>
@@ -2223,10 +2350,6 @@
<translation>Bu muamele, ücret düşüldükten sonra göndermek için çok düşük</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>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.</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>BIP32'den sonra hiyerarşik determinist (HD) anahtar üretimini kullan. Sadece cüzdan oluşturulmasında/ilk başlamada etkiye sahiptir.</translation>
</message>
@@ -2339,10 +2462,6 @@
<translation>Muamele meblağı çok düşük</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Muamele tutarının pozitif olması lazımdır</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Ücret politikası için çok büyük muamele</translation>
</message>
@@ -2407,14 +2526,14 @@
<translation>-maxtxfee çok yüksek bir değere ayarlanmış! Bu denli yüksek ücretler tek bir muamelede ödenebilir.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>-paytxfee çok yüksek bir değere ayarlanmış! Bu, muamele gönderirseniz ödeyeceğiniz muamele ücretidir.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Muameleleri bellek alanında &lt;n&gt; saatten fazla tutma (varsayılan: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>Oluşturma ve aktarşa muamelelerinde sigop başına eşdeğer bayt (varsayılan: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>Bundan düşük ücretler (%s/kB olarak) muamele oluşturulması için sıfır değerinde ücret olarak kabul edilir (varsayılan: %s)</translation>
</message>
@@ -2459,10 +2578,6 @@
<translation>Eşlere gizli Tor servisleri ile ulaşmak için ayrı SOCKS5 vekil sunucusu kullan (varsayılan: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>JSON-RPC bağlantıları için kullanıcı ismi ve karmalanmış parola. &lt;userpw&gt; alanı şu biçimdedir: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Kanonik bir Python betiği share/rpcuser klasöründe bulunabilir. Bu seçenek birden çok kez belirtilebilir.</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>İkaz: bilinmeyen blok sürümü oluşturulmaya çalışılıyor. Bilinmeyen kuralların işlemesi mümkündür.</translation>
</message>
@@ -2531,8 +2646,8 @@
<translation>Anahtar alan boyutunu &lt;n&gt; değerine ayarla (varsayılan: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Bayt olarak asgari blok boyutunu tanımla (varsayılan: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>Azami BIP141 blok ağırlığını ayarla (varsayılan: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
diff --git a/src/qt/locale/bitcoin_tr_TR.ts b/src/qt/locale/bitcoin_tr_TR.ts
index 344309c25f..c4e4d2983e 100644
--- a/src/qt/locale/bitcoin_tr_TR.ts
+++ b/src/qt/locale/bitcoin_tr_TR.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Sil</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
</context>
@@ -68,7 +71,7 @@
<source>&amp;Address</source>
<translation>Adres</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -79,6 +82,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -88,12 +94,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -107,12 +122,18 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -125,12 +146,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index a06cc9e092..9c46c18224 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Видалити</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Повторіть пароль</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -262,26 +265,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>Оброблено %n блок історії транзакцій.</numerusform><numerusform>Оброблено %n блоки історії транзакцій.</numerusform><numerusform>Оброблено %n блоків історії транзакцій.</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n година</numerusform><numerusform>%n години</numerusform><numerusform>%n годин</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n день</numerusform><numerusform>%n дні</numerusform><numerusform>%n днів</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n тиждень</numerusform><numerusform>%n тижня</numerusform><numerusform>%n тижнів</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 та %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n рік</numerusform><numerusform>%n роки</numerusform><numerusform>%n років</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 тому</translation>
@@ -360,7 +343,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>&lt;b&gt;Зашифрований&lt;/b&gt; гаманець &lt;b&gt;заблоковано&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -380,10 +363,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Пріорітет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комісія:</translation>
</message>
@@ -435,11 +414,7 @@
<source>Confirmed</source>
<translation>Підтверджені</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Пріоритет</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -462,7 +437,7 @@
<source>&amp;Address</source>
<translation>&amp;Адреса</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -565,6 +540,21 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Форма</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Час останнього блоку</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Приховати</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,7 +572,7 @@
<source>Select payment request file</source>
<translation>Виберіть файл запиту платежу</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -874,6 +864,9 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -883,11 +876,7 @@
<source>Node/Service</source>
<translation>Вузол/Сервіс</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Затримка</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -926,7 +915,17 @@
<source>%1 ms</source>
<translation>%1 мс</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 та %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -1114,14 +1113,6 @@
<translation>Очистити консоль</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>&amp;Від'єднати Вузол</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>Заблокувати Вузол на</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 &amp;годину</translation>
</message>
@@ -1138,10 +1129,6 @@
<translation>1 &amp;рік</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>&amp;Розблокувати Вузол</translation>
- </message>
- <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Використовуйте стрілки вгору вниз для навігації по історії, і &lt;b&gt;Ctrl-L&lt;/b&gt; для очищення екрана.</translation>
</message>
@@ -1268,7 +1255,7 @@
<source>Remove</source>
<translation>Вилучити</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -1287,7 +1274,10 @@
<source>&amp;Save Image...</source>
<translation>&amp;Зберегти зображення...</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1323,10 +1313,6 @@
<translation>Сума:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Пріорітет:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Комісія:</translation>
</message>
@@ -1395,10 +1381,6 @@
<translation>(Розумну оплату ще не ініціалізовано. Це, зазвичай, триває кілька блоків...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Час підтвердження:</translation>
- </message>
- <message>
<source>normal</source>
<translation>звичайний</translation>
</message>
@@ -1438,7 +1420,7 @@
<source>S&amp;end</source>
<translation>&amp;Відправити</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1517,7 +1499,10 @@
<source>Memo:</source>
<translation>Нотатка:</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>SendConfirmationDialog</name>
+ </context>
<context>
<name>ShutdownWindow</name>
<message>
@@ -1611,7 +1596,7 @@
<source>Reset all verify message fields</source>
<translation>Скинути всі поля перевірки повідомлення</translation>
</message>
-</context>
+ </context>
<context>
<name>SplashScreen</name>
<message>
@@ -1627,12 +1612,21 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Даний діалог показує детальну статистику по вибраній транзакції</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
<message>
@@ -1641,6 +1635,15 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1703,10 +1706,6 @@
<translation>Неможливо запустити HTTP-сервер. Детальніший опис наведено в журналі зневадження.</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>Приймати підключення ззовні (типово: 1 за відсутності -proxy чи -connect)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1719,10 +1718,6 @@
<translation>Видалити всі транзакції гаманця та відновити ті, що будуть знайдені під час запуску за допомогою -rescan</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Поширюється за ліцензією MIT, додаткова інформація міститься у файлі COPYING та за адресою &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Виконати команду, коли транзакція гаманця зміниться (замість %s в команді буде підставлено ідентифікатор транзакції)</translation>
</message>
@@ -1735,26 +1730,10 @@
<translation>Схоже, що база даних блоків містить блок з майбутнього. Це може статися із-за некоректно встановленої дати та/або часу. Перебудовуйте базу даних блоків лише тоді, коли ви переконані, що встановлено правильну дату і час</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>Це тестова збірка пре-релізної версії - використовуйте на свій страх і ризик - не застосовувати для добування монет або торгівлі</translation>
- </message>
- <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>Використовувати UPnP для відображення порту, що прослуховується (типово: 1 при прослуховуванні та за відсутності -proxy)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>Увага: Частина мережі використовує інший головний ланцюжок! Деякі добувачі, можливо, зазнають проблем.</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>Увага: Наш ланцюжок блоків відрізняється від ланцюжків підключених учасників! Можливо, вам, або іншим вузлам, необхідно оновитися.</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>Додати учасників, що під'єднуються з заданої підмережі чи IP-адреси, в білий список. Можна вказувати декілька разів.</translation>
- </message>
- <message>
<source>-maxmempool must be at least %d MB</source>
<translation>-maxmempool має бути не менше %d МБ</translation>
</message>
@@ -1767,10 +1746,6 @@
<translation>Опції створення блоку:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>Підключитись лише до вказаного вузла/вузлів</translation>
- </message>
- <message>
<source>Connection options:</source>
<translation>Параметри з'єднання:</translation>
</message>
@@ -1959,10 +1934,6 @@
<translation>Максимальний розмір даних в транзакціях носіїв даних, що ми передаємо і добуваємо (за замовчуванням: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>Дізнаватися адреси учасників через DNS при замалій кількості відомих адрес (типово: 1 за відсутності -connect)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>Надавати випадкові дані доступу для кожного проксі-з'єднання. Це дозволяє ввімкнути ізоляцію потоків Tor'у (типово: %u)</translation>
</message>
@@ -1975,10 +1946,6 @@
<translation>Залишок від суми транзакції зі сплатою комісії занадто малий </translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>Цей продукт включає в себе програмне забезпечення, розроблене в рамках проекту OpenSSL &lt;https://www.openssl.org/&gt;, криптографічне програмне забезпечення, написане Еріком Янгом, та функції для роботи з UPnP, написані Томасом Бернардом.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>Учасники, що знаходяться в білому списку, не можуть бути заблоковані за DoS та їхні транзакції завжди ретранслюватимуться (навіть якщо вони є в пам'яті), що може бути корисним, наприклад, для шлюзу</translation>
</message>
@@ -2087,10 +2054,6 @@
<translation>Сума транзакції занадто мала</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>Суми монет у транзакції мають бути позитивними</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>Транзакція занадто велика для правил комісії</translation>
</message>
@@ -2151,10 +2114,6 @@
<translation>Встановлено дуже велике значення -maxtxfee! Такі великі комісії можуть бути сплачені окремою транзакцією.</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>Встановлено дуже велике значення -paytxfee! Цю комісію буде сплачено для проведення транзакції.</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>Не тримати транзакції в пам'яті довше &lt;n&gt; годин (типово: %u)</translation>
</message>
@@ -2199,10 +2158,6 @@
<translation>Використовувати окремий SOCKS5-проксі для з'єднання з учасниками через приховані сервіси Tor (типово: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>Логін та хешований пароль для зв'язків JSON-RPC. Поле &lt;userpw&gt; має формат: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. Класичний Python script додано до share/rpcuser. Цей параметр може бути застосований декілька разів.</translation>
- </message>
- <message>
<source>(default: %s)</source>
<translation>(типово: %s)</translation>
</message>
@@ -2263,10 +2218,6 @@
<translation>Встановити розмір пулу ключів &lt;n&gt; (типово: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>Встановити мінімальний розмір блоку в байтах (типово: %u)</translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>Встановити число потоків для обслуговування викликів RPC (типово: %d)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ur_PK.ts b/src/qt/locale/bitcoin_ur_PK.ts
index 6b43bf63e5..923198c91a 100644
--- a/src/qt/locale/bitcoin_ur_PK.ts
+++ b/src/qt/locale/bitcoin_ur_PK.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>مٹا</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -56,7 +59,7 @@
<source>Repeat new passphrase</source>
<translation>نیا پاس فریز دہرائیں</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -92,7 +95,7 @@
<source>&amp;Address</source>
<translation> پتہ</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -107,6 +110,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -116,6 +122,9 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -126,6 +135,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -139,6 +154,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Insufficient funds!</source>
@@ -157,6 +175,9 @@
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -169,12 +190,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Insufficient funds</source>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 0062abfc1d..fe10a8a8e7 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Ўчириш</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>Янги махфий сузни такрорланг</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
</context>
@@ -246,26 +249,6 @@
<source>No block source available...</source>
<translation>Блок манбалари мавжуд эмас...</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n соат</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n кун</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n ҳафта</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 ва %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n йил</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>%1 орқада</translation>
@@ -314,7 +297,7 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>Ҳамён &lt;b&gt;кодланган&lt;/b&gt; ва вақтинча &lt;b&gt;қулфланган&lt;/b&gt;</translation>
</message>
-</context>
+ </context>
<context>
<name>CoinControlDialog</name>
<message>
@@ -330,10 +313,6 @@
<translation>Миқдори:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Муҳимлиги:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Солиқ:</translation>
</message>
@@ -377,11 +356,7 @@
<source>Confirmed</source>
<translation>Тасдиқланди</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Муҳимлиги</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
@@ -404,7 +379,7 @@
<source>&amp;Address</source>
<translation>&amp;Манзил</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -475,6 +450,17 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Шакл</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>Сўнгги блок вақти</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -492,7 +478,7 @@
<source>Select payment request file</source>
<translation>Тўлов сўрови файлини танлаш</translation>
</message>
-</context>
+ </context>
<context>
<name>OptionsDialog</name>
<message>
@@ -684,16 +670,15 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
<translation>Фойдаланувчи вакил</translation>
</message>
- <message>
- <source>Ping Time</source>
- <translation>Ping вақти</translation>
- </message>
-</context>
+ </context>
<context>
<name>QObject</name>
<message>
@@ -724,7 +709,17 @@
<source>%1 ms</source>
<translation>%1 мс</translation>
</message>
-</context>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 ва %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
<context>
<name>RPCConsole</name>
<message>
@@ -962,7 +957,7 @@
<source>Remove</source>
<translation>Ўчириш</translation>
</message>
-</context>
+ </context>
<context>
<name>ReceiveRequestDialog</name>
<message>
@@ -977,7 +972,10 @@
<source>&amp;Save Image...</source>
<translation>Расмни &amp;сақлаш</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
<context>
<name>SendCoinsDialog</name>
<message>
@@ -1009,10 +1007,6 @@
<translation>Миқдори:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Муҳимлиги:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Солиқ:</translation>
</message>
@@ -1049,10 +1043,6 @@
<translation>Тавсия этилган</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>Тасдиқ вақти</translation>
- </message>
- <message>
<source>normal</source>
<translation>Нормал</translation>
</message>
@@ -1088,7 +1078,7 @@
<source>S&amp;end</source>
<translation>Жў&amp;натиш</translation>
</message>
-</context>
+ </context>
<context>
<name>SendCoinsEntry</name>
<message>
@@ -1133,6 +1123,9 @@
</message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -1173,16 +1166,34 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>Ушбу ойна операциянинг батафсил таърифини кўрсатади</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_vi.ts b/src/qt/locale/bitcoin_vi.ts
index e8bf01ab1b..e6775bf205 100644
--- a/src/qt/locale/bitcoin_vi.ts
+++ b/src/qt/locale/bitcoin_vi.ts
@@ -21,7 +21,10 @@
<source>&amp;Delete</source>
<translation>&amp;Xóa</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
</context>
@@ -52,7 +55,7 @@
<source>&amp;Address</source>
<translation>Địa chỉ</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
</context>
@@ -63,6 +66,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -72,6 +78,9 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
@@ -82,6 +91,12 @@
</message>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -95,6 +110,9 @@
</message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Amount:</source>
@@ -105,6 +123,9 @@
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -117,12 +138,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index a4e1588c93..c27111a52a 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>&amp;Xó&amp;a</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,13 +63,29 @@
<source>Repeat new passphrase</source>
<translation>Điền lại passphrase</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Netmask</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Bị cấm đến</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
+ <source>Sign &amp;message...</source>
+ <translation>Chứ ký &amp; Tin nhắn...</translation>
+ </message>
+ <message>
+ <source>Synchronizing with network...</source>
+ <translation>Đồng bộ hóa với mạng</translation>
+ </message>
+ <message>
<source>&amp;Overview</source>
<translation>&amp;Tổng quan</translation>
</message>
@@ -75,6 +94,18 @@
<translation>Node</translation>
</message>
<message>
+ <source>Show general overview of wallet</source>
+ <translation>Hiện thỉ thông tin sơ lược chung về Ví</translation>
+ </message>
+ <message>
+ <source>&amp;Transactions</source>
+ <translation>&amp;Giao dịch</translation>
+ </message>
+ <message>
+ <source>Browse transaction history</source>
+ <translation>Duyệt tìm lịch sử giao dịch</translation>
+ </message>
+ <message>
<source>E&amp;xit</source>
<translation>T&amp;hoát</translation>
</message>
@@ -83,6 +114,14 @@
<translation>Thoát chương trình</translation>
</message>
<message>
+ <source>&amp;About %1</source>
+ <translation>&amp;Thông tin về %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>Hiện thông tin về %1</translation>
+ </message>
+ <message>
<source>About &amp;Qt</source>
<translation>Về &amp;Qt</translation>
</message>
@@ -91,6 +130,30 @@
<translation>Xem thông tin về Qt</translation>
</message>
<message>
+ <source>&amp;Options...</source>
+ <translation>&amp;Tùy chọn...</translation>
+ </message>
+ <message>
+ <source>Modify configuration options for %1</source>
+ <translation>Chỉnh sửa thiết đặt tùy chọn cho %1</translation>
+ </message>
+ <message>
+ <source>&amp;Encrypt Wallet...</source>
+ <translation>&amp;Mã hóa ví tiền</translation>
+ </message>
+ <message>
+ <source>&amp;Backup Wallet...</source>
+ <translation>&amp;Sao lưu ví tiền...</translation>
+ </message>
+ <message>
+ <source>&amp;Change Passphrase...</source>
+ <translation>&amp;Thay đổi mật khẩu...</translation>
+ </message>
+ <message>
+ <source>&amp;Sending addresses...</source>
+ <translation>&amp;Địa chỉ gửi</translation>
+ </message>
+ <message>
<source>&amp;Receiving addresses...</source>
<translation>Địa chỉ nhận</translation>
</message>
@@ -99,6 +162,30 @@
<translation>Mở &amp;URI...</translation>
</message>
<message>
+ <source>Reindexing blocks on disk...</source>
+ <translation>Đánh chỉ số (indexing) lại các khối (blocks) trên ổ đĩa ...</translation>
+ </message>
+ <message>
+ <source>Send coins to a Bitcoin address</source>
+ <translation>Gửi coins đến tài khoản Bitcoin</translation>
+ </message>
+ <message>
+ <source>Backup wallet to another location</source>
+ <translation>Sao lưu ví tiền ở vị trí khác</translation>
+ </message>
+ <message>
+ <source>Change the passphrase used for wallet encryption</source>
+ <translation>Thay đổi cụm mật mã dùng cho mã hoá Ví</translation>
+ </message>
+ <message>
+ <source>&amp;Debug window</source>
+ <translation>&amp;Cửa sổ xử lý lỗi (debug)</translation>
+ </message>
+ <message>
+ <source>&amp;Verify message...</source>
+ <translation>&amp;Tin nhắn xác thực</translation>
+ </message>
+ <message>
<source>Bitcoin</source>
<translation>Bitcoin</translation>
</message>
@@ -123,6 +210,18 @@
<translation>Hiện hoặc ẩn cửa sổ chính</translation>
</message>
<message>
+ <source>Encrypt the private keys that belong to your wallet</source>
+ <translation>Mã hoá các khoá bí mật trong Ví của bạn.</translation>
+ </message>
+ <message>
+ <source>Sign messages with your Bitcoin addresses to prove you own them</source>
+ <translation>Dùng địa chỉ Bitcoin của bạn ký các tin nhắn để xác minh những nội dung tin nhắn đó là của bạn.</translation>
+ </message>
+ <message>
+ <source>Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+ <translation>Kiểm tra các tin nhắn để chắc chắn rằng chúng được ký bằng các địa chỉ Bitcoin xác định.</translation>
+ </message>
+ <message>
<source>&amp;File</source>
<translation>&amp;File</translation>
</message>
@@ -134,25 +233,41 @@
<source>&amp;Help</source>
<translation>Trợ &amp;giúp</translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n giờ</numerusform></translation>
+ <message>
+ <source>Tabs toolbar</source>
+ <translation>Thanh công cụ (toolbar)</translation>
</message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n ngày</numerusform></translation>
+ <message>
+ <source>Request payments (generates QR codes and bitcoin: URIs)</source>
+ <translation>Yêu cầu thanh toán(tạo mã QR và địa chỉ Bitcoin: URLs)</translation>
</message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n tuần</numerusform></translation>
+ <message>
+ <source>Show the list of used sending addresses and labels</source>
+ <translation>Hiện thỉ danh sách các địa chỉ và nhãn đã dùng để gửi.</translation>
</message>
<message>
- <source>%1 and %2</source>
- <translation>%1 và %2</translation>
+ <source>Show the list of used receiving addresses and labels</source>
+ <translation>Hiện thỉ danh sách các địa chỉ và nhãn đã dùng để nhận.</translation>
+ </message>
+ <message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Mở bitcoin:URL hoặc yêu cầu thanh toán</translation>
+ </message>
+ <message>
+ <source>&amp;Command-line options</source>
+ <translation>7Tùy chọn dòng lệnh</translation>
</message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n năm</numerusform></translation>
+ <message>
+ <source>%1 behind</source>
+ <translation>%1 chậm trễ</translation>
+ </message>
+ <message>
+ <source>Last received block was generated %1 ago.</source>
+ <translation>Khối (block) cuối cùng nhận được cách đây %1</translation>
+ </message>
+ <message>
+ <source>Transactions after this will not yet be visible.</source>
+ <translation>Những giao dịch sau đó sẽ không hiện thị.</translation>
</message>
<message>
<source>Error</source>
@@ -171,6 +286,40 @@
<translation>Đã cập nhật</translation>
</message>
<message>
+ <source>Catching up...</source>
+ <translation>Bắt kịp...</translation>
+ </message>
+ <message>
+ <source>Date: %1
+</source>
+ <translation>Ngày: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Số lượng: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Loại: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Nhãn hiệu: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Địa chỉ: %1
+</translation>
+ </message>
+ <message>
<source>Sent transaction</source>
<translation>Giao dịch đã gửi</translation>
</message>
@@ -178,6 +327,14 @@
<source>Incoming transaction</source>
<translation>Giao dịch đang tới</translation>
</message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+ <translation>Ví tiền &lt;b&gt; đã được mã hóa&lt;/b&gt;và hiện &lt;b&gt;đang mở&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+ <translation>Ví tiền &lt;b&gt; đã được mã hóa&lt;/b&gt;và hiện &lt;b&gt;đang khóa&lt;/b&gt;</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -194,18 +351,30 @@
<translation>Lượng:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Tầm quan trọng:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Phí:</translation>
</message>
<message>
+ <source>After Fee:</source>
+ <translation>Sau thuế, phí:</translation>
+ </message>
+ <message>
<source>Change:</source>
<translation>Thay đổi:</translation>
</message>
<message>
+ <source>(un)select all</source>
+ <translation>(bỏ)chọn tất cả</translation>
+ </message>
+ <message>
+ <source>Tree mode</source>
+ <translation>Chế độ cây</translation>
+ </message>
+ <message>
+ <source>List mode</source>
+ <translation>Chế độ danh sách</translation>
+ </message>
+ <message>
<source>Amount</source>
<translation>Lượng</translation>
</message>
@@ -221,14 +390,14 @@
<source>Confirmed</source>
<translation>Đã xác nhận</translation>
</message>
- <message>
- <source>Priority</source>
- <translation>Tầm quan trọng</translation>
- </message>
-</context>
+ </context>
<context>
<name>EditAddressDialog</name>
<message>
+ <source>Edit Address</source>
+ <translation>Thay đổi địa chỉ</translation>
+ </message>
+ <message>
<source>&amp;Label</source>
<translation>Nhãn</translation>
</message>
@@ -236,7 +405,7 @@
<source>&amp;Address</source>
<translation>Địa chỉ</translation>
</message>
-</context>
+ </context>
<context>
<name>FreespaceChecker</name>
<message>
@@ -250,6 +419,30 @@
<source>version</source>
<translation>version</translation>
</message>
+ <message>
+ <source>(%1-bit)</source>
+ <translation>(%1-bit)</translation>
+ </message>
+ <message>
+ <source>Command-line options</source>
+ <translation>&amp;Tùy chọn dòng lệnh</translation>
+ </message>
+ <message>
+ <source>Usage:</source>
+ <translation>Mức sử dụng</translation>
+ </message>
+ <message>
+ <source>command-line options</source>
+ <translation>tùy chọn dòng lệnh</translation>
+ </message>
+ <message>
+ <source>Set language, for example "de_DE" (default: system locale)</source>
+ <translation>Chọn ngôn ngữ, ví dụ "de_DE" (mặc định: Vị trí hệ thống)</translation>
+ </message>
+ <message>
+ <source>Set SSL root certificates for payment request (default: -system-)</source>
+ <translation>Đặt chứng nhận SSL gốc cho yêu cầu giao dịch (mặc định: -hệ thống-)</translation>
+ </message>
</context>
<context>
<name>Intro</name>
@@ -258,11 +451,26 @@
<translation>Chào mừng</translation>
</message>
<message>
+ <source>Use the default data directory</source>
+ <translation>Sử dụng vị trí dữ liệu mặc định</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Lỗi</translation>
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>Form</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ẩn</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -288,14 +496,58 @@
<translation>MB</translation>
</message>
<message>
+ <source>Accept connections from outside</source>
+ <translation>Chấp nhận các kết nối từ bên ngoài</translation>
+ </message>
+ <message>
+ <source>Allow incoming connections</source>
+ <translation>Cho phép nhận kết nối</translation>
+ </message>
+ <message>
+ <source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+ <translation>Địa chỉ IP của proxy (ví dụ IPv4: 127.0.0.1 / IPv6: ::1)</translation>
+ </message>
+ <message>
+ <source>Third party transaction URLs</source>
+ <translation>Phần mềm giao dịch bên thứ ba URLs</translation>
+ </message>
+ <message>
<source>W&amp;allet</source>
<translation>Ví</translation>
</message>
<message>
+ <source>Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+ <translation>Kết nối đến máy chủ Bitcoin thông qua SOCKS5 proxy.</translation>
+ </message>
+ <message>
+ <source>Proxy &amp;IP:</source>
+ <translation>Proxy &amp;IP:</translation>
+ </message>
+ <message>
+ <source>&amp;Port:</source>
+ <translation>&amp;Cổng:</translation>
+ </message>
+ <message>
+ <source>Port of the proxy (e.g. 9050)</source>
+ <translation>Cổng proxy (e.g. 9050) </translation>
+ </message>
+ <message>
+ <source>IPv4</source>
+ <translation>IPv4</translation>
+ </message>
+ <message>
+ <source>IPv6</source>
+ <translation>IPv6</translation>
+ </message>
+ <message>
<source>&amp;Display</source>
<translation>&amp;Hiển thị</translation>
</message>
<message>
+ <source>User Interface &amp;language:</source>
+ <translation>Giao diện người dùng &amp; ngôn ngữ</translation>
+ </message>
+ <message>
<source>&amp;OK</source>
<translation>&amp;OK</translation>
</message>
@@ -307,6 +559,10 @@
<source>default</source>
<translation>mặc định</translation>
</message>
+ <message>
+ <source>none</source>
+ <translation>Trống</translation>
+ </message>
</context>
<context>
<name>OverviewPage</name>
@@ -315,11 +571,22 @@
<translation>Form</translation>
</message>
<message>
+ <source>Available:</source>
+ <translation>Khả dụng</translation>
+ </message>
+ <message>
+ <source>Pending:</source>
+ <translation>Đang chờ</translation>
+ </message>
+ <message>
<source>Total:</source>
<translation>Tổng:</translation>
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -332,6 +599,20 @@
<source>Amount</source>
<translation>Lượng</translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 và %2</translation>
+ </message>
+ </context>
+<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>$Lưu hình ảnh...</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -359,6 +640,58 @@
<source>User Agent</source>
<translation>User Agent</translation>
</message>
+ <message>
+ <source>1 &amp;hour</source>
+ <translation>1&amp;giờ</translation>
+ </message>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1&amp;ngày</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1&amp;tuần</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1&amp;năm</translation>
+ </message>
+ <message>
+ <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
+ <translation>Sử dụng phím lên và xuống để di chuyển lịch sử, và &lt;b&gt;Ctrl-L&lt;/b&gt; để xóa màn hình</translation>
+ </message>
+ <message>
+ <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source>
+ <translation>Gõ &lt;b&gt;help&lt;/b&gt; để xem nhưng câu lệnh có sẵn</translation>
+ </message>
+ <message>
+ <source>%1 B</source>
+ <translation>%1 B</translation>
+ </message>
+ <message>
+ <source>%1 KB</source>
+ <translation>%1 KB</translation>
+ </message>
+ <message>
+ <source>%1 MB</source>
+ <translation>%1 MB</translation>
+ </message>
+ <message>
+ <source>%1 GB</source>
+ <translation>%1 GB</translation>
+ </message>
+ <message>
+ <source>never</source>
+ <translation>không bao giờ</translation>
+ </message>
+ <message>
+ <source>Yes</source>
+ <translation>Đồng ý</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Không</translation>
+ </message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
@@ -366,17 +699,124 @@
<source>&amp;Amount:</source>
<translation>Lượng:</translation>
</message>
+ <message>
+ <source>&amp;Label:</source>
+ <translation>&amp;Nhãn</translation>
+ </message>
+ <message>
+ <source>&amp;Message:</source>
+ <translation>&amp;Tin nhắn:</translation>
+ </message>
+ <message>
+ <source>Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+ <translation>Sử dụng form này để yêu cầu thanh toán. Tất cả các trường &lt;b&gt;không bắt buộc&lt;b&gt;</translation>
+ </message>
+ <message>
+ <source>Clear all fields of the form.</source>
+ <translation>Xóa tất cả các trường trong biểu mẫu</translation>
+ </message>
+ <message>
+ <source>Clear</source>
+ <translation>Xóa</translation>
+ </message>
+ <message>
+ <source>Requested payments history</source>
+ <translation>Lịch sử yêu cầu thanh toán</translation>
+ </message>
+ <message>
+ <source>&amp;Request payment</source>
+ <translation>&amp;Yêu cầu thanh toán</translation>
+ </message>
+ <message>
+ <source>Show</source>
+ <translation>Hiển thị</translation>
+ </message>
+ <message>
+ <source>Remove the selected entries from the list</source>
+ <translation>Xóa khỏi danh sách</translation>
+ </message>
+ <message>
+ <source>Remove</source>
+ <translation>Xóa</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>Copy tin nhắn</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
+ <source>QR Code</source>
+ <translation>QR Code</translation>
+ </message>
+ <message>
+ <source>Copy &amp;URI</source>
+ <translation>Copy &amp;URI</translation>
+ </message>
+ <message>
<source>Copy &amp;Address</source>
<translation>&amp;Copy Địa Chỉ</translation>
</message>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>$Lưu hình ảnh...</translation>
+ </message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>Yêu cầu thanh toán cho %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>Thông tin thanh toán</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Lượng</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>Tin nhắn</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>Lỗi khi encode từ URI thành QR Code</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Message</source>
+ <translation>Tin nhắn</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(không tin nhắn)</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
+ <source>Send Coins</source>
+ <translation>Gửi Coins</translation>
+ </message>
+ <message>
+ <source>Coin Control Features</source>
+ <translation>Tính năng Control Coin</translation>
+ </message>
+ <message>
+ <source>Inputs...</source>
+ <translation>Nhập...</translation>
+ </message>
+ <message>
+ <source>automatically selected</source>
+ <translation>Tự động chọn</translation>
+ </message>
+ <message>
<source>Insufficient funds!</source>
<translation>Không đủ tiền</translation>
</message>
@@ -393,17 +833,93 @@
<translation>Lượng:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>Tầm quan trọng:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>Phí:</translation>
</message>
<message>
+ <source>After Fee:</source>
+ <translation>Sau thuế, phí:</translation>
+ </message>
+ <message>
<source>Change:</source>
<translation>Thay đổi:</translation>
</message>
+ <message>
+ <source>Transaction Fee:</source>
+ <translation>Phí giao dịch</translation>
+ </message>
+ <message>
+ <source>Choose...</source>
+ <translation>Chọn...</translation>
+ </message>
+ <message>
+ <source>collapse fee-settings</source>
+ <translation>Thu gọn fee-settings</translation>
+ </message>
+ <message>
+ <source>per kilobyte</source>
+ <translation>trên KB</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>Ẩn</translation>
+ </message>
+ <message>
+ <source>total at least</source>
+ <translation>Tổng cộng ít nhất</translation>
+ </message>
+ <message>
+ <source>(read the tooltip)</source>
+ <translation>(Đọc hướng dẫn)</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>Bình thường</translation>
+ </message>
+ <message>
+ <source>fast</source>
+ <translation>Nhanh</translation>
+ </message>
+ <message>
+ <source>Send to multiple recipients at once</source>
+ <translation>Gửi đến nhiều người nhận trong một lần</translation>
+ </message>
+ <message>
+ <source>Add &amp;Recipient</source>
+ <translation>Thêm &amp;Người nhận</translation>
+ </message>
+ <message>
+ <source>Clear all fields of the form.</source>
+ <translation>Xóa tất cả các trường trong biểu mẫu</translation>
+ </message>
+ <message>
+ <source>Clear &amp;All</source>
+ <translation>Xóa &amp;Tất cả</translation>
+ </message>
+ <message>
+ <source>Balance:</source>
+ <translation>Tài khoản</translation>
+ </message>
+ <message>
+ <source>Confirm the send action</source>
+ <translation>Xác nhận sự gửi</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 đến %2</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>Tổng cộng %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>hoặc</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>Xác nhận gửi coins</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -411,12 +927,27 @@
<source>A&amp;mount:</source>
<translation>Lượng:</translation>
</message>
+ <message>
+ <source>&amp;Label:</source>
+ <translation>&amp;Nhãn</translation>
+ </message>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>Đồng ý</translation>
+ </message>
+</context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
<name>SignVerifyMessageDialog</name>
+ <message>
+ <source>Clear &amp;All</source>
+ <translation>Xóa &amp;Tất cả</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -425,12 +956,42 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Message</source>
+ <translation>Tin nhắn</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>Lượng</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>Gửi Coins</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
diff --git a/src/qt/locale/bitcoin_zh.ts b/src/qt/locale/bitcoin_zh.ts
index bceba9dfdd..99d723deff 100644
--- a/src/qt/locale/bitcoin_zh.ts
+++ b/src/qt/locale/bitcoin_zh.ts
@@ -3,6 +3,9 @@
<name>AddressBookPage</name>
</context>
<context>
+ <name>AddressTableModel</name>
+ </context>
+<context>
<name>AskPassphraseDialog</name>
</context>
<context>
@@ -43,6 +46,9 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -52,12 +58,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -67,6 +82,13 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Insufficient funds!</source>
@@ -76,11 +98,26 @@
<source>Choose...</source>
<translation>选择...</translation>
</message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>收款人地址无效,请再次确认。</translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>仅支付全额的%1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>警告:比特币地址无效</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -93,17 +130,43 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
- <name>UnitDisplayStatusBarControl</name>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
</context>
<context>
- <name>bitcoin-core</name>
+ <name>TransactionView</name>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>转账额度须为正数</translation>
+ <source>Date</source>
+ <translation>日期</translation>
</message>
+ </context>
+<context>
+ <name>UnitDisplayStatusBarControl</name>
+ </context>
+<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
+ <name>bitcoin-core</name>
<message>
<source>Transaction too large for fee policy</source>
<translation>根据费率标准,本次转账超额</translation>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 92a7006d30..8267a4f0e3 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>删除(&amp;D)</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>选择要付钱过去的地址</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>选择要收钱进来的地址</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>选择</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>付款地址</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>收款地址</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>这些是你要付款过去的比特币地址。在付钱之前,务必要检查金额和收款地址是否正确。</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>这些是你用来收款的比特币地址。建议在每次交易时,都使用一个新的收款地址。</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>复制地址</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>复制标签</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>编辑</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>导出地址列表</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>逗号分隔文件 (*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>导出失败</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>存储地址列表到 %1 时发生错误。请再试一次。</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>地址</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(无标签)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>重复新密码</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>输入钱包的新密码。&lt;br/&gt;密码请用&lt;b&gt;10 个以上的随机字符&lt;/b&gt;,或是&lt;b&gt;8 个以上的字词&lt;/b&gt;。</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>加密钱包</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>这个操作需要你的钱包密码来解锁钱包。</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>解锁钱包</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>这个操作需要你的钱包密码来把钱包解密。</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>解密钱包</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>修改密码</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>请输入钱包的旧密码和新密码。</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>确认钱包加密</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>警告: 如果把钱包加密后又忘记密码,你就会从此&lt;b&gt;失去其中所有的比特币了&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>你确定要把钱包加密吗?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>钱包已加密</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 现在要关闭,以完成加密过程。请注意,加密钱包不能完全防止入侵你的电脑的恶意程序偷取钱币。</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>重要: 请改用新产生的有加密的钱包文件,来取代旧钱包文件的备份。为了安全性,当你开始使用新的有加密的钱包后,旧钱包文件的备份就不能再使用了。</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>钱包加密失败</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>因为内部错误导致钱包加密失败。你的钱包还是没加密。</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>提供的密码不yi'zhi。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>钱包解锁失败</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>输入用来解密钱包的密码不正确。</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>钱包解密失败</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>钱包密码修改成功。</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>警告: 大写字母锁定已开启!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -112,7 +271,11 @@
</message>
<message>
<source>&amp;About %1</source>
- <translation>&amp;关于 %1</translation>
+ <translation>关于 %1</translation>
+ </message>
+ <message>
+ <source>Show information about %1</source>
+ <translation>显示 %1 相关信息</translation>
</message>
<message>
<source>About &amp;Qt</source>
@@ -127,6 +290,10 @@
<translation>选项(&amp;O)...</translation>
</message>
<message>
+ <source>Modify configuration options for %1</source>
+ <translation>修改%1配置选项</translation>
+ </message>
+ <message>
<source>&amp;Encrypt Wallet...</source>
<translation>加密钱包(&amp;E)...</translation>
</message>
@@ -151,6 +318,18 @@
<translation>打开 &amp;URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>点击禁用网络活动。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>网络活动已禁用。</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>点击重新开启网络活动。</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>正在为数据块重建索引...</translation>
</message>
@@ -232,7 +411,7 @@
</message>
<message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
- <translation>请求支付(生成二维码和 bitcoin: URI)</translation>
+ <translation>请求支付 (生成二维码和 bitcoin: URI)</translation>
</message>
<message>
<source>Show the list of used sending addresses and labels</source>
@@ -244,7 +423,7 @@
</message>
<message>
<source>Open a bitcoin: URI or payment request</source>
- <translation>打开一个比特币:URI 或支付请求</translation>
+ <translation>打开一个 bitcoin: URI 或支付请求</translation>
</message>
<message>
<source>&amp;Command-line options</source>
@@ -255,6 +434,14 @@
<translation><numerusform>%n 个到比特币网络的活动连接</numerusform></translation>
</message>
<message>
+ <source>Indexing blocks on disk...</source>
+ <translation>正在为数据块建立索引...</translation>
+ </message>
+ <message>
+ <source>Processing blocks on disk...</source>
+ <translation>正在处理数据块...</translation>
+ </message>
+ <message>
<source>No block source available...</source>
<translation>沒有可用的区块来源...</translation>
</message>
@@ -262,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>已处理 %n 个交易历史数据块。</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n 小时</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n 天</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n 周</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1 和 %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n 年</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>落后 %1 </translation>
@@ -311,6 +478,14 @@
<translation>已是最新</translation>
</message>
<message>
+ <source>Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <translation>显示 %1 帮助信息,获取可用命令行选项列表</translation>
+ </message>
+ <message>
+ <source>%1 client</source>
+ <translation>%1 客戶</translation>
+ </message>
+ <message>
<source>Catching up...</source>
<translation>更新中...</translation>
</message>
@@ -360,12 +535,16 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>钱包已被&lt;b&gt;加密&lt;/b&gt;,当前为&lt;b&gt;锁定&lt;/b&gt;状态</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>发生严重错误。客户端无法安全地继续运行,即将退出。</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<source>Coin Selection</source>
- <translation>币源选择(Coin Selection)</translation>
+ <translation>选择钱币</translation>
</message>
<message>
<source>Quantity:</source>
@@ -380,10 +559,6 @@
<translation>金额:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>优先级:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>费用:</translation>
</message>
@@ -436,8 +611,84 @@
<translation>已确认</translation>
</message>
<message>
- <source>Priority</source>
- <translation>优先级</translation>
+ <source>Copy address</source>
+ <translation>复制地址</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>复制标签</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>复制金额</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>复制交易识别码</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>锁定未花费</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>解锁未花费</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>复制数目</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>复制手续费</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>复制计费后金额</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>复制字节数</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>复制零散金额</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>复制找零金额</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(锁定 %1 枚)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>是</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>否</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>当任何一个收款金额小于目前的零散金额上限时,文字会变红色。</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>每组输入可能有 +/- %1 个 satoshi 的误差。</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(无标签)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>找零前是 %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(找零)</translation>
</message>
</context>
<context>
@@ -462,6 +713,38 @@
<source>&amp;Address</source>
<translation>地址(&amp;A)</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>新建收款地址</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>新建付款地址</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>编辑收款地址</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>编辑付款地址</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>输入的地址 %1 并不是有效的比特币地址。</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>输入的地址 %1 已经存在地址簿。</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>无法将钱包解锁。</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>产生新的密钥失败了。</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -497,6 +780,10 @@
<translation>(%1 位)</translation>
</message>
<message>
+ <source>About %1</source>
+ <translation>關於 %1</translation>
+ </message>
+ <message>
<source>Command-line options</source>
<translation>命令行选项</translation>
</message>
@@ -532,7 +819,11 @@
<source>Show splash screen on startup (default: %u)</source>
<translation>显示启动画面(默认:%u)</translation>
</message>
- </context>
+ <message>
+ <source>Reset all settings changed in the GUI</source>
+ <translation>重置图形界面所有的变更设置</translation>
+ </message>
+</context>
<context>
<name>Intro</name>
<message>
@@ -540,6 +831,19 @@
<translation>欢迎</translation>
</message>
<message>
+ <source>Welcome to %1.</source>
+ <translation>
+歡迎來到 %1</translation>
+ </message>
+ <message>
+ <source>As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <translation>由于这是第一次启动此程序,您可以选择%1的数据所存储的位置</translation>
+ </message>
+ <message>
+ <source>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</source>
+ <translation>%1 会下载并存储一份比特币区块链的副本。至少有 %2GB 的数据会存储到这个目录中,并且还会持续增长。另外钱包资料也会储存在这个目录。</translation>
+ </message>
+ <message>
<source>Use the default data directory</source>
<translation>使用默认的数据目录</translation>
</message>
@@ -565,6 +869,53 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>表单</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>近期交易可能尚未显示,因此当前余额可能不准确。以上信息将在与比特币网络完全同步后更正。详情如下</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>尝试使用受未可见交易影响的余额将不被网络接受。</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>剩余区块数量</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>未知</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>上一数据块时间</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>进度</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>每小时进度增加</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>正在计算</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>预计剩余同步时间</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>隐藏</translation>
+ </message>
+ </context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -582,6 +933,10 @@
<source>Select payment request file</source>
<translation>选择付款请求文件 </translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>选择要打开的付款请求文件</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -594,6 +949,14 @@
<translation>主要(&amp;M)</translation>
</message>
<message>
+ <source>Automatically start %1 after logging in to the system.</source>
+ <translation>在登入系统后自动启动 %1</translation>
+ </message>
+ <message>
+ <source>&amp;Start %1 on system login</source>
+ <translation>系统登入时启动 %1</translation>
+ </message>
+ <message>
<source>Size of &amp;database cache</source>
<translation>数据库缓存大小(&amp;D)</translation>
</message>
@@ -719,7 +1082,7 @@
</message>
<message>
<source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor hidden services.</source>
- <translation>在Tor匿名网络下通过不同的SOCKS5代理连接比特币网络</translation>
+ <translation>在 Tor 匿名网络下通过不同的 SOCKS5 代理连接比特币网络</translation>
</message>
<message>
<source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source>
@@ -730,6 +1093,14 @@
<translation>窗口(&amp;W)</translation>
</message>
<message>
+ <source>&amp;Hide the icon from the system tray.</source>
+ <translation>不在通知区显示图标</translation>
+ </message>
+ <message>
+ <source>Hide tray icon</source>
+ <translation>不显示通知区图标</translation>
+ </message>
+ <message>
<source>Show only a tray icon after minimizing the window.</source>
<translation>最小化窗口后仅显示托盘图标</translation>
</message>
@@ -750,6 +1121,10 @@
<translation>用户界面语言(&amp;L):</translation>
</message>
<message>
+ <source>The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <translation>可以在这里设定用户界面的语言。这个设定在重启 %1 后才会生效。</translation>
+ </message>
+ <message>
<source>&amp;Unit to show amounts in:</source>
<translation>比特币金额单位(&amp;U):</translation>
</message>
@@ -806,7 +1181,7 @@
</message>
<message>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
- <translation>现在显示的消息可能是过期的. 在连接上比特币网络节点后,您的钱包将自动与网络同步,但是这个过程还没有完成。</translation>
+ <translation>现在显示的消息可能是过期的。在连接上比特币网络节点后,您的钱包将自动与网络同步,但是这个过程还没有完成。</translation>
</message>
<message>
<source>Watch-only:</source>
@@ -874,6 +1249,98 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>要求付款时发生错误</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>无法启动 bitcoin 协议的“
+一键支付”处理器</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI 处理</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>取得付款请求的 URL 无效: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>无效的付款地址 %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>无法解析 URI 地址!可能是因为比特币地址无效,或是 URI 参数格式错误。</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>处理付款请求文件</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>无法读取付款请求文件!可能是文件无效造成的。</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>付款请求已被拒绝</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>付款请求的网络类型跟客户端不符。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>付款请求已过期。</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>支付请求未成形。</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>不支持到自定义付款脚本的未验证付款请求。</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>无效的支付请求。</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>请求支付的金额 %1 太小(就像尘埃)。</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>退款来自 %1</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>支付请求 %1 太大 (%2 字节。只允许 %3 字节)。</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>%1: %2 通讯出错</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>无法解析 付款请求!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>来自 %1 服务器的错误响应</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>网络请求出错</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>付款已确认</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -884,8 +1351,12 @@
<translation>节点/服务</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Ping 时间</translation>
+ <source>NodeId</source>
+ <translation>节点ID</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation> </translation>
</message>
</context>
<context>
@@ -926,6 +1397,72 @@
<source>%1 ms</source>
<translation>%1 毫秒</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n 秒</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n 分钟</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n 小时</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n 天</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n 周</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 和 %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n 年</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 尚未安全退出</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>错误:指定的数据目录“%1”不存在。</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>错误:无法解析配置文件:%1。只接受 key=value语法。</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>错误:%1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>保存图片(&amp;S)...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>复制图片</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>保存二维码</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG 图像(*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -954,6 +1491,10 @@
<translation>使用的 BerkeleyDB 版本</translation>
</message>
<message>
+ <source>Datadir</source>
+ <translation>数据目录</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>启动时间</translation>
</message>
@@ -1038,6 +1579,14 @@
<translation>用户代理</translation>
</message>
<message>
+ <source>Decrease font size</source>
+ <translation>缩小文字</translation>
+ </message>
+ <message>
+ <source>Increase font size</source>
+ <translation>放大文字</translation>
+ </message>
+ <message>
<source>Services</source>
<translation>服务</translation>
</message>
@@ -1062,10 +1611,18 @@
<translation>Ping 时间</translation>
</message>
<message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>目前这一次 ping 已经过去的时间。</translation>
+ </message>
+ <message>
<source>Ping Wait</source>
<translation>Ping等待</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>最小Ping值</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>时间偏移</translation>
</message>
@@ -1095,7 +1652,7 @@
</message>
<message>
<source>In:</source>
- <translation>输入:</translation>
+ <translation>输入:</translation>
</message>
<message>
<source>Out:</source>
@@ -1110,14 +1667,6 @@
<translation>清空控制台</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>(&amp;D)断开节点连接</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>禁止节点连接时长:</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 小时(&amp;H)</translation>
</message>
@@ -1134,8 +1683,20 @@
<translation>1 年(&amp;Y)</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>(&amp;U)允许节点连接</translation>
+ <source>&amp;Disconnect</source>
+ <translation>(&amp;D)断开</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>禁止</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>重新允许</translation>
+ </message>
+ <message>
+ <source>Welcome to the %1 RPC console.</source>
+ <translation>欢迎使用 %1 的 RPC 控制台。</translation>
</message>
<message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
@@ -1146,6 +1707,14 @@
<translation>使用 &lt;b&gt;help&lt;/b&gt; 命令显示帮助信息。</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>警告: 已有骗子通过要求用户在此输入指令以盗取钱包。不要在没有完全理解命令规范时使用控制台。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>网络活动已禁用</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 字节</translation>
</message>
@@ -1264,6 +1833,22 @@
<source>Remove</source>
<translation>移除</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>复制URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>复制标签</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>复制消息</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>复制金额</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1283,8 +1868,71 @@
<source>&amp;Save Image...</source>
<translation>保存图片(&amp;S)...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>请求付款到 %1</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>付款信息</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>地址</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>金额</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>消息</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>URI 太长,请试着精简标签或消息文本。</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>把 URI 编码成二维码时发生错误。</translation>
+ </message>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>消息</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(无标签)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(无消息)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(无请求金额)</translation>
+ </message>
+ </context>
+<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
@@ -1319,10 +1967,6 @@
<translation>金额:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>优先级:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>费用:</translation>
</message>
@@ -1391,10 +2035,6 @@
<translation>(智能交易费用 尚未初始化。 需要再下载一些数据块...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>确认时间:</translation>
- </message>
- <message>
<source>normal</source>
<translation>一般</translation>
</message>
@@ -1434,6 +2074,118 @@
<source>S&amp;end</source>
<translation>发送(&amp;E)</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>复制数目</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>复制金额</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>复制手续费</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>复制计费后金额</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>复制字节数</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>复制零散金额</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>复制找零金额</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 到 %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>您确定要发出吗?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>已添加交易费</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>总金额 %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>或</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>确认发送货币</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>接收人地址无效。请重新检查。</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>支付金额必须大于0。</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>金额超出您的账上余额。</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>计入 %1 交易费后的金额超出您的账上余额。</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>发现重复地址:每个地址应该只使用一次。</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>交易创建失败!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>交易因以下原因拒绝:%1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>超过 %1 的交易费被认为是荒谬的高费率。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>付款请求已过期。</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n 个区块</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>只支付必要费用 %1</translation>
+ </message>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>预计 %n 个数据块后被确认。</numerusform></translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>警告: 比特币地址无效</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>警告:未知的更改地址</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(无标签)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1513,10 +2265,25 @@
<source>Memo:</source>
<translation>便条:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>为这个地址输入一个标签,以便将它添加到您的地址簿</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>是</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
<message>
+ <source>%1 is shutting down...</source>
+ <translation>正在关闭 %1 ...</translation>
+ </message>
+ <message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>在此窗口消失前不要关闭计算机。</translation>
</message>
@@ -1607,6 +2374,58 @@
<source>Reset all verify message fields</source>
<translation>清空所有验证消息栏</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>单击“签名消息“产生签名。</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>输入的地址非法。</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>请检查地址后重试。</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>输入的地址没有关联的公私钥对。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>钱包解锁动作取消。</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>找不到输入地址关联的私钥。</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>消息签名失败。</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>消息已签名。</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>签名无法解码。</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>请检查签名后重试。</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>签名与消息摘要不匹配。</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>消息验证失败。</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>消息验证成功。</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1623,11 +2442,440 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>再打开 %n 个数据块</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>至 %1 个数据块时开启</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>与一个有 %1 个确认的交易冲突</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1 / 离线</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0/未确认,%1</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>已抛弃</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1/未确认</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>%1 已确认</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>状态</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>,未被成功广播</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>, 通过 %n 个节点广播 </numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>源</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>生成</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>来自</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>未知</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>到</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>自己的地址</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>观察地址(watch-only) </translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>收入</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>%n 个数据块后成熟(mature) </numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>未被接受</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>支出</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>总收入</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>总支出</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>交易费</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>净额</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>消息</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>备注</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>交易总大小</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>输出索引</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>商家</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>生成的比特币在可以使用前必须有 %1 个成熟的区块。当您生成了此区块后,它将被广播到网络中以加入区块链。如果它未成功进入区块链,其状态将变更为“不接受”并且不可使用。这可能偶尔会发生,如果另一个节点比你早几秒钟成功生成一个区块。</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>调试信息</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>交易</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>输入</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>金额</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>是</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>否</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>当前面板显示了交易的详细信息</translation>
</message>
+ </context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>种类</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>至 %1 个数据块时开启</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>掉线</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>未确认的 </translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>确认中 (推荐 %2个确认,已经有 %1个确认)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>已确认 (%1 条确认信息)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>冲突的</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>未成熟 (%1 个确认,将在 %2 个后可用)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>此数据块未被任何其他节点接收,可能不被接受!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>已生成但未被接受</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>收款</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>收款来自</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>付款</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>付款给自己</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>挖矿所得</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>观察地址(watch-only) </translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(不可用)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(无标签)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>交易状态。 鼠标移到此区域可显示确认项数量。</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>接收到交易的时间</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>交易类别。</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>该交易中是否涉及 观察地址(watch-only address)。</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>用户定义的该交易的意图/目的。</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>从余额添加或移除的金额。</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>全部</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>今天</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>这星期</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>这个月</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>上个月</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>今年</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>指定范围...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>收款</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>付款</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>给自己</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>挖矿所得</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>其它</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>输入地址或标签进行搜索</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>最小金额</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>放弃交易</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>复制地址</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>复制标签</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>复制金额</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>复制交易识别码</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>复制原始交易</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>复制所有交易详情</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>编辑标签</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>显示交易详情</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>导出交易历史</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>逗号分隔文件 (*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>已确认</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>观察地址(Watch-only) </translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>种类</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>标签</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>地址</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>ID</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>导出失败</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>导出交易历史到 %1 时发生错误。</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>导出成功</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>交易历史已成功保存到 %1。</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>范围:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>到</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1637,6 +2885,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>没有载入钱包。</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>发送比特币</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>导出(&amp;E)</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>导出当前分页里的数据到文件</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>备份钱包</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>钱包文件(*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>备份失败</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>尝试保存钱包数据至 %1 时发生错误。</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>备份成功</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>钱包数据成功保存至 %1 。</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1704,16 +3001,12 @@
<translation>无法启动HTTP服务,查看日志获取更多信息</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>接受来自外部的连接 (缺省: 如果不带 -proxy or -connect 参数设置为1)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
- <translation>比特币核心</translation>
+ <translation>Bitcoin Core</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>-fallbackfree 交易费设置得很高!这是在费用估计不可用时你可能会支付的交易费。</translation>
+ <source>The %s developers</source>
+ <translation>%s 开发人员</translation>
</message>
<message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
@@ -1732,18 +3025,10 @@
<translation>删除钱包的所有交易记录,且只有用 -rescan参数启动客户端才能重新取回交易记录 </translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>当最佳区块变化时执行命令 (命令行中的 %s 会被替换成区块哈希值)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>强制关联来自白名单同行的交易即使他们违反本地关联政策(默认: %d)</translation>
- </message>
- <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>设置脚本验证的程序 (%u 到 %d, 0 = 自动, &lt;0 = 保留自由的核心, 默认值: %d)</translation>
</message>
@@ -1752,26 +3037,10 @@
<translation>区块数据库包含未来的交易,这可能是由本机错误的日期时间引起。若确认本机日期时间正确,请重新建立区块数据库。</translation>
</message>
<message>
- <source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>这是测试用的预发布版本 - 请谨慎使用 - 不要用来挖矿,或者在正式商用环境下使用</translation>
- </message>
- <message>
<source>Use UPnP to map the listening port (default: 1 when listening and no -proxy)</source>
<translation>使用UPnP暴露本机监听端口(默认:1 当正在监听且不使用代理)</translation>
</message>
<message>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>警告:网络似乎并不完全同意!有些矿工似乎遇到了问题。</translation>
- </message>
- <message>
- <source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
- <translation>警告:我们的同行似乎不完全同意!您可能需要升级,或者其他节点可能需要升级。</translation>
- </message>
- <message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>节点白名单,网络掩码或IP址。可多次指定。</translation>
- </message>
- <message>
<source>-maxmempool must be at least %d MB</source>
<translation>-maxmempool 最小为%d MB</translation>
</message>
@@ -1788,14 +3057,18 @@
<translation>数据块创建选项:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>仅连接到指定节点</translation>
+ <source>Cannot resolve -%s address: '%s'</source>
+ <translation>无法解析 - %s 地址: '%s'</translation>
</message>
<message>
<source>Connection options:</source>
<translation>连接选项:</translation>
</message>
<message>
+ <source>Copyright (C) %i-%i</source>
+ <translation>版权所有 (C) %i-%i</translation>
+ </message>
+ <message>
<source>Corrupted block database detected</source>
<translation>检测发现数据块数据库损坏。请使用 -reindex参数重启客户端。</translation>
</message>
@@ -1840,6 +3113,10 @@
<translation>Error initializing wallet database environment %s!</translation>
</message>
<message>
+ <source>Error loading %s</source>
+ <translation>载入 %s 时发生错误</translation>
+ </message>
+ <message>
<source>Error loading block database</source>
<translation>导入数据块数据库出错</translation>
</message>
@@ -1880,10 +3157,6 @@
<translation>认证Cookie的位置 (默认: data目录)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>我们关联和挖掘的每sigop的最低交易字节(默认: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>没有足够的文件描述符可用。</translation>
</message>
@@ -1916,6 +3189,10 @@
<translation>指定钱包文件(数据目录内)</translation>
</message>
<message>
+ <source>The source code is available from %s.</source>
+ <translation>源代码可以在 %s 获得。</translation>
+ </message>
+ <message>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation>忽略不支持的选项 -benchmark,使用 -debug=bench</translation>
</message>
@@ -1937,11 +3214,11 @@
</message>
<message>
<source>Verifying blocks...</source>
- <translation>正在验证数据库的完整性...</translation>
+ <translation>正在验证区块...</translation>
</message>
<message>
<source>Verifying wallet...</source>
- <translation>正在检测钱包的完整性...</translation>
+ <translation>正在验证钱包...</translation>
</message>
<message>
<source>Wallet %s resides outside data directory %s</source>
@@ -1996,10 +3273,6 @@
<translation>Maximum size of data in data carrier transactions we relay and mine (default: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>通过DNS查询每个地址,如果短地址 (默认值: 1 除非 -连接)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>为每个代理连接随机化凭据。这将启用 Tor 流隔离 (默认: %u)</translation>
</message>
@@ -2012,10 +3285,6 @@
<translation>在交易费被扣除后发送的交易金额太小</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</translation>
- </message>
- <message>
<source>Whitelisted peers cannot be DoS banned and their transactions are always relayed, even if they are already in the mempool, useful e.g. for a gateway</source>
<translation>白名单节点不能被DoS banned ,且转发所有来自他们的交易(即便这些交易已经存在于mempool中),常用于网关 </translation>
</message>
@@ -2044,6 +3313,10 @@
<translation>读取数据库出错,关闭中。</translation>
</message>
<message>
+ <source>Imports blocks from external blk000??.dat file on startup</source>
+ <translation>启动时从其他来源的 blk000??.dat 文件导入区块</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>信息</translation>
</message>
@@ -2072,6 +3345,10 @@
<translation>RPC 服务器选项:</translation>
</message>
<message>
+ <source>Reducing -maxconnections from %d to %d, because of system limitations.</source>
+ <translation>因为系统的限制,将 -maxconnections 参数从 %d 降到了 %d</translation>
+ </message>
+ <message>
<source>Rescan the block chain for missing wallet transactions on startup</source>
<translation>重新扫描区块链以查找遗漏的钱包交易</translation>
</message>
@@ -2104,12 +3381,16 @@
<translation>这是实验性的软件。</translation>
</message>
<message>
- <source>Transaction amount too small</source>
- <translation>交易量太小</translation>
+ <source>Tor control port password (default: empty)</source>
+ <translation>Tor 控制端口密码 (默认值: 空白)</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>交易金额必须是积极的</translation>
+ <source>Tor control port to use if onion listening enabled (default: %s)</source>
+ <translation>开启监听 onion 连接时的 Tor 控制端口号 (默认值: %s)</translation>
+ </message>
+ <message>
+ <source>Transaction amount too small</source>
+ <translation>交易量太小</translation>
</message>
<message>
<source>Transaction too large for fee policy</source>
@@ -2136,12 +3417,16 @@
<translation>警告</translation>
</message>
<message>
+ <source>Warning: unknown new rules activated (versionbit %i)</source>
+ <translation>警告: 不明的交易规则被启用了(versionbit %i)</translation>
+ </message>
+ <message>
<source>Whether to operate in a blocks only mode (default: %u)</source>
<translation>是否用块方进行 (%u)</translation>
</message>
<message>
<source>Zapping all transactions from wallet...</source>
- <translation>Zapping all transactions from wallet...</translation>
+ <translation>正在消除錢包中的所有交易...</translation>
</message>
<message>
<source>ZeroMQ notification options:</source>
@@ -2169,6 +3454,18 @@
<translation>(1 = 保留 tx meta data , 如 account owner 和 payment request information, 2 = 不保留 tx meta data) </translation>
</message>
<message>
+ <source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+ <translation>参数 -maxtxfee 设定了很高的金额!这是你一次交易就有可能付出的最高手续费。</translation>
+ </message>
+ <message>
+ <source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
+ <translation>不要让交易留在内存池中超过 &lt;n&gt; 个小时 (默认值: %u)</translation>
+ </message>
+ <message>
+ <source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
+ <translation>当产生交易时,如果每千字节 (kB) 的手续费比这个值 (单位是 %s) 低,就视为没支付手续费 (默认值: %s)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>数据块验证 严密级别 -checkblocks (0-4, 默认: %u) </translation>
</message>
@@ -2185,10 +3482,22 @@
<translation>输出调试信息 (默认: %u, 提供 &lt;category&gt; 是可选项)</translation>
</message>
<message>
+ <source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
+ <translation>支持用 Bloom 过滤器来过滤区块和交易(默认值: %u)</translation>
+ </message>
+ <message>
+ <source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
+ <translation>网络版本字符串的总长度 (%i) 超过最大长度 (%i) 了。请减少 uacomment 参数的数目或长度。</translation>
+ </message>
+ <message>
<source>Tries to keep outbound traffic under the given target (in MiB per 24h), 0 = no limit (default: %d)</source>
<translation>尝试保持上传带宽低于(MiB/24h),0=无限制(默认:%d)</translation>
</message>
<message>
+ <source>Unsupported argument -socks found. Setting SOCKS version isn't possible anymore, only SOCKS5 proxies are supported.</source>
+ <translation>找到不再支持的 -socks 参数。现在只支持 SOCKS5 协议的代理服务器,因此不可以指定 SOCKS 协议版本。</translation>
+ </message>
+ <message>
<source>Unsupported argument -whitelistalwaysrelay ignored, use -whitelistrelay and/or -whitelistforcerelay.</source>
<translation>一个不被支持的参数 -whitelistalwaysrelay 被忽略了。请使用 -whitelistrelay 或者 -whitelistforcerelay.</translation>
</message>
@@ -2261,10 +3570,6 @@
<translation>设置私钥池大小为 &lt;n&gt; (默认:%u) </translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>设置数据块 最小字节数 (默认: %u) </translation>
- </message>
- <message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
<translation>设置RPC服务线程数 (默认: %d) </translation>
</message>
@@ -2285,6 +3590,10 @@
<translation>付款时允许使用未确认的零钱 (默认: %u) </translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>正在启动网络线程...</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>断开 非礼节点的阀值 (默认: %u) </translation>
</message>
@@ -2298,7 +3607,7 @@
</message>
<message>
<source>Loading block index...</source>
- <translation>正在加载数据块索引...</translation>
+ <translation>正在加载区块索引...</translation>
</message>
<message>
<source>Add a node to connect to and attempt to keep the connection open</source>
diff --git a/src/qt/locale/bitcoin_zh_HK.ts b/src/qt/locale/bitcoin_zh_HK.ts
index aa014db0bd..2f3a8d1f16 100644
--- a/src/qt/locale/bitcoin_zh_HK.ts
+++ b/src/qt/locale/bitcoin_zh_HK.ts
@@ -41,7 +41,10 @@
<source>&amp;Delete</source>
<translation>刪除 &amp;D</translation>
</message>
-</context>
+ </context>
+<context>
+ <name>AddressTableModel</name>
+ </context>
<context>
<name>AskPassphraseDialog</name>
<message>
@@ -60,7 +63,7 @@
<source>Repeat new passphrase</source>
<translation>重複新密碼</translation>
</message>
-</context>
+ </context>
<context>
<name>BanTableModel</name>
<message>
@@ -215,6 +218,9 @@
<name>Intro</name>
</context>
<context>
+ <name>ModalOverlay</name>
+ </context>
+<context>
<name>OpenURIDialog</name>
</context>
<context>
@@ -224,12 +230,21 @@
<name>OverviewPage</name>
</context>
<context>
+ <name>PaymentServer</name>
+ </context>
+<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
</context>
<context>
+ <name>QObject::QObject</name>
+ </context>
+<context>
+ <name>QRImageWidget</name>
+ </context>
+<context>
<name>RPCConsole</name>
</context>
<context>
@@ -239,12 +254,18 @@
<name>ReceiveRequestDialog</name>
</context>
<context>
+ <name>RecentRequestsTableModel</name>
+ </context>
+<context>
<name>SendCoinsDialog</name>
</context>
<context>
<name>SendCoinsEntry</name>
</context>
<context>
+ <name>SendConfirmationDialog</name>
+ </context>
+<context>
<name>ShutdownWindow</name>
</context>
<context>
@@ -257,12 +278,30 @@
<name>TrafficGraphWidget</name>
</context>
<context>
+ <name>TransactionDesc</name>
+ </context>
+<context>
<name>TransactionDescDialog</name>
</context>
<context>
+ <name>TransactionTableModel</name>
+ </context>
+<context>
+ <name>TransactionView</name>
+ </context>
+<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
+ <name>WalletFrame</name>
+ </context>
+<context>
+ <name>WalletModel</name>
+ </context>
+<context>
+ <name>WalletView</name>
+ </context>
+<context>
<name>bitcoin-core</name>
</context>
</TS> \ No newline at end of file
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index ab56f96795..bdcf966297 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -41,6 +41,77 @@
<source>&amp;Delete</source>
<translation>刪掉</translation>
</message>
+ <message>
+ <source>Choose the address to send coins to</source>
+ <translation>選擇要付錢過去的位址</translation>
+ </message>
+ <message>
+ <source>Choose the address to receive coins with</source>
+ <translation>選擇要收錢進來的位址</translation>
+ </message>
+ <message>
+ <source>C&amp;hoose</source>
+ <translation>選取</translation>
+ </message>
+ <message>
+ <source>Sending addresses</source>
+ <translation>付款位址</translation>
+ </message>
+ <message>
+ <source>Receiving addresses</source>
+ <translation>收款位址</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <translation>這些是你要付款過去的 Bitcoin 位址。在付錢之前,務必要檢查金額和收款位址是否正確。</translation>
+ </message>
+ <message>
+ <source>These are your Bitcoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
+ <translation>這些是你用來收款的 Bitcoin 位址。建議在每次交易時,都使用一個新的收款位址。</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Address</source>
+ <translation>複製位址</translation>
+ </message>
+ <message>
+ <source>Copy &amp;Label</source>
+ <translation>複製標記</translation>
+ </message>
+ <message>
+ <source>&amp;Edit</source>
+ <translation>編輯</translation>
+ </message>
+ <message>
+ <source>Export Address List</source>
+ <translation>匯出位址清單</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>逗點分隔資料檔(*.csv)</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>匯出失敗</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <translation>儲存位址列表到 %1 時發生錯誤。請重試一次。</translation>
+ </message>
+</context>
+<context>
+ <name>AddressTableModel</name>
+ <message>
+ <source>Label</source>
+ <translation>標記</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>位址</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(無標記)</translation>
+ </message>
</context>
<context>
<name>AskPassphraseDialog</name>
@@ -60,6 +131,94 @@
<source>Repeat new passphrase</source>
<translation>重複新密碼</translation>
</message>
+ <message>
+ <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <translation>輸入錢包的新密碼。&lt;br/&gt;密碼請用&lt;b&gt;10 個以上的隨機字元&lt;/b&gt;,或是&lt;b&gt;8 個以上的字詞&lt;/b&gt;。</translation>
+ </message>
+ <message>
+ <source>Encrypt wallet</source>
+ <translation>加密錢包</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to unlock the wallet.</source>
+ <translation>這個動作需要你的錢包密碼來解鎖錢包。</translation>
+ </message>
+ <message>
+ <source>Unlock wallet</source>
+ <translation>解鎖錢包</translation>
+ </message>
+ <message>
+ <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
+ <translation>這個動作需要你的錢包密碼來把錢包解密。</translation>
+ </message>
+ <message>
+ <source>Decrypt wallet</source>
+ <translation>解密錢包</translation>
+ </message>
+ <message>
+ <source>Change passphrase</source>
+ <translation>改變密碼</translation>
+ </message>
+ <message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>請輸入錢包的舊密碼和新密碼。</translation>
+ </message>
+ <message>
+ <source>Confirm wallet encryption</source>
+ <translation>確認錢包加密</translation>
+ </message>
+ <message>
+ <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <translation>警告: 如果把錢包加密後又忘記密碼,你就會從此&lt;b&gt;失去其中所有的 Bitcoin 了&lt;/b&gt;!</translation>
+ </message>
+ <message>
+ <source>Are you sure you wish to encrypt your wallet?</source>
+ <translation>你確定要把錢包加密嗎?</translation>
+ </message>
+ <message>
+ <source>Wallet encrypted</source>
+ <translation>錢包已加密</translation>
+ </message>
+ <message>
+ <source>%1 will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <translation>%1 現在要關閉,好完成加密程序。請注意,加密錢包不能完全防止入侵你的電腦的惡意程式偷取錢幣。</translation>
+ </message>
+ <message>
+ <source>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.</source>
+ <translation>重要: 請改用新產生有加密的錢包檔,來取代舊錢包檔的備份。為了安全性的理由,當你開始使用新的有加密的錢包後,舊錢包檔的備份就不能再使用了。</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed</source>
+ <translation>錢包加密失敗</translation>
+ </message>
+ <message>
+ <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <translation>因為內部錯誤導致錢包加密失敗。你的錢包還是沒加密。</translation>
+ </message>
+ <message>
+ <source>The supplied passphrases do not match.</source>
+ <translation>提供的密碼不一樣。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock failed</source>
+ <translation>錢包解鎖失敗</translation>
+ </message>
+ <message>
+ <source>The passphrase entered for the wallet decryption was incorrect.</source>
+ <translation>輸入要用來解密錢包的密碼不對。</translation>
+ </message>
+ <message>
+ <source>Wallet decryption failed</source>
+ <translation>錢包解密失敗</translation>
+ </message>
+ <message>
+ <source>Wallet passphrase was successfully changed.</source>
+ <translation>錢包密碼改成功了。</translation>
+ </message>
+ <message>
+ <source>Warning: The Caps Lock key is on!</source>
+ <translation>警告: 大寫字母鎖定作用中!</translation>
+ </message>
</context>
<context>
<name>BanTableModel</name>
@@ -159,6 +318,18 @@
<translation>開啓 URI...</translation>
</message>
<message>
+ <source>Click to disable network activity.</source>
+ <translation>按一下就會不使用網路。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled.</source>
+ <translation>網路活動關閉了。</translation>
+ </message>
+ <message>
+ <source>Click to enable network activity again.</source>
+ <translation>按一下就又會使用網路。</translation>
+ </message>
+ <message>
<source>Reindexing blocks on disk...</source>
<translation>正在為磁碟裡的區塊重建索引...</translation>
</message>
@@ -278,26 +449,6 @@
<source>Processed %n block(s) of transaction history.</source>
<translation><numerusform>已經處理了 %n 個區塊的交易紀錄。</numerusform></translation>
</message>
- <message numerus="yes">
- <source>%n hour(s)</source>
- <translation><numerusform>%n 個小時</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n day(s)</source>
- <translation><numerusform>%n 天</numerusform></translation>
- </message>
- <message numerus="yes">
- <source>%n week(s)</source>
- <translation><numerusform>%n 個星期</numerusform></translation>
- </message>
- <message>
- <source>%1 and %2</source>
- <translation>%1又 %2</translation>
- </message>
- <message numerus="yes">
- <source>%n year(s)</source>
- <translation><numerusform>%n 年</numerusform></translation>
- </message>
<message>
<source>%1 behind</source>
<translation>落後 %1</translation>
@@ -377,6 +528,14 @@
<translation>收款交易</translation>
</message>
<message>
+ <source>HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <translation>產生 HD 金鑰&lt;b&gt;已經啟用&lt;/b&gt;</translation>
+ </message>
+ <message>
+ <source>HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <translation>產生 HD 金鑰&lt;b&gt;已經停用&lt;/b&gt;</translation>
+ </message>
+ <message>
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
<translation>錢包&lt;b&gt;已加密&lt;/b&gt;並且&lt;b&gt;解鎖中&lt;/b&gt;</translation>
</message>
@@ -384,6 +543,10 @@
<source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
<translation>錢包&lt;b&gt;已加密&lt;/b&gt;並且&lt;b&gt;上鎖中&lt;/b&gt;</translation>
</message>
+ <message>
+ <source>A fatal error occurred. Bitcoin can no longer continue safely and will quit.</source>
+ <translation>發生了致命的錯誤。Bitcoin 軟體沒辦法再繼續安全執行,只好結束。</translation>
+ </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -404,10 +567,6 @@
<translation>金額:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>優先度:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>手續費:</translation>
</message>
@@ -460,8 +619,84 @@
<translation>已確認</translation>
</message>
<message>
- <source>Priority</source>
- <translation>優先度</translation>
+ <source>Copy address</source>
+ <translation>複製位址</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>複製標記</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>複製金額</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>複製交易識別碼</translation>
+ </message>
+ <message>
+ <source>Lock unspent</source>
+ <translation>鎖定不用</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>解鎖可用</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>複製數目</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>複製手續費</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>複製計費後金額</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>複製位元組數</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>複製零散金額</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>複製找零金額</translation>
+ </message>
+ <message>
+ <source>(%1 locked)</source>
+ <translation>(鎖定 %1 枚)</translation>
+ </message>
+ <message>
+ <source>yes</source>
+ <translation>是</translation>
+ </message>
+ <message>
+ <source>no</source>
+ <translation>否</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <translation>當任何一個收款金額小於目前的零散金額上限時,文字會變紅色。</translation>
+ </message>
+ <message>
+ <source>Can vary +/- %1 satoshi(s) per input.</source>
+ <translation>每組輸入可能有 +/- %1 個 satoshi 的誤差。</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(無標記)</translation>
+ </message>
+ <message>
+ <source>change from %1 (%2)</source>
+ <translation>找零前是 %1 (%2)</translation>
+ </message>
+ <message>
+ <source>(change)</source>
+ <translation>(找零)</translation>
</message>
</context>
<context>
@@ -486,6 +721,38 @@
<source>&amp;Address</source>
<translation>位址</translation>
</message>
+ <message>
+ <source>New receiving address</source>
+ <translation>造新的收款位址</translation>
+ </message>
+ <message>
+ <source>New sending address</source>
+ <translation>造新的付款位址</translation>
+ </message>
+ <message>
+ <source>Edit receiving address</source>
+ <translation>編輯收款位址</translation>
+ </message>
+ <message>
+ <source>Edit sending address</source>
+ <translation>編輯付款位址</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is not a valid Bitcoin address.</source>
+ <translation>輸入的位址 %1 並不是有效的 Bitcoin 位址。</translation>
+ </message>
+ <message>
+ <source>The entered address "%1" is already in the address book.</source>
+ <translation>輸入的位址 %1 在位址簿中已經有了。</translation>
+ </message>
+ <message>
+ <source>Could not unlock wallet.</source>
+ <translation>沒辦法把錢包解鎖。</translation>
+ </message>
+ <message>
+ <source>New key generation failed.</source>
+ <translation>產生新的密鑰失敗了。</translation>
+ </message>
</context>
<context>
<name>FreespaceChecker</name>
@@ -609,6 +876,57 @@
</message>
</context>
<context>
+ <name>ModalOverlay</name>
+ <message>
+ <source>Form</source>
+ <translation>表單</translation>
+ </message>
+ <message>
+ <source>Recent transactions may not yet be visible, and therefore your wallet's balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <translation>最近的交易可能還看不到,因此錢包餘額可能不正確。在錢包軟體完成跟 bitcoin 網路的同步後,這裡的資訊就會正確。詳情請見下面。</translation>
+ </message>
+ <message>
+ <source>Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <translation>使用還沒顯示出來的交易所影響到的 bitcoin 可能會不被網路所接受。</translation>
+ </message>
+ <message>
+ <source>Number of blocks left</source>
+ <translation>剩餘區塊數</translation>
+ </message>
+ <message>
+ <source>Unknown...</source>
+ <translation>不明...</translation>
+ </message>
+ <message>
+ <source>Last block time</source>
+ <translation>最近區塊時間</translation>
+ </message>
+ <message>
+ <source>Progress</source>
+ <translation>進度</translation>
+ </message>
+ <message>
+ <source>Progress increase per hour</source>
+ <translation>每小時進度</translation>
+ </message>
+ <message>
+ <source>calculating...</source>
+ <translation>正在計算中...</translation>
+ </message>
+ <message>
+ <source>Estimated time left until synced</source>
+ <translation>預估完成同步所需時間</translation>
+ </message>
+ <message>
+ <source>Hide</source>
+ <translation>隱藏</translation>
+ </message>
+ <message>
+ <source>Unknown. Syncing Headers (%1)...</source>
+ <translation>不明。正在同步前導資料(%1)中...</translation>
+ </message>
+</context>
+<context>
<name>OpenURIDialog</name>
<message>
<source>Open URI</source>
@@ -626,6 +944,10 @@
<source>Select payment request file</source>
<translation>選擇付款要求資料檔</translation>
</message>
+ <message>
+ <source>Select payment request file to open</source>
+ <translation>選擇要開啟的付款要求資料檔</translation>
+ </message>
</context>
<context>
<name>OptionsDialog</name>
@@ -938,6 +1260,97 @@
</message>
</context>
<context>
+ <name>PaymentServer</name>
+ <message>
+ <source>Payment request error</source>
+ <translation>要求付款時發生錯誤</translation>
+ </message>
+ <message>
+ <source>Cannot start bitcoin: click-to-pay handler</source>
+ <translation>沒辦法啟動 bitcoin 協議的「按就付」處理器</translation>
+ </message>
+ <message>
+ <source>URI handling</source>
+ <translation>URI 處理</translation>
+ </message>
+ <message>
+ <source>Payment request fetch URL is invalid: %1</source>
+ <translation>取得付款要求的 URL 無效: %1</translation>
+ </message>
+ <message>
+ <source>Invalid payment address %1</source>
+ <translation>無效的付款位址 %1</translation>
+ </message>
+ <message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>沒辦法解析 URI 位址!可能是因為 Bitcoin 位址無效,或是 URI 參數格式錯誤。</translation>
+ </message>
+ <message>
+ <source>Payment request file handling</source>
+ <translation>處理付款要求檔案</translation>
+ </message>
+ <message>
+ <source>Payment request file cannot be read! This can be caused by an invalid payment request file.</source>
+ <translation>沒辦法讀取付款要求檔案!可能是無效的檔案造成的。</translation>
+ </message>
+ <message>
+ <source>Payment request rejected</source>
+ <translation>付款的要求被拒絕了</translation>
+ </message>
+ <message>
+ <source>Payment request network doesn't match client network.</source>
+ <translation>付款要求的網路類型跟客戶端不符。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>付款的要求過期了。</translation>
+ </message>
+ <message>
+ <source>Payment request is not initialized.</source>
+ <translation>付款的要求沒有完成初始化。</translation>
+ </message>
+ <message>
+ <source>Unverified payment requests to custom payment scripts are unsupported.</source>
+ <translation>不支援含有自訂付款指令碼,且沒驗證過的付款要求。</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>付款的要求無效。</translation>
+ </message>
+ <message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>要求付款的金額 %1 太少(會被網路認為是沒必要的零散錢)。</translation>
+ </message>
+ <message>
+ <source>Refund from %1</source>
+ <translation>來自 %1 的退款</translation>
+ </message>
+ <message>
+ <source>Payment request %1 is too large (%2 bytes, allowed %3 bytes).</source>
+ <translation>付款要求 %1 過大 (%2 位元組, 上限 %3 位元組).</translation>
+ </message>
+ <message>
+ <source>Error communicating with %1: %2</source>
+ <translation>跟 %1 通訊時發生錯誤: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>沒辦法解析付款要求內容!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>伺服器 %1 的回應有誤</translation>
+ </message>
+ <message>
+ <source>Network request error</source>
+ <translation>發出要求時發生網路錯誤</translation>
+ </message>
+ <message>
+ <source>Payment acknowledged</source>
+ <translation>付款已確認</translation>
+ </message>
+</context>
+<context>
<name>PeerTableModel</name>
<message>
<source>User Agent</source>
@@ -948,8 +1361,12 @@
<translation>節點/服務</translation>
</message>
<message>
- <source>Ping Time</source>
- <translation>Ping 時間</translation>
+ <source>NodeId</source>
+ <translation>節點識別碼</translation>
+ </message>
+ <message>
+ <source>Ping</source>
+ <translation>Ping 時間</translation>
</message>
</context>
<context>
@@ -990,6 +1407,72 @@
<source>%1 ms</source>
<translation>%1 毫秒</translation>
</message>
+ <message numerus="yes">
+ <source>%n second(s)</source>
+ <translation><numerusform>%n 秒鐘</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n minute(s)</source>
+ <translation><numerusform>%n 分鐘</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n hour(s)</source>
+ <translation><numerusform>%n 小時</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n day(s)</source>
+ <translation><numerusform>%n 天</numerusform></translation>
+ </message>
+ <message numerus="yes">
+ <source>%n week(s)</source>
+ <translation><numerusform>%n 星期</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1又 %2</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n year(s)</source>
+ <translation><numerusform>%n 年</numerusform></translation>
+ </message>
+ <message>
+ <source>%1 didn't yet exit safely...</source>
+ <translation>%1 還沒有安全地結束...</translation>
+ </message>
+</context>
+<context>
+ <name>QObject::QObject</name>
+ <message>
+ <source>Error: Specified data directory "%1" does not exist.</source>
+ <translation>錯誤: 不存在指定的資料目錄 "%1" 。</translation>
+ </message>
+ <message>
+ <source>Error: Cannot parse configuration file: %1. Only use key=value syntax.</source>
+ <translation>錯誤: 沒辦法解析設定檔: %1。只能用「名稱=設定值」這種語法。</translation>
+ </message>
+ <message>
+ <source>Error: %1</source>
+ <translation>錯誤: %1</translation>
+ </message>
+</context>
+<context>
+ <name>QRImageWidget</name>
+ <message>
+ <source>&amp;Save Image...</source>
+ <translation>儲存圖片...</translation>
+ </message>
+ <message>
+ <source>&amp;Copy Image</source>
+ <translation>複製圖片</translation>
+ </message>
+ <message>
+ <source>Save QR Code</source>
+ <translation>儲存 QR Code</translation>
+ </message>
+ <message>
+ <source>PNG Image (*.png)</source>
+ <translation>PNG 圖檔(*.png)</translation>
+ </message>
</context>
<context>
<name>RPCConsole</name>
@@ -1150,6 +1633,10 @@
<translation>Ping 等待時間</translation>
</message>
<message>
+ <source>Min Ping</source>
+ <translation>Ping 最短時間</translation>
+ </message>
+ <message>
<source>Time Offset</source>
<translation>時間差</translation>
</message>
@@ -1194,14 +1681,6 @@
<translation>清主控台</translation>
</message>
<message>
- <source>&amp;Disconnect Node</source>
- <translation>跟節點斷線</translation>
- </message>
- <message>
- <source>Ban Node for</source>
- <translation>禁止節點連線:</translation>
- </message>
- <message>
<source>1 &amp;hour</source>
<translation>1 小時</translation>
</message>
@@ -1218,8 +1697,16 @@
<translation>1 年</translation>
</message>
<message>
- <source>&amp;Unban Node</source>
- <translation>解禁節點連線</translation>
+ <source>&amp;Disconnect</source>
+ <translation>斷線</translation>
+ </message>
+ <message>
+ <source>Ban for</source>
+ <translation>禁止連線</translation>
+ </message>
+ <message>
+ <source>&amp;Unban</source>
+ <translation>連線解禁</translation>
</message>
<message>
<source>Welcome to the %1 RPC console.</source>
@@ -1234,6 +1721,14 @@
<translation>請打 &lt;b&gt;help&lt;/b&gt; 來看可用指令的簡介。</translation>
</message>
<message>
+ <source>WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.</source>
+ <translation>警告: 已知有詐騙集團會叫人在這個畫面輸入指令,以偷取他們錢包的內容物。請不要在沒有充分理解指令可能造成後果的情況下使用主控台。</translation>
+ </message>
+ <message>
+ <source>Network activity disabled</source>
+ <translation>網路活動已關閉</translation>
+ </message>
+ <message>
<source>%1 B</source>
<translation>%1 B (位元組)</translation>
</message>
@@ -1352,6 +1847,22 @@
<source>Remove</source>
<translation>刪掉</translation>
</message>
+ <message>
+ <source>Copy URI</source>
+ <translation>複製 URI</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>複製標記</translation>
+ </message>
+ <message>
+ <source>Copy message</source>
+ <translation>複製訊息</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>複製金額</translation>
+ </message>
</context>
<context>
<name>ReceiveRequestDialog</name>
@@ -1371,6 +1882,73 @@
<source>&amp;Save Image...</source>
<translation>儲存圖片...</translation>
</message>
+ <message>
+ <source>Request payment to %1</source>
+ <translation>付款給 %1 的要求</translation>
+ </message>
+ <message>
+ <source>Payment information</source>
+ <translation>付款資訊</translation>
+ </message>
+ <message>
+ <source>URI</source>
+ <translation>URI</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>位址</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>金額</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>標記:</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>訊息</translation>
+ </message>
+ <message>
+ <source>Resulting URI too long, try to reduce the text for label / message.</source>
+ <translation>產生的 URI 過長,請試著縮短標記或訊息的文字內容。</translation>
+ </message>
+ <message>
+ <source>Error encoding URI into QR Code.</source>
+ <translation>把 URI 編碼成 QR Code 時發生錯誤。</translation>
+ </message>
+</context>
+<context>
+ <name>RecentRequestsTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>標記:</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>訊息</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(無標記)</translation>
+ </message>
+ <message>
+ <source>(no message)</source>
+ <translation>(無訊息)</translation>
+ </message>
+ <message>
+ <source>(no amount requested)</source>
+ <translation>(無要求金額)</translation>
+ </message>
+ <message>
+ <source>Requested</source>
+ <translation>要求金額</translation>
+ </message>
</context>
<context>
<name>SendCoinsDialog</name>
@@ -1407,10 +1985,6 @@
<translation>金額:</translation>
</message>
<message>
- <source>Priority:</source>
- <translation>優先度:</translation>
- </message>
- <message>
<source>Fee:</source>
<translation>手續費:</translation>
</message>
@@ -1479,10 +2053,6 @@
<translation>(手續費智慧演算法還沒準備好。通常都要等幾個區塊才行...)</translation>
</message>
<message>
- <source>Confirmation time:</source>
- <translation>確認時間:</translation>
- </message>
- <message>
<source>normal</source>
<translation>正常</translation>
</message>
@@ -1507,6 +2077,10 @@
<translation>零散錢:</translation>
</message>
<message>
+ <source>Confirmation time target:</source>
+ <translation>目標確認時間:</translation>
+ </message>
+ <message>
<source>Clear &amp;All</source>
<translation>全部清掉</translation>
</message>
@@ -1522,6 +2096,114 @@
<source>S&amp;end</source>
<translation>付款</translation>
</message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>複製數目</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>複製金額</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>複製手續費</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>複製計費後金額</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>複製位元組數</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>複製零散金額</translation>
+ </message>
+ <message>
+ <source>Copy change</source>
+ <translation>複製找零金額</translation>
+ </message>
+ <message>
+ <source>%1 to %2</source>
+ <translation>%1 給 %2</translation>
+ </message>
+ <message>
+ <source>Are you sure you want to send?</source>
+ <translation>你確定要付錢出去嗎?</translation>
+ </message>
+ <message>
+ <source>added as transaction fee</source>
+ <translation>加做交易手續費</translation>
+ </message>
+ <message>
+ <source>Total Amount %1</source>
+ <translation>總金額 %1</translation>
+ </message>
+ <message>
+ <source>or</source>
+ <translation>或</translation>
+ </message>
+ <message>
+ <source>Confirm send coins</source>
+ <translation>確認付款金額</translation>
+ </message>
+ <message>
+ <source>The recipient address is not valid. Please recheck.</source>
+ <translation>收款位址無效。請再檢查看看。</translation>
+ </message>
+ <message>
+ <source>The amount to pay must be larger than 0.</source>
+ <translation>付款金額必須大於零。</translation>
+ </message>
+ <message>
+ <source>The amount exceeds your balance.</source>
+ <translation>金額超過餘額了。</translation>
+ </message>
+ <message>
+ <source>The total exceeds your balance when the %1 transaction fee is included.</source>
+ <translation>包含 %1 的交易手續費後,總金額超過你的餘額了。</translation>
+ </message>
+ <message>
+ <source>Duplicate address found: addresses should only be used once each.</source>
+ <translation>發現有重複的位址: 每個位址只能出現一次。</translation>
+ </message>
+ <message>
+ <source>Transaction creation failed!</source>
+ <translation>製造交易失敗了!</translation>
+ </message>
+ <message>
+ <source>The transaction was rejected with the following reason: %1</source>
+ <translation>交易因為以下原因被拒絕了: %1</translation>
+ </message>
+ <message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>高於 %1 的手續費會被認為是不合理。</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>付款的要求過期了。</translation>
+ </message>
+ <message numerus="yes">
+ <source>%n block(s)</source>
+ <translation><numerusform>%n 個區塊</numerusform></translation>
+ </message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>只付必要的手續費 %1</translation>
+ </message>
+ <message>
+ <source>Warning: Invalid Bitcoin address</source>
+ <translation>警告: Bitcoin 位址無效</translation>
+ </message>
+ <message>
+ <source>Warning: Unknown change address</source>
+ <translation>警告: 不明的找零位址</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(無標記)</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -1601,6 +2283,17 @@
<source>Memo:</source>
<translation>備註:</translation>
</message>
+ <message>
+ <source>Enter a label for this address to add it to your address book</source>
+ <translation>請輸入這個位址的標記來把它加進位址簿中</translation>
+ </message>
+</context>
+<context>
+ <name>SendConfirmationDialog</name>
+ <message>
+ <source>Yes</source>
+ <translation>是</translation>
+ </message>
</context>
<context>
<name>ShutdownWindow</name>
@@ -1699,6 +2392,58 @@
<source>Reset all verify message fields</source>
<translation>重設所有訊息驗證欄位</translation>
</message>
+ <message>
+ <source>Click "Sign Message" to generate signature</source>
+ <translation>請按一下「簽署訊息」來產生簽章</translation>
+ </message>
+ <message>
+ <source>The entered address is invalid.</source>
+ <translation>輸入的位址無效。</translation>
+ </message>
+ <message>
+ <source>Please check the address and try again.</source>
+ <translation>請檢查位址是否正確後再試一次。</translation>
+ </message>
+ <message>
+ <source>The entered address does not refer to a key.</source>
+ <translation>輸入的位址沒有對應到你的任何密鑰。</translation>
+ </message>
+ <message>
+ <source>Wallet unlock was cancelled.</source>
+ <translation>錢包解鎖已取消。</translation>
+ </message>
+ <message>
+ <source>Private key for the entered address is not available.</source>
+ <translation>沒有對應輸入位址的密鑰。</translation>
+ </message>
+ <message>
+ <source>Message signing failed.</source>
+ <translation>訊息簽署失敗。</translation>
+ </message>
+ <message>
+ <source>Message signed.</source>
+ <translation>訊息簽署好了。</translation>
+ </message>
+ <message>
+ <source>The signature could not be decoded.</source>
+ <translation>沒辦法把這個簽章解碼。</translation>
+ </message>
+ <message>
+ <source>Please check the signature and try again.</source>
+ <translation>請檢查簽章是否正確後再試一次。</translation>
+ </message>
+ <message>
+ <source>The signature did not match the message digest.</source>
+ <translation>這個簽章跟訊息的數位摘要不符。</translation>
+ </message>
+ <message>
+ <source>Message verification failed.</source>
+ <translation>訊息驗證失敗。</translation>
+ </message>
+ <message>
+ <source>Message verified.</source>
+ <translation>訊息驗證沒錯。</translation>
+ </message>
</context>
<context>
<name>SplashScreen</name>
@@ -1715,11 +2460,460 @@
</message>
</context>
<context>
+ <name>TransactionDesc</name>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>到下 %n 個區塊生出來前可修改</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>到 %1 前可修改</translation>
+ </message>
+ <message>
+ <source>conflicted with a transaction with %1 confirmations</source>
+ <translation>跟一個目前確認 %1 次的交易互相衝突</translation>
+ </message>
+ <message>
+ <source>%1/offline</source>
+ <translation>%1 次/離線中</translation>
+ </message>
+ <message>
+ <source>0/unconfirmed, %1</source>
+ <translation>0 次/未確認,%1</translation>
+ </message>
+ <message>
+ <source>in memory pool</source>
+ <translation>在記憶池中</translation>
+ </message>
+ <message>
+ <source>not in memory pool</source>
+ <translation>不在記憶池中</translation>
+ </message>
+ <message>
+ <source>abandoned</source>
+ <translation>已中止</translation>
+ </message>
+ <message>
+ <source>%1/unconfirmed</source>
+ <translation>%1 次/未確認</translation>
+ </message>
+ <message>
+ <source>%1 confirmations</source>
+ <translation>確認 %1 次</translation>
+ </message>
+ <message>
+ <source>Status</source>
+ <translation>狀態</translation>
+ </message>
+ <message>
+ <source>, has not been successfully broadcast yet</source>
+ <translation>,還沒成功公告出去</translation>
+ </message>
+ <message numerus="yes">
+ <source>, broadcast through %n node(s)</source>
+ <translation><numerusform>,已公告給 %n 個節點</numerusform></translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>來源</translation>
+ </message>
+ <message>
+ <source>Generated</source>
+ <translation>生產出來</translation>
+ </message>
+ <message>
+ <source>From</source>
+ <translation>來源</translation>
+ </message>
+ <message>
+ <source>unknown</source>
+ <translation>未知</translation>
+ </message>
+ <message>
+ <source>To</source>
+ <translation>目的</translation>
+ </message>
+ <message>
+ <source>own address</source>
+ <translation>自己的位址</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>只能看</translation>
+ </message>
+ <message>
+ <source>label</source>
+ <translation>標記</translation>
+ </message>
+ <message>
+ <source>Credit</source>
+ <translation>入帳</translation>
+ </message>
+ <message numerus="yes">
+ <source>matures in %n more block(s)</source>
+ <translation><numerusform>再等 %n 個區塊生出來後成熟</numerusform></translation>
+ </message>
+ <message>
+ <source>not accepted</source>
+ <translation>不被接受</translation>
+ </message>
+ <message>
+ <source>Debit</source>
+ <translation>出帳</translation>
+ </message>
+ <message>
+ <source>Total debit</source>
+ <translation>出帳總額</translation>
+ </message>
+ <message>
+ <source>Total credit</source>
+ <translation>入帳總額</translation>
+ </message>
+ <message>
+ <source>Transaction fee</source>
+ <translation>交易手續費</translation>
+ </message>
+ <message>
+ <source>Net amount</source>
+ <translation>淨額</translation>
+ </message>
+ <message>
+ <source>Message</source>
+ <translation>訊息</translation>
+ </message>
+ <message>
+ <source>Comment</source>
+ <translation>附註</translation>
+ </message>
+ <message>
+ <source>Transaction ID</source>
+ <translation>交易識別碼</translation>
+ </message>
+ <message>
+ <source>Transaction total size</source>
+ <translation>交易總大小</translation>
+ </message>
+ <message>
+ <source>Output index</source>
+ <translation>輸出索引</translation>
+ </message>
+ <message>
+ <source>Merchant</source>
+ <translation>商家</translation>
+ </message>
+ <message>
+ <source>Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <translation>生產出來的錢要再等 %1 個區塊生出來後才成熟可以用。當區塊生產出來時會公布到網路上,來被加進區塊鏈。如果加失敗了,狀態就會變成「不被接受」,而且不能夠花。如果在你生產出區塊的幾秒鐘內,也有其他節點生產出來的話,就有可能會發生這種情形。</translation>
+ </message>
+ <message>
+ <source>Debug information</source>
+ <translation>除錯資訊</translation>
+ </message>
+ <message>
+ <source>Transaction</source>
+ <translation>交易</translation>
+ </message>
+ <message>
+ <source>Inputs</source>
+ <translation>輸入</translation>
+ </message>
+ <message>
+ <source>Amount</source>
+ <translation>金額</translation>
+ </message>
+ <message>
+ <source>true</source>
+ <translation>是</translation>
+ </message>
+ <message>
+ <source>false</source>
+ <translation>否</translation>
+ </message>
+</context>
+<context>
<name>TransactionDescDialog</name>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>這個版面顯示這次交易的詳細說明</translation>
</message>
+ <message>
+ <source>Details for %1</source>
+ <translation>交易 %1 的明細</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionTableModel</name>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>種類</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>標記:</translation>
+ </message>
+ <message numerus="yes">
+ <source>Open for %n more block(s)</source>
+ <translation><numerusform>到下 %n 個區塊生出來前可修改</numerusform></translation>
+ </message>
+ <message>
+ <source>Open until %1</source>
+ <translation>到 %1 前可修改</translation>
+ </message>
+ <message>
+ <source>Offline</source>
+ <translation>離線中</translation>
+ </message>
+ <message>
+ <source>Unconfirmed</source>
+ <translation>未確認</translation>
+ </message>
+ <message>
+ <source>Abandoned</source>
+ <translation>已中止</translation>
+ </message>
+ <message>
+ <source>Confirming (%1 of %2 recommended confirmations)</source>
+ <translation>確認中(已經 %1 次,建議至少 %2 次)</translation>
+ </message>
+ <message>
+ <source>Confirmed (%1 confirmations)</source>
+ <translation>已確認(%1 次)</translation>
+ </message>
+ <message>
+ <source>Conflicted</source>
+ <translation>有衝突</translation>
+ </message>
+ <message>
+ <source>Immature (%1 confirmations, will be available after %2)</source>
+ <translation>未成熟(確認 %1 次,會在 %2 次後可用)</translation>
+ </message>
+ <message>
+ <source>This block was not received by any other nodes and will probably not be accepted!</source>
+ <translation>沒有其他節點收到這個區塊,也許它不會被接受!</translation>
+ </message>
+ <message>
+ <source>Generated but not accepted</source>
+ <translation>生產出來但是不被接受</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>收款</translation>
+ </message>
+ <message>
+ <source>Received from</source>
+ <translation>收款自</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>付款</translation>
+ </message>
+ <message>
+ <source>Payment to yourself</source>
+ <translation>付給自己</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>開採所得</translation>
+ </message>
+ <message>
+ <source>watch-only</source>
+ <translation>只能看</translation>
+ </message>
+ <message>
+ <source>(n/a)</source>
+ <translation>(不適用)</translation>
+ </message>
+ <message>
+ <source>(no label)</source>
+ <translation>(無標記)</translation>
+ </message>
+ <message>
+ <source>Transaction status. Hover over this field to show number of confirmations.</source>
+ <translation>交易狀態。把游標停在欄位上會顯示確認次數。</translation>
+ </message>
+ <message>
+ <source>Date and time that the transaction was received.</source>
+ <translation>收到交易的日期和時間。</translation>
+ </message>
+ <message>
+ <source>Type of transaction.</source>
+ <translation>交易的種類。</translation>
+ </message>
+ <message>
+ <source>Whether or not a watch-only address is involved in this transaction.</source>
+ <translation>不論如何有一個只能觀看的地只有參與這次的交易</translation>
+ </message>
+ <message>
+ <source>User-defined intent/purpose of the transaction.</source>
+ <translation>使用者定義的交易動機或理由。</translation>
+ </message>
+ <message>
+ <source>Amount removed from or added to balance.</source>
+ <translation>要減掉或加進餘額的金額。</translation>
+ </message>
+</context>
+<context>
+ <name>TransactionView</name>
+ <message>
+ <source>All</source>
+ <translation>全部</translation>
+ </message>
+ <message>
+ <source>Today</source>
+ <translation>今天</translation>
+ </message>
+ <message>
+ <source>This week</source>
+ <translation>這星期</translation>
+ </message>
+ <message>
+ <source>This month</source>
+ <translation>這個月</translation>
+ </message>
+ <message>
+ <source>Last month</source>
+ <translation>上個月</translation>
+ </message>
+ <message>
+ <source>This year</source>
+ <translation>今年</translation>
+ </message>
+ <message>
+ <source>Range...</source>
+ <translation>指定範圍...</translation>
+ </message>
+ <message>
+ <source>Received with</source>
+ <translation>收款</translation>
+ </message>
+ <message>
+ <source>Sent to</source>
+ <translation>付款</translation>
+ </message>
+ <message>
+ <source>To yourself</source>
+ <translation>給自己</translation>
+ </message>
+ <message>
+ <source>Mined</source>
+ <translation>開採所得</translation>
+ </message>
+ <message>
+ <source>Other</source>
+ <translation>其它</translation>
+ </message>
+ <message>
+ <source>Enter address or label to search</source>
+ <translation>請輸入要搜尋的位址或標記</translation>
+ </message>
+ <message>
+ <source>Min amount</source>
+ <translation>最小金額</translation>
+ </message>
+ <message>
+ <source>Abandon transaction</source>
+ <translation>中止交易</translation>
+ </message>
+ <message>
+ <source>Copy address</source>
+ <translation>複製位址</translation>
+ </message>
+ <message>
+ <source>Copy label</source>
+ <translation>複製標記</translation>
+ </message>
+ <message>
+ <source>Copy amount</source>
+ <translation>複製金額</translation>
+ </message>
+ <message>
+ <source>Copy transaction ID</source>
+ <translation>複製交易識別碼</translation>
+ </message>
+ <message>
+ <source>Copy raw transaction</source>
+ <translation>複製交易原始資料</translation>
+ </message>
+ <message>
+ <source>Copy full transaction details</source>
+ <translation>複製完整交易明細</translation>
+ </message>
+ <message>
+ <source>Edit label</source>
+ <translation>編輯標記</translation>
+ </message>
+ <message>
+ <source>Show transaction details</source>
+ <translation>顯示交易明細</translation>
+ </message>
+ <message>
+ <source>Export Transaction History</source>
+ <translation>匯出交易記錄</translation>
+ </message>
+ <message>
+ <source>Comma separated file (*.csv)</source>
+ <translation>逗點分隔資料檔(*.csv)</translation>
+ </message>
+ <message>
+ <source>Confirmed</source>
+ <translation>已確認</translation>
+ </message>
+ <message>
+ <source>Watch-only</source>
+ <translation>只能觀看的</translation>
+ </message>
+ <message>
+ <source>Date</source>
+ <translation>日期</translation>
+ </message>
+ <message>
+ <source>Type</source>
+ <translation>種類</translation>
+ </message>
+ <message>
+ <source>Label</source>
+ <translation>標記:</translation>
+ </message>
+ <message>
+ <source>Address</source>
+ <translation>位址</translation>
+ </message>
+ <message>
+ <source>ID</source>
+ <translation>識別碼</translation>
+ </message>
+ <message>
+ <source>Exporting Failed</source>
+ <translation>匯出失敗</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the transaction history to %1.</source>
+ <translation>儲存交易記錄到 %1 時發生錯誤。</translation>
+ </message>
+ <message>
+ <source>Exporting Successful</source>
+ <translation>匯出成功</translation>
+ </message>
+ <message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>交易記錄已經成功儲存到 %1 了。</translation>
+ </message>
+ <message>
+ <source>Range:</source>
+ <translation>範圍:</translation>
+ </message>
+ <message>
+ <source>to</source>
+ <translation>到</translation>
+ </message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
@@ -1729,6 +2923,55 @@
</message>
</context>
<context>
+ <name>WalletFrame</name>
+ <message>
+ <source>No wallet has been loaded.</source>
+ <translation>沒有載入錢包。</translation>
+ </message>
+</context>
+<context>
+ <name>WalletModel</name>
+ <message>
+ <source>Send Coins</source>
+ <translation>付款</translation>
+ </message>
+</context>
+<context>
+ <name>WalletView</name>
+ <message>
+ <source>&amp;Export</source>
+ <translation>匯出</translation>
+ </message>
+ <message>
+ <source>Export the data in the current tab to a file</source>
+ <translation>將目前分頁的資料匯出存成檔案</translation>
+ </message>
+ <message>
+ <source>Backup Wallet</source>
+ <translation>備份錢包</translation>
+ </message>
+ <message>
+ <source>Wallet Data (*.dat)</source>
+ <translation>錢包資料檔(*.dat)</translation>
+ </message>
+ <message>
+ <source>Backup Failed</source>
+ <translation>備份失敗</translation>
+ </message>
+ <message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>儲存錢包資料到 %1 時發生錯誤。</translation>
+ </message>
+ <message>
+ <source>Backup Successful</source>
+ <translation>備份成功</translation>
+ </message>
+ <message>
+ <source>The wallet data was successfully saved to %1.</source>
+ <translation>錢包的資料已經成功儲存到 %1 了。</translation>
+ </message>
+</context>
+<context>
<name>bitcoin-core</name>
<message>
<source>Options:</source>
@@ -1752,6 +2995,18 @@
</translation>
</message>
<message>
+ <source>Accept connections from outside (default: 1 if no -proxy or -connect/-noconnect)</source>
+ <translation>是否接受外來連線(預設值: 當沒有 -proxy 或 -connect/-noconnect 時為 1)</translation>
+ </message>
+ <message>
+ <source>Connect only to the specified node(s); -noconnect or -connect=0 alone to disable automatic connections</source>
+ <translation>只連線到指定的節點。用 -noconnect 或是 -connect=0 可以關閉自動連線。</translation>
+ </message>
+ <message>
+ <source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <translation>依據 MIT 軟體授權條款散布,詳情請見附帶的 %s 檔案或是 %s</translation>
+ </message>
+ <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>如果沒有提供 &lt;category&gt; 或是值為 1 就會輸出所有的除錯資訊。</translation>
</message>
@@ -1792,10 +3047,6 @@
<translation>無法啟動 HTTP 伺服器。詳情請看除錯紀錄。</translation>
</message>
<message>
- <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
- <translation>是否接受外來連線(預設值: 當沒有 -proxy 或 -connect 時為 1)</translation>
- </message>
- <message>
<source>Bitcoin Core</source>
<translation>Bitcoin Core</translation>
</message>
@@ -1804,10 +3055,6 @@
<translation>%s 開發人員</translation>
</message>
<message>
- <source>-fallbackfee is set very high! This is the transaction fee you may pay when fee estimates are not available.</source>
- <translation>警告: -fallbackfee 設定了很高的金額!這是當預估手續費還沒計算出來時,交易付款預設會付的手續費。</translation>
- </message>
- <message>
<source>A fee rate (in %s/kB) that will be used when fee estimation has insufficient data (default: %s)</source>
<translation>當沒有足夠的資料計算預估手續費時,所使用的手續費費率(單位是 %s/kB, 預設值: %s)</translation>
</message>
@@ -1828,10 +3075,6 @@
<translation>清掉錢包裡的所有交易,並且在下次啟動時,使用 -rescan 來從區塊鏈中復原回來。</translation>
</message>
<message>
- <source>Distributed under the MIT software license, see the accompanying file COPYING or &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</source>
- <translation>這套軟體是依據 MIT 軟體授權條款散布,詳情請見附帶的 COPYING 檔案,或是以下網站: &lt;http://www.opensource.org/licenses/mit-license.php&gt;.</translation>
- </message>
- <message>
<source>Error loading %s: You can't enable HD on a already existing non-HD wallet</source>
<translation>載入 %s 發生錯誤:不能對已存在的非 HD 錢包啟用 HD 功能。</translation>
</message>
@@ -1844,10 +3087,6 @@
<translation>當錢包有交易改變時要執行的指令(指令中的 %s 會被取代成交易識別碼)</translation>
</message>
<message>
- <source>Force relay of transactions from whitelisted peers even they violate local relay policy (default: %d)</source>
- <translation>強制轉發從白名點節點收到的交易,即使它們違反了本機的轉發準則(預設值: %d)</translation>
- </message>
- <message>
<source>Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)</source>
<translation>跟其他節點的時間差最高可接受的中位數值。本機所認為的時間可能會被其他節點影響,往前或往後在這個值之內。(預設值: %u 秒)</translation>
</message>
@@ -1873,7 +3112,7 @@
</message>
<message>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
- <translation>這是個還沒發表的測試版本 - 使用請自負風險 - 請不要用來開採或商業應用</translation>
+ <translation>這是個還沒發表的測試版本 - 使用請自負風險 - 請不要用來開採或做商業應用</translation>
</message>
<message>
<source>Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
@@ -1884,18 +3123,18 @@
<translation>是否要使用「通用即插即用」協定(UPnP),來設定聽候連線的通訊埠的對應(預設值: 當有聽候連線且沒有指定 -proxy 參數時為 1)</translation>
</message>
<message>
+ <source>Wallet will not create transactions that violate mempool chain limits (default: %u)</source>
+ <translation>錢包軟體不會產生違反記憶池交易鏈限制的交易(預設值: %u)</translation>
+ </message>
+ <message>
<source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation>警告: 節點網路對於區塊鏈結的決定目前有分歧!看來有些礦工會有問題。</translation>
+ <translation>警告: 位元幣網路對於區塊鏈結的決定目前有分歧!有些礦工看來會有問題。</translation>
</message>
<message>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>警告: 我們和某些連線的節點對於區塊鏈結的決定不同!你可能需要升級,或是需要等其它的節點升級。</translation>
</message>
<message>
- <source>Whitelist peers connecting from the given netmask or IP address. Can be specified multiple times.</source>
- <translation>把來自指定網域或位址的節點放進白名單。這個選項可以設定多次。</translation>
- </message>
- <message>
<source>You need to rebuild the database using -reindex-chainstate to change -txindex</source>
<translation>改變 -txindex 參數後,必須要用 -reindex-chainstate 參數來重建資料庫</translation>
</message>
@@ -1928,12 +3167,12 @@
<translation>沒辦法解析 -%s 參數指定的位址: '%s'</translation>
</message>
<message>
- <source>Change index out of range</source>
- <translation>找零的索引值超出範圍</translation>
+ <source>Chain selection options:</source>
+ <translation>區塊鏈選項:</translation>
</message>
<message>
- <source>Connect only to the specified node(s)</source>
- <translation>只連線到指定節點(可多個)</translation>
+ <source>Change index out of range</source>
+ <translation>找零的索引值超出範圍</translation>
</message>
<message>
<source>Connection options:</source>
@@ -2056,10 +3295,6 @@
<translation>認證 cookie 資料的位置(預設值: 同資料目錄)</translation>
</message>
<message>
- <source>Minimum bytes per sigop in transactions we relay and mine (default: %u)</source>
- <translation>轉發和開採時,對交易資料的 sigop 平均位元組數下限(預設值: %u)</translation>
- </message>
- <message>
<source>Not enough file descriptors available.</source>
<translation>檔案描述元不足。</translation>
</message>
@@ -2093,17 +3328,13 @@
</message>
<message>
<source>Rewinding blocks...</source>
- <translation>倒轉回區塊鏈之前的狀態...</translation>
+ <translation>正在倒轉回區塊鏈之前的狀態...</translation>
</message>
<message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>設定資料庫快取大小是多少百萬位元組(MB,範圍: %d 到 %d,預設值: %d)</translation>
</message>
<message>
- <source>Set maximum block cost (default: %d)</source>
- <translation>設定區塊成本的最大值(預設值: %d)</translation>
- </message>
- <message>
<source>Set maximum block size in bytes (default: %d)</source>
<translation>設定區塊大小上限成多少位元組(預設值: %d)</translation>
</message>
@@ -2136,6 +3367,10 @@
<translation>使用通用隨插即用 (UPnP) 協定來設定對應的服務連接埠(預設值: %u)</translation>
</message>
<message>
+ <source>Use the test chain</source>
+ <translation>使用測試鏈</translation>
+ </message>
+ <message>
<source>User Agent comment (%s) contains unsafe characters.</source>
<translation>使用者代理註解(%s)中含有不安全的字元。</translation>
</message>
@@ -2208,10 +3443,6 @@
<translation>轉發和開採時,對只帶資料的交易的大小上限(預設值: %u)</translation>
</message>
<message>
- <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
- <translation>是否允許在節點位址數目不足時,使用域名查詢來搜尋節點 (預設值: 當沒用 -connect 時為 1)</translation>
- </message>
- <message>
<source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
<translation>對每個代理連線使用隨機產生的憑證。這個選項會開啟 Tor 的串流隔離(預設值: %u)</translation>
</message>
@@ -2224,10 +3455,6 @@
<translation>扣除手續費後的交易金額太少而不能傳送</translation>
</message>
<message>
- <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit &lt;https://www.openssl.org/&gt; and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
- <translation>此產品也包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit 軟體 &lt;https://www.openssl.org/&gt;, 和由 Eric Young 撰寫的加解密軟體,以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</translation>
- </message>
- <message>
<source>Use hierarchical deterministic key generation (HD) after BIP32. Only has effect during wallet creation/first start</source>
<translation>在 BIP32 開始作用後,啟用階層式可預期性密鑰產生方式(HD)。只有在產生新錢包或第一次啟動時才有作用。</translation>
</message>
@@ -2340,10 +3567,6 @@
<translation>交易金額太小</translation>
</message>
<message>
- <source>Transaction amounts must be positive</source>
- <translation>交易金額必須是正的</translation>
- </message>
- <message>
<source>Transaction too large for fee policy</source>
<translation>根據交易手續費準則,本交易的位元量過大</translation>
</message>
@@ -2408,18 +3631,22 @@
<translation>參數 -maxtxfee 設定了很高的金額!這可是你一次交易就有可能付出的最高手續費。</translation>
</message>
<message>
- <source>-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
- <translation>參數 -paytxfee 設定了很高的金額!這可是你交易付款時所要付的手續費。</translation>
- </message>
- <message>
<source>Do not keep transactions in the mempool longer than &lt;n&gt; hours (default: %u)</source>
<translation>不要讓交易留在記憶池中超過 &lt;n&gt; 個小時(預設值: %u)</translation>
</message>
<message>
+ <source>Equivalent bytes per sigop in transactions for relay and mining (default: %u)</source>
+ <translation>轉發和開採時,交易資料中每個 sigop 的等同位元組數(預設值: %u)</translation>
+ </message>
+ <message>
<source>Fees (in %s/kB) smaller than this are considered zero fee for transaction creation (default: %s)</source>
<translation>當製造交易時,如果每千位元組(kB)的手續費比這個值(單位是 %s)低,就視為沒付手續費(預設值: %s)</translation>
</message>
<message>
+ <source>Force relay of transactions from whitelisted peers even if they violate local relay policy (default: %d)</source>
+ <translation>強制轉發從白名點節點收到的交易,即使它們違反了本機的轉發準則(預設值: %d)</translation>
+ </message>
+ <message>
<source>How thorough the block verification of -checkblocks is (0-4, default: %u)</source>
<translation>使用 -checkblocks 檢查區塊的仔細程度(0 到 4,預設值: %u)</translation>
</message>
@@ -2436,10 +3663,26 @@
<translation>輸出除錯資訊(預設值: %u, 不一定要指定 &lt;category&gt;)</translation>
</message>
<message>
+ <source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect/-noconnect)</source>
+ <translation>是否允許在節點位址數目不足時,使用域名查詢來搜尋節點 (預設值: 當沒用 -connect/-noconnect 時為 1)</translation>
+ </message>
+ <message>
+ <source>Sets the serialization of raw transaction or block hex returned in non-verbose mode, non-segwit(0) or segwit(1) (default: %d)</source>
+ <translation>設定非冗長模式時,回傳的交易原始資料或區塊位元值的序列化形式:無 segwit 為 0,或是有 segwit 為 1 (預設值: %d)</translation>
+ </message>
+ <message>
<source>Support filtering of blocks and transaction with bloom filters (default: %u)</source>
<translation>支援用布倫過濾器來過濾區塊和交易(預設值: %u)</translation>
</message>
<message>
+ <source>This is the transaction fee you may pay when fee estimates are not available.</source>
+ <translation>這是當預估手續費還沒計算出來時,付款交易預設會付的手續費。</translation>
+ </message>
+ <message>
+ <source>This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit %s and cryptographic software written by Eric Young and UPnP software written by Thomas Bernard.</source>
+ <translation>此產品包含了由 OpenSSL Project 所開發的 OpenSSL Toolkit 軟體 %s, 由 Eric Young 撰寫的加解密軟體,以及由 Thomas Bernard 所撰寫的 UPnP 軟體。</translation>
+ </message>
+ <message>
<source>Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
<translation>網路版本字串的總長度(%i)超過最大長度(%i)了。請減少 uacomment 參數的數目或長度。</translation>
</message>
@@ -2460,10 +3703,6 @@
<translation>使用另外的 SOCK5 代理伺服器,來透過 Tor 隱藏服務跟其他節點聯絡(預設值: %s)</translation>
</message>
<message>
- <source>Username and hashed password for JSON-RPC connections. The field &lt;userpw&gt; comes in the format: &lt;USERNAME&gt;:&lt;SALT&gt;$&lt;HASH&gt;. A canonical python script is included in share/rpcuser. This option can be specified multiple times</source>
- <translation>JSON-RPC 連線要用的使用者名稱和雜湊密碼。&lt;userpw&gt; 的格式是:&lt;使用者名稱&gt;:&lt;調味值&gt;$&lt;雜湊值&gt;。在 share/rpcuser 目錄下有一個示範的 python 程式。這個選項可以給很多次。</translation>
- </message>
- <message>
<source>Warning: Unknown block versions being mined! It's possible unknown rules are in effect</source>
<translation>警告: 有礦工正在開採不明版本的區塊!這表示有不明的交易規則正在作用中</translation>
</message>
@@ -2472,6 +3711,14 @@
<translation>警告: 錢包檔壞掉,但資料被救回來了!原來的檔案 %s 改儲存為 %s,在目錄 %s 下。 如果餘額或交易資料有誤的話,你應該要從備份資料復原回來。</translation>
</message>
<message>
+ <source>Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple times.</source>
+ <translation>把來自指定位址(例如:1.2.3.4)或 CIDR 格式網段(例如:1.2.3.0/24)的節點放進白名單。這個選項可以設定多次。</translation>
+ </message>
+ <message>
+ <source>%s is set very high!</source>
+ <translation>%s 的設定值異常大!</translation>
+ </message>
+ <message>
<source>(default: %s)</source>
<translation>(預設值: %s)</translation>
</message>
@@ -2492,6 +3739,10 @@
<translation>無效的 -proxy 位址: '%s'</translation>
</message>
<message>
+ <source>Keypool ran out, please call keypoolrefill first</source>
+ <translation>密鑰池已經乾了,請先執行 keypoolrefill</translation>
+ </message>
+ <message>
<source>Listen for JSON-RPC connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>在通訊埠 &lt;port&gt; 聽候 JSON-RPC 連線(預設值: %u, 或若為測試網路: %u)</translation>
</message>
@@ -2528,12 +3779,16 @@
<translation>允許轉發非 P2SH 的多簽章交易(預設值: %u)</translation>
</message>
<message>
+ <source>Send transactions with full-RBF opt-in enabled (default: %u)</source>
+ <translation>送出允許提高手續費(full-RBF)的交易(預設值: %u)</translation>
+ </message>
+ <message>
<source>Set key pool size to &lt;n&gt; (default: %u)</source>
<translation>設定密鑰池大小為 &lt;n&gt; (預設值: %u)</translation>
</message>
<message>
- <source>Set minimum block size in bytes (default: %u)</source>
- <translation>設定區塊大小下限為多少位元組(預設值: %u)</translation>
+ <source>Set maximum BIP141 block weight (default: %d)</source>
+ <translation>設定 BIP141 區塊重量的最大值(預設值: %d)</translation>
</message>
<message>
<source>Set the number of threads to service RPC calls (default: %d)</source>
@@ -2556,10 +3811,38 @@
<translation>傳送交易時可以花還沒確認的零錢(預設值: %u)</translation>
</message>
<message>
+ <source>Starting network threads...</source>
+ <translation>正在啟動網路執行緒...</translation>
+ </message>
+ <message>
+ <source>The wallet will avoid paying less than the minimum relay fee.</source>
+ <translation>錢包軟體會付多於最小轉發費用的手續費。</translation>
+ </message>
+ <message>
+ <source>This is the minimum transaction fee you pay on every transaction.</source>
+ <translation>這是你每次交易付款時最少要付的手續費。</translation>
+ </message>
+ <message>
+ <source>This is the transaction fee you will pay if you send a transaction.</source>
+ <translation>這是你交易付款時所要付的手續費。</translation>
+ </message>
+ <message>
<source>Threshold for disconnecting misbehaving peers (default: %u)</source>
<translation>與亂搞的節點斷線的臨界值 (預設: %u)</translation>
</message>
<message>
+ <source>Transaction amounts must not be negative</source>
+ <translation>交易金額不能是負的</translation>
+ </message>
+ <message>
+ <source>Transaction has too long of a mempool chain</source>
+ <translation>交易造成記憶池中的交易鏈太長</translation>
+ </message>
+ <message>
+ <source>Transaction must have at least one recipient</source>
+ <translation>交易必須至少要有一個收款人</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>在 -onlynet 指定了不明的網路別: '%s'</translation>
</message>
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index 1a843a07ac..89fb159956 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -105,7 +105,7 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
ui->progressIncreasePerH->setText(QString::number(progressPerHour*100, 'f', 2)+"%");
// show expected remaining time
- ui->expectedTimeLeft->setText(GUIUtil::formateNiceTimeOffset(remainingMSecs/1000.0));
+ ui->expectedTimeLeft->setText(GUIUtil::formatNiceTimeOffset(remainingMSecs/1000.0));
static const int MAX_SAMPLES = 5000;
if (blockProcessTime.count() > MAX_SAMPLES)
@@ -137,6 +137,13 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
}
}
+void ModalOverlay::toggleVisibility()
+{
+ showHide(layerIsVisible, true);
+ if (!layerIsVisible)
+ userClosed = true;
+}
+
void ModalOverlay::showHide(bool hide, bool userRequested)
{
if ( (layerIsVisible && !hide) || (!layerIsVisible && hide) || (!hide && userClosed && !userRequested))
diff --git a/src/qt/modaloverlay.h b/src/qt/modaloverlay.h
index 66c0aa78cf..70d37b87ad 100644
--- a/src/qt/modaloverlay.h
+++ b/src/qt/modaloverlay.h
@@ -25,9 +25,11 @@ public Q_SLOTS:
void tipUpdate(int count, const QDateTime& blockDate, double nVerificationProgress);
void setKnownBestHeight(int count, const QDateTime& blockDate);
+ void toggleVisibility();
// will show or hide the modal layer
void showHide(bool hide = false, bool userRequested = false);
void closeClicked();
+ bool isLayerVisible() { return layerIsVisible; }
protected:
bool eventFilter(QObject * obj, QEvent * ev);
diff --git a/src/qt/networkstyle.cpp b/src/qt/networkstyle.cpp
index acbfee0868..93092501c9 100644
--- a/src/qt/networkstyle.cpp
+++ b/src/qt/networkstyle.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/notificator.cpp b/src/qt/notificator.cpp
index 8277e20c90..8718929c6a 100644
--- a/src/qt/notificator.cpp
+++ b/src/qt/notificator.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp
index 588059d0c5..89f633aa73 100644
--- a/src/qt/optionsdialog.cpp
+++ b/src/qt/optionsdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include "guiutil.h"
#include "optionsmodel.h"
-#include "main.h" // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
+#include "validation.h" // for DEFAULT_SCRIPTCHECK_THREADS and MAX_SCRIPTCHECK_THREADS
#include "netbase.h"
#include "txdb.h" // for -dbcache defaults
diff --git a/src/qt/optionsdialog.h b/src/qt/optionsdialog.h
index 41b56d1386..d98c1dc193 100644
--- a/src/qt/optionsdialog.h
+++ b/src/qt/optionsdialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index f82e153b67..d6e740ee9c 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include "amount.h"
#include "init.h"
-#include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS
+#include "validation.h" // For DEFAULT_SCRIPTCHECK_THREADS
#include "net.h"
#include "netbase.h"
#include "txdb.h" // for -dbcache defaults
@@ -36,7 +36,7 @@ OptionsModel::OptionsModel(QObject *parent, bool resetSettings) :
void OptionsModel::addOverriddenOption(const std::string &option)
{
- strOverriddenByCommandLine += QString::fromStdString(option) + "=" + QString::fromStdString(mapArgs[option]) + " ";
+ strOverriddenByCommandLine += QString::fromStdString(option) + "=" + QString::fromStdString(GetArg(option, "")) + " ";
}
// Writes all missing QSettings with their default values
@@ -464,4 +464,4 @@ void OptionsModel::checkAndMigrate()
settings.setValue(strSettingsVersionKey, CLIENT_VERSION);
}
-} \ No newline at end of file
+}
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index b23b5f2607..78529fbdcc 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -81,7 +81,7 @@ private:
int nDisplayUnit;
QString strThirdPartyTxUrls;
bool fCoinControlFeatures;
- /* settings that were overriden by command-line */
+ /* settings that were overridden by command-line */
QString strOverriddenByCommandLine;
// Add option to list of GUI options overridden through command line/config file
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index 7ccdb89c0c..ba344f4dbf 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -25,8 +25,8 @@ class TxViewDelegate : public QAbstractItemDelegate
{
Q_OBJECT
public:
- TxViewDelegate(const PlatformStyle *_platformStyle):
- QAbstractItemDelegate(), unit(BitcoinUnits::BTC),
+ TxViewDelegate(const PlatformStyle *_platformStyle, QObject *parent=nullptr):
+ QAbstractItemDelegate(parent), unit(BitcoinUnits::BTC),
platformStyle(_platformStyle)
{
@@ -119,8 +119,7 @@ OverviewPage::OverviewPage(const PlatformStyle *platformStyle, QWidget *parent)
currentWatchOnlyBalance(-1),
currentWatchUnconfBalance(-1),
currentWatchImmatureBalance(-1),
- txdelegate(new TxViewDelegate(platformStyle)),
- filter(0)
+ txdelegate(new TxViewDelegate(platformStyle, this))
{
ui->setupUi(this);
@@ -220,7 +219,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
if(model && model->getOptionsModel())
{
// Set up transaction list
- filter = new TransactionFilterProxy();
+ filter.reset(new TransactionFilterProxy());
filter->setSourceModel(model->getTransactionTableModel());
filter->setLimit(NUM_ITEMS);
filter->setDynamicSortFilter(true);
@@ -228,7 +227,7 @@ void OverviewPage::setWalletModel(WalletModel *model)
filter->setShowInactive(false);
filter->sort(TransactionTableModel::Date, Qt::DescendingOrder);
- ui->listTransactions->setModel(filter);
+ ui->listTransactions->setModel(filter.get());
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
// Keep up to date with wallet
diff --git a/src/qt/overviewpage.h b/src/qt/overviewpage.h
index 65cd3341b6..d76b651ce6 100644
--- a/src/qt/overviewpage.h
+++ b/src/qt/overviewpage.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,6 +8,7 @@
#include "amount.h"
#include <QWidget>
+#include <memory>
class ClientModel;
class TransactionFilterProxy;
@@ -56,7 +57,7 @@ private:
CAmount currentWatchImmatureBalance;
TxViewDelegate *txdelegate;
- TransactionFilterProxy *filter;
+ std::unique_ptr<TransactionFilterProxy> filter;
private Q_SLOTS:
void updateDisplayUnit();
diff --git a/src/qt/paymentrequestplus.cpp b/src/qt/paymentrequestplus.cpp
index 20e1f79ffa..01ec416613 100644
--- a/src/qt/paymentrequestplus.cpp
+++ b/src/qt/paymentrequestplus.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -159,14 +159,24 @@ bool PaymentRequestPlus::getMerchant(X509_STORE* certStore, QString& merchant) c
std::string data_to_verify; // Everything but the signature
rcopy.SerializeToString(&data_to_verify);
- EVP_MD_CTX ctx;
+#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX *ctx = EVP_MD_CTX_new();
+ if (!ctx) throw SSLVerifyError("Error allocating OpenSSL context.");
+#else
+ EVP_MD_CTX _ctx;
+ EVP_MD_CTX *ctx;
+ ctx = &_ctx;
+#endif
EVP_PKEY *pubkey = X509_get_pubkey(signing_cert);
- EVP_MD_CTX_init(&ctx);
- if (!EVP_VerifyInit_ex(&ctx, digestAlgorithm, NULL) ||
- !EVP_VerifyUpdate(&ctx, data_to_verify.data(), data_to_verify.size()) ||
- !EVP_VerifyFinal(&ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
+ EVP_MD_CTX_init(ctx);
+ if (!EVP_VerifyInit_ex(ctx, digestAlgorithm, NULL) ||
+ !EVP_VerifyUpdate(ctx, data_to_verify.data(), data_to_verify.size()) ||
+ !EVP_VerifyFinal(ctx, (const unsigned char*)paymentRequest.signature().data(), (unsigned int)paymentRequest.signature().size(), pubkey)) {
throw SSLVerifyError("Bad signature, invalid payment request.");
}
+#if HAVE_DECL_EVP_MD_CTX_NEW
+ EVP_MD_CTX_free(ctx);
+#endif
// OpenSSL API for getting human printable strings from certs is baroque.
int textlen = X509_NAME_get_text_by_NID(certname, NID_commonName, NULL, 0);
diff --git a/src/qt/paymentrequestplus.h b/src/qt/paymentrequestplus.h
index a73fe5f29d..ee1a37d83c 100644
--- a/src/qt/paymentrequestplus.h
+++ b/src/qt/paymentrequestplus.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 9f23e77a13..688e8123af 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,7 +10,7 @@
#include "base58.h"
#include "chainparams.h"
-#include "main.h" // For minRelayTxFee
+#include "policy/policy.h"
#include "ui_interface.h"
#include "util.h"
#include "wallet/wallet.h"
@@ -58,14 +58,19 @@ const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest"
// BIP70 max payment request size in bytes (DoS protection)
const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
-X509_STORE* PaymentServer::certStore = NULL;
-void PaymentServer::freeCertStore()
+struct X509StoreDeleter {
+ void operator()(X509_STORE* b) {
+ X509_STORE_free(b);
+ }
+};
+
+struct X509Deleter {
+ void operator()(X509* b) { X509_free(b); }
+};
+
+namespace // Anon namespace
{
- if (PaymentServer::certStore != NULL)
- {
- X509_STORE_free(PaymentServer::certStore);
- PaymentServer::certStore = NULL;
- }
+ std::unique_ptr<X509_STORE, X509StoreDeleter> certStore;
}
//
@@ -80,7 +85,7 @@ static QString ipcServerName()
// Append a simple hash of the datadir
// Note that GetDataDir(true) returns a different path
// for -testnet versus main net
- QString ddir(QString::fromStdString(GetDataDir(true).string()));
+ QString ddir(GUIUtil::boostPathToQString(GetDataDir(true)));
name.append(QString::number(qHash(ddir)));
return name;
@@ -107,20 +112,15 @@ static void ReportInvalidCertificate(const QSslCertificate& cert)
//
void PaymentServer::LoadRootCAs(X509_STORE* _store)
{
- if (PaymentServer::certStore == NULL)
- atexit(PaymentServer::freeCertStore);
- else
- freeCertStore();
-
// Unit tests mostly use this, to pass in fake root CAs:
if (_store)
{
- PaymentServer::certStore = _store;
+ certStore.reset(_store);
return;
}
// Normal execution, use either -rootcertificates or system certs:
- PaymentServer::certStore = X509_STORE_new();
+ certStore.reset(X509_STORE_new());
// Note: use "-system-" default here so that users can pass -rootcertificates=""
// and get 'I don't like X.509 certificates, don't trust anybody' behavior:
@@ -167,11 +167,11 @@ void PaymentServer::LoadRootCAs(X509_STORE* _store)
QByteArray certData = cert.toDer();
const unsigned char *data = (const unsigned char *)certData.data();
- X509* x509 = d2i_X509(0, &data, certData.size());
- if (x509 && X509_STORE_add_cert(PaymentServer::certStore, x509))
+ std::unique_ptr<X509, X509Deleter> x509(d2i_X509(0, &data, certData.size()));
+ if (x509 && X509_STORE_add_cert(certStore.get(), x509.get()))
{
- // Note: X509_STORE_free will free the X509* objects when
- // the PaymentServer is destroyed
+ // Note: X509_STORE increases the reference count to the X509 object,
+ // we still have to release our reference to it.
++nRootCerts;
}
else
@@ -550,7 +550,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
recipient.paymentRequest = request;
recipient.message = GUIUtil::HtmlEscape(request.getDetails().memo());
- request.getMerchant(PaymentServer::certStore, recipient.authenticatedMerchant);
+ request.getMerchant(certStore.get(), recipient.authenticatedMerchant);
QList<std::pair<CScript, CAmount> > sendingTos = request.getPayTo();
QStringList addresses;
@@ -582,7 +582,7 @@ bool PaymentServer::processPaymentRequest(const PaymentRequestPlus& request, Sen
// Extract and check amounts
CTxOut txOut(sendingTo.second, sendingTo.first);
- if (txOut.IsDust(::minRelayTxFee)) {
+ if (txOut.IsDust(dustRelayFee)) {
Q_EMIT message(tr("Payment request error"), tr("Requested payment amount of %1 is too small (considered dust).")
.arg(BitcoinUnits::formatWithUnit(optionsModel->getDisplayUnit(), sendingTo.second)),
CClientUIInterface::MSG_ERROR);
@@ -807,3 +807,8 @@ bool PaymentServer::verifyAmount(const CAmount& requestAmount)
}
return fVerified;
}
+
+X509_STORE* PaymentServer::getCertStore()
+{
+ return certStore.get();
+}
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 2d27ed078b..37ee522d54 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -83,7 +83,7 @@ public:
static void LoadRootCAs(X509_STORE* store = NULL);
// Return certificate store
- static X509_STORE* getCertStore() { return certStore; }
+ static X509_STORE* getCertStore();
// OptionsModel is used for getting proxy settings and display unit
void setOptionsModel(OptionsModel *optionsModel);
@@ -140,9 +140,6 @@ private:
bool saveURIs; // true during startup
QLocalServer* uriServer;
- static X509_STORE* certStore; // Trusted root certificates
- static void freeCertStore();
-
QNetworkAccessManager* netManager; // Used to fetch payment requests
OptionsModel *optionsModel;
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index a2f9471fcc..974a71ddca 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,6 +8,7 @@
#include "guiconstants.h"
#include "guiutil.h"
+#include "validation.h" // for cs_main
#include "sync.h"
#include <QDebug>
@@ -114,12 +115,12 @@ PeerTableModel::PeerTableModel(ClientModel *parent) :
timer(0)
{
columns << tr("NodeId") << tr("Node/Service") << tr("User Agent") << tr("Ping");
- priv = new PeerTablePriv();
+ priv.reset(new PeerTablePriv());
// default to unsorted
priv->sortColumn = -1;
// set up timer for auto refresh
- timer = new QTimer();
+ timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), SLOT(refresh()));
timer->setInterval(MODEL_UPDATE_DELAY);
@@ -127,6 +128,11 @@ PeerTableModel::PeerTableModel(ClientModel *parent) :
refresh();
}
+PeerTableModel::~PeerTableModel()
+{
+ // Intentionally left empty
+}
+
void PeerTableModel::startAutoRefresh()
{
timer->start();
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index a4f7bbdb3d..cc47b67ec9 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_PEERTABLEMODEL_H
#define BITCOIN_QT_PEERTABLEMODEL_H
-#include "main.h" // For CNodeStateStats
+#include "net_processing.h" // For CNodeStateStats
#include "net.h"
#include <QAbstractTableModel>
@@ -46,6 +46,7 @@ class PeerTableModel : public QAbstractTableModel
public:
explicit PeerTableModel(ClientModel *parent = 0);
+ ~PeerTableModel();
const CNodeCombinedStats *getNodeStats(int idx);
int getRowByNodeId(NodeId nodeid);
void startAutoRefresh();
@@ -75,7 +76,7 @@ public Q_SLOTS:
private:
ClientModel *clientModel;
QStringList columns;
- PeerTablePriv *priv;
+ std::unique_ptr<PeerTablePriv> priv;
QTimer *timer;
};
diff --git a/src/qt/platformstyle.cpp b/src/qt/platformstyle.cpp
index e4438cc43d..90bd619c04 100644
--- a/src/qt/platformstyle.cpp
+++ b/src/qt/platformstyle.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/qvalidatedlineedit.cpp b/src/qt/qvalidatedlineedit.cpp
index 492b96ff09..179ecdc8b3 100644
--- a/src/qt/qvalidatedlineedit.cpp
+++ b/src/qt/qvalidatedlineedit.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/qvaluecombobox.cpp b/src/qt/qvaluecombobox.cpp
index 2f2478783c..a3b9b994ec 100644
--- a/src/qt/qvaluecombobox.cpp
+++ b/src/qt/qvaluecombobox.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/receivecoinsdialog.cpp b/src/qt/receivecoinsdialog.cpp
index b50cad4975..e98f4d3347 100644
--- a/src/qt/receivecoinsdialog.cpp
+++ b/src/qt/receivecoinsdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -25,6 +25,7 @@
ReceiveCoinsDialog::ReceiveCoinsDialog(const PlatformStyle *_platformStyle, QWidget *parent) :
QDialog(parent),
ui(new Ui::ReceiveCoinsDialog),
+ columnResizingFixer(0),
model(0),
platformStyle(_platformStyle)
{
@@ -49,7 +50,7 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(const PlatformStyle *_platformStyle, QWid
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
// context menu
- contextMenu = new QMenu();
+ contextMenu = new QMenu(this);
contextMenu->addAction(copyURIAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyMessageAction);
@@ -91,7 +92,7 @@ void ReceiveCoinsDialog::setModel(WalletModel *_model)
SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this,
SLOT(recentRequestsView_selectionChanged(QItemSelection, QItemSelection)));
// Last 2 columns are set by the columnResizingFixer, when the table geometry is ready.
- columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH);
+ columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(tableView, AMOUNT_MINIMUM_COLUMN_WIDTH, DATE_COLUMN_WIDTH, this);
}
}
diff --git a/src/qt/receivecoinsdialog.h b/src/qt/receivecoinsdialog.h
index d137f1616e..1d0491c0d5 100644
--- a/src/qt/receivecoinsdialog.h
+++ b/src/qt/receivecoinsdialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/receiverequestdialog.cpp b/src/qt/receiverequestdialog.cpp
index 998c9176d7..3752fa4b66 100644
--- a/src/qt/receiverequestdialog.cpp
+++ b/src/qt/receiverequestdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -32,7 +32,7 @@
QRImageWidget::QRImageWidget(QWidget *parent):
QLabel(parent), contextMenu(0)
{
- contextMenu = new QMenu();
+ contextMenu = new QMenu(this);
QAction *saveImageAction = new QAction(tr("&Save Image..."), this);
connect(saveImageAction, SIGNAL(triggered()), this, SLOT(saveImage()));
contextMenu->addAction(saveImageAction);
diff --git a/src/qt/receiverequestdialog.h b/src/qt/receiverequestdialog.h
index 676745a858..1a9b165237 100644
--- a/src/qt/receiverequestdialog.h
+++ b/src/qt/receiverequestdialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/recentrequeststablemodel.cpp b/src/qt/recentrequeststablemodel.cpp
index 2335d6b282..dac3979290 100644
--- a/src/qt/recentrequeststablemodel.cpp
+++ b/src/qt/recentrequeststablemodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,7 +14,7 @@
#include <boost/foreach.hpp>
RecentRequestsTableModel::RecentRequestsTableModel(CWallet *wallet, WalletModel *parent) :
- walletModel(parent)
+ QAbstractTableModel(parent), walletModel(parent)
{
Q_UNUSED(wallet);
nReceiveRequestsMaxId = 0;
diff --git a/src/qt/recentrequeststablemodel.h b/src/qt/recentrequeststablemodel.h
index 0193e748d7..0c02968f92 100644
--- a/src/qt/recentrequeststablemodel.h
+++ b/src/qt/recentrequeststablemodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -27,7 +27,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
unsigned int nDate = date.toTime_t();
READWRITE(this->nVersion);
diff --git a/src/qt/res/icons/network_disabled.png b/src/qt/res/icons/network_disabled.png
new file mode 100644
index 0000000000..269c3cfab8
--- /dev/null
+++ b/src/qt/res/icons/network_disabled.png
Binary files differ
diff --git a/src/qt/res/src/connect-0.svg b/src/qt/res/src/connect-0.svg
index 7d2afac622..0920555b96 100644
--- a/src/qt/res/src/connect-0.svg
+++ b/src/qt/res/src/connect-0.svg
@@ -7,8 +7,8 @@
xmlns="http://www.w3.org/2000/svg"
id="svg2"
viewBox="0 0 24 24"
- height="24"
- width="24"
+ height="92"
+ width="92"
version="1.2">
<metadata
id="metadata10">
diff --git a/src/qt/res/src/connect-1.svg b/src/qt/res/src/connect-1.svg
index d17928c97d..25dea4cd3a 100644
--- a/src/qt/res/src/connect-1.svg
+++ b/src/qt/res/src/connect-1.svg
@@ -6,8 +6,8 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.2"
- width="24"
- height="24"
+ width="92"
+ height="92"
viewBox="0 0 24 24"
id="svg2">
<metadata
diff --git a/src/qt/res/src/connect-2.svg b/src/qt/res/src/connect-2.svg
index 841ca6071d..bb98333d23 100644
--- a/src/qt/res/src/connect-2.svg
+++ b/src/qt/res/src/connect-2.svg
@@ -6,8 +6,8 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.2"
- width="24"
- height="24"
+ width="92"
+ height="92"
viewBox="0 0 24 24"
id="svg2">
<metadata
diff --git a/src/qt/res/src/connect-3.svg b/src/qt/res/src/connect-3.svg
index b06e67daf8..a54a55ef61 100644
--- a/src/qt/res/src/connect-3.svg
+++ b/src/qt/res/src/connect-3.svg
@@ -7,8 +7,8 @@
xmlns="http://www.w3.org/2000/svg"
id="svg2"
viewBox="0 0 24 24"
- height="24"
- width="24"
+ height="92"
+ width="92"
version="1.2">
<metadata
id="metadata10">
diff --git a/src/qt/res/src/connect-4.svg b/src/qt/res/src/connect-4.svg
index 0abc7955fd..b83b9f9d03 100644
--- a/src/qt/res/src/connect-4.svg
+++ b/src/qt/res/src/connect-4.svg
@@ -6,8 +6,8 @@
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.2"
- width="24"
- height="24"
+ width="92"
+ height="92"
viewBox="0 0 24 24"
id="svg2">
<metadata
diff --git a/src/qt/res/src/network_disabled.svg b/src/qt/res/src/network_disabled.svg
new file mode 100644
index 0000000000..a041d77439
--- /dev/null
+++ b/src/qt/res/src/network_disabled.svg
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ id="svg2"
+ viewBox="0 0 24 24"
+ width="92"
+ height="92"
+ version="1.2">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <g
+ id="g4142"
+ transform="matrix(0,-1,-1,0,23.96,24)">
+ <g
+ id="g4210"
+ transform="matrix(-1,0,0,1,59.86,-106.6)">
+ <g
+ id="g4289"
+ transform="matrix(-1,0,0,1,-16.98,0.8136)">
+ <g
+ id="g4291">
+ <path
+ id="path4293"
+ transform="matrix(0,-1,-1,0,-52.84,129.7464)"
+ d="M 20.146484 1.0097656 C 18.746484 1.0097656 17.646484 1.8597656 17.146484 3.0097656 L 14.447266 3.0097656 C 12.247266 3.0097656 10.447266 4.7997656 10.447266 7.0097656 L 10.447266 8.1425781 C 10.128283 8.0634395 9.7980674 8.0097656 9.4472656 8.0097656 L 6.8457031 8.0097656 C 6.3457031 6.8597656 5.2457031 6.0097656 3.8457031 6.0097656 C 1.8457031 6.0097656 0.34570312 7.5997656 0.34570312 9.5097656 C 0.34570312 11.419766 1.8457031 13.009766 3.8457031 13.009766 C 5.2457031 13.009766 6.3457031 12.159766 6.8457031 11.009766 L 8.9746094 11.009766 C 8.8693536 11.330059 8.8007812 11.663345 8.8007812 12.001953 C 8.8007813 12.841953 9.1402344 13.671625 9.7402344 14.265625 C 9.9479364 14.475439 10.191281 14.640988 10.447266 14.783203 L 10.447266 16.980469 C 10.447266 17.530469 9.9472656 17.980469 9.4472656 17.980469 L 6.8457031 17.980469 C 6.3457031 16.830469 5.2457031 15.980469 3.8457031 15.980469 C 1.8457031 15.980469 0.34570312 17.570469 0.34570312 19.480469 C 0.34570312 21.390469 1.8457031 22.990234 3.8457031 22.990234 C 5.2457031 22.990234 6.2457031 22.14 6.8457031 21 L 9.4472656 21 C 11.747266 21 13.447266 19.19 13.447266 17 L 13.447266 15.869141 C 13.768504 15.952624 14.100702 16.009766 14.447266 16.009766 L 17.146484 16.009766 C 17.646484 17.159766 18.746484 18.009766 20.146484 18.009766 C 22.046484 18.009766 23.646484 16.449766 23.646484 14.509766 C 23.646484 12.579766 22.046484 11.009766 20.146484 11.009766 C 18.746484 11.009766 17.646484 11.859766 17.146484 13.009766 L 15.009766 13.009766 C 15.119625 12.684735 15.189453 12.346256 15.189453 12 C 15.189453 11.16 14.849906 10.339953 14.253906 9.7519531 C 14.0189 9.51021 13.74069 9.3244522 13.447266 9.171875 L 13.447266 7.0097656 C 13.447266 6.4597656 13.947266 6.0097656 14.447266 6.0097656 L 17.146484 6.0097656 C 17.646484 7.1597656 18.746484 8.0097656 20.146484 8.0097656 C 22.046484 8.0097656 23.646484 6.4397656 23.646484 4.5097656 C 23.646484 2.5697656 22.046484 1.0097656 20.146484 1.0097656 z M 20.146484 2.0097656 C 21.446484 2.0097656 22.646484 3.1297656 22.646484 4.5097656 C 22.646484 5.8797656 21.446484 7.0097656 20.146484 7.0097656 C 19.046484 7.0097656 18.145703 6.3096094 17.845703 5.3496094 L 17.746094 5.0097656 L 14.447266 5.0097656 C 13.347266 5.0097656 12.447266 5.8997656 12.447266 7.0097656 L 12.447266 8.8476562 C 12.298996 8.8261586 12.150754 8.8027344 12 8.8027344 C 11.954455 8.8027344 11.910576 8.8144662 11.865234 8.8164062 C 11.733157 8.716719 11.592447 8.6297054 11.447266 8.546875 L 11.447266 7.0097656 C 11.447266 5.3597656 12.847266 4.0097656 14.447266 4.0097656 L 17.746094 4.0097656 L 17.845703 3.6699219 C 18.145703 2.7099219 19.046484 2.0097656 20.146484 2.0097656 z M 3.8457031 7.0097656 C 4.9457031 7.0097656 5.8464844 7.7099219 6.1464844 8.6699219 L 6.2460938 9.0097656 L 9.4472656 9.0097656 C 9.8222656 9.0097656 10.165234 9.0792969 10.474609 9.2050781 C 10.207952 9.3508551 9.9554097 9.5233651 9.7402344 9.7421875 C 9.6554755 9.8255337 9.5878282 9.9233484 9.5136719 10.015625 C 9.4909069 10.014746 9.470428 10.009766 9.4472656 10.009766 L 6.2460938 10.009766 L 6.1464844 10.349609 C 5.8464844 11.319609 4.9457031 12.009766 3.8457031 12.009766 C 2.4457031 12.009766 1.3457031 10.899766 1.3457031 9.5097656 C 1.3457031 8.1197656 2.4457031 7.0097656 3.8457031 7.0097656 z M 20.146484 12.009766 C 21.446484 12.009766 22.646484 13.139766 22.646484 14.509766 C 22.646484 15.889766 21.446484 17.009766 20.146484 17.009766 C 19.046484 17.009766 18.145703 16.309609 17.845703 15.349609 L 17.746094 15.009766 L 14.447266 15.009766 C 14.100959 15.009766 13.772729 14.94045 13.470703 14.816406 C 13.754756 14.666178 14.02454 14.485593 14.253906 14.253906 C 14.328913 14.179151 14.386367 14.091269 14.453125 14.009766 L 17.746094 14.009766 L 17.845703 13.669922 C 18.145703 12.709922 19.046484 12.009766 20.146484 12.009766 z M 11.447266 15.144531 C 11.629002 15.17624 11.813246 15.199219 12 15.199219 C 12.018544 15.199153 12.036184 15.193748 12.054688 15.193359 C 12.180437 15.288088 12.3107 15.373496 12.447266 15.453125 L 12.447266 17 C 12.447266 18.67 11.147266 20 9.4472656 20 L 6.6464844 20 L 6.2460938 20 L 6.1464844 20.330078 C 5.8464844 21.290078 4.9457031 21.990234 3.8457031 21.990234 C 2.4457031 21.990234 1.3457031 20.870469 1.3457031 19.480469 C 1.3457031 18.090469 2.4457031 16.980469 3.8457031 16.980469 C 4.9457031 16.980469 5.8464844 17.680625 6.1464844 18.640625 L 6.2460938 18.980469 L 9.4472656 18.980469 C 10.547266 18.980469 11.447266 18.090469 11.447266 16.980469 L 11.447266 15.144531 z "
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:0.5;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+ </g>
+ </g>
+ </g>
+ </g>
+ <path d="M 3,3 l 18,18" style="stroke-width: 3; stroke: #000000; stroke-linecap: round;" />
+ <path d="M 21,3 l -18,18" style="stroke-width: 3; stroke: #000000; stroke-linecap: round;" />
+</svg>
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index f10dddf589..87d73b5f08 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -31,6 +31,7 @@
#include <QKeyEvent>
#include <QMenu>
+#include <QMessageBox>
#include <QScrollBar>
#include <QSettings>
#include <QSignalMapper>
@@ -63,6 +64,20 @@ const struct {
{NULL, NULL}
};
+namespace {
+
+// don't add private key handling cmd's to the history
+const QStringList historyFilter = QStringList()
+ << "importprivkey"
+ << "importmulti"
+ << "signmessagewithprivkey"
+ << "signrawtransaction"
+ << "walletpassphrase"
+ << "walletpassphrasechange"
+ << "encryptwallet";
+
+}
+
/* Object for executing console RPC commands in a separate thread.
*/
class RPCExecutor : public QObject
@@ -113,10 +128,10 @@ public:
#include "rpcconsole.moc"
/**
- * Split shell command line into a list of arguments and execute the command(s).
+ * Split shell command line into a list of arguments and optionally execute the command(s).
* Aims to emulate \c bash and friends.
*
- * - Command nesting is possible with brackets [example: validateaddress(getnewaddress())]
+ * - Command nesting is possible with parenthesis; for example: validateaddress(getnewaddress())
* - Arguments are delimited with whitespace or comma
* - Extra whitespace at the beginning and end and between arguments will be ignored
* - Text can be "double" or 'single' quoted
@@ -127,9 +142,11 @@ public:
*
* @param[out] result stringified Result from the executed command(chain)
* @param[in] strCommand Command line to split
+ * @param[in] fExecute set true if you want the command to be executed
+ * @param[out] pstrFilteredOut Command line, filtered to remove any sensitive data
*/
-bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string &strCommand)
+bool RPCConsole::RPCParseCommandLine(std::string &strResult, const std::string &strCommand, const bool fExecute, std::string * const pstrFilteredOut)
{
std::vector< std::vector<std::string> > stack;
stack.push_back(std::vector<std::string>());
@@ -137,6 +154,8 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
enum CmdParseState
{
STATE_EATING_SPACES,
+ STATE_EATING_SPACES_IN_ARG,
+ STATE_EATING_SPACES_IN_BRACKETS,
STATE_ARGUMENT,
STATE_SINGLEQUOTED,
STATE_DOUBLEQUOTED,
@@ -147,12 +166,35 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
} state = STATE_EATING_SPACES;
std::string curarg;
UniValue lastResult;
+ unsigned nDepthInsideSensitive = 0;
+ size_t filter_begin_pos = 0, chpos;
+ std::vector<std::pair<size_t, size_t>> filter_ranges;
+
+ auto add_to_current_stack = [&](const std::string& strArg) {
+ if (stack.back().empty() && (!nDepthInsideSensitive) && historyFilter.contains(QString::fromStdString(strArg), Qt::CaseInsensitive)) {
+ nDepthInsideSensitive = 1;
+ filter_begin_pos = chpos;
+ }
+ stack.back().push_back(strArg);
+ };
+
+ auto close_out_params = [&]() {
+ if (nDepthInsideSensitive) {
+ if (!--nDepthInsideSensitive) {
+ assert(filter_begin_pos);
+ filter_ranges.push_back(std::make_pair(filter_begin_pos, chpos));
+ filter_begin_pos = 0;
+ }
+ }
+ stack.pop_back();
+ };
std::string strCommandTerminated = strCommand;
if (strCommandTerminated.back() != '\n')
strCommandTerminated += "\n";
- for(char ch: strCommandTerminated)
+ for (chpos = 0; chpos < strCommandTerminated.size(); ++chpos)
{
+ char ch = strCommandTerminated[chpos];
switch(state)
{
case STATE_COMMAND_EXECUTED_INNER:
@@ -171,7 +213,7 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
curarg += ch;
break;
}
- if (curarg.size())
+ if (curarg.size() && fExecute)
{
// if we have a value query, query arrays with index and objects with a string key
UniValue subelement;
@@ -196,7 +238,7 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
breakParsing = false;
// pop the stack and return the result to the current command arguments
- stack.pop_back();
+ close_out_params();
// don't stringify the json in case of a string to avoid doublequotes
if (lastResult.isStr())
@@ -208,7 +250,7 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
if (curarg.size())
{
if (stack.size())
- stack.back().push_back(curarg);
+ add_to_current_stack(curarg);
else
strResult = curarg;
}
@@ -220,6 +262,8 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
break;
}
case STATE_ARGUMENT: // In or after argument
+ case STATE_EATING_SPACES_IN_ARG:
+ case STATE_EATING_SPACES_IN_BRACKETS:
case STATE_EATING_SPACES: // Handle runs of whitespace
switch(ch)
{
@@ -227,41 +271,55 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
case '\'': state = STATE_SINGLEQUOTED; break;
case '\\': state = STATE_ESCAPE_OUTER; break;
case '(': case ')': case '\n':
+ if (state == STATE_EATING_SPACES_IN_ARG)
+ throw std::runtime_error("Invalid Syntax");
if (state == STATE_ARGUMENT)
{
if (ch == '(' && stack.size() && stack.back().size() > 0)
- stack.push_back(std::vector<std::string>());
- if (curarg.size())
{
- // don't allow commands after executed commands on baselevel
- if (!stack.size())
- throw std::runtime_error("Invalid Syntax");
- stack.back().push_back(curarg);
+ if (nDepthInsideSensitive) {
+ ++nDepthInsideSensitive;
+ }
+ stack.push_back(std::vector<std::string>());
}
+
+ // don't allow commands after executed commands on baselevel
+ if (!stack.size())
+ throw std::runtime_error("Invalid Syntax");
+
+ add_to_current_stack(curarg);
curarg.clear();
- state = STATE_EATING_SPACES;
+ state = STATE_EATING_SPACES_IN_BRACKETS;
}
if ((ch == ')' || ch == '\n') && stack.size() > 0)
{
- std::string strPrint;
- // Convert argument list to JSON objects in method-dependent way,
- // and pass it along with the method name to the dispatcher.
- JSONRPCRequest req;
- req.params = RPCConvertValues(stack.back()[0], std::vector<std::string>(stack.back().begin() + 1, stack.back().end()));
- req.strMethod = stack.back()[0];
- lastResult = tableRPC.execute(req);
+ if (fExecute) {
+ // Convert argument list to JSON objects in method-dependent way,
+ // and pass it along with the method name to the dispatcher.
+ JSONRPCRequest req;
+ req.params = RPCConvertValues(stack.back()[0], std::vector<std::string>(stack.back().begin() + 1, stack.back().end()));
+ req.strMethod = stack.back()[0];
+ lastResult = tableRPC.execute(req);
+ }
state = STATE_COMMAND_EXECUTED;
curarg.clear();
}
break;
case ' ': case ',': case '\t':
- if(state == STATE_ARGUMENT) // Space ends argument
+ if(state == STATE_EATING_SPACES_IN_ARG && curarg.empty() && ch == ',')
+ throw std::runtime_error("Invalid Syntax");
+
+ else if(state == STATE_ARGUMENT) // Space ends argument
{
- if (curarg.size())
- stack.back().push_back(curarg);
+ add_to_current_stack(curarg);
curarg.clear();
}
+ if ((state == STATE_EATING_SPACES_IN_BRACKETS || state == STATE_ARGUMENT) && ch == ',')
+ {
+ state = STATE_EATING_SPACES_IN_ARG;
+ break;
+ }
state = STATE_EATING_SPACES;
break;
default: curarg += ch; state = STATE_ARGUMENT;
@@ -291,6 +349,16 @@ bool RPCConsole::RPCExecuteCommandLine(std::string &strResult, const std::string
break;
}
}
+ if (pstrFilteredOut) {
+ if (STATE_COMMAND_EXECUTED == state) {
+ assert(!stack.empty());
+ close_out_params();
+ }
+ *pstrFilteredOut = strCommand;
+ for (auto i = filter_ranges.rbegin(); i != filter_ranges.rend(); ++i) {
+ pstrFilteredOut->replace(i->first, i->second - i->first, "(…)");
+ }
+ }
switch(state) // final state
{
case STATE_COMMAND_EXECUTED:
@@ -343,7 +411,6 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) :
ui(new Ui::RPCConsole),
clientModel(0),
historyPtr(0),
- cachedNodeid(-1),
platformStyle(_platformStyle),
peersTableContextMenu(0),
banTableContextMenu(0),
@@ -383,7 +450,6 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) :
// based timer interface
RPCSetTimerInterfaceIfUnset(rpcTimerInterface);
- startExecutor();
setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
ui->detailWidget->hide();
@@ -397,7 +463,6 @@ RPCConsole::RPCConsole(const PlatformStyle *_platformStyle, QWidget *parent) :
RPCConsole::~RPCConsole()
{
GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this);
- Q_EMIT stopExecutor();
RPCUnsetTimerInterface(rpcTimerInterface);
delete rpcTimerInterface;
delete ui;
@@ -459,6 +524,9 @@ void RPCConsole::setClientModel(ClientModel *model)
setNumBlocks(model->getNumBlocks(), model->getLastBlockDate(), model->getVerificationProgress(NULL), false);
connect(model, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
+ updateNetworkState();
+ connect(model, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));
+
updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent());
connect(model, SIGNAL(bytesChanged(quint64,quint64)), this, SLOT(updateTrafficStats(quint64, quint64)));
@@ -469,7 +537,7 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->peerWidget->verticalHeader()->hide();
ui->peerWidget->setEditTriggers(QAbstractItemView::NoEditTriggers);
ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
- ui->peerWidget->setSelectionMode(QAbstractItemView::SingleSelection);
+ ui->peerWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
ui->peerWidget->setContextMenuPolicy(Qt::CustomContextMenu);
ui->peerWidget->setColumnWidth(PeerTableModel::Address, ADDRESS_COLUMN_WIDTH);
ui->peerWidget->setColumnWidth(PeerTableModel::Subversion, SUBVERSION_COLUMN_WIDTH);
@@ -477,14 +545,14 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
// create peer table context menu actions
- QAction* disconnectAction = new QAction(tr("&Disconnect Node"), this);
- QAction* banAction1h = new QAction(tr("Ban Node for") + " " + tr("1 &hour"), this);
- QAction* banAction24h = new QAction(tr("Ban Node for") + " " + tr("1 &day"), this);
- QAction* banAction7d = new QAction(tr("Ban Node for") + " " + tr("1 &week"), this);
- QAction* banAction365d = new QAction(tr("Ban Node for") + " " + tr("1 &year"), this);
+ QAction* disconnectAction = new QAction(tr("&Disconnect"), this);
+ QAction* banAction1h = new QAction(tr("Ban for") + " " + tr("1 &hour"), this);
+ QAction* banAction24h = new QAction(tr("Ban for") + " " + tr("1 &day"), this);
+ QAction* banAction7d = new QAction(tr("Ban for") + " " + tr("1 &week"), this);
+ QAction* banAction365d = new QAction(tr("Ban for") + " " + tr("1 &year"), this);
// create peer table context menu
- peersTableContextMenu = new QMenu();
+ peersTableContextMenu = new QMenu(this);
peersTableContextMenu->addAction(disconnectAction);
peersTableContextMenu->addAction(banAction1h);
peersTableContextMenu->addAction(banAction24h);
@@ -514,7 +582,9 @@ void RPCConsole::setClientModel(ClientModel *model)
this, SLOT(peerSelected(const QItemSelection &, const QItemSelection &)));
// peer table signal handling - update peer details when new nodes are added to the model
connect(model->getPeerTableModel(), SIGNAL(layoutChanged()), this, SLOT(peerLayoutChanged()));
-
+ // peer table signal handling - cache selected node ids
+ connect(model->getPeerTableModel(), SIGNAL(layoutAboutToBeChanged()), this, SLOT(peerLayoutAboutToChange()));
+
// set up ban table
ui->banlistWidget->setModel(model->getBanTableModel());
ui->banlistWidget->verticalHeader()->hide();
@@ -527,10 +597,10 @@ void RPCConsole::setClientModel(ClientModel *model)
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
// create ban table context menu action
- QAction* unbanAction = new QAction(tr("&Unban Node"), this);
+ QAction* unbanAction = new QAction(tr("&Unban"), this);
// create ban table context menu
- banTableContextMenu = new QMenu();
+ banTableContextMenu = new QMenu(this);
banTableContextMenu->addAction(unbanAction);
// ban table context menu signals
@@ -561,6 +631,14 @@ void RPCConsole::setClientModel(ClientModel *model)
autoCompleter = new QCompleter(wordList, this);
ui->lineEdit->setCompleter(autoCompleter);
autoCompleter->popup()->installEventFilter(this);
+ // Start thread to execute RPC commands.
+ startExecutor();
+ }
+ if (!model) {
+ // Client model is being set to 0, this means shutdown() is about to be called.
+ // Make sure we clean up the executor thread
+ Q_EMIT stopExecutor();
+ thread.wait();
}
}
@@ -640,13 +718,18 @@ void RPCConsole::clear(bool clearHistory)
"td.message { font-family: %1; font-size: %2; white-space:pre-wrap; } "
"td.cmd-request { color: #006060; } "
"td.cmd-error { color: red; } "
+ ".secwarning { color: red; }"
"b { color: #006060; } "
).arg(fixedFontInfo.family(), QString("%1pt").arg(consoleFontSize))
);
message(CMD_REPLY, (tr("Welcome to the %1 RPC console.").arg(tr(PACKAGE_NAME)) + "<br>" +
tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" +
- tr("Type <b>help</b> for an overview of available commands.")), true);
+ tr("Type <b>help</b> for an overview of available commands.")) +
+ "<br><span class=\"secwarning\">" +
+ tr("WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramification of a command.") +
+ "</span>",
+ true);
}
void RPCConsole::keyPressEvent(QKeyEvent *event)
@@ -673,16 +756,30 @@ void RPCConsole::message(int category, const QString &message, bool html)
ui->messagesWidget->append(out);
}
+void RPCConsole::updateNetworkState()
+{
+ QString connections = QString::number(clientModel->getNumConnections()) + " (";
+ connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
+ connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";
+
+ if(!clientModel->getNetworkActive()) {
+ connections += " (" + tr("Network activity disabled") + ")";
+ }
+
+ ui->numberOfConnections->setText(connections);
+}
+
void RPCConsole::setNumConnections(int count)
{
if (!clientModel)
return;
- QString connections = QString::number(count) + " (";
- connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
- connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";
+ updateNetworkState();
+}
- ui->numberOfConnections->setText(connections);
+void RPCConsole::setNetworkActive(bool networkActive)
+{
+ updateNetworkState();
}
void RPCConsole::setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers)
@@ -706,12 +803,30 @@ void RPCConsole::setMempoolSize(long numberOfTxs, size_t dynUsage)
void RPCConsole::on_lineEdit_returnPressed()
{
QString cmd = ui->lineEdit->text();
- ui->lineEdit->clear();
if(!cmd.isEmpty())
{
+ std::string strFilteredCmd;
+ try {
+ std::string dummy;
+ if (!RPCParseCommandLine(dummy, cmd.toStdString(), false, &strFilteredCmd)) {
+ // Failed to parse command, so we cannot even filter it for the history
+ throw std::runtime_error("Invalid command line");
+ }
+ } catch (const std::exception& e) {
+ QMessageBox::critical(this, "Error", QString("Error: ") + QString::fromStdString(e.what()));
+ return;
+ }
+
+ ui->lineEdit->clear();
+
+ cmdBeforeBrowsing = QString();
+
message(CMD_REQUEST, cmd);
Q_EMIT cmdRequest(cmd);
+
+ cmd = QString::fromStdString(strFilteredCmd);
+
// Remove command, if already in history
history.removeOne(cmd);
// Append command to history
@@ -721,6 +836,7 @@ void RPCConsole::on_lineEdit_returnPressed()
history.removeFirst();
// Set pointer to end of history
historyPtr = history.size();
+
// Scroll console view to end
scrollToEnd();
}
@@ -728,6 +844,11 @@ void RPCConsole::on_lineEdit_returnPressed()
void RPCConsole::browseHistory(int offset)
{
+ // store current text when start browsing through the history
+ if (historyPtr == history.size()) {
+ cmdBeforeBrowsing = ui->lineEdit->text();
+ }
+
historyPtr += offset;
if(historyPtr < 0)
historyPtr = 0;
@@ -736,14 +857,16 @@ void RPCConsole::browseHistory(int offset)
QString cmd;
if(historyPtr < history.size())
cmd = history.at(historyPtr);
+ else if (!cmdBeforeBrowsing.isNull()) {
+ cmd = cmdBeforeBrowsing;
+ }
ui->lineEdit->setText(cmd);
}
void RPCConsole::startExecutor()
{
- QThread *thread = new QThread;
RPCExecutor *executor = new RPCExecutor();
- executor->moveToThread(thread);
+ executor->moveToThread(&thread);
// Replies from executor object must go to this object
connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString)));
@@ -751,16 +874,14 @@ void RPCConsole::startExecutor()
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()));
+ connect(this, SIGNAL(stopExecutor()), &thread, SLOT(quit()));
+ // - queue executor for deletion (in execution thread)
+ connect(&thread, SIGNAL(finished()), executor, SLOT(deleteLater()), Qt::DirectConnection);
// Default implementation of QThread::run() simply spins up an event loop in the thread,
// which is what we want.
- thread->start();
+ thread.start();
}
void RPCConsole::on_tabWidget_currentChanged(int index)
@@ -825,6 +946,17 @@ void RPCConsole::peerSelected(const QItemSelection &selected, const QItemSelecti
updateNodeDetail(stats);
}
+void RPCConsole::peerLayoutAboutToChange()
+{
+ QModelIndexList selected = ui->peerWidget->selectionModel()->selectedIndexes();
+ cachedNodeids.clear();
+ for(int i = 0; i < selected.size(); i++)
+ {
+ const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(selected.at(i).row());
+ cachedNodeids.append(stats->nodeStats.nodeid);
+ }
+}
+
void RPCConsole::peerLayoutChanged()
{
if (!clientModel || !clientModel->getPeerTableModel())
@@ -834,7 +966,7 @@ void RPCConsole::peerLayoutChanged()
bool fUnselect = false;
bool fReselect = false;
- if (cachedNodeid == -1) // no node selected yet
+ if (cachedNodeids.empty()) // no node selected yet
return;
// find the currently selected row
@@ -846,7 +978,7 @@ void RPCConsole::peerLayoutChanged()
// check if our detail node has a row in the table (it may not necessarily
// be at selectedRow since its position can change after a layout change)
- int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeid);
+ int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeids.first());
if (detailNodeRow < 0)
{
@@ -872,7 +1004,10 @@ void RPCConsole::peerLayoutChanged()
if (fReselect)
{
- ui->peerWidget->selectRow(detailNodeRow);
+ for(int i = 0; i < cachedNodeids.size(); i++)
+ {
+ ui->peerWidget->selectRow(clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeids.at(i)));
+ }
}
if (stats)
@@ -881,9 +1016,6 @@ void RPCConsole::peerLayoutChanged()
void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats)
{
- // Update cached nodeid
- cachedNodeid = stats->nodeStats.nodeid;
-
// update the detail ui with latest node information
QString peerAddrDetails(QString::fromStdString(stats->nodeStats.addrName) + " ");
peerAddrDetails += tr("(node id: %1)").arg(QString::number(stats->nodeStats.nodeid));
@@ -973,33 +1105,44 @@ void RPCConsole::disconnectSelectedNode()
{
if(!g_connman)
return;
- // Get currently selected peer address
- NodeId id = GUIUtil::getEntryData(ui->peerWidget, 0, PeerTableModel::NetNodeId).toInt();
- // Find the node, disconnect it and clear the selected node
- if(g_connman->DisconnectNode(id))
- clearSelectedNode();
+
+ // Get selected peer addresses
+ QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId);
+ for(int i = 0; i < nodes.count(); i++)
+ {
+ // Get currently selected peer address
+ NodeId id = nodes.at(i).data().toInt();
+ // Find the node, disconnect it and clear the selected node
+ if(g_connman->DisconnectNode(id))
+ clearSelectedNode();
+ }
}
void RPCConsole::banSelectedNode(int bantime)
{
if (!clientModel || !g_connman)
return;
-
- if(cachedNodeid == -1)
- return;
-
- // Get currently selected peer address
- int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeid);
- if(detailNodeRow < 0)
- return;
-
- // Find possible nodes, ban it and clear the selected node
- const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(detailNodeRow);
- if(stats) {
- g_connman->Ban(stats->nodeStats.addr, BanReasonManuallyAdded, bantime);
- clearSelectedNode();
- clientModel->getBanTableModel()->refresh();
+
+ // Get selected peer addresses
+ QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId);
+ for(int i = 0; i < nodes.count(); i++)
+ {
+ // Get currently selected peer address
+ NodeId id = nodes.at(i).data().toInt();
+
+ // Get currently selected peer address
+ int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);
+ if(detailNodeRow < 0)
+ return;
+
+ // Find possible nodes, ban it and clear the selected node
+ const CNodeCombinedStats *stats = clientModel->getPeerTableModel()->getNodeStats(detailNodeRow);
+ if(stats) {
+ g_connman->Ban(stats->nodeStats.addr, BanReasonManuallyAdded, bantime);
+ }
}
+ clearSelectedNode();
+ clientModel->getBanTableModel()->refresh();
}
void RPCConsole::unbanSelectedNode()
@@ -1007,22 +1150,27 @@ void RPCConsole::unbanSelectedNode()
if (!clientModel)
return;
- // Get currently selected ban address
- QString strNode = GUIUtil::getEntryData(ui->banlistWidget, 0, BanTableModel::Address).toString();
- CSubNet possibleSubnet;
-
- LookupSubNet(strNode.toStdString().c_str(), possibleSubnet);
- if (possibleSubnet.IsValid() && g_connman)
+ // Get selected ban addresses
+ QList<QModelIndex> nodes = GUIUtil::getEntryData(ui->banlistWidget, BanTableModel::Address);
+ for(int i = 0; i < nodes.count(); i++)
{
- g_connman->Unban(possibleSubnet);
- clientModel->getBanTableModel()->refresh();
+ // Get currently selected ban address
+ QString strNode = nodes.at(i).data().toString();
+ CSubNet possibleSubnet;
+
+ LookupSubNet(strNode.toStdString().c_str(), possibleSubnet);
+ if (possibleSubnet.IsValid() && g_connman)
+ {
+ g_connman->Unban(possibleSubnet);
+ clientModel->getBanTableModel()->refresh();
+ }
}
}
void RPCConsole::clearSelectedNode()
{
ui->peerWidget->selectionModel()->clearSelection();
- cachedNodeid = -1;
+ cachedNodeids.clear();
ui->detailWidget->hide();
ui->peerHeading->setText(tr("Select a peer to view detailed information."));
}
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 50224a1cc0..ec531c99c8 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,6 +12,7 @@
#include <QWidget>
#include <QCompleter>
+#include <QThread>
class ClientModel;
class PlatformStyle;
@@ -35,7 +36,10 @@ public:
explicit RPCConsole(const PlatformStyle *platformStyle, QWidget *parent);
~RPCConsole();
- static bool RPCExecuteCommandLine(std::string &strResult, const std::string &strCommand);
+ static bool RPCParseCommandLine(std::string &strResult, const std::string &strCommand, bool fExecute, std::string * const pstrFilteredOut = NULL);
+ static bool RPCExecuteCommandLine(std::string &strResult, const std::string &strCommand, std::string * const pstrFilteredOut = NULL) {
+ return RPCParseCommandLine(strResult, strCommand, true, pstrFilteredOut);
+ }
void setClientModel(ClientModel *model);
@@ -88,6 +92,8 @@ public Q_SLOTS:
void message(int category, const QString &message, bool html = false);
/** Set number of connections shown in the UI */
void setNumConnections(int count);
+ /** Set network state shown in the UI */
+ void setNetworkActive(bool networkActive);
/** Set number of blocks and last block date shown in the UI */
void setNumBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers);
/** Set size (number of transactions and memory usage) of the mempool in the UI */
@@ -98,6 +104,8 @@ public Q_SLOTS:
void scrollToEnd();
/** Handle selection of peer in peers list */
void peerSelected(const QItemSelection &selected, const QItemSelection &deselected);
+ /** Handle selection caching before update */
+ void peerLayoutAboutToChange();
/** Handle updated peer information */
void peerLayoutChanged();
/** Disconnect a selected node on the Peers tab */
@@ -135,13 +143,18 @@ private:
ClientModel *clientModel;
QStringList history;
int historyPtr;
- NodeId cachedNodeid;
+ QString cmdBeforeBrowsing;
+ QList<NodeId> cachedNodeids;
const PlatformStyle *platformStyle;
RPCTimerInterface *rpcTimerInterface;
QMenu *peersTableContextMenu;
QMenu *banTableContextMenu;
int consoleFontSize;
QCompleter *autoCompleter;
+ QThread thread;
+
+ /** Update UI with latest network info from model. */
+ void updateNetworkState();
};
#endif // BITCOIN_QT_RPCCONSOLE_H
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 57b2179435..5aeda7a30d 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,7 +17,7 @@
#include "base58.h"
#include "wallet/coincontrol.h"
-#include "main.h" // mempool and minRelayTxFee
+#include "validation.h" // mempool and minRelayTxFee
#include "ui_interface.h"
#include "txmempool.h"
#include "wallet/wallet.h"
@@ -175,7 +175,7 @@ void SendCoinsDialog::setModel(WalletModel *_model)
// set the smartfee-sliders default value (wallets default conf.target or last stored value)
QSettings settings;
if (settings.value("nSmartFeeSliderPosition").toInt() == 0)
- ui->sliderSmartFee->setValue(ui->sliderSmartFee->maximum() - model->getDefaultConfirmTarget() + 1);
+ ui->sliderSmartFee->setValue(ui->sliderSmartFee->maximum() - model->getDefaultConfirmTarget() + 2);
else
ui->sliderSmartFee->setValue(settings.value("nSmartFeeSliderPosition").toInt());
}
@@ -241,7 +241,7 @@ void SendCoinsDialog::on_sendButton_clicked()
if (model->getOptionsModel()->getCoinControlFeatures())
ctrl = *CoinControlDialog::coinControl;
if (ui->radioSmartFee->isChecked())
- ctrl.nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 1;
+ ctrl.nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
else
ctrl.nConfirmTarget = 0;
@@ -601,7 +601,7 @@ void SendCoinsDialog::updateGlobalFeeVariables()
{
if (ui->radioSmartFee->isChecked())
{
- int nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 1;
+ int nConfirmTarget = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
payTxFee = CFeeRate(0);
// set nMinimumTotalFee to 0 to not accidentally pay a custom fee
@@ -646,7 +646,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
if(!model || !model->getOptionsModel())
return;
- int nBlocksToConfirm = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 1;
+ int nBlocksToConfirm = ui->sliderSmartFee->maximum() - ui->sliderSmartFee->value() + 2;
int estimateFoundAtBlocks = nBlocksToConfirm;
CFeeRate feeRate = mempool.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks);
if (feeRate <= CFeeRate(0)) // not enough data => minfee
@@ -772,6 +772,19 @@ void SendCoinsDialog::coinControlChangeEdited(const QString& text)
if (!model->havePrivKey(keyid)) // Unknown change address
{
ui->labelCoinControlChangeLabel->setText(tr("Warning: Unknown change address"));
+
+ // confirmation dialog
+ QMessageBox::StandardButton btnRetVal = QMessageBox::question(this, tr("Confirm custom change address"), tr("The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?"),
+ QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel);
+
+ if(btnRetVal == QMessageBox::Yes)
+ CoinControlDialog::coinControl->destChange = addr.Get();
+ else
+ {
+ ui->lineEditCoinControlChange->setText("");
+ ui->labelCoinControlChangeLabel->setStyleSheet("QLabel{color:black;}");
+ ui->labelCoinControlChangeLabel->setText("");
+ }
}
else // Known change address
{
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index b0df495a98..a402edc961 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 7eb1eb7e3a..bb0f47b21c 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/signverifymessagedialog.cpp b/src/qt/signverifymessagedialog.cpp
index 3e42f3a7b0..0950ed0234 100644
--- a/src/qt/signverifymessagedialog.cpp
+++ b/src/qt/signverifymessagedialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include "base58.h"
#include "init.h"
-#include "main.h" // For strMessageMagic
+#include "validation.h" // For strMessageMagic
#include "wallet/wallet.h"
#include <string>
diff --git a/src/qt/splashscreen.cpp b/src/qt/splashscreen.cpp
index cd27385653..f4377247e1 100644
--- a/src/qt/splashscreen.cpp
+++ b/src/qt/splashscreen.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -147,6 +147,7 @@ void SplashScreen::slotFinish(QWidget *mainWin)
if (isMinimized())
showNormal();
hide();
+ deleteLater(); // No more need for this
}
static void InitMessage(SplashScreen *splash, const std::string &message)
diff --git a/src/qt/splashscreen.h b/src/qt/splashscreen.h
index d1727b66c9..95a65cc53c 100644
--- a/src/qt/splashscreen.h
+++ b/src/qt/splashscreen.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/test/compattests.cpp b/src/qt/test/compattests.cpp
new file mode 100644
index 0000000000..2a7284b5b2
--- /dev/null
+++ b/src/qt/test/compattests.cpp
@@ -0,0 +1,23 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "paymentrequestplus.h" // this includes protobuf's port.h which defines its own bswap macos
+
+#include "compattests.h"
+
+#include "compat/byteswap.h"
+
+void CompatTests::bswapTests()
+{
+ // Sibling in bitcoin/src/test/bswap_tests.cpp
+ uint16_t u1 = 0x1234;
+ uint32_t u2 = 0x56789abc;
+ uint64_t u3 = 0xdef0123456789abc;
+ uint16_t e1 = 0x3412;
+ uint32_t e2 = 0xbc9a7856;
+ uint64_t e3 = 0xbc9a78563412f0de;
+ QVERIFY(bswap_16(u1) == e1);
+ QVERIFY(bswap_32(u2) == e2);
+ QVERIFY(bswap_64(u3) == e3);
+}
diff --git a/src/qt/test/compattests.h b/src/qt/test/compattests.h
new file mode 100644
index 0000000000..1af97696b2
--- /dev/null
+++ b/src/qt/test/compattests.h
@@ -0,0 +1,19 @@
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_QT_TEST_COMPATTESTS_H
+#define BITCOIN_QT_TEST_COMPATTESTS_H
+
+#include <QObject>
+#include <QTest>
+
+class CompatTests : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void bswapTests();
+};
+
+#endif // BITCOIN_QT_TEST_COMPATTESTS_H
diff --git a/src/qt/test/rpcnestedtests.cpp b/src/qt/test/rpcnestedtests.cpp
index 3dae33bafb..fbec5722b6 100644
--- a/src/qt/test/rpcnestedtests.cpp
+++ b/src/qt/test/rpcnestedtests.cpp
@@ -6,7 +6,7 @@
#include "chainparams.h"
#include "consensus/validation.h"
-#include "main.h"
+#include "validation.h"
#include "rpc/register.h"
#include "rpc/server.h"
#include "rpcconsole.h"
@@ -15,9 +15,23 @@
#include "util.h"
#include <QDir>
+#include <QtGlobal>
#include <boost/filesystem.hpp>
+static UniValue rpcNestedTest_rpc(const JSONRPCRequest& request)
+{
+ if (request.fHelp) {
+ return "help message";
+ }
+ return request.params.write(0, 0);
+}
+
+static const CRPCCommand vRPCCommands[] =
+{
+ { "test", "rpcNestedTest", &rpcNestedTest_rpc, true },
+};
+
void RPCNestedTests::rpcNestedTests()
{
UniValue jsonRPCError;
@@ -26,11 +40,12 @@ void RPCNestedTests::rpcNestedTests()
// could be moved to a more generic place when we add more tests on QT level
const CChainParams& chainparams = Params();
RegisterAllCoreRPCCommands(tableRPC);
+ tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]);
ClearDatadirCache();
std::string path = QDir::tempPath().toStdString() + "/" + strprintf("test_bitcoin_qt_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
QDir dir(QString::fromStdString(path));
dir.mkpath(".");
- mapArgs["-datadir"] = path;
+ ForceSetArg("-datadir", path);
//mempool.setSanityCheck(1.0);
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
@@ -46,8 +61,10 @@ void RPCNestedTests::rpcNestedTests()
std::string result;
std::string result2;
- RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo()[chain]"); //simple result filtering with path
+ std::string filtered;
+ RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo()[chain]", &filtered); //simple result filtering with path
QVERIFY(result=="main");
+ QVERIFY(filtered == "getblockchaininfo()[chain]");
RPCConsole::RPCExecuteCommandLine(result, "getblock(getbestblockhash())"); //simple 2 level nesting
RPCConsole::RPCExecuteCommandLine(result, "getblock(getblock(getbestblockhash())[hash], true)");
@@ -63,16 +80,6 @@ void RPCNestedTests::rpcNestedTests()
RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo "); //whitespace at the end will be tolerated
QVERIFY(result.substr(0,1) == "{");
-#if QT_VERSION >= 0x050300
- // do the QVERIFY_EXCEPTION_THROWN checks only with Qt5.3 and higher (QVERIFY_EXCEPTION_THROWN was introduced in Qt5.3)
- QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
- QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
- (RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo(")); //tolerate non closing brackets if we have no arguments
- (RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo()()()")); //tolerate non command brackts
- QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo(True)"), UniValue); //invalid argument
- QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "a(getblockchaininfo(True))"), UniValue); //method not found
-#endif
-
(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo()[\"chain\"]")); //Quote path identifier are allowed, but look after a child contaning the quotes in the key
QVERIFY(result == "null");
@@ -82,8 +89,64 @@ void RPCNestedTests::rpcNestedTests()
(RPCConsole::RPCExecuteCommandLine(result2, "createrawtransaction( [], {} , 0 )")); //whitespace between parametres is allowed
QVERIFY(result == result2);
- RPCConsole::RPCExecuteCommandLine(result, "getblock(getbestblockhash())[tx][0]");
+ RPCConsole::RPCExecuteCommandLine(result, "getblock(getbestblockhash())[tx][0]", &filtered);
QVERIFY(result == "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b");
+ QVERIFY(filtered == "getblock(getbestblockhash())[tx][0]");
+
+ RPCConsole::RPCParseCommandLine(result, "importprivkey", false, &filtered);
+ QVERIFY(filtered == "importprivkey(…)");
+ RPCConsole::RPCParseCommandLine(result, "signmessagewithprivkey abc", false, &filtered);
+ QVERIFY(filtered == "signmessagewithprivkey(…)");
+ RPCConsole::RPCParseCommandLine(result, "signmessagewithprivkey abc,def", false, &filtered);
+ QVERIFY(filtered == "signmessagewithprivkey(…)");
+ RPCConsole::RPCParseCommandLine(result, "signrawtransaction(abc)", false, &filtered);
+ QVERIFY(filtered == "signrawtransaction(…)");
+ RPCConsole::RPCParseCommandLine(result, "walletpassphrase(help())", false, &filtered);
+ QVERIFY(filtered == "walletpassphrase(…)");
+ RPCConsole::RPCParseCommandLine(result, "walletpassphrasechange(help(walletpassphrasechange(abc)))", false, &filtered);
+ QVERIFY(filtered == "walletpassphrasechange(…)");
+ RPCConsole::RPCParseCommandLine(result, "help(encryptwallet(abc, def))", false, &filtered);
+ QVERIFY(filtered == "help(encryptwallet(…))");
+ RPCConsole::RPCParseCommandLine(result, "help(importprivkey())", false, &filtered);
+ QVERIFY(filtered == "help(importprivkey(…))");
+ RPCConsole::RPCParseCommandLine(result, "help(importprivkey(help()))", false, &filtered);
+ QVERIFY(filtered == "help(importprivkey(…))");
+ RPCConsole::RPCParseCommandLine(result, "help(importprivkey(abc), walletpassphrase(def))", false, &filtered);
+ QVERIFY(filtered == "help(importprivkey(…), walletpassphrase(…))");
+
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest");
+ QVERIFY(result == "[]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest ''");
+ QVERIFY(result == "[\"\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest \"\"");
+ QVERIFY(result == "[\"\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest '' abc");
+ QVERIFY(result == "[\"\",\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc '' abc");
+ QVERIFY(result == "[\"abc\",\"\",\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc abc");
+ QVERIFY(result == "[\"abc\",\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc\t\tabc");
+ QVERIFY(result == "[\"abc\",\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc )");
+ QVERIFY(result == "[\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc )");
+ QVERIFY(result == "[\"abc\"]");
+ RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest( abc , cba )");
+ QVERIFY(result == "[\"abc\",\"cba\"]");
+
+#if QT_VERSION >= 0x050300
+ // do the QVERIFY_EXCEPTION_THROWN checks only with Qt5.3 and higher (QVERIFY_EXCEPTION_THROWN was introduced in Qt5.3)
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() .\n"), std::runtime_error); //invalid syntax
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo() getblockchaininfo()"), std::runtime_error); //invalid syntax
+ (RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo(")); //tolerate non closing brackets if we have no arguments
+ (RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo()()()")); //tolerate non command brackts
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "getblockchaininfo(True)"), UniValue); //invalid argument
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "a(getblockchaininfo(True))"), UniValue); //method not found
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest abc,,abc"), std::runtime_error); //don't tollerate empty arguments when using ,
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,abc)"), std::runtime_error); //don't tollerate empty arguments when using ,
+ QVERIFY_EXCEPTION_THROWN(RPCConsole::RPCExecuteCommandLine(result, "rpcNestedTest(abc,,)"), std::runtime_error); //don't tollerate empty arguments when using ,
+#endif
delete pcoinsTip;
delete pcoinsdbview;
diff --git a/src/qt/test/test_main.cpp b/src/qt/test/test_main.cpp
index dbaab54fb6..d44d711315 100644
--- a/src/qt/test/test_main.cpp
+++ b/src/qt/test/test_main.cpp
@@ -11,6 +11,7 @@
#include "rpcnestedtests.h"
#include "util.h"
#include "uritests.h"
+#include "compattests.h"
#ifdef ENABLE_WALLET
#include "paymentservertests.h"
@@ -61,6 +62,9 @@ int main(int argc, char *argv[])
RPCNestedTests test3;
if (QTest::qExec(&test3) != 0)
fInvalid = true;
+ CompatTests test4;
+ if (QTest::qExec(&test4) != 0)
+ fInvalid = true;
ECC_Stop();
return fInvalid;
diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp
index 65144e7865..7e16cc9dd4 100644
--- a/src/qt/transactiondesc.cpp
+++ b/src/qt/transactiondesc.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,7 +11,7 @@
#include "base58.h"
#include "consensus/consensus.h"
-#include "main.h"
+#include "validation.h"
#include "script/script.h"
#include "timedata.h"
#include "util.h"
@@ -26,10 +26,10 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
AssertLockHeld(cs_main);
if (!CheckFinalTx(wtx))
{
- if (wtx.nLockTime < LOCKTIME_THRESHOLD)
- return tr("Open for %n more block(s)", "", wtx.nLockTime - chainActive.Height());
+ if (wtx.tx->nLockTime < LOCKTIME_THRESHOLD)
+ return tr("Open for %n more block(s)", "", wtx.tx->nLockTime - chainActive.Height());
else
- return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime));
+ return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.tx->nLockTime));
}
else
{
@@ -133,7 +133,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
// Coinbase
//
CAmount nUnmatured = 0;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
nUnmatured += wallet->GetCredit(txout, ISMINE_ALL);
strHTML += "<b>" + tr("Credit") + ":</b> ";
if (wtx.IsInMainChain())
@@ -152,14 +152,14 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
else
{
isminetype fAllFromMe = ISMINE_SPENDABLE;
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
isminetype mine = wallet->IsMine(txin);
if(fAllFromMe > mine) fAllFromMe = mine;
}
isminetype fAllToMe = ISMINE_SPENDABLE;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
isminetype mine = wallet->IsMine(txout);
if(fAllToMe > mine) fAllToMe = mine;
@@ -173,7 +173,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
//
// Debit
//
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
// Ignore change
isminetype toSelf = wallet->IsMine(txout);
@@ -212,7 +212,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
strHTML += "<b>" + tr("Total credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, nValue) + "<br>";
}
- CAmount nTxFee = nDebit - wtx.GetValueOut();
+ CAmount nTxFee = nDebit - wtx.tx->GetValueOut();
if (nTxFee > 0)
strHTML += "<b>" + tr("Transaction fee") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -nTxFee) + "<br>";
}
@@ -221,10 +221,10 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
//
// Mixed debit transaction
//
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
if (wallet->IsMine(txin))
strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
if (wallet->IsMine(txout))
strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(txout, ISMINE_ALL)) + "<br>";
}
@@ -241,7 +241,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
strHTML += "<br><b>" + tr("Comment") + ":</b><br>" + GUIUtil::HtmlEscape(wtx.mapValue["comment"], true) + "<br>";
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + rec->getTxID() + "<br>";
- strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.GetTotalSize()) + " bytes<br>";
+ strHTML += "<b>" + tr("Transaction total size") + ":</b> " + QString::number(wtx.tx->GetTotalSize()) + " bytes<br>";
strHTML += "<b>" + tr("Output index") + ":</b> " + QString::number(rec->getOutputIndex()) + "<br>";
// Message from normal bitcoin:URI (bitcoin:123...?message=example)
@@ -276,20 +276,20 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx, TransactionReco
if (fDebug)
{
strHTML += "<hr><br>" + tr("Debug information") + "<br><br>";
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
if(wallet->IsMine(txin))
strHTML += "<b>" + tr("Debit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, -wallet->GetDebit(txin, ISMINE_ALL)) + "<br>";
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
if(wallet->IsMine(txout))
strHTML += "<b>" + tr("Credit") + ":</b> " + BitcoinUnits::formatHtmlWithUnit(unit, wallet->GetCredit(txout, ISMINE_ALL)) + "<br>";
strHTML += "<br><b>" + tr("Transaction") + ":</b><br>";
- strHTML += GUIUtil::HtmlEscape(wtx.ToString(), true);
+ strHTML += GUIUtil::HtmlEscape(wtx.tx->ToString(), true);
strHTML += "<br><b>" + tr("Inputs") + ":</b>";
strHTML += "<ul>";
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
COutPoint prevout = txin.prevout;
diff --git a/src/qt/transactiondescdialog.cpp b/src/qt/transactiondescdialog.cpp
index 65adcc4f02..65f163deb2 100644
--- a/src/qt/transactiondescdialog.cpp
+++ b/src/qt/transactiondescdialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/transactionfilterproxy.cpp b/src/qt/transactionfilterproxy.cpp
index e21b89b935..44e4ef8238 100644
--- a/src/qt/transactionfilterproxy.cpp
+++ b/src/qt/transactionfilterproxy.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp
index 4fe47181f6..cbdedbf68b 100644
--- a/src/qt/transactionrecord.cpp
+++ b/src/qt/transactionrecord.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include "base58.h"
#include "consensus/consensus.h"
-#include "main.h"
+#include "validation.h"
#include "timedata.h"
#include "wallet/wallet.h"
@@ -47,7 +47,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
//
// Credit
//
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
isminetype mine = wallet->IsMine(txout);
if(mine)
@@ -83,7 +83,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
{
bool involvesWatchAddress = false;
isminetype fAllFromMe = ISMINE_SPENDABLE;
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
isminetype mine = wallet->IsMine(txin);
if(mine & ISMINE_WATCH_ONLY) involvesWatchAddress = true;
@@ -91,7 +91,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
}
isminetype fAllToMe = ISMINE_SPENDABLE;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
isminetype mine = wallet->IsMine(txout);
if(mine & ISMINE_WATCH_ONLY) involvesWatchAddress = true;
@@ -112,11 +112,11 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet *
//
// Debit
//
- CAmount nTxFee = nDebit - wtx.GetValueOut();
+ CAmount nTxFee = nDebit - wtx.tx->GetValueOut();
- for (unsigned int nOut = 0; nOut < wtx.vout.size(); nOut++)
+ for (unsigned int nOut = 0; nOut < wtx.tx->vout.size(); nOut++)
{
- const CTxOut& txout = wtx.vout[nOut];
+ const CTxOut& txout = wtx.tx->vout[nOut];
TransactionRecord sub(hash, nTime);
sub.idx = parts.size();
sub.involvesWatchAddress = involvesWatchAddress;
@@ -190,15 +190,15 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
if (!CheckFinalTx(wtx))
{
- if (wtx.nLockTime < LOCKTIME_THRESHOLD)
+ if (wtx.tx->nLockTime < LOCKTIME_THRESHOLD)
{
status.status = TransactionStatus::OpenUntilBlock;
- status.open_for = wtx.nLockTime - chainActive.Height();
+ status.open_for = wtx.tx->nLockTime - chainActive.Height();
}
else
{
status.status = TransactionStatus::OpenUntilDate;
- status.open_for = wtx.nLockTime;
+ status.open_for = wtx.tx->nLockTime;
}
}
// For generated transactions, determine maturity
diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h
index 8eff302aff..5aabbbffa8 100644
--- a/src/qt/transactionrecord.h
+++ b/src/qt/transactionrecord.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 52261ff04b..61466c8ed1 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,7 +14,7 @@
#include "walletmodel.h"
#include "core_io.h"
-#include "main.h"
+#include "validation.h"
#include "sync.h"
#include "uint256.h"
#include "util.h"
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 6932646e1e..80aeb64c41 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 856b16d2c4..30f4db9450 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -37,7 +37,7 @@
TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent) :
QWidget(parent), model(0), transactionProxyModel(0),
- transactionView(0), abandonAction(0)
+ transactionView(0), abandonAction(0), columnResizingFixer(0)
{
// Build filter row
setContentsMargins(0,0,0,0);
@@ -147,7 +147,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
QAction *editLabelAction = new QAction(tr("Edit label"), this);
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
- contextMenu = new QMenu();
+ contextMenu = new QMenu(this);
contextMenu->addAction(copyAddressAction);
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyAmountAction);
@@ -212,7 +212,7 @@ void TransactionView::setModel(WalletModel *_model)
transactionView->setColumnWidth(TransactionTableModel::Type, TYPE_COLUMN_WIDTH);
transactionView->setColumnWidth(TransactionTableModel::Amount, AMOUNT_MINIMUM_COLUMN_WIDTH);
- columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH);
+ columnResizingFixer = new GUIUtil::TableViewLastColumnResizingFixer(transactionView, AMOUNT_MINIMUM_COLUMN_WIDTH, MINIMUM_COLUMN_WIDTH, this);
if (_model->getOptionsModel())
{
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index e9b9d5b6bc..595701cdd9 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/utilitydialog.cpp b/src/qt/utilitydialog.cpp
index 947bcdb15a..70efe27990 100644
--- a/src/qt/utilitydialog.cpp
+++ b/src/qt/utilitydialog.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -171,22 +171,20 @@ ShutdownWindow::ShutdownWindow(QWidget *parent, Qt::WindowFlags f):
setLayout(layout);
}
-void ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
+QWidget *ShutdownWindow::showShutdownWindow(BitcoinGUI *window)
{
if (!window)
- return;
+ return nullptr;
// Show a simple window indicating shutdown status
QWidget *shutdownWindow = new ShutdownWindow();
- // We don't hold a direct pointer to the shutdown window after creation, so use
- // Qt::WA_DeleteOnClose to make sure that the window will be deleted eventually.
- shutdownWindow->setAttribute(Qt::WA_DeleteOnClose);
shutdownWindow->setWindowTitle(window->windowTitle());
// Center shutdown window at where main window was
const QPoint global = window->mapToGlobal(window->rect().center());
shutdownWindow->move(global.x() - shutdownWindow->width() / 2, global.y() - shutdownWindow->height() / 2);
shutdownWindow->show();
+ return shutdownWindow;
}
void ShutdownWindow::closeEvent(QCloseEvent *event)
diff --git a/src/qt/utilitydialog.h b/src/qt/utilitydialog.h
index 843bd7f67b..1b6781c5fc 100644
--- a/src/qt/utilitydialog.h
+++ b/src/qt/utilitydialog.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -43,7 +43,7 @@ class ShutdownWindow : public QWidget
public:
ShutdownWindow(QWidget *parent=0, Qt::WindowFlags f=0);
- static void showShutdownWindow(BitcoinGUI *window);
+ static QWidget *showShutdownWindow(BitcoinGUI *window);
protected:
void closeEvent(QCloseEvent *event);
diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp
index 69dcc9abb1..f3183320f0 100644
--- a/src/qt/walletframe.cpp
+++ b/src/qt/walletframe.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/walletframe.h b/src/qt/walletframe.h
index 7bc6412910..42ce69fea1 100644
--- a/src/qt/walletframe.h
+++ b/src/qt/walletframe.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 3490d1c1cc..0a5a7c3e9f 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -14,9 +14,11 @@
#include "base58.h"
#include "keystore.h"
-#include "main.h"
+#include "validation.h"
+#include "net.h" // for g_connman
#include "sync.h"
#include "ui_interface.h"
+#include "util.h" // for GetBoolArg
#include "wallet/wallet.h"
#include "wallet/walletdb.h" // for BackupWallet
@@ -65,7 +67,7 @@ CAmount WalletModel::getBalance(const CCoinControl *coinControl) const
wallet->AvailableCoins(vCoins, true, coinControl);
BOOST_FOREACH(const COutput& out, vCoins)
if(out.fSpendable)
- nBalance += out.tx->vout[out.i].nValue;
+ nBalance += out.tx->tx->vout[out.i].nValue;
return nBalance;
}
@@ -333,9 +335,8 @@ WalletModel::SendCoinsReturn WalletModel::sendCoins(WalletModelTransaction &tran
if(!wallet->CommitTransaction(*newTx, *keyChange, g_connman.get(), state))
return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(state.GetRejectReason()));
- CTransaction* t = (CTransaction*)newTx;
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
- ssTx << *t;
+ ssTx << *newTx->tx;
transaction_array.append(&(ssTx[0]), ssTx.size());
}
@@ -607,7 +608,7 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
int nDepth = wallet->mapWallet[outpoint.hash].GetDepthInMainChain();
if (nDepth < 0) continue;
COutput out(&wallet->mapWallet[outpoint.hash], outpoint.n, nDepth, true, true);
- if (outpoint.n < out.tx->vout.size() && wallet->IsMine(out.tx->vout[outpoint.n]) == ISMINE_SPENDABLE)
+ if (outpoint.n < out.tx->tx->vout.size() && wallet->IsMine(out.tx->tx->vout[outpoint.n]) == ISMINE_SPENDABLE)
vCoins.push_back(out);
}
@@ -615,14 +616,14 @@ void WalletModel::listCoins(std::map<QString, std::vector<COutput> >& mapCoins)
{
COutput cout = out;
- while (wallet->IsChange(cout.tx->vout[cout.i]) && cout.tx->vin.size() > 0 && wallet->IsMine(cout.tx->vin[0]))
+ while (wallet->IsChange(cout.tx->tx->vout[cout.i]) && cout.tx->tx->vin.size() > 0 && wallet->IsMine(cout.tx->tx->vin[0]))
{
- if (!wallet->mapWallet.count(cout.tx->vin[0].prevout.hash)) break;
- cout = COutput(&wallet->mapWallet[cout.tx->vin[0].prevout.hash], cout.tx->vin[0].prevout.n, 0, true, true);
+ if (!wallet->mapWallet.count(cout.tx->tx->vin[0].prevout.hash)) break;
+ cout = COutput(&wallet->mapWallet[cout.tx->tx->vin[0].prevout.hash], cout.tx->tx->vin[0].prevout.n, 0, true, true);
}
CTxDestination address;
- if(!out.fSpendable || !ExtractDestination(cout.tx->vout[cout.i].scriptPubKey, address))
+ if(!out.fSpendable || !ExtractDestination(cout.tx->tx->vout[cout.i].scriptPubKey, address))
continue;
mapCoins[QString::fromStdString(CBitcoinAddress(address).ToString())].push_back(out);
}
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h
index 6a5670e378..cd7585635f 100644
--- a/src/qt/walletmodel.h
+++ b/src/qt/walletmodel.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -65,7 +65,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
std::string sAddress = address.toStdString();
std::string sLabel = label.toStdString();
std::string sMessage = message.toStdString();
diff --git a/src/qt/walletmodeltransaction.cpp b/src/qt/walletmodeltransaction.cpp
index fdec6a1c86..b4445c8166 100644
--- a/src/qt/walletmodeltransaction.cpp
+++ b/src/qt/walletmodeltransaction.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -64,7 +64,7 @@ void WalletModelTransaction::reassignAmounts(int nChangePosRet)
if (out.amount() <= 0) continue;
if (i == nChangePosRet)
i++;
- subtotal += walletTransaction->vout[i].nValue;
+ subtotal += walletTransaction->tx->vout[i].nValue;
i++;
}
rcp.amount = subtotal;
@@ -73,7 +73,7 @@ void WalletModelTransaction::reassignAmounts(int nChangePosRet)
{
if (i == nChangePosRet)
i++;
- rcp.amount = walletTransaction->vout[i].nValue;
+ rcp.amount = walletTransaction->tx->vout[i].nValue;
i++;
}
}
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp
index a9518413c2..4a18c0bd4d 100644
--- a/src/qt/walletview.cpp
+++ b/src/qt/walletview.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/walletview.h b/src/qt/walletview.h
index aaa6aacbf0..c1f8422f0c 100644
--- a/src/qt/walletview.h
+++ b/src/qt/walletview.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/qt/winshutdownmonitor.cpp b/src/qt/winshutdownmonitor.cpp
index a11da50588..d6f40c38b8 100644
--- a/src/qt/winshutdownmonitor.cpp
+++ b/src/qt/winshutdownmonitor.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/random.cpp b/src/random.cpp
index aa027e49c4..6634019bea 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,7 +11,6 @@
#include "compat.h" // for Windows API
#include <wincrypt.h>
#endif
-#include "serialize.h" // for begin_ptr(vec)
#include "util.h" // for LogPrint()
#include "utilstrencodings.h" // for GetTime()
@@ -72,15 +71,15 @@ static void RandAddSeedPerfmon()
const size_t nMaxSize = 10000000; // Bail out at more than 10MB of performance data
while (true) {
nSize = vData.size();
- ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, begin_ptr(vData), &nSize);
+ ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", NULL, NULL, vData.data(), &nSize);
if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize)
break;
vData.resize(std::max((vData.size() * 3) / 2, nMaxSize)); // Grow size of buffer exponentially
}
RegCloseKey(HKEY_PERFORMANCE_DATA);
if (ret == ERROR_SUCCESS) {
- RAND_add(begin_ptr(vData), nSize, nSize / 100.0);
- memory_cleanse(begin_ptr(vData), nSize);
+ RAND_add(vData.data(), nSize, nSize / 100.0);
+ memory_cleanse(vData.data(), nSize);
LogPrint("rand", "%s: %lu bytes\n", __func__, nSize);
} else {
static bool warned = false; // Warn only once
diff --git a/src/random.h b/src/random.h
index e97d2d1fb0..664f030eba 100644
--- a/src/random.h
+++ b/src/random.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/rest.cpp b/src/rest.cpp
index b8b5420626..a8f8e753c6 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,7 +7,7 @@
#include "chainparams.h"
#include "primitives/block.h"
#include "primitives/transaction.h"
-#include "main.h"
+#include "validation.h"
#include "httpserver.h"
#include "rpc/server.h"
#include "streams.h"
@@ -17,7 +17,6 @@
#include "version.h"
#include <boost/algorithm/string.hpp>
-#include <boost/dynamic_bitset.hpp>
#include <univalue.h>
@@ -50,7 +49,7 @@ struct CCoin {
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+ inline void SerializationOp(Stream& s, Operation ser_action)
{
READWRITE(nTxVer);
READWRITE(nHeight);
@@ -228,7 +227,7 @@ static bool rest_block(HTTPRequest* req,
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
}
- CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
ssBlock << block;
switch (rf) {
@@ -363,12 +362,12 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
if (!ParseHashStr(hashStr, hash))
return RESTERR(req, HTTP_BAD_REQUEST, "Invalid hash: " + hashStr);
- CTransaction tx;
+ CTransactionRef tx;
uint256 hashBlock = uint256();
if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
- CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
ssTx << tx;
switch (rf) {
@@ -388,7 +387,7 @@ static bool rest_tx(HTTPRequest* req, const std::string& strURIPart)
case RF_JSON: {
UniValue objTx(UniValue::VOBJ);
- TxToJSON(tx, hashBlock, objTx);
+ TxToJSON(*tx, hashBlock, objTx);
string strJSON = objTx.write() + "\n";
req->WriteHeader("Content-Type", "application/json");
req->WriteReply(HTTP_OK, strJSON);
@@ -502,7 +501,8 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
vector<unsigned char> bitmap;
vector<CCoin> outs;
std::string bitmapStringRepresentation;
- boost::dynamic_bitset<unsigned char> hits(vOutPoints.size());
+ std::vector<bool> hits;
+ bitmap.resize((vOutPoints.size() + 7) / 8);
{
LOCK2(cs_main, mempool.cs);
@@ -518,10 +518,11 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
for (size_t i = 0; i < vOutPoints.size(); i++) {
CCoins coins;
uint256 hash = vOutPoints[i].hash;
+ bool hit = false;
if (view.GetCoins(hash, coins)) {
mempool.pruneSpent(hash, coins);
if (coins.IsAvailable(vOutPoints[i].n)) {
- hits[i] = true;
+ hit = true;
// Safe to index into vout here because IsAvailable checked if it's off the end of the array, or if
// n is valid but points to an already spent output (IsNull).
CCoin coin;
@@ -533,10 +534,11 @@ static bool rest_getutxos(HTTPRequest* req, const std::string& strURIPart)
}
}
- bitmapStringRepresentation.append(hits[i] ? "1" : "0"); // form a binary string representation (human-readable for json output)
+ hits.push_back(hit);
+ bitmapStringRepresentation.append(hit ? "1" : "0"); // form a binary string representation (human-readable for json output)
+ bitmap[i / 8] |= ((uint8_t)hit) << (i % 8);
}
}
- boost::to_block_range(hits, std::back_inserter(bitmap));
switch (rf) {
case RF_BINARY: {
diff --git a/src/reverselock.h b/src/reverselock.h
index 1fd8de5d80..9d9cc9fd77 100644
--- a/src/reverselock.h
+++ b/src/reverselock.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 8caea14adb..368654bfa6 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
#include "checkpoints.h"
#include "coins.h"
#include "consensus/validation.h"
-#include "main.h"
+#include "validation.h"
#include "policy/policy.h"
#include "primitives/transaction.h"
#include "rpc/server.h"
@@ -119,16 +119,16 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
result.push_back(Pair("versionHex", strprintf("%08x", block.nVersion)));
result.push_back(Pair("merkleroot", block.hashMerkleRoot.GetHex()));
UniValue txs(UniValue::VARR);
- BOOST_FOREACH(const CTransaction&tx, block.vtx)
+ for(const auto& tx : block.vtx)
{
if(txDetails)
{
UniValue objTx(UniValue::VOBJ);
- TxToJSON(tx, uint256(), objTx);
+ TxToJSON(*tx, uint256(), objTx);
txs.push_back(objTx);
}
else
- txs.push_back(tx.GetHash().GetHex());
+ txs.push_back(tx->GetHash().GetHex());
}
result.push_back(Pair("tx", txs));
result.push_back(Pair("time", block.GetBlockTime()));
@@ -169,9 +169,9 @@ UniValue getbestblockhash(const JSONRPCRequest& request)
throw runtime_error(
"getbestblockhash\n"
"\nReturns the hash of the best (tip) block in the longest blockchain.\n"
- "\nResult\n"
+ "\nResult:\n"
"\"hex\" (string) the block hash hex encoded\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("getbestblockhash", "")
+ HelpExampleRpc("getbestblockhash", "")
);
@@ -194,17 +194,17 @@ UniValue waitfornewblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() > 1)
throw runtime_error(
- "waitfornewblock\n"
+ "waitfornewblock (timeout)\n"
"\nWaits for a specific new block and returns useful info about it.\n"
"\nReturns the current block on timeout or exit.\n"
"\nArguments:\n"
- "1. timeout (milliseconds) (int, optional, default=false)\n"
- "\nResult::\n"
+ "1. timeout (int, optional, default=0) Time in milliseconds to wait for a response. 0 indicates no timeout.\n"
+ "\nResult:\n"
"{ (json object)\n"
" \"hash\" : { (string) The blockhash\n"
" \"height\" : { (int) Block height\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("waitfornewblock", "1000")
+ HelpExampleRpc("waitfornewblock", "1000")
);
@@ -232,18 +232,18 @@ UniValue waitforblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "waitforblock\n"
+ "waitforblock <blockhash> (timeout)\n"
"\nWaits for a specific new block and returns useful info about it.\n"
"\nReturns the current block on timeout or exit.\n"
"\nArguments:\n"
- "1. blockhash to wait for (string)\n"
- "2. timeout (milliseconds) (int, optional, default=false)\n"
- "\nResult::\n"
+ "1. \"blockhash\" (required, string) Block hash to wait for.\n"
+ "2. timeout (int, optional, default=0) Time in milliseconds to wait for a response. 0 indicates no timeout.\n"
+ "\nResult:\n"
"{ (json object)\n"
" \"hash\" : { (string) The blockhash\n"
" \"height\" : { (int) Block height\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("waitforblock", "\"0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862\", 1000")
+ HelpExampleRpc("waitforblock", "\"0000000000079f8ef3d2c688c244eb7a4570b24c9ed7b4a8c619eb02596f8862\", 1000")
);
@@ -274,19 +274,19 @@ UniValue waitforblockheight(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "waitforblock\n"
+ "waitforblockheight <height> (timeout)\n"
"\nWaits for (at least) block height and returns the height and hash\n"
- "\nof the current tip.\n"
+ "of the current tip.\n"
"\nReturns the current block on timeout or exit.\n"
"\nArguments:\n"
- "1. block height to wait for (int)\n"
- "2. timeout (milliseconds) (int, optional, default=false)\n"
- "\nResult::\n"
+ "1. height (required, int) Block height to wait for (int)\n"
+ "2. timeout (int, optional, default=0) Time in milliseconds to wait for a response. 0 indicates no timeout.\n"
+ "\nResult:\n"
"{ (json object)\n"
" \"hash\" : { (string) The blockhash\n"
" \"height\" : { (int) Block height\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("waitforblockheight", "\"100\", 1000")
+ HelpExampleRpc("waitforblockheight", "\"100\", 1000")
);
@@ -331,18 +331,18 @@ UniValue getdifficulty(const JSONRPCRequest& request)
std::string EntryDescriptionString()
{
- return " \"size\" : n, (numeric) transaction size in bytes\n"
+ return " \"size\" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted.\n"
" \"fee\" : n, (numeric) transaction fee in " + CURRENCY_UNIT + "\n"
" \"modifiedfee\" : n, (numeric) transaction fee with fee deltas used for mining priority\n"
" \"time\" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT\n"
" \"height\" : n, (numeric) block height when transaction entered pool\n"
- " \"startingpriority\" : n, (numeric) priority when transaction entered pool\n"
- " \"currentpriority\" : n, (numeric) transaction priority now\n"
+ " \"startingpriority\" : n, (numeric) DEPRECATED. Priority when transaction entered pool\n"
+ " \"currentpriority\" : n, (numeric) DEPRECATED. Transaction priority now\n"
" \"descendantcount\" : n, (numeric) number of in-mempool descendant transactions (including this one)\n"
- " \"descendantsize\" : n, (numeric) size of in-mempool descendants (including this one)\n"
+ " \"descendantsize\" : n, (numeric) virtual transaction size of in-mempool descendants (including this one)\n"
" \"descendantfees\" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one)\n"
" \"ancestorcount\" : n, (numeric) number of in-mempool ancestor transactions (including this one)\n"
- " \"ancestorsize\" : n, (numeric) size of in-mempool ancestors (including this one)\n"
+ " \"ancestorsize\" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one)\n"
" \"ancestorfees\" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one)\n"
" \"depends\" : [ (array) unconfirmed transactions used as inputs for this transaction\n"
" \"transactionid\", (string) parent transaction id\n"
@@ -418,7 +418,7 @@ UniValue getrawmempool(const JSONRPCRequest& request)
"getrawmempool ( verbose )\n"
"\nReturns all transaction ids in memory pool as a json array of string transaction ids.\n"
"\nArguments:\n"
- "1. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n"
+ "1. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n"
"\nResult: (for verbose = false):\n"
"[ (json array of string)\n"
" \"transactionid\" (string) The transaction id\n"
@@ -430,7 +430,7 @@ UniValue getrawmempool(const JSONRPCRequest& request)
+ EntryDescriptionString()
+ " }, ...\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("getrawmempool", "true")
+ HelpExampleRpc("getrawmempool", "true")
);
@@ -449,8 +449,8 @@ UniValue getmempoolancestors(const JSONRPCRequest& request)
"getmempoolancestors txid (verbose)\n"
"\nIf txid is in the mempool, returns all in-mempool ancestors.\n"
"\nArguments:\n"
- "1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
- "2. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n"
+ "1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
+ "2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n"
"\nResult (for verbose=false):\n"
"[ (json array of strings)\n"
" \"transactionid\" (string) The transaction id of an in-mempool ancestor transaction\n"
@@ -462,7 +462,7 @@ UniValue getmempoolancestors(const JSONRPCRequest& request)
+ EntryDescriptionString()
+ " }, ...\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("getmempoolancestors", "\"mytxid\"")
+ HelpExampleRpc("getmempoolancestors", "\"mytxid\"")
);
@@ -513,8 +513,8 @@ UniValue getmempooldescendants(const JSONRPCRequest& request)
"getmempooldescendants txid (verbose)\n"
"\nIf txid is in the mempool, returns all in-mempool descendants.\n"
"\nArguments:\n"
- "1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
- "2. verbose (boolean, optional, default=false) true for a json object, false for array of transaction ids\n"
+ "1. \"txid\" (string, required) The transaction id (must be in mempool)\n"
+ "2. verbose (boolean, optional, default=false) True for a json object, false for array of transaction ids\n"
"\nResult (for verbose=false):\n"
"[ (json array of strings)\n"
" \"transactionid\" (string) The transaction id of an in-mempool descendant transaction\n"
@@ -526,7 +526,7 @@ UniValue getmempooldescendants(const JSONRPCRequest& request)
+ EntryDescriptionString()
+ " }, ...\n"
"}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("getmempooldescendants", "\"mytxid\"")
+ HelpExampleRpc("getmempooldescendants", "\"mytxid\"")
);
@@ -582,7 +582,7 @@ UniValue getmempoolentry(const JSONRPCRequest& request)
"{ (json object)\n"
+ EntryDescriptionString()
+ "}\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("getmempoolentry", "\"mytxid\"")
+ HelpExampleRpc("getmempoolentry", "\"mytxid\"")
);
@@ -607,10 +607,10 @@ UniValue getblockhash(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "getblockhash index\n"
- "\nReturns hash of block in best-block-chain at index provided.\n"
+ "getblockhash height\n"
+ "\nReturns hash of block in best-block-chain at height provided.\n"
"\nArguments:\n"
- "1. index (numeric, required) The block index\n"
+ "1. height (numeric, required) The height index\n"
"\nResult:\n"
"\"hash\" (string) The block hash\n"
"\nExamples:\n"
@@ -651,9 +651,9 @@ UniValue getblockheader(const JSONRPCRequest& request)
" \"nonce\" : n, (numeric) The nonce\n"
" \"bits\" : \"1d00ffff\", (string) The bits\n"
" \"difficulty\" : x.xxx, (numeric) The difficulty\n"
+ " \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n"
" \"previousblockhash\" : \"hash\", (string) The hash of the previous block\n"
" \"nextblockhash\" : \"hash\", (string) The hash of the next block\n"
- " \"chainwork\" : \"0000...1f3\" (string) Expected number of hashes required to produce the current chain (in hex)\n"
"}\n"
"\nResult (for verbose=false):\n"
"\"data\" (string) A string that is serialized, hex-encoded data for block 'hash'.\n"
@@ -691,19 +691,19 @@ UniValue getblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "getblock \"hash\" ( verbose )\n"
+ "getblock \"blockhash\" ( verbose )\n"
"\nIf verbose is false, returns a string that is serialized, hex-encoded data for block 'hash'.\n"
"If verbose is true, returns an Object with information about block <hash>.\n"
"\nArguments:\n"
- "1. \"hash\" (string, required) The block hash\n"
- "2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n"
+ "1. \"blockhash\" (string, required) The block hash\n"
+ "2. verbose (boolean, optional, default=true) true for a json object, false for the hex encoded data\n"
"\nResult (for verbose = true):\n"
"{\n"
" \"hash\" : \"hash\", (string) the block hash (same as provided)\n"
" \"confirmations\" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain\n"
" \"size\" : n, (numeric) The block size\n"
" \"strippedsize\" : n, (numeric) The block size excluding witness data\n"
- " \"weight\" : n (numeric) The block weight (BIP 141)\n"
+ " \"weight\" : n (numeric) The block weight as defined in BIP 141\n"
" \"height\" : n, (numeric) The block height or index\n"
" \"version\" : n, (numeric) The block version\n"
" \"versionHex\" : \"00000000\", (string) The block version formatted in hexadecimal\n"
@@ -751,7 +751,7 @@ UniValue getblock(const JSONRPCRequest& request)
if (!fVerbose)
{
- CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ssBlock(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
ssBlock << block;
std::string strHex = HexStr(ssBlock.begin(), ssBlock.end());
return strHex;
@@ -814,6 +814,53 @@ static bool GetUTXOStats(CCoinsView *view, CCoinsStats &stats)
return true;
}
+UniValue pruneblockchain(const JSONRPCRequest& request)
+{
+ if (request.fHelp || request.params.size() != 1)
+ throw runtime_error(
+ "pruneblockchain\n"
+ "\nArguments:\n"
+ "1. \"height\" (numeric, required) The block height to prune up to. May be set to a discrete height, or to a unix timestamp to prune based on block time.\n"
+ "\nResult:\n"
+ "n (numeric) Height of the last block pruned.\n"
+ "\nExamples:\n"
+ + HelpExampleCli("pruneblockchain", "1000")
+ + HelpExampleRpc("pruneblockchain", "1000"));
+
+ if (!fPruneMode)
+ throw JSONRPCError(RPC_METHOD_NOT_FOUND, "Cannot prune blocks because node is not in prune mode.");
+
+ LOCK(cs_main);
+
+ int heightParam = request.params[0].get_int();
+ if (heightParam < 0)
+ throw JSONRPCError(RPC_INVALID_PARAMETER, "Negative block height.");
+
+ // Height value more than a billion is too high to be a block height, and
+ // too low to be a block time (corresponds to timestamp from Sep 2001).
+ if (heightParam > 1000000000) {
+ CBlockIndex* pindex = chainActive.FindEarliestAtLeast(heightParam);
+ if (!pindex) {
+ throw JSONRPCError(RPC_INTERNAL_ERROR, "Could not find block with at least the specified timestamp.");
+ }
+ heightParam = pindex->nHeight;
+ }
+
+ unsigned int height = (unsigned int) heightParam;
+ unsigned int chainHeight = (unsigned int) chainActive.Height();
+ if (chainHeight < Params().PruneAfterHeight())
+ throw JSONRPCError(RPC_INTERNAL_ERROR, "Blockchain is too short for pruning.");
+ else if (height > chainHeight)
+ throw JSONRPCError(RPC_INVALID_PARAMETER, "Blockchain is shorter than the attempted prune height.");
+ else if (height > chainHeight - MIN_BLOCKS_TO_KEEP) {
+ LogPrint("rpc", "Attempt to prune blocks close to the tip. Retaining the minimum number of blocks.");
+ height = chainHeight - MIN_BLOCKS_TO_KEEP;
+ }
+
+ PruneBlockFilesManual(height);
+ return uint64_t(height);
+}
+
UniValue gettxoutsetinfo(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 0)
@@ -858,12 +905,12 @@ UniValue gettxout(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 2 || request.params.size() > 3)
throw runtime_error(
- "gettxout \"txid\" n ( includemempool )\n"
+ "gettxout \"txid\" n ( include_mempool )\n"
"\nReturns details about an unspent transaction output.\n"
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id\n"
"2. n (numeric, required) vout number\n"
- "3. includemempool (boolean, optional) Whether to include the mempool\n"
+ "3. include_mempool (boolean, optional) Whether to include the mempool\n"
"\nResult:\n"
"{\n"
" \"bestblock\" : \"hash\", (string) the block hash\n"
@@ -875,7 +922,7 @@ UniValue gettxout(const JSONRPCRequest& request)
" \"reqSigs\" : n, (numeric) Number of required signatures\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg pubkeyhash\n"
" \"addresses\" : [ (array of string) array of bitcoin addresses\n"
- " \"bitcoinaddress\" (string) bitcoin address\n"
+ " \"address\" (string) bitcoin address\n"
" ,...\n"
" ]\n"
" },\n"
@@ -940,11 +987,11 @@ UniValue verifychain(const JSONRPCRequest& request)
int nCheckDepth = GetArg("-checkblocks", DEFAULT_CHECKBLOCKS);
if (request.fHelp || request.params.size() > 2)
throw runtime_error(
- "verifychain ( checklevel numblocks )\n"
+ "verifychain ( checklevel nblocks )\n"
"\nVerifies blockchain database.\n"
"\nArguments:\n"
"1. checklevel (numeric, optional, 0-4, default=" + strprintf("%d", nCheckLevel) + ") How thorough the block verification is.\n"
- "2. numblocks (numeric, optional, default=" + strprintf("%d", nCheckDepth) + ", 0=all) The number of blocks to check.\n"
+ "2. nblocks (numeric, optional, default=" + strprintf("%d", nCheckDepth) + ", 0=all) The number of blocks to check.\n"
"\nResult:\n"
"true|false (boolean) Verified or not\n"
"\nExamples:\n"
@@ -1073,7 +1120,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
obj.push_back(Pair("bestblockhash", chainActive.Tip()->GetBlockHash().GetHex()));
obj.push_back(Pair("difficulty", (double)GetDifficulty()));
obj.push_back(Pair("mediantime", (int64_t)chainActive.Tip()->GetMedianTimePast()));
- obj.push_back(Pair("verificationprogress", Checkpoints::GuessVerificationProgress(Params().Checkpoints(), chainActive.Tip())));
+ obj.push_back(Pair("verificationprogress", GuessVerificationProgress(Params().TxData(), chainActive.Tip())));
obj.push_back(Pair("chainwork", chainActive.Tip()->nChainWork.GetHex()));
obj.push_back(Pair("pruned", fPruneMode));
@@ -1240,7 +1287,7 @@ UniValue getmempoolinfo(const JSONRPCRequest& request)
"\nResult:\n"
"{\n"
" \"size\": xxxxx, (numeric) Current tx count\n"
- " \"bytes\": xxxxx, (numeric) Sum of all tx sizes\n"
+ " \"bytes\": xxxxx, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted\n"
" \"usage\": xxxxx, (numeric) Total memory usage for the mempool\n"
" \"maxmempool\": xxxxx, (numeric) Maximum memory usage for the mempool\n"
" \"mempoolminfee\": xxxxx (numeric) Minimum fee for tx to be accepted\n"
@@ -1257,12 +1304,12 @@ UniValue preciousblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "preciousblock \"hash\"\n"
+ "preciousblock \"blockhash\"\n"
"\nTreats a block as if it were received before others with the same work.\n"
"\nA later preciousblock call can override the effect of an earlier one.\n"
"\nThe effects of preciousblock are not retained across restarts.\n"
"\nArguments:\n"
- "1. hash (string, required) the hash of the block to mark as precious\n"
+ "1. \"blockhash\" (string, required) the hash of the block to mark as precious\n"
"\nResult:\n"
"\nExamples:\n"
+ HelpExampleCli("preciousblock", "\"blockhash\"")
@@ -1295,10 +1342,10 @@ UniValue invalidateblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "invalidateblock \"hash\"\n"
+ "invalidateblock \"blockhash\"\n"
"\nPermanently marks a block as invalid, as if it violated a consensus rule.\n"
"\nArguments:\n"
- "1. hash (string, required) the hash of the block to mark as invalid\n"
+ "1. \"blockhash\" (string, required) the hash of the block to mark as invalid\n"
"\nResult:\n"
"\nExamples:\n"
+ HelpExampleCli("invalidateblock", "\"blockhash\"")
@@ -1319,7 +1366,7 @@ UniValue invalidateblock(const JSONRPCRequest& request)
}
if (state.IsValid()) {
- ActivateBestChain(state, Params(), NULL);
+ ActivateBestChain(state, Params());
}
if (!state.IsValid()) {
@@ -1333,11 +1380,11 @@ UniValue reconsiderblock(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "reconsiderblock \"hash\"\n"
+ "reconsiderblock \"blockhash\"\n"
"\nRemoves invalidity status of a block and its descendants, reconsider them for activation.\n"
"This can be used to undo the effects of invalidateblock.\n"
"\nArguments:\n"
- "1. hash (string, required) the hash of the block to reconsider\n"
+ "1. \"blockhash\" (string, required) the hash of the block to reconsider\n"
"\nResult:\n"
"\nExamples:\n"
+ HelpExampleCli("reconsiderblock", "\"blockhash\"")
@@ -1357,7 +1404,7 @@ UniValue reconsiderblock(const JSONRPCRequest& request)
}
CValidationState state;
- ActivateBestChain(state, Params(), NULL);
+ ActivateBestChain(state, Params());
if (!state.IsValid()) {
throw JSONRPCError(RPC_DATABASE_ERROR, state.GetRejectReason());
@@ -1367,33 +1414,34 @@ UniValue reconsiderblock(const JSONRPCRequest& request)
}
static const CRPCCommand commands[] =
-{ // category name actor (function) okSafeMode
- // --------------------- ------------------------ ----------------------- ----------
- { "blockchain", "getblockchaininfo", &getblockchaininfo, true },
- { "blockchain", "getbestblockhash", &getbestblockhash, true },
- { "blockchain", "getblockcount", &getblockcount, true },
- { "blockchain", "getblock", &getblock, true },
- { "blockchain", "getblockhash", &getblockhash, true },
- { "blockchain", "getblockheader", &getblockheader, true },
- { "blockchain", "getchaintips", &getchaintips, true },
- { "blockchain", "getdifficulty", &getdifficulty, true },
- { "blockchain", "getmempoolancestors", &getmempoolancestors, true },
- { "blockchain", "getmempooldescendants", &getmempooldescendants, true },
- { "blockchain", "getmempoolentry", &getmempoolentry, true },
- { "blockchain", "getmempoolinfo", &getmempoolinfo, true },
- { "blockchain", "getrawmempool", &getrawmempool, true },
- { "blockchain", "gettxout", &gettxout, true },
- { "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true },
- { "blockchain", "verifychain", &verifychain, true },
-
- { "blockchain", "preciousblock", &preciousblock, true },
+{ // category name actor (function) okSafe argNames
+ // --------------------- ------------------------ ----------------------- ------ ----------
+ { "blockchain", "getblockchaininfo", &getblockchaininfo, true, {} },
+ { "blockchain", "getbestblockhash", &getbestblockhash, true, {} },
+ { "blockchain", "getblockcount", &getblockcount, true, {} },
+ { "blockchain", "getblock", &getblock, true, {"blockhash","verbose"} },
+ { "blockchain", "getblockhash", &getblockhash, true, {"height"} },
+ { "blockchain", "getblockheader", &getblockheader, true, {"blockhash","verbose"} },
+ { "blockchain", "getchaintips", &getchaintips, true, {} },
+ { "blockchain", "getdifficulty", &getdifficulty, true, {} },
+ { "blockchain", "getmempoolancestors", &getmempoolancestors, true, {"txid","verbose"} },
+ { "blockchain", "getmempooldescendants", &getmempooldescendants, true, {"txid","verbose"} },
+ { "blockchain", "getmempoolentry", &getmempoolentry, true, {"txid"} },
+ { "blockchain", "getmempoolinfo", &getmempoolinfo, true, {} },
+ { "blockchain", "getrawmempool", &getrawmempool, true, {"verbose"} },
+ { "blockchain", "gettxout", &gettxout, true, {"txid","n","include_mempool"} },
+ { "blockchain", "gettxoutsetinfo", &gettxoutsetinfo, true, {} },
+ { "blockchain", "pruneblockchain", &pruneblockchain, true, {"height"} },
+ { "blockchain", "verifychain", &verifychain, true, {"checklevel","nblocks"} },
+
+ { "blockchain", "preciousblock", &preciousblock, true, {"blockhash"} },
/* Not shown in help */
- { "hidden", "invalidateblock", &invalidateblock, true },
- { "hidden", "reconsiderblock", &reconsiderblock, true },
- { "hidden", "waitfornewblock", &waitfornewblock, true },
- { "hidden", "waitforblock", &waitforblock, true },
- { "hidden", "waitforblockheight", &waitforblockheight, true },
+ { "hidden", "invalidateblock", &invalidateblock, true, {"blockhash"} },
+ { "hidden", "reconsiderblock", &reconsiderblock, true, {"blockhash"} },
+ { "hidden", "waitfornewblock", &waitfornewblock, true, {"timeout"} },
+ { "hidden", "waitforblock", &waitforblock, true, {"blockhash","timeout"} },
+ { "hidden", "waitforblockheight", &waitforblockheight, true, {"height","timeout"} },
};
void RegisterBlockchainRPCCommands(CRPCTable &t)
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index 8370a0f43e..5d3c458455 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -20,103 +20,121 @@ class CRPCConvertParam
public:
std::string methodName; //!< method whose params want conversion
int paramIdx; //!< 0-based idx of param to convert
+ std::string paramName; //!< parameter name
};
+/**
+ * Specifiy a (method, idx, name) here if the argument is a non-string RPC
+ * argument and needs to be converted from JSON.
+ *
+ * @note Parameter indexes start from 0.
+ */
static const CRPCConvertParam vRPCConvertParams[] =
{
- { "stop", 0 },
- { "setmocktime", 0 },
- { "generate", 0 },
- { "generate", 1 },
- { "generatetoaddress", 0 },
- { "generatetoaddress", 2 },
- { "getnetworkhashps", 0 },
- { "getnetworkhashps", 1 },
- { "sendtoaddress", 1 },
- { "sendtoaddress", 4 },
- { "settxfee", 0 },
- { "getreceivedbyaddress", 1 },
- { "getreceivedbyaccount", 1 },
- { "listreceivedbyaddress", 0 },
- { "listreceivedbyaddress", 1 },
- { "listreceivedbyaddress", 2 },
- { "listreceivedbyaccount", 0 },
- { "listreceivedbyaccount", 1 },
- { "listreceivedbyaccount", 2 },
- { "getbalance", 1 },
- { "getbalance", 2 },
- { "getblockhash", 0 },
- { "waitforblockheight", 0 },
- { "waitforblockheight", 1 },
- { "waitforblock", 1 },
- { "waitforblock", 2 },
- { "waitfornewblock", 0 },
- { "waitfornewblock", 1 },
- { "move", 2 },
- { "move", 3 },
- { "sendfrom", 2 },
- { "sendfrom", 3 },
- { "listtransactions", 1 },
- { "listtransactions", 2 },
- { "listtransactions", 3 },
- { "listaccounts", 0 },
- { "listaccounts", 1 },
- { "walletpassphrase", 1 },
- { "getblocktemplate", 0 },
- { "listsinceblock", 1 },
- { "listsinceblock", 2 },
- { "sendmany", 1 },
- { "sendmany", 2 },
- { "sendmany", 4 },
- { "addmultisigaddress", 0 },
- { "addmultisigaddress", 1 },
- { "createmultisig", 0 },
- { "createmultisig", 1 },
- { "listunspent", 0 },
- { "listunspent", 1 },
- { "listunspent", 2 },
- { "getblock", 1 },
- { "getblockheader", 1 },
- { "gettransaction", 1 },
- { "getrawtransaction", 1 },
- { "createrawtransaction", 0 },
- { "createrawtransaction", 1 },
- { "createrawtransaction", 2 },
- { "signrawtransaction", 1 },
- { "signrawtransaction", 2 },
- { "sendrawtransaction", 1 },
- { "fundrawtransaction", 1 },
- { "gettxout", 1 },
- { "gettxout", 2 },
- { "gettxoutproof", 0 },
- { "lockunspent", 0 },
- { "lockunspent", 1 },
- { "importprivkey", 2 },
- { "importaddress", 2 },
- { "importaddress", 3 },
- { "importpubkey", 2 },
- { "importmulti", 0 },
- { "importmulti", 1 },
- { "verifychain", 0 },
- { "verifychain", 1 },
- { "keypoolrefill", 0 },
- { "getrawmempool", 0 },
- { "estimatefee", 0 },
- { "estimatepriority", 0 },
- { "estimatesmartfee", 0 },
- { "estimatesmartpriority", 0 },
- { "prioritisetransaction", 1 },
- { "prioritisetransaction", 2 },
- { "setban", 2 },
- { "setban", 3 },
- { "getmempoolancestors", 1 },
- { "getmempooldescendants", 1 },
+ { "setmocktime", 0, "timestamp" },
+ { "generate", 0, "nblocks" },
+ { "generate", 1, "maxtries" },
+ { "generatetoaddress", 0, "nblocks" },
+ { "generatetoaddress", 2, "maxtries" },
+ { "getnetworkhashps", 0, "nblocks" },
+ { "getnetworkhashps", 1, "height" },
+ { "sendtoaddress", 1, "amount" },
+ { "sendtoaddress", 4, "subtractfeefromamount" },
+ { "settxfee", 0, "amount" },
+ { "getreceivedbyaddress", 1, "minconf" },
+ { "getreceivedbyaccount", 1, "minconf" },
+ { "listreceivedbyaddress", 0, "minconf" },
+ { "listreceivedbyaddress", 1, "include_empty" },
+ { "listreceivedbyaddress", 2, "include_watchonly" },
+ { "listreceivedbyaccount", 0, "minconf" },
+ { "listreceivedbyaccount", 1, "include_empty" },
+ { "listreceivedbyaccount", 2, "include_watchonly" },
+ { "getbalance", 1, "minconf" },
+ { "getbalance", 2, "include_watchonly" },
+ { "getblockhash", 0, "height" },
+ { "waitforblockheight", 0, "height" },
+ { "waitforblockheight", 1, "timeout" },
+ { "waitforblock", 1, "timeout" },
+ { "waitfornewblock", 0, "timeout" },
+ { "move", 2, "amount" },
+ { "move", 3, "minconf" },
+ { "sendfrom", 2, "amount" },
+ { "sendfrom", 3, "minconf" },
+ { "listtransactions", 1, "count" },
+ { "listtransactions", 2, "skip" },
+ { "listtransactions", 3, "include_watchonly" },
+ { "listaccounts", 0, "minconf" },
+ { "listaccounts", 1, "include_watchonly" },
+ { "walletpassphrase", 1, "timeout" },
+ { "getblocktemplate", 0, "template_request" },
+ { "listsinceblock", 1, "target_confirmations" },
+ { "listsinceblock", 2, "include_watchonly" },
+ { "sendmany", 1, "amounts" },
+ { "sendmany", 2, "minconf" },
+ { "sendmany", 4, "subtractfeefrom" },
+ { "addmultisigaddress", 0, "nrequired" },
+ { "addmultisigaddress", 1, "keys" },
+ { "createmultisig", 0, "nrequired" },
+ { "createmultisig", 1, "keys" },
+ { "listunspent", 0, "minconf" },
+ { "listunspent", 1, "maxconf" },
+ { "listunspent", 2, "addresses" },
+ { "getblock", 1, "verbose" },
+ { "getblockheader", 1, "verbose" },
+ { "gettransaction", 1, "include_watchonly" },
+ { "getrawtransaction", 1, "verbose" },
+ { "createrawtransaction", 0, "transactions" },
+ { "createrawtransaction", 1, "outputs" },
+ { "createrawtransaction", 2, "locktime" },
+ { "signrawtransaction", 1, "prevtxs" },
+ { "signrawtransaction", 2, "privkeys" },
+ { "sendrawtransaction", 1, "allowhighfees" },
+ { "fundrawtransaction", 1, "options" },
+ { "gettxout", 1, "n" },
+ { "gettxout", 2, "include_mempool" },
+ { "gettxoutproof", 0, "txids" },
+ { "lockunspent", 0, "unlock" },
+ { "lockunspent", 1, "transactions" },
+ { "importprivkey", 2, "rescan" },
+ { "importaddress", 2, "rescan" },
+ { "importaddress", 3, "p2sh" },
+ { "importpubkey", 2, "rescan" },
+ { "importmulti", 0, "requests" },
+ { "importmulti", 1, "options" },
+ { "verifychain", 0, "checklevel" },
+ { "verifychain", 1, "nblocks" },
+ { "pruneblockchain", 0, "height" },
+ { "keypoolrefill", 0, "newsize" },
+ { "getrawmempool", 0, "verbose" },
+ { "estimatefee", 0, "nblocks" },
+ { "estimatepriority", 0, "nblocks" },
+ { "estimatesmartfee", 0, "nblocks" },
+ { "estimatesmartpriority", 0, "nblocks" },
+ { "prioritisetransaction", 1, "priority_delta" },
+ { "prioritisetransaction", 2, "fee_delta" },
+ { "setban", 2, "bantime" },
+ { "setban", 3, "absolute" },
+ { "setnetworkactive", 0, "state" },
+ { "getmempoolancestors", 1, "verbose" },
+ { "getmempooldescendants", 1, "verbose" },
+ // Echo with conversion (For testing only)
+ { "echojson", 0, "arg0" },
+ { "echojson", 1, "arg1" },
+ { "echojson", 2, "arg2" },
+ { "echojson", 3, "arg3" },
+ { "echojson", 4, "arg4" },
+ { "echojson", 5, "arg5" },
+ { "echojson", 6, "arg6" },
+ { "echojson", 7, "arg7" },
+ { "echojson", 8, "arg8" },
+ { "echojson", 9, "arg9" },
};
class CRPCConvertTable
{
private:
- std::set<std::pair<std::string, int> > members;
+ std::set<std::pair<std::string, int>> members;
+ std::set<std::pair<std::string, std::string>> membersByName;
public:
CRPCConvertTable();
@@ -124,6 +142,9 @@ public:
bool convert(const std::string& method, int idx) {
return (members.count(std::make_pair(method, idx)) > 0);
}
+ bool convert(const std::string& method, const std::string& name) {
+ return (membersByName.count(std::make_pair(method, name)) > 0);
+ }
};
CRPCConvertTable::CRPCConvertTable()
@@ -134,6 +155,8 @@ CRPCConvertTable::CRPCConvertTable()
for (unsigned int i = 0; i < n_elem; i++) {
members.insert(std::make_pair(vRPCConvertParams[i].methodName,
vRPCConvertParams[i].paramIdx));
+ membersByName.insert(std::make_pair(vRPCConvertParams[i].methodName,
+ vRPCConvertParams[i].paramName));
}
}
@@ -151,7 +174,6 @@ UniValue ParseNonRFCJSONValue(const std::string& strVal)
return jVal[0];
}
-/** Convert strings to command-specific RPC representation */
UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
{
UniValue params(UniValue::VARR);
@@ -170,3 +192,28 @@ UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::s
return params;
}
+
+UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<std::string> &strParams)
+{
+ UniValue params(UniValue::VOBJ);
+
+ for (const std::string &s: strParams) {
+ size_t pos = s.find("=");
+ if (pos == std::string::npos) {
+ throw(std::runtime_error("No '=' in named argument '"+s+"', this needs to be present for every argument (even if it is empty)"));
+ }
+
+ std::string name = s.substr(0, pos);
+ std::string value = s.substr(pos+1);
+
+ if (!rpcCvtTable.convert(strMethod, name)) {
+ // insert string value directly
+ params.pushKV(name, value);
+ } else {
+ // parse string as JSON, insert bool/number/object/etc. value
+ params.pushKV(name, ParseNonRFCJSONValue(value));
+ }
+ }
+
+ return params;
+}
diff --git a/src/rpc/client.h b/src/rpc/client.h
index ae015860b6..e7cf035d8f 100644
--- a/src/rpc/client.h
+++ b/src/rpc/client.h
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,12 @@
#include <univalue.h>
+/** Convert positional arguments to command-specific RPC representation */
UniValue RPCConvertValues(const std::string& strMethod, const std::vector<std::string>& strParams);
+
+/** Convert named arguments to command-specific RPC representation */
+UniValue RPCConvertNamedValues(const std::string& strMethod, const std::vector<std::string>& strParams);
+
/** Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null)
* as well as objects and arrays.
*/
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index be0776ea22..e46f55a8aa 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,7 +12,7 @@
#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
-#include "main.h"
+#include "validation.h"
#include "miner.h"
#include "net.h"
#include "pow.h"
@@ -78,13 +78,13 @@ UniValue getnetworkhashps(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() > 2)
throw runtime_error(
- "getnetworkhashps ( blocks height )\n"
+ "getnetworkhashps ( nblocks height )\n"
"\nReturns the estimated network hashes per second based on the last n blocks.\n"
"Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change.\n"
"Pass in [height] to estimate the network speed at the time when a certain block was found.\n"
"\nArguments:\n"
- "1. blocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.\n"
- "2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n"
+ "1. nblocks (numeric, optional, default=120) The number of blocks, or -1 for blocks since last difficulty change.\n"
+ "2. height (numeric, optional, default=-1) To estimate at the time of the given height.\n"
"\nResult:\n"
"x (numeric) Hashes per second estimated\n"
"\nExamples:\n"
@@ -131,8 +131,8 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
if (pblock->nNonce == nInnerLoopCount) {
continue;
}
- CValidationState state;
- if (!ProcessNewBlock(state, Params(), NULL, pblock, true, NULL))
+ std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(*pblock);
+ if (!ProcessNewBlock(Params(), shared_pblock, true, NULL))
throw JSONRPCError(RPC_INTERNAL_ERROR, "ProcessNewBlock, block not accepted");
++nHeight;
blockHashes.push_back(pblock->GetHash().GetHex());
@@ -150,12 +150,12 @@ UniValue generate(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "generate numblocks ( maxtries )\n"
- "\nMine up to numblocks blocks immediately (before the RPC call returns)\n"
+ "generate nblocks ( maxtries )\n"
+ "\nMine up to nblocks blocks immediately (before the RPC call returns)\n"
"\nArguments:\n"
- "1. numblocks (numeric, required) How many blocks are generated immediately.\n"
+ "1. nblocks (numeric, required) How many blocks are generated immediately.\n"
"2. maxtries (numeric, optional) How many iterations to try (default = 1000000).\n"
- "\nResult\n"
+ "\nResult:\n"
"[ blockhashes ] (array) hashes of blocks generated\n"
"\nExamples:\n"
"\nGenerate 11 blocks\n"
@@ -186,13 +186,13 @@ UniValue generatetoaddress(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() < 2 || request.params.size() > 3)
throw runtime_error(
- "generatetoaddress numblocks address (maxtries)\n"
+ "generatetoaddress nblocks address (maxtries)\n"
"\nMine blocks immediately to a specified address (before the RPC call returns)\n"
"\nArguments:\n"
- "1. numblocks (numeric, required) How many blocks are generated immediately.\n"
- "2. address (string, required) The address to send the newly generated bitcoin to.\n"
+ "1. nblocks (numeric, required) How many blocks are generated immediately.\n"
+ "2. address (string, required) The address to send the newly generated bitcoin to.\n"
"3. maxtries (numeric, optional) How many iterations to try (default = 1000000).\n"
- "\nResult\n"
+ "\nResult:\n"
"[ blockhashes ] (array) hashes of blocks generated\n"
"\nExamples:\n"
"\nGenerate 11 blocks to myaddress\n"
@@ -264,13 +264,13 @@ UniValue prioritisetransaction(const JSONRPCRequest& request)
"Accepts the transaction into mined blocks at a higher (or lower) priority\n"
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id.\n"
- "2. priority delta (numeric, required) The priority to add or subtract.\n"
+ "2. priority_delta (numeric, required) The priority to add or subtract.\n"
" The transaction selection algorithm considers the tx as it would have a higher priority.\n"
" (priority of a transaction is calculated: coinage * value_in_satoshis / txsize) \n"
- "3. fee delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n"
+ "3. fee_delta (numeric, required) The fee value (in satoshis) to add (or subtract, if negative).\n"
" The fee is not actually paid, only the algorithm for selecting transactions into a block\n"
" considers the transaction as it would have paid a higher (or lower) fee.\n"
- "\nResult\n"
+ "\nResult:\n"
"true (boolean) Returns true\n"
"\nExamples:\n"
+ HelpExampleCli("prioritisetransaction", "\"txid\" 0.0 10000")
@@ -329,7 +329,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
" https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki\n"
"\nArguments:\n"
- "1. TemplateRequest (json object, optional) A json object in the following spec\n"
+ "1. template_request (json object, optional) A json object in the following spec\n"
" {\n"
" \"mode\":\"template\" (string, optional) This must be set to \"template\", \"proposal\" (see BIP 23), or omitted\n"
" \"capabilities\":[ (array, optional) A list of strings\n"
@@ -558,7 +558,8 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
UniValue transactions(UniValue::VARR);
map<uint256, int64_t> setTxIndex;
int i = 0;
- BOOST_FOREACH (CTransaction& tx, pblock->vtx) {
+ for (const auto& it : pblock->vtx) {
+ const CTransaction& tx = *it;
uint256 txHash = tx.GetHash();
setTxIndex[txHash] = i++;
@@ -663,7 +664,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
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("coinbasevalue", (int64_t)pblock->vtx[0]->vout[0].nValue));
result.push_back(Pair("longpollid", chainActive.Tip()->GetBlockHash().GetHex() + i64tostr(nTransactionsUpdatedLast)));
result.push_back(Pair("target", hashTarget.GetHex()));
result.push_back(Pair("mintime", (int64_t)pindexPrev->GetMedianTimePast()+1));
@@ -680,7 +681,9 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
result.push_back(Pair("curtime", pblock->GetBlockTime()));
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
- if (!pblocktemplate->vchCoinbaseCommitment.empty()) {
+
+ const struct BIP9DeploymentInfo& segwit_info = VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_SEGWIT];
+ if (!pblocktemplate->vchCoinbaseCommitment.empty() && setClientRules.find(segwit_info.name) != setClientRules.end()) {
result.push_back(Pair("default_witness_commitment", HexStr(pblocktemplate->vchCoinbaseCommitment.begin(), pblocktemplate->vchCoinbaseCommitment.end())));
}
@@ -715,8 +718,8 @@ UniValue submitblock(const JSONRPCRequest& request)
"See https://en.bitcoin.it/wiki/BIP_0022 for full specification.\n"
"\nArguments\n"
- "1. \"hexdata\" (string, required) the hex-encoded block data to submit\n"
- "2. \"jsonparametersobject\" (string, optional) object of optional parameters\n"
+ "1. \"hexdata\" (string, required) the hex-encoded block data to submit\n"
+ "2. \"parameters\" (string, optional) object of optional parameters\n"
" {\n"
" \"workid\" : \"id\" (string, optional) if the server provided a workid, it MUST be included with submissions\n"
" }\n"
@@ -726,7 +729,8 @@ UniValue submitblock(const JSONRPCRequest& request)
+ HelpExampleRpc("submitblock", "\"mydata\"")
);
- CBlock block;
+ std::shared_ptr<CBlock> blockptr = std::make_shared<CBlock>();
+ CBlock& block = *blockptr;
if (!DecodeHexBlk(block, request.params[0].get_str()))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "Block decode failed");
@@ -754,10 +758,9 @@ UniValue submitblock(const JSONRPCRequest& request)
}
}
- CValidationState state;
submitblock_StateCatcher sc(block.GetHash());
RegisterValidationInterface(&sc);
- bool fAccepted = ProcessNewBlock(state, Params(), NULL, &block, true, NULL);
+ bool fAccepted = ProcessNewBlock(Params(), blockptr, true, NULL);
UnregisterValidationInterface(&sc);
if (fBlockPresent)
{
@@ -765,13 +768,9 @@ UniValue submitblock(const JSONRPCRequest& request)
return "duplicate-inconclusive";
return "duplicate";
}
- if (fAccepted)
- {
- if (!sc.found)
- return "inconclusive";
- state = sc.state;
- }
- return BIP22ValidationResult(state);
+ if (!sc.found)
+ return "inconclusive";
+ return BIP22ValidationResult(sc.state);
}
UniValue estimatefee(const JSONRPCRequest& request)
@@ -780,14 +779,17 @@ UniValue estimatefee(const JSONRPCRequest& request)
throw runtime_error(
"estimatefee nblocks\n"
"\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
- "confirmation within nblocks blocks.\n"
+ "confirmation within nblocks blocks. Uses virtual transaction size of transaction\n"
+ "as defined in BIP 141 (witness data is discounted).\n"
"\nArguments:\n"
- "1. nblocks (numeric)\n"
+ "1. nblocks (numeric, required)\n"
"\nResult:\n"
"n (numeric) estimated fee-per-kilobyte\n"
"\n"
"A negative value is returned if not enough transactions and blocks\n"
"have been observed to make an estimate.\n"
+ "-1 is always returned for nblocks == 1 as it is impossible to calculate\n"
+ "a fee that is high enough to get reliably included in the next block.\n"
"\nExample:\n"
+ HelpExampleCli("estimatefee", "6")
);
@@ -810,10 +812,10 @@ UniValue estimatepriority(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
"estimatepriority nblocks\n"
- "\nEstimates the approximate priority a zero-fee transaction needs to begin\n"
+ "\nDEPRECATED. Estimates the approximate priority a zero-fee transaction needs to begin\n"
"confirmation within nblocks blocks.\n"
"\nArguments:\n"
- "1. nblocks (numeric)\n"
+ "1. nblocks (numeric, required)\n"
"\nResult:\n"
"n (numeric) estimated priority\n"
"\n"
@@ -840,7 +842,8 @@ UniValue estimatesmartfee(const JSONRPCRequest& request)
"\nWARNING: This interface is unstable and may disappear or change!\n"
"\nEstimates the approximate fee per kilobyte needed for a transaction to begin\n"
"confirmation within nblocks blocks if possible and return the number of blocks\n"
- "for which the estimate is valid.\n"
+ "for which the estimate is valid. Uses virtual transaction size as defined\n"
+ "in BIP 141 (witness data is discounted).\n"
"\nArguments:\n"
"1. nblocks (numeric)\n"
"\nResult:\n"
@@ -873,12 +876,12 @@ UniValue estimatesmartpriority(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
"estimatesmartpriority nblocks\n"
- "\nWARNING: This interface is unstable and may disappear or change!\n"
+ "\nDEPRECATED. WARNING: This interface is unstable and may disappear or change!\n"
"\nEstimates the approximate priority a zero-fee transaction needs to begin\n"
"confirmation within nblocks blocks if possible and return the number of blocks\n"
"for which the estimate is valid.\n"
"\nArguments:\n"
- "1. nblocks (numeric)\n"
+ "1. nblocks (numeric, required)\n"
"\nResult:\n"
"{\n"
" \"priority\" : x.x, (numeric) estimated priority\n"
@@ -907,19 +910,19 @@ UniValue estimatesmartpriority(const JSONRPCRequest& request)
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "mining", "getnetworkhashps", &getnetworkhashps, true },
- { "mining", "getmininginfo", &getmininginfo, true },
- { "mining", "prioritisetransaction", &prioritisetransaction, true },
- { "mining", "getblocktemplate", &getblocktemplate, true },
- { "mining", "submitblock", &submitblock, true },
-
- { "generating", "generate", &generate, true },
- { "generating", "generatetoaddress", &generatetoaddress, true },
-
- { "util", "estimatefee", &estimatefee, true },
- { "util", "estimatepriority", &estimatepriority, true },
- { "util", "estimatesmartfee", &estimatesmartfee, true },
- { "util", "estimatesmartpriority", &estimatesmartpriority, true },
+ { "mining", "getnetworkhashps", &getnetworkhashps, true, {"nblocks","height"} },
+ { "mining", "getmininginfo", &getmininginfo, true, {} },
+ { "mining", "prioritisetransaction", &prioritisetransaction, true, {"txid","priority_delta","fee_delta"} },
+ { "mining", "getblocktemplate", &getblocktemplate, true, {"template_request"} },
+ { "mining", "submitblock", &submitblock, true, {"hexdata","parameters"} },
+
+ { "generating", "generate", &generate, true, {"nblocks","maxtries"} },
+ { "generating", "generatetoaddress", &generatetoaddress, true, {"nblocks","address","maxtries"} },
+
+ { "util", "estimatefee", &estimatefee, true, {"nblocks"} },
+ { "util", "estimatepriority", &estimatepriority, true, {"nblocks"} },
+ { "util", "estimatesmartfee", &estimatesmartfee, true, {"nblocks"} },
+ { "util", "estimatesmartpriority", &estimatesmartpriority, true, {"nblocks"} },
};
void RegisterMiningRPCCommands(CRPCTable &t)
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index 3193985803..54d8c3e035 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -1,12 +1,12 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
#include "clientversion.h"
#include "init.h"
-#include "main.h"
+#include "validation.h"
#include "net.h"
#include "netbase.h"
#include "rpc/server.h"
@@ -152,14 +152,14 @@ UniValue validateaddress(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "validateaddress \"bitcoinaddress\"\n"
+ "validateaddress \"address\"\n"
"\nReturn information about the given bitcoin address.\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address to validate\n"
+ "1. \"address\" (string, required) The bitcoin address to validate\n"
"\nResult:\n"
"{\n"
" \"isvalid\" : true|false, (boolean) If the address is valid or not. If not, this is the only property returned.\n"
- " \"address\" : \"bitcoinaddress\", (string) The bitcoin address validated\n"
+ " \"address\" : \"address\", (string) The bitcoin address validated\n"
" \"scriptPubKey\" : \"hex\", (string) The hex encoded scriptPubKey generated by the address\n"
" \"ismine\" : true|false, (boolean) If the address is yours or not\n"
" \"iswatchonly\" : true|false, (boolean) If the address is watchonly\n"
@@ -325,10 +325,10 @@ UniValue verifymessage(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 3)
throw runtime_error(
- "verifymessage \"bitcoinaddress\" \"signature\" \"message\"\n"
+ "verifymessage \"address\" \"signature\" \"message\"\n"
"\nVerify a signed message\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the signature.\n"
+ "1. \"address\" (string, required) The bitcoin address to use for the signature.\n"
"2. \"signature\" (string, required) The signature provided by the signer in base 64 encoding (see signmessage).\n"
"3. \"message\" (string, required) The message that was signed.\n"
"\nResult:\n"
@@ -492,18 +492,33 @@ UniValue getmemoryinfo(const JSONRPCRequest& request)
return obj;
}
+UniValue echo(const JSONRPCRequest& request)
+{
+ if (request.fHelp)
+ throw runtime_error(
+ "echo|echojson \"message\" ...\n"
+ "\nSimply echo back the input arguments. This command is for testing.\n"
+ "\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in"
+ "bitcoin-cli and the GUI. There is no server-side difference."
+ );
+
+ return request.params;
+}
+
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "control", "getinfo", &getinfo, true }, /* uses wallet if enabled */
- { "control", "getmemoryinfo", &getmemoryinfo, true },
- { "util", "validateaddress", &validateaddress, true }, /* uses wallet if enabled */
- { "util", "createmultisig", &createmultisig, true },
- { "util", "verifymessage", &verifymessage, true },
- { "util", "signmessagewithprivkey", &signmessagewithprivkey, true },
+ { "control", "getinfo", &getinfo, true, {} }, /* uses wallet if enabled */
+ { "control", "getmemoryinfo", &getmemoryinfo, true, {} },
+ { "util", "validateaddress", &validateaddress, true, {"address"} }, /* uses wallet if enabled */
+ { "util", "createmultisig", &createmultisig, true, {"nrequired","keys"} },
+ { "util", "verifymessage", &verifymessage, true, {"address","signature","message"} },
+ { "util", "signmessagewithprivkey", &signmessagewithprivkey, true, {"privkey","message"} },
/* Not shown in help */
- { "hidden", "setmocktime", &setmocktime, true },
+ { "hidden", "setmocktime", &setmocktime, true, {"timestamp"}},
+ { "hidden", "echo", &echo, true, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
+ { "hidden", "echojson", &echo, true, {"arg0","arg1","arg2","arg3","arg4","arg5","arg6","arg7","arg8","arg9"}},
};
void RegisterMiscRPCCommands(CRPCTable &t)
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 2b43f08f0b..27b9963a10 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,8 +6,9 @@
#include "chainparams.h"
#include "clientversion.h"
-#include "main.h"
+#include "validation.h"
#include "net.h"
+#include "net_processing.h"
#include "netbase.h"
#include "protocol.h"
#include "sync.h"
@@ -91,6 +92,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
" \"version\": v, (numeric) The peer version, such as 7001\n"
" \"subver\": \"/Satoshi:0.8.5/\", (string) The string version\n"
" \"inbound\": true|false, (boolean) Inbound (true) or Outbound (false)\n"
+ " \"addnode\": true|false, (boolean) Whether connection was due to addnode and is using an addnode slot\n"
" \"startingheight\": n, (numeric) The starting height (block) of the peer\n"
" \"banscore\": n, (numeric) The ban score\n"
" \"synced_headers\": n, (numeric) The last header we have in common with this peer\n"
@@ -98,13 +100,14 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
" \"inflight\": [\n"
" n, (numeric) The heights of blocks we're currently asking from this peer\n"
" ...\n"
- " ]\n"
+ " ],\n"
+ " \"whitelisted\": true|false, (boolean) Whether the peer is whitelisted\n"
" \"bytessent_per_msg\": {\n"
- " \"addr\": n, (numeric) The total bytes sent aggregated by message type\n"
+ " \"addr\": n, (numeric) The total bytes sent aggregated by message type\n"
" ...\n"
- " }\n"
+ " },\n"
" \"bytesrecv_per_msg\": {\n"
- " \"addr\": n, (numeric) The total bytes received aggregated by message type\n"
+ " \"addr\": n, (numeric) The total bytes received aggregated by message type\n"
" ...\n"
" }\n"
" }\n"
@@ -151,6 +154,7 @@ UniValue getpeerinfo(const JSONRPCRequest& request)
// their ver message.
obj.push_back(Pair("subver", stats.cleanSubVer));
obj.push_back(Pair("inbound", stats.fInbound));
+ obj.push_back(Pair("addnode", stats.fAddnode));
obj.push_back(Pair("startingheight", stats.nStartingHeight));
if (fStateStats) {
obj.push_back(Pair("banscore", statestats.nMisbehavior));
@@ -331,7 +335,7 @@ UniValue getnettotals(const JSONRPCRequest& request)
"{\n"
" \"totalbytesrecv\": n, (numeric) Total bytes received\n"
" \"totalbytessent\": n, (numeric) Total bytes sent\n"
- " \"timemillis\": t, (numeric) Total cpu time\n"
+ " \"timemillis\": t, (numeric) Current UNIX time in milliseconds\n"
" \"uploadtarget\":\n"
" {\n"
" \"timeframe\": n, (numeric) Length of the measuring timeframe in seconds\n"
@@ -401,12 +405,14 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
" \"localrelay\": true|false, (bool) true if transaction relay is requested from peers\n"
" \"timeoffset\": xxxxx, (numeric) the time offset\n"
" \"connections\": xxxxx, (numeric) the number of connections\n"
+ " \"networkactive\": true|false, (bool) whether p2p networking is enabled\n"
" \"networks\": [ (array) information per network\n"
" {\n"
" \"name\": \"xxx\", (string) network (ipv4, ipv6 or onion)\n"
" \"limited\": true|false, (boolean) is the network limited using -onlynet?\n"
" \"reachable\": true|false, (boolean) is the network reachable?\n"
" \"proxy\": \"host:port\" (string) the proxy that is used for this network, or empty if none\n"
+ " \"proxy_randomize_credentials\": true|false, (string) Whether randomized credentials are used\n"
" }\n"
" ,...\n"
" ],\n"
@@ -419,7 +425,7 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
" }\n"
" ,...\n"
" ]\n"
- " \"warnings\": \"...\" (string) any network warnings (such as alert messages) \n"
+ " \"warnings\": \"...\" (string) any network warnings\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getnetworkinfo", "")
@@ -435,8 +441,10 @@ UniValue getnetworkinfo(const JSONRPCRequest& request)
obj.push_back(Pair("localservices", strprintf("%016x", g_connman->GetLocalServices())));
obj.push_back(Pair("localrelay", fRelayTxes));
obj.push_back(Pair("timeoffset", GetTimeOffset()));
- if(g_connman)
+ if (g_connman) {
+ obj.push_back(Pair("networkactive", g_connman->GetNetworkActive()));
obj.push_back(Pair("connections", (int)g_connman->GetNodeCount(CConnman::CONNECTIONS_ALL)));
+ }
obj.push_back(Pair("networks", GetNetworksInfo()));
obj.push_back(Pair("relayfee", ValueFromAmount(::minRelayTxFee.GetFeePerK())));
UniValue localAddresses(UniValue::VARR);
@@ -464,10 +472,10 @@ UniValue setban(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 2 ||
(strCommand != "add" && strCommand != "remove"))
throw runtime_error(
- "setban \"ip(/netmask)\" \"add|remove\" (bantime) (absolute)\n"
+ "setban \"subnet\" \"add|remove\" (bantime) (absolute)\n"
"\nAttempts add or remove a IP/Subnet from the banned list.\n"
"\nArguments:\n"
- "1. \"ip(/netmask)\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
+ "1. \"subnet\" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)\n"
"2. \"command\" (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list\n"
"3. \"bantime\" (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)\n"
"4. \"absolute\" (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)\n"
@@ -571,20 +579,41 @@ UniValue clearbanned(const JSONRPCRequest& request)
return NullUniValue;
}
+UniValue setnetworkactive(const JSONRPCRequest& request)
+{
+ if (request.fHelp || request.params.size() != 1) {
+ throw runtime_error(
+ "setnetworkactive true|false\n"
+ "\nDisable/enable all p2p network activity.\n"
+ "\nArguments:\n"
+ "1. \"state\" (boolean, required) true to enable networking, false to disable\n"
+ );
+ }
+
+ if (!g_connman) {
+ throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ }
+
+ g_connman->SetNetworkActive(request.params[0].get_bool());
+
+ return g_connman->GetNetworkActive();
+}
+
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "network", "getconnectioncount", &getconnectioncount, true },
- { "network", "ping", &ping, true },
- { "network", "getpeerinfo", &getpeerinfo, true },
- { "network", "addnode", &addnode, true },
- { "network", "disconnectnode", &disconnectnode, true },
- { "network", "getaddednodeinfo", &getaddednodeinfo, true },
- { "network", "getnettotals", &getnettotals, true },
- { "network", "getnetworkinfo", &getnetworkinfo, true },
- { "network", "setban", &setban, true },
- { "network", "listbanned", &listbanned, true },
- { "network", "clearbanned", &clearbanned, true },
+ { "network", "getconnectioncount", &getconnectioncount, true, {} },
+ { "network", "ping", &ping, true, {} },
+ { "network", "getpeerinfo", &getpeerinfo, true, {} },
+ { "network", "addnode", &addnode, true, {"node","command"} },
+ { "network", "disconnectnode", &disconnectnode, true, {"node"} },
+ { "network", "getaddednodeinfo", &getaddednodeinfo, true, {"node"} },
+ { "network", "getnettotals", &getnettotals, true, {} },
+ { "network", "getnetworkinfo", &getnetworkinfo, true, {} },
+ { "network", "setban", &setban, true, {"subnet", "command", "bantime", "absolute"} },
+ { "network", "listbanned", &listbanned, true, {} },
+ { "network", "clearbanned", &clearbanned, true, {} },
+ { "network", "setnetworkactive", &setnetworkactive, true, {"state"} },
};
void RegisterNetRPCCommands(CRPCTable &t)
diff --git a/src/rpc/protocol.cpp b/src/rpc/protocol.cpp
index ec186f4fc5..dc710d939f 100644
--- a/src/rpc/protocol.cpp
+++ b/src/rpc/protocol.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h
index c74fa0070f..47e56e712b 100644
--- a/src/rpc/protocol.h
+++ b/src/rpc/protocol.h
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp
index 0656a61755..c10de45f8b 100644
--- a/src/rpc/rawtransaction.cpp
+++ b/src/rpc/rawtransaction.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,7 +10,7 @@
#include "core_io.h"
#include "init.h"
#include "keystore.h"
-#include "main.h"
+#include "validation.h"
#include "merkleblock.h"
#include "net.h"
#include "policy/policy.h"
@@ -82,16 +82,13 @@ void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue& entry)
o.push_back(Pair("hex", HexStr(txin.scriptSig.begin(), txin.scriptSig.end())));
in.push_back(Pair("scriptSig", o));
}
- if (!tx.wit.IsNull()) {
- if (!tx.wit.vtxinwit[i].IsNull()) {
+ if (tx.HasWitness()) {
UniValue txinwitness(UniValue::VARR);
- for (unsigned int j = 0; j < tx.wit.vtxinwit[i].scriptWitness.stack.size(); j++) {
- std::vector<unsigned char> item = tx.wit.vtxinwit[i].scriptWitness.stack[j];
+ for (unsigned int j = 0; j < tx.vin[i].scriptWitness.stack.size(); j++) {
+ std::vector<unsigned char> item = tx.vin[i].scriptWitness.stack[j];
txinwitness.push_back(HexStr(item.begin(), item.end()));
}
in.push_back(Pair("txinwitness", txinwitness));
- }
-
}
in.push_back(Pair("sequence", (int64_t)txin.nSequence));
vin.push_back(in);
@@ -131,21 +128,23 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
"getrawtransaction \"txid\" ( verbose )\n"
- "\nNOTE: By default this function only works sometimes. This is when the tx is in the mempool\n"
- "or there is an unspent output in the utxo for this transaction. To make it always work,\n"
- "you need to maintain a transaction index, using the -txindex command line option.\n"
+
+ "\nNOTE: By default this function only works for mempool transactions. If the -txindex option is\n"
+ "enabled, it also works for blockchain transactions.\n"
+ "DEPRECATED: for now, it also works for transactions with unspent outputs.\n"
+
"\nReturn the raw transaction data.\n"
- "\nIf verbose=0, returns a string that is serialized, hex-encoded data for 'txid'.\n"
- "If verbose is non-zero, returns an Object with information about 'txid'.\n"
+ "\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
+ "If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n"
"\nArguments:\n"
"1. \"txid\" (string, required) The transaction id\n"
- "2. verbose (numeric, optional, default=0) If 0, return a string, other return a json object\n"
+ "2. verbose (bool, optional, default=false) If true, return a string, other return a json object\n"
- "\nResult (if verbose is not set or set to 0):\n"
+ "\nResult (if verbose is not set or set to false):\n"
"\"data\" (string) The serialized, hex-encoded data for 'txid'\n"
- "\nResult (if verbose > 0):\n"
+ "\nResult (if verbose is set to true):\n"
"{\n"
" \"hex\" : \"data\", (string) The serialized, hex-encoded data for 'txid'\n"
" \"txid\" : \"id\", (string) The transaction id (same as provided)\n"
@@ -177,7 +176,7 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
" \"reqSigs\" : n, (numeric) The required sigs\n"
" \"type\" : \"pubkeyhash\", (string) The type, eg 'pubkeyhash'\n"
" \"addresses\" : [ (json array of string)\n"
- " \"bitcoinaddress\" (string) bitcoin address\n"
+ " \"address\" (string) bitcoin address\n"
" ,...\n"
" ]\n"
" }\n"
@@ -192,31 +191,47 @@ UniValue getrawtransaction(const JSONRPCRequest& request)
"\nExamples:\n"
+ HelpExampleCli("getrawtransaction", "\"mytxid\"")
- + HelpExampleCli("getrawtransaction", "\"mytxid\" 1")
- + HelpExampleRpc("getrawtransaction", "\"mytxid\", 1")
+ + HelpExampleCli("getrawtransaction", "\"mytxid\" true")
+ + HelpExampleRpc("getrawtransaction", "\"mytxid\", true")
);
LOCK(cs_main);
uint256 hash = ParseHashV(request.params[0], "parameter 1");
+ // Accept either a bool (true) or a num (>=1) to indicate verbose output.
bool fVerbose = false;
- if (request.params.size() > 1)
- fVerbose = (request.params[1].get_int() != 0);
+ if (request.params.size() > 1) {
+ if (request.params[1].isNum()) {
+ if (request.params[1].get_int() != 0) {
+ fVerbose = true;
+ }
+ }
+ else if(request.params[1].isBool()) {
+ if(request.params[1].isTrue()) {
+ fVerbose = true;
+ }
+ }
+ else {
+ throw JSONRPCError(RPC_TYPE_ERROR, "Invalid type provided. Verbose parameter must be a boolean.");
+ }
+ }
- CTransaction tx;
+ CTransactionRef tx;
uint256 hashBlock;
if (!GetTransaction(hash, tx, Params().GetConsensus(), hashBlock, true))
- throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "No information available about transaction");
+ throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, std::string(fTxIndex ? "No such mempool or blockchain transaction"
+ : "No such mempool transaction. Use -txindex to enable blockchain transaction queries") +
+ ". Use gettransaction for wallet transactions.");
- string strHex = EncodeHexTx(tx);
+ string strHex = EncodeHexTx(*tx, RPCSerializationFlags());
if (!fVerbose)
return strHex;
UniValue result(UniValue::VOBJ);
result.push_back(Pair("hex", strHex));
- TxToJSON(tx, hashBlock, result);
+ TxToJSON(*tx, hashBlock, result);
return result;
}
@@ -237,7 +252,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request)
" \"txid\" (string) A transaction hash\n"
" ,...\n"
" ]\n"
- "2. \"block hash\" (string, optional) If specified, looks for txid in the block with this hash\n"
+ "2. \"blockhash\" (string, optional) If specified, looks for txid in the block with this hash\n"
"\nResult:\n"
"\"data\" (string) A string that is a serialized, hex-encoded data for the proof.\n"
);
@@ -275,7 +290,7 @@ UniValue gettxoutproof(const JSONRPCRequest& request)
if (pblockindex == NULL)
{
- CTransaction tx;
+ CTransactionRef tx;
if (!GetTransaction(oneTxid, tx, Params().GetConsensus(), hashBlock, false) || hashBlock.IsNull())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Transaction not yet in block");
if (!mapBlockIndex.count(hashBlock))
@@ -288,8 +303,8 @@ UniValue gettxoutproof(const JSONRPCRequest& request)
throw JSONRPCError(RPC_INTERNAL_ERROR, "Can't read block from disk");
unsigned int ntxFound = 0;
- BOOST_FOREACH(const CTransaction&tx, block.vtx)
- if (setTxids.count(tx.GetHash()))
+ for (const auto& tx : block.vtx)
+ if (setTxids.count(tx->GetHash()))
ntxFound++;
if (ntxFound != setTxids.size())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "(Not all) transactions not found in specified block");
@@ -347,26 +362,26 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
"it is not stored in the wallet or transmitted to the network.\n"
"\nArguments:\n"
- "1. \"transactions\" (string, required) A json array of json objects\n"
+ "1. \"inputs\" (string, required) A json array of json objects\n"
" [\n"
" {\n"
" \"txid\":\"id\", (string, required) The transaction id\n"
- " \"vout\":n (numeric, required) The output number\n"
- " \"sequence\":n (numeric, optional) The sequence number\n"
- " }\n"
+ " \"vout\":n, (numeric, required) The output number\n"
+ " \"sequence\":n (numeric, optional) The sequence number\n"
+ " } \n"
" ,...\n"
" ]\n"
- "2. \"outputs\" (string, required) a json object with outputs\n"
+ "2. \"outputs\" (string, required) a json object with outputs\n"
" {\n"
- " \"address\": x.xxx (numeric or string, required) The key is the bitcoin address, the numeric value (can be string) is the " + CURRENCY_UNIT + " amount\n"
- " \"data\": \"hex\", (string, required) The key is \"data\", the value is hex encoded data\n"
- " ...\n"
+ " \"address\": x.xxx, (numeric or string, required) The key is the bitcoin address, the numeric value (can be string) is the " + CURRENCY_UNIT + " amount\n"
+ " \"data\": \"hex\" (string, required) The key is \"data\", the value is hex encoded data\n"
+ " ,...\n"
" }\n"
- "3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
+ "3. locktime (numeric, optional, default=0) Raw locktime. Non-0 value also locktime-activates inputs\n"
"\nResult:\n"
- "\"transaction\" (string) hex string of the transaction\n"
+ "\"transaction\" (string) hex string of the transaction\n"
- "\nExamples\n"
+ "\nExamples:\n"
+ HelpExampleCli("createrawtransaction", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"address\\\":0.01}\"")
+ HelpExampleCli("createrawtransaction", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\" \"{\\\"data\\\":\\\"00010203\\\"}\"")
+ HelpExampleRpc("createrawtransaction", "\"[{\\\"txid\\\":\\\"myid\\\",\\\"vout\\\":0}]\", \"{\\\"address\\\":0.01}\"")
@@ -456,7 +471,7 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
"\nReturn a JSON object representing the serialized, hex-encoded transaction.\n"
"\nArguments:\n"
- "1. \"hex\" (string, required) The transaction hex string\n"
+ "1. \"hexstring\" (string, required) The transaction hex string\n"
"\nResult:\n"
"{\n"
@@ -506,13 +521,13 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
LOCK(cs_main);
RPCTypeCheck(request.params, boost::assign::list_of(UniValue::VSTR));
- CTransaction tx;
+ CMutableTransaction mtx;
- if (!DecodeHexTx(tx, request.params[0].get_str(), true))
+ if (!DecodeHexTx(mtx, request.params[0].get_str(), true))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
UniValue result(UniValue::VOBJ);
- TxToJSON(tx, uint256(), result);
+ TxToJSON(CTransaction(std::move(mtx)), uint256(), result);
return result;
}
@@ -521,10 +536,10 @@ UniValue decodescript(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "decodescript \"hex\"\n"
+ "decodescript \"hexstring\"\n"
"\nDecode a hex-encoded script.\n"
"\nArguments:\n"
- "1. \"hex\" (string) the hex encoded script\n"
+ "1. \"hexstring\" (string) the hex encoded script\n"
"\nResult:\n"
"{\n"
" \"asm\":\"asm\", (string) Script public key\n"
@@ -605,7 +620,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
" }\n"
" ,...\n"
" ]\n"
- "3. \"privatekeys\" (string, optional) A json array of base58-encoded private keys for signing\n"
+ "3. \"privkeys\" (string, optional) A json array of base58-encoded private keys for signing\n"
" [ (json array of strings, or 'null' if none provided)\n"
" \"privatekey\" (string) private key in base58-encoding\n"
" ,...\n"
@@ -826,7 +841,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
UpdateTransaction(mergedTx, i, sigdata);
ScriptError serror = SCRIPT_ERR_OK;
- if (!VerifyScript(txin.scriptSig, prevPubKey, mergedTx.wit.vtxinwit.size() > i ? &mergedTx.wit.vtxinwit[i].scriptWitness : NULL, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) {
+ if (!VerifyScript(txin.scriptSig, prevPubKey, &txin.scriptWitness, STANDARD_SCRIPT_VERIFY_FLAGS, TransactionSignatureChecker(&txConst, i, amount), &serror)) {
TxInErrorToJSON(txin, vErrors, ScriptErrorString(serror));
}
}
@@ -869,10 +884,11 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
RPCTypeCheck(request.params, boost::assign::list_of(UniValue::VSTR)(UniValue::VBOOL));
// parse hex string from parameter
- CTransaction tx;
- if (!DecodeHexTx(tx, request.params[0].get_str()))
+ CMutableTransaction mtx;
+ if (!DecodeHexTx(mtx, request.params[0].get_str()))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
- uint256 hashTx = tx.GetHash();
+ CTransactionRef tx(MakeTransactionRef(std::move(mtx)));
+ const uint256& hashTx = tx->GetHash();
bool fLimitFree = false;
CAmount nMaxRawTxFee = maxTxFee;
@@ -887,7 +903,7 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
// push to local node and sync with wallets
CValidationState state;
bool fMissingInputs;
- if (!AcceptToMemoryPool(mempool, state, tx, fLimitFree, &fMissingInputs, false, nMaxRawTxFee)) {
+ if (!AcceptToMemoryPool(mempool, state, std::move(tx), fLimitFree, &fMissingInputs, NULL, false, nMaxRawTxFee)) {
if (state.IsInvalid()) {
throw JSONRPCError(RPC_TRANSACTION_REJECTED, strprintf("%i: %s", state.GetRejectCode(), state.GetRejectReason()));
} else {
@@ -914,15 +930,15 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "rawtransactions", "getrawtransaction", &getrawtransaction, true },
- { "rawtransactions", "createrawtransaction", &createrawtransaction, true },
- { "rawtransactions", "decoderawtransaction", &decoderawtransaction, true },
- { "rawtransactions", "decodescript", &decodescript, true },
- { "rawtransactions", "sendrawtransaction", &sendrawtransaction, false },
- { "rawtransactions", "signrawtransaction", &signrawtransaction, false }, /* uses wallet if enabled */
-
- { "blockchain", "gettxoutproof", &gettxoutproof, true },
- { "blockchain", "verifytxoutproof", &verifytxoutproof, true },
+ { "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose"} },
+ { "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"transactions","outputs","locktime"} },
+ { "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
+ { "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
+ { "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
+ { "rawtransactions", "signrawtransaction", &signrawtransaction, false, {"hexstring","prevtxs","privkeys","sighashtype"} }, /* uses wallet if enabled */
+
+ { "blockchain", "gettxoutproof", &gettxoutproof, true, {"txids", "blockhash"} },
+ { "blockchain", "verifytxoutproof", &verifytxoutproof, true, {"proof"} },
};
void RegisterRawTransactionRPCCommands(CRPCTable &t)
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
index 164e0f00e2..1b94e10071 100644
--- a/src/rpc/server.cpp
+++ b/src/rpc/server.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -26,6 +26,7 @@
#include <boost/algorithm/string/case_conv.hpp> // for to_upper()
#include <memory> // for unique_ptr
+#include <unordered_map>
using namespace RPCServer;
using namespace std;
@@ -268,11 +269,11 @@ UniValue stop(const JSONRPCRequest& jsonRequest)
* Call Table
*/
static const CRPCCommand vRPCCommands[] =
-{ // category name actor (function) okSafeMode
- // --------------------- ------------------------ ----------------------- ----------
+{ // category name actor (function) okSafe argNames
+ // --------------------- ------------------------ ----------------------- ------ ----------
/* Overall control/query calls */
- { "control", "help", &help, true },
- { "control", "stop", &stop, true },
+ { "control", "help", &help, true, {"command"} },
+ { "control", "stop", &stop, true, {} },
};
CRPCTable::CRPCTable()
@@ -379,12 +380,12 @@ void JSONRPCRequest::parse(const UniValue& valRequest)
// Parse params
UniValue valParams = find_value(request, "params");
- if (valParams.isArray())
- params = valParams.get_array();
+ if (valParams.isArray() || valParams.isObject())
+ params = valParams;
else if (valParams.isNull())
params = UniValue(UniValue::VARR);
else
- throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array");
+ throw JSONRPCError(RPC_INVALID_REQUEST, "Params must be an array or object");
}
static UniValue JSONRPCExecOne(const UniValue& req)
@@ -420,6 +421,48 @@ std::string JSONRPCExecBatch(const UniValue& vReq)
return ret.write() + "\n";
}
+/**
+ * Process named arguments into a vector of positional arguments, based on the
+ * passed-in specification for the RPC call's arguments.
+ */
+static inline JSONRPCRequest transformNamedArguments(const JSONRPCRequest& in, const std::vector<std::string>& argNames)
+{
+ JSONRPCRequest out = in;
+ out.params = UniValue(UniValue::VARR);
+ // Build a map of parameters, and remove ones that have been processed, so that we can throw a focused error if
+ // there is an unknown one.
+ const std::vector<std::string>& keys = in.params.getKeys();
+ const std::vector<UniValue>& values = in.params.getValues();
+ std::unordered_map<std::string, const UniValue*> argsIn;
+ for (size_t i=0; i<keys.size(); ++i) {
+ argsIn[keys[i]] = &values[i];
+ }
+ // Process expected parameters.
+ int hole = 0;
+ for (const std::string &argName: argNames) {
+ auto fr = argsIn.find(argName);
+ if (fr != argsIn.end()) {
+ for (int i = 0; i < hole; ++i) {
+ // Fill hole between specified parameters with JSON nulls,
+ // but not at the end (for backwards compatibility with calls
+ // that act based on number of specified parameters).
+ out.params.push_back(UniValue());
+ }
+ hole = 0;
+ out.params.push_back(*fr->second);
+ argsIn.erase(fr);
+ } else {
+ hole += 1;
+ }
+ }
+ // If there are still arguments in the argsIn map, this is an error.
+ if (!argsIn.empty()) {
+ throw JSONRPCError(RPC_INVALID_PARAMETER, "Unknown named parameter " + argsIn.begin()->first);
+ }
+ // Return request with named arguments transformed to positional arguments
+ return out;
+}
+
UniValue CRPCTable::execute(const JSONRPCRequest &request) const
{
// Return immediately if in warmup
@@ -438,8 +481,12 @@ UniValue CRPCTable::execute(const JSONRPCRequest &request) const
try
{
- // Execute
- return pcmd->actor(request);
+ // Execute, convert arguments to array if necessary
+ if (request.params.isObject()) {
+ return pcmd->actor(transformNamedArguments(request, pcmd->argNames));
+ } else {
+ return pcmd->actor(request);
+ }
}
catch (const std::exception& e)
{
@@ -497,4 +544,12 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000)));
}
+int RPCSerializationFlags()
+{
+ int flag = 0;
+ if (GetArg("-rpcserialversion", DEFAULT_RPC_SERIALIZE_VERSION) == 0)
+ flag |= SERIALIZE_TRANSACTION_NO_WITNESS;
+ return flag;
+}
+
CRPCTable tableRPC;
diff --git a/src/rpc/server.h b/src/rpc/server.h
index c59886222c..fed3d8c90f 100644
--- a/src/rpc/server.h
+++ b/src/rpc/server.h
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,6 +19,8 @@
#include <univalue.h>
+static const unsigned int DEFAULT_RPC_SERIALIZE_VERSION = 1;
+
class CRPCCommand;
namespace RPCServer
@@ -134,6 +136,7 @@ public:
std::string name;
rpcfn_type actor;
bool okSafeMode;
+ std::vector<std::string> argNames;
};
/**
@@ -198,4 +201,7 @@ void StopRPC();
std::string JSONRPCExecBatch(const UniValue& vReq);
void RPCNotifyBlockChange(bool ibd, const CBlockIndex *);
+// Retrieves any serialization flags requested in command line argument
+int RPCSerializationFlags();
+
#endif // BITCOIN_RPCSERVER_H
diff --git a/src/scheduler.cpp b/src/scheduler.cpp
index 52777b61f9..b01170074d 100644
--- a/src/scheduler.cpp
+++ b/src/scheduler.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -54,9 +54,10 @@ void CScheduler::serviceQueue()
#else
// Some boost versions have a conflicting overload of wait_until that returns void.
// Explicitly use a template here to avoid hitting that overload.
- while (!shouldStop() && !taskQueue.empty() &&
- newTaskScheduled.wait_until<>(lock, taskQueue.begin()->first) != boost::cv_status::timeout) {
- // Keep waiting until timeout
+ while (!shouldStop() && !taskQueue.empty()) {
+ boost::chrono::system_clock::time_point timeToWaitFor = taskQueue.begin()->first;
+ if (newTaskScheduled.wait_until<>(lock, timeToWaitFor) == boost::cv_status::timeout)
+ break; // Exit loop after timeout, it means we reached the time of the event
}
#endif
// If there are multiple threads, the queue can empty while we're waiting (another
diff --git a/src/script/bitcoinconsensus.cpp b/src/script/bitcoinconsensus.cpp
index b629f4278b..c4ab441e2c 100644
--- a/src/script/bitcoinconsensus.cpp
+++ b/src/script/bitcoinconsensus.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -23,7 +23,7 @@ public:
m_remaining(txToLen)
{}
- TxInputStream& read(char* pch, size_t nSize)
+ void read(char* pch, size_t nSize)
{
if (nSize > m_remaining)
throw std::ios_base::failure(std::string(__func__) + ": end of data");
@@ -37,16 +37,17 @@ public:
memcpy(pch, m_data, nSize);
m_remaining -= nSize;
m_data += nSize;
- return *this;
}
template<typename T>
TxInputStream& operator>>(T& obj)
{
- ::Unserialize(*this, obj, m_type, m_version);
+ ::Unserialize(*this, obj);
return *this;
}
+ int GetVersion() const { return m_version; }
+ int GetType() const { return m_type; }
private:
const int m_type;
const int m_version;
@@ -69,23 +70,32 @@ struct ECCryptoClosure
ECCryptoClosure instance_of_eccryptoclosure;
}
+/** Check that all specified flags are part of the libconsensus interface. */
+static bool verify_flags(unsigned int flags)
+{
+ return (flags & ~(bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL)) == 0;
+}
+
static int verify_script(const unsigned char *scriptPubKey, unsigned int scriptPubKeyLen, CAmount amount,
const unsigned char *txTo , unsigned int txToLen,
unsigned int nIn, unsigned int flags, bitcoinconsensus_error* err)
{
+ if (!verify_flags(flags)) {
+ return bitcoinconsensus_ERR_INVALID_FLAGS;
+ }
try {
TxInputStream stream(SER_NETWORK, PROTOCOL_VERSION, txTo, txToLen);
- CTransaction tx;
- stream >> tx;
+ CTransaction tx(deserialize, stream);
if (nIn >= tx.vin.size())
return set_error(err, bitcoinconsensus_ERR_TX_INDEX);
- if (tx.GetSerializeSize(SER_NETWORK, PROTOCOL_VERSION) != txToLen)
+ if (GetSerializeSize(tx, SER_NETWORK, PROTOCOL_VERSION) != txToLen)
return set_error(err, bitcoinconsensus_ERR_TX_SIZE_MISMATCH);
// Regardless of the verification result, the tx did not error.
set_error(err, bitcoinconsensus_ERR_OK);
+
PrecomputedTransactionData txdata(tx);
- return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), nIn < tx.wit.vtxinwit.size() ? &tx.wit.vtxinwit[nIn].scriptWitness : NULL, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL);
+ return VerifyScript(tx.vin[nIn].scriptSig, CScript(scriptPubKey, scriptPubKey + scriptPubKeyLen), &tx.vin[nIn].scriptWitness, flags, TransactionSignatureChecker(&tx, nIn, amount, txdata), NULL);
} catch (const std::exception&) {
return set_error(err, bitcoinconsensus_ERR_TX_DESERIALIZE); // Error deserializing
}
diff --git a/src/script/bitcoinconsensus.h b/src/script/bitcoinconsensus.h
index 1d2d5c23e4..1bef4fe9e9 100644
--- a/src/script/bitcoinconsensus.h
+++ b/src/script/bitcoinconsensus.h
@@ -42,6 +42,7 @@ typedef enum bitcoinconsensus_error_t
bitcoinconsensus_ERR_TX_SIZE_MISMATCH,
bitcoinconsensus_ERR_TX_DESERIALIZE,
bitcoinconsensus_ERR_AMOUNT_REQUIRED,
+ bitcoinconsensus_ERR_INVALID_FLAGS,
} bitcoinconsensus_error;
/** Script verification flags */
@@ -54,6 +55,9 @@ enum
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9), // enable CHECKLOCKTIMEVERIFY (BIP65)
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10), // enable CHECKSEQUENCEVERIFY (BIP112)
bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS = (1U << 11), // enable WITNESS (BIP141)
+ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL = bitcoinconsensus_SCRIPT_FLAGS_VERIFY_P2SH | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_DERSIG |
+ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_NULLDUMMY | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKLOCKTIMEVERIFY |
+ bitcoinconsensus_SCRIPT_FLAGS_VERIFY_CHECKSEQUENCEVERIFY | bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS
};
/// Returns 1 if the input nIn of the serialized transaction pointed to by
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 0e17ddc130..f9b7835882 100644
--- a/src/script/interpreter.cpp
+++ b/src/script/interpreter.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -856,15 +856,15 @@ bool EvalScript(vector<vector<unsigned char> >& stack, const CScript& script, un
valtype& vch = stacktop(-1);
valtype vchHash((opcode == OP_RIPEMD160 || opcode == OP_SHA1 || opcode == OP_HASH160) ? 20 : 32);
if (opcode == OP_RIPEMD160)
- CRIPEMD160().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
+ CRIPEMD160().Write(vch.data(), vch.size()).Finalize(vchHash.data());
else if (opcode == OP_SHA1)
- CSHA1().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
+ CSHA1().Write(vch.data(), vch.size()).Finalize(vchHash.data());
else if (opcode == OP_SHA256)
- CSHA256().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
+ CSHA256().Write(vch.data(), vch.size()).Finalize(vchHash.data());
else if (opcode == OP_HASH160)
- CHash160().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
+ CHash160().Write(vch.data(), vch.size()).Finalize(vchHash.data());
else if (opcode == OP_HASH256)
- CHash256().Write(begin_ptr(vch), vch.size()).Finalize(begin_ptr(vchHash));
+ CHash256().Write(vch.data(), vch.size()).Finalize(vchHash.data());
popstack(stack);
stack.push_back(vchHash);
}
@@ -1069,7 +1069,7 @@ public:
/** Serialize the passed scriptCode, skipping OP_CODESEPARATORs */
template<typename S>
- void SerializeScriptCode(S &s, int nType, int nVersion) const {
+ void SerializeScriptCode(S &s) const {
CScript::const_iterator it = scriptCode.begin();
CScript::const_iterator itBegin = it;
opcodetype opcode;
@@ -1092,53 +1092,53 @@ public:
/** Serialize an input of txTo */
template<typename S>
- void SerializeInput(S &s, unsigned int nInput, int nType, int nVersion) const {
+ void SerializeInput(S &s, unsigned int nInput) const {
// In case of SIGHASH_ANYONECANPAY, only the input being signed is serialized
if (fAnyoneCanPay)
nInput = nIn;
// Serialize the prevout
- ::Serialize(s, txTo.vin[nInput].prevout, nType, nVersion);
+ ::Serialize(s, txTo.vin[nInput].prevout);
// Serialize the script
if (nInput != nIn)
// Blank out other inputs' signatures
- ::Serialize(s, CScriptBase(), nType, nVersion);
+ ::Serialize(s, CScriptBase());
else
- SerializeScriptCode(s, nType, nVersion);
+ SerializeScriptCode(s);
// Serialize the nSequence
if (nInput != nIn && (fHashSingle || fHashNone))
// let the others update at will
- ::Serialize(s, (int)0, nType, nVersion);
+ ::Serialize(s, (int)0);
else
- ::Serialize(s, txTo.vin[nInput].nSequence, nType, nVersion);
+ ::Serialize(s, txTo.vin[nInput].nSequence);
}
/** Serialize an output of txTo */
template<typename S>
- void SerializeOutput(S &s, unsigned int nOutput, int nType, int nVersion) const {
+ void SerializeOutput(S &s, unsigned int nOutput) const {
if (fHashSingle && nOutput != nIn)
// Do not lock-in the txout payee at other indices as txin
- ::Serialize(s, CTxOut(), nType, nVersion);
+ ::Serialize(s, CTxOut());
else
- ::Serialize(s, txTo.vout[nOutput], nType, nVersion);
+ ::Serialize(s, txTo.vout[nOutput]);
}
/** Serialize txTo */
template<typename S>
- void Serialize(S &s, int nType, int nVersion) const {
+ void Serialize(S &s) const {
// Serialize nVersion
- ::Serialize(s, txTo.nVersion, nType, nVersion);
+ ::Serialize(s, txTo.nVersion);
// Serialize vin
unsigned int nInputs = fAnyoneCanPay ? 1 : txTo.vin.size();
::WriteCompactSize(s, nInputs);
for (unsigned int nInput = 0; nInput < nInputs; nInput++)
- SerializeInput(s, nInput, nType, nVersion);
+ SerializeInput(s, nInput);
// Serialize vout
unsigned int nOutputs = fHashNone ? 0 : (fHashSingle ? nIn+1 : txTo.vout.size());
::WriteCompactSize(s, nOutputs);
for (unsigned int nOutput = 0; nOutput < nOutputs; nOutput++)
- SerializeOutput(s, nOutput, nType, nVersion);
+ SerializeOutput(s, nOutput);
// Serialize nLockTime
- ::Serialize(s, txTo.nLockTime, nType, nVersion);
+ ::Serialize(s, txTo.nLockTime);
}
};
diff --git a/src/script/ismine.cpp b/src/script/ismine.cpp
index 7467d23b2d..608a8de8f5 100644
--- a/src/script/ismine.cpp
+++ b/src/script/ismine.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/ismine.h b/src/script/ismine.h
index ec7a620e33..1aa5937b34 100644
--- a/src/script/ismine.h
+++ b/src/script/ismine.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/script.cpp b/src/script/script.cpp
index ddf6775569..828ce1a056 100644
--- a/src/script/script.cpp
+++ b/src/script/script.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/script.h b/src/script/script.h
index 278774d32e..654dff4625 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -394,7 +394,6 @@ protected:
}
public:
CScript() { }
- CScript(const CScript& b) : CScriptBase(b.begin(), b.end()) { }
CScript(const_iterator pbegin, const_iterator pend) : CScriptBase(pbegin, pend) { }
CScript(std::vector<unsigned char>::const_iterator pbegin, std::vector<unsigned char>::const_iterator pend) : CScriptBase(pbegin, pend) { }
CScript(const unsigned char* pbegin, const unsigned char* pend) : CScriptBase(pbegin, pend) { }
@@ -656,6 +655,8 @@ struct CScriptWitness
bool IsNull() const { return stack.empty(); }
+ void SetNull() { stack.clear(); stack.shrink_to_fit(); }
+
std::string ToString() const;
};
diff --git a/src/script/script_error.cpp b/src/script/script_error.cpp
index 2c5359fe8a..c9d13c92a8 100644
--- a/src/script/script_error.cpp
+++ b/src/script/script_error.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/script_error.h b/src/script/script_error.h
index 430836991b..3200e94707 100644
--- a/src/script/script_error.h
+++ b/src/script/script_error.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/sigcache.cpp b/src/script/sigcache.cpp
index bdc0bfdc1c..09bedc5460 100644
--- a/src/script/sigcache.cpp
+++ b/src/script/sigcache.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,20 +11,29 @@
#include "uint256.h"
#include "util.h"
+#include "cuckoocache.h"
#include <boost/thread.hpp>
-#include <boost/unordered_set.hpp>
namespace {
/**
* We're hashing a nonce into the entries themselves, so we don't need extra
* blinding in the set hash computation.
+ *
+ * This may exhibit platform endian dependent behavior but because these are
+ * nonced hashes (random) and this state is only ever used locally it is safe.
+ * All that matters is local consistency.
*/
-class CSignatureCacheHasher
+class SignatureCacheHasher
{
public:
- size_t operator()(const uint256& key) const {
- return key.GetCheapHash();
+ template <uint8_t hash_select>
+ uint32_t operator()(const uint256& key) const
+ {
+ static_assert(hash_select <8, "SignatureCacheHasher only has 8 hashes available.");
+ uint32_t u;
+ std::memcpy(&u, key.begin()+4*hash_select, 4);
+ return u;
}
};
@@ -38,11 +47,10 @@ class CSignatureCache
private:
//! Entries are SHA256(nonce || signature hash || public key || signature):
uint256 nonce;
- typedef boost::unordered_set<uint256, CSignatureCacheHasher> map_type;
+ typedef CuckooCache::cache<uint256, SignatureCacheHasher> map_type;
map_type setValid;
boost::shared_mutex cs_sigcache;
-
public:
CSignatureCache()
{
@@ -56,58 +64,51 @@ public:
}
bool
- Get(const uint256& entry)
+ Get(const uint256& entry, const bool erase)
{
boost::shared_lock<boost::shared_mutex> lock(cs_sigcache);
- return setValid.count(entry);
+ return setValid.contains(entry, erase);
}
- void Erase(const uint256& entry)
+ void Set(uint256& entry)
{
boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
- setValid.erase(entry);
+ setValid.insert(entry);
}
-
- void Set(const uint256& entry)
+ uint32_t setup_bytes(size_t n)
{
- size_t nMaxCacheSize = GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20);
- if (nMaxCacheSize <= 0) return;
-
- boost::unique_lock<boost::shared_mutex> lock(cs_sigcache);
- while (memusage::DynamicUsage(setValid) > nMaxCacheSize)
- {
- map_type::size_type s = GetRand(setValid.bucket_count());
- map_type::local_iterator it = setValid.begin(s);
- if (it != setValid.end(s)) {
- setValid.erase(*it);
- }
- }
-
- setValid.insert(entry);
+ return setValid.setup_bytes(n);
}
};
+/* In previous versions of this code, signatureCache was a local static variable
+ * in CachingTransactionSignatureChecker::VerifySignature. We initialize
+ * signatureCache outside of VerifySignature to avoid the atomic operation per
+ * call overhead associated with local static variables even though
+ * signatureCache could be made local to VerifySignature.
+*/
+static CSignatureCache signatureCache;
}
-bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
+// To be called once in AppInit2/TestingSetup to initialize the signatureCache
+void InitSignatureCache()
{
- static CSignatureCache signatureCache;
+ size_t nMaxCacheSize = GetArg("-maxsigcachesize", DEFAULT_MAX_SIG_CACHE_SIZE) * ((size_t) 1 << 20);
+ if (nMaxCacheSize <= 0) return;
+ size_t nElems = signatureCache.setup_bytes(nMaxCacheSize);
+ LogPrintf("Using %zu MiB out of %zu requested for signature cache, able to store %zu elements\n",
+ (nElems*sizeof(uint256)) >>20, nMaxCacheSize>>20, nElems);
+}
+bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const
+{
uint256 entry;
signatureCache.ComputeEntry(entry, sighash, vchSig, pubkey);
-
- if (signatureCache.Get(entry)) {
- if (!store) {
- signatureCache.Erase(entry);
- }
+ if (signatureCache.Get(entry, !store))
return true;
- }
-
if (!TransactionSignatureChecker::VerifySignature(vchSig, pubkey, sighash))
return false;
-
- if (store) {
+ if (store)
signatureCache.Set(entry);
- }
return true;
}
diff --git a/src/script/sigcache.h b/src/script/sigcache.h
index 44551ec2bc..c123a9ba0f 100644
--- a/src/script/sigcache.h
+++ b/src/script/sigcache.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,9 +10,10 @@
#include <vector>
-// DoS prevention: limit cache size to less than 40MB (over 500000
-// entries on 64-bit systems).
-static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 40;
+// DoS prevention: limit cache size to 32MB (over 1000000 entries on 64-bit
+// systems). Due to how we count cache size, actual memory usage is slightly
+// more (~32.25 MB)
+static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE = 32;
class CPubKey;
@@ -27,4 +28,6 @@ public:
bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
};
+void InitSignatureCache();
+
#endif // BITCOIN_SCRIPT_SIGCACHE_H
diff --git a/src/script/sign.cpp b/src/script/sign.cpp
index f552ad5bba..b008df2591 100644
--- a/src/script/sign.cpp
+++ b/src/script/sign.cpp
@@ -194,9 +194,7 @@ SignatureData DataFromTransaction(const CMutableTransaction& tx, unsigned int nI
SignatureData data;
assert(tx.vin.size() > nIn);
data.scriptSig = tx.vin[nIn].scriptSig;
- if (tx.wit.vtxinwit.size() > nIn) {
- data.scriptWitness = tx.wit.vtxinwit[nIn].scriptWitness;
- }
+ data.scriptWitness = tx.vin[nIn].scriptWitness;
return data;
}
@@ -204,10 +202,7 @@ void UpdateTransaction(CMutableTransaction& tx, unsigned int nIn, const Signatur
{
assert(tx.vin.size() > nIn);
tx.vin[nIn].scriptSig = data.scriptSig;
- if (!data.scriptWitness.IsNull() || tx.wit.vtxinwit.size() > nIn) {
- tx.wit.vtxinwit.resize(tx.vin.size());
- tx.wit.vtxinwit[nIn].scriptWitness = data.scriptWitness;
- }
+ tx.vin[nIn].scriptWitness = data.scriptWitness;
}
bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutableTransaction& txTo, unsigned int nIn, const CAmount& amount, int nHashType)
diff --git a/src/script/sign.h b/src/script/sign.h
index f9aa6fca27..1cfc53c6c1 100644
--- a/src/script/sign.h
+++ b/src/script/sign.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/standard.cpp b/src/script/standard.cpp
index bb178f49fe..4b9bec9aa1 100644
--- a/src/script/standard.cpp
+++ b/src/script/standard.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/script/standard.h b/src/script/standard.h
index 72aaea0b7b..097e0c3748 100644
--- a/src/script/standard.h
+++ b/src/script/standard.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/secp256k1/.gitignore b/src/secp256k1/.gitignore
index efb277d347..87fea161ba 100644
--- a/src/secp256k1/.gitignore
+++ b/src/secp256k1/.gitignore
@@ -6,6 +6,7 @@ bench_schnorr_verify
bench_recover
bench_internal
tests
+exhaustive_tests
gen_context
*.exe
*.so
diff --git a/src/secp256k1/.travis.yml b/src/secp256k1/.travis.yml
index 2c5c63adad..2439529242 100644
--- a/src/secp256k1/.travis.yml
+++ b/src/secp256k1/.travis.yml
@@ -11,7 +11,7 @@ cache:
- src/java/guava/
env:
global:
- - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no schnorr=no RECOVERY=no EXPERIMENTAL=no
+ - FIELD=auto BIGNUM=auto SCALAR=auto ENDOMORPHISM=no STATICPRECOMPUTATION=yes ASM=no BUILD=check EXTRAFLAGS= HOST= ECDH=no RECOVERY=no EXPERIMENTAL=no
- GUAVA_URL=https://search.maven.org/remotecontent?filepath=com/google/guava/guava/18.0/guava-18.0.jar GUAVA_JAR=src/java/guava/guava-18.0.jar
matrix:
- SCALAR=32bit RECOVERY=yes
@@ -22,15 +22,14 @@ env:
- FIELD=64bit ENDOMORPHISM=yes ECDH=yes EXPERIMENTAL=yes
- FIELD=64bit ASM=x86_64
- FIELD=64bit ENDOMORPHISM=yes ASM=x86_64
- - FIELD=32bit SCHNORR=yes EXPERIMENTAL=yes
- FIELD=32bit ENDOMORPHISM=yes
- BIGNUM=no
- - BIGNUM=no ENDOMORPHISM=yes SCHNORR=yes RECOVERY=yes EXPERIMENTAL=yes
+ - BIGNUM=no ENDOMORPHISM=yes RECOVERY=yes EXPERIMENTAL=yes
- BIGNUM=no STATICPRECOMPUTATION=no
- BUILD=distcheck
- EXTRAFLAGS=CPPFLAGS=-DDETERMINISTIC
- EXTRAFLAGS=CFLAGS=-O0
- - BUILD=check-java ECDH=yes SCHNORR=yes EXPERIMENTAL=yes
+ - BUILD=check-java ECDH=yes EXPERIMENTAL=yes
matrix:
fast_finish: true
include:
@@ -66,5 +65,5 @@ before_script: ./autogen.sh
script:
- if [ -n "$HOST" ]; then export USE_HOST="--host=$HOST"; fi
- if [ "x$HOST" = "xi686-linux-gnu" ]; then export CC="$CC -m32"; fi
- - ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-schnorr=$SCHNORR --enable-module-recovery=$RECOVERY $EXTRAFLAGS $USE_HOST && make -j2 $BUILD
+ - ./configure --enable-experimental=$EXPERIMENTAL --enable-endomorphism=$ENDOMORPHISM --with-field=$FIELD --with-bignum=$BIGNUM --with-scalar=$SCALAR --enable-ecmult-static-precomputation=$STATICPRECOMPUTATION --enable-module-ecdh=$ECDH --enable-module-recovery=$RECOVERY $EXTRAFLAGS $USE_HOST && make -j2 $BUILD
os: linux
diff --git a/src/secp256k1/Makefile.am b/src/secp256k1/Makefile.am
index 3d130bdcbd..e5657f7f31 100644
--- a/src/secp256k1/Makefile.am
+++ b/src/secp256k1/Makefile.am
@@ -12,9 +12,11 @@ noinst_HEADERS =
noinst_HEADERS += src/scalar.h
noinst_HEADERS += src/scalar_4x64.h
noinst_HEADERS += src/scalar_8x32.h
+noinst_HEADERS += src/scalar_low.h
noinst_HEADERS += src/scalar_impl.h
noinst_HEADERS += src/scalar_4x64_impl.h
noinst_HEADERS += src/scalar_8x32_impl.h
+noinst_HEADERS += src/scalar_low_impl.h
noinst_HEADERS += src/group.h
noinst_HEADERS += src/group_impl.h
noinst_HEADERS += src/num_gmp.h
@@ -87,13 +89,23 @@ bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
endif
+TESTS =
if USE_TESTS
noinst_PROGRAMS += tests
tests_SOURCES = src/tests.c
tests_CPPFLAGS = -DSECP256K1_BUILD -DVERIFY -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
tests_LDFLAGS = -static
-TESTS = tests
+TESTS += tests
+endif
+
+if USE_EXHAUSTIVE_TESTS
+noinst_PROGRAMS += exhaustive_tests
+exhaustive_tests_SOURCES = src/tests_exhaustive.c
+exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -DVERIFY -I$(top_srcdir)/src $(SECP_INCLUDES)
+exhaustive_tests_LDADD = $(SECP_LIBS)
+exhaustive_tests_LDFLAGS = -static
+TESTS += exhaustive_tests
endif
JAVAROOT=src/java
@@ -154,10 +166,6 @@ if ENABLE_MODULE_ECDH
include src/modules/ecdh/Makefile.am.include
endif
-if ENABLE_MODULE_SCHNORR
-include src/modules/schnorr/Makefile.am.include
-endif
-
if ENABLE_MODULE_RECOVERY
include src/modules/recovery/Makefile.am.include
endif
diff --git a/src/secp256k1/build-aux/m4/bitcoin_secp.m4 b/src/secp256k1/build-aux/m4/bitcoin_secp.m4
index b25d8adb92..b74acb8c13 100644
--- a/src/secp256k1/build-aux/m4/bitcoin_secp.m4
+++ b/src/secp256k1/build-aux/m4/bitcoin_secp.m4
@@ -46,6 +46,10 @@ if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
ECDSA_sign(0, NULL, 0, NULL, NULL, eckey);
ECDSA_verify(0, NULL, 0, NULL, 0, eckey);
EC_KEY_free(eckey);
+ ECDSA_SIG *sig_openssl;
+ sig_openssl = ECDSA_SIG_new();
+ (void)sig_openssl->r;
+ ECDSA_SIG_free(sig_openssl);
]])],[has_openssl_ec=yes],[has_openssl_ec=no])
AC_MSG_RESULT([$has_openssl_ec])
fi
diff --git a/src/secp256k1/configure.ac b/src/secp256k1/configure.ac
index 0743c36690..ec50ffe3a2 100644
--- a/src/secp256k1/configure.ac
+++ b/src/secp256k1/configure.ac
@@ -104,6 +104,11 @@ AC_ARG_ENABLE(experimental,
[use_experimental=$enableval],
[use_experimental=no])
+AC_ARG_ENABLE(exhaustive_tests,
+ AS_HELP_STRING([--enable-exhaustive-tests],[compile exhaustive tests (default is yes)]),
+ [use_exhaustive_tests=$enableval],
+ [use_exhaustive_tests=yes])
+
AC_ARG_ENABLE(endomorphism,
AS_HELP_STRING([--enable-endomorphism],[enable endomorphism (default is no)]),
[use_endomorphism=$enableval],
@@ -119,11 +124,6 @@ AC_ARG_ENABLE(module_ecdh,
[enable_module_ecdh=$enableval],
[enable_module_ecdh=no])
-AC_ARG_ENABLE(module_schnorr,
- AS_HELP_STRING([--enable-module-schnorr],[enable Schnorr signature module (experimental)]),
- [enable_module_schnorr=$enableval],
- [enable_module_schnorr=no])
-
AC_ARG_ENABLE(module_recovery,
AS_HELP_STRING([--enable-module-recovery],[enable ECDSA pubkey recovery module (default is no)]),
[enable_module_recovery=$enableval],
@@ -381,9 +381,6 @@ fi
if test x"$use_jni" != x"no"; then
AX_JNI_INCLUDE_DIR
have_jni_dependencies=yes
- if test x"$enable_module_schnorr" = x"no"; then
- have_jni_dependencies=no
- fi
if test x"$enable_module_ecdh" = x"no"; then
have_jni_dependencies=no
fi
@@ -392,7 +389,7 @@ if test x"$use_jni" != x"no"; then
fi
if test "x$have_jni_dependencies" = "xno"; then
if test x"$use_jni" = x"yes"; then
- AC_MSG_ERROR([jni support explicitly requested but headers/dependencies were not found. Enable ECDH and Schnorr and try again.])
+ AC_MSG_ERROR([jni support explicitly requested but headers/dependencies were not found. Enable ECDH and try again.])
fi
AC_MSG_WARN([jni headers/dependencies not found. jni support disabled])
use_jni=no
@@ -413,7 +410,7 @@ if test x"$use_endomorphism" = x"yes"; then
AC_DEFINE(USE_ENDOMORPHISM, 1, [Define this symbol to use endomorphism optimization])
fi
-if test x"$use_ecmult_static_precomputation" = x"yes"; then
+if test x"$set_precomp" = x"yes"; then
AC_DEFINE(USE_ECMULT_STATIC_PRECOMPUTATION, 1, [Define this symbol to use a statically generated ecmult table])
fi
@@ -421,10 +418,6 @@ if test x"$enable_module_ecdh" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_ECDH, 1, [Define this symbol to enable the ECDH module])
fi
-if test x"$enable_module_schnorr" = x"yes"; then
- AC_DEFINE(ENABLE_MODULE_SCHNORR, 1, [Define this symbol to enable the Schnorr signature module])
-fi
-
if test x"$enable_module_recovery" = x"yes"; then
AC_DEFINE(ENABLE_MODULE_RECOVERY, 1, [Define this symbol to enable the ECDSA pubkey recovery module])
fi
@@ -442,7 +435,6 @@ AC_MSG_NOTICE([Using bignum implementation: $set_bignum])
AC_MSG_NOTICE([Using scalar implementation: $set_scalar])
AC_MSG_NOTICE([Using endomorphism optimizations: $use_endomorphism])
AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh])
-AC_MSG_NOTICE([Building Schnorr signatures module: $enable_module_schnorr])
AC_MSG_NOTICE([Building ECDSA pubkey recovery module: $enable_module_recovery])
AC_MSG_NOTICE([Using jni: $use_jni])
@@ -451,12 +443,8 @@ if test x"$enable_experimental" = x"yes"; then
AC_MSG_NOTICE([WARNING: experimental build])
AC_MSG_NOTICE([Experimental features do not have stable APIs or properties, and may not be safe for production use.])
AC_MSG_NOTICE([Building ECDH module: $enable_module_ecdh])
- AC_MSG_NOTICE([Building Schnorr signatures module: $enable_module_schnorr])
AC_MSG_NOTICE([******])
else
- if test x"$enable_module_schnorr" = x"yes"; then
- AC_MSG_ERROR([Schnorr signature module is experimental. Use --enable-experimental to allow.])
- fi
if test x"$enable_module_ecdh" = x"yes"; then
AC_MSG_ERROR([ECDH module is experimental. Use --enable-experimental to allow.])
fi
@@ -473,10 +461,10 @@ AC_SUBST(SECP_LIBS)
AC_SUBST(SECP_TEST_LIBS)
AC_SUBST(SECP_TEST_INCLUDES)
AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" != x"no"])
+AM_CONDITIONAL([USE_EXHAUSTIVE_TESTS], [test x"$use_exhaustive_tests" != x"no"])
AM_CONDITIONAL([USE_BENCHMARK], [test x"$use_benchmark" = x"yes"])
-AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$use_ecmult_static_precomputation" = x"yes"])
+AM_CONDITIONAL([USE_ECMULT_STATIC_PRECOMPUTATION], [test x"$set_precomp" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_ECDH], [test x"$enable_module_ecdh" = x"yes"])
-AM_CONDITIONAL([ENABLE_MODULE_SCHNORR], [test x"$enable_module_schnorr" = x"yes"])
AM_CONDITIONAL([ENABLE_MODULE_RECOVERY], [test x"$enable_module_recovery" = x"yes"])
AM_CONDITIONAL([USE_JNI], [test x"$use_jni" == x"yes"])
AM_CONDITIONAL([USE_EXTERNAL_ASM], [test x"$use_external_asm" = x"yes"])
diff --git a/src/secp256k1/include/secp256k1.h b/src/secp256k1/include/secp256k1.h
index 7145dbcc54..f268e309d0 100644
--- a/src/secp256k1/include/secp256k1.h
+++ b/src/secp256k1/include/secp256k1.h
@@ -47,11 +47,8 @@ typedef struct secp256k1_context_struct secp256k1_context;
* The exact representation of data inside is implementation defined and not
* guaranteed to be portable between different platforms or versions. It is
* however guaranteed to be 64 bytes in size, and can be safely copied/moved.
- * If you need to convert to a format suitable for storage or transmission, use
- * secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse.
- *
- * Furthermore, it is guaranteed that identical public keys (ignoring
- * compression) will have identical representation, so they can be memcmp'ed.
+ * If you need to convert to a format suitable for storage, transmission, or
+ * comparison, use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse.
*/
typedef struct {
unsigned char data[64];
@@ -62,12 +59,9 @@ typedef struct {
* The exact representation of data inside is implementation defined and not
* guaranteed to be portable between different platforms or versions. It is
* however guaranteed to be 64 bytes in size, and can be safely copied/moved.
- * If you need to convert to a format suitable for storage or transmission, use
- * the secp256k1_ecdsa_signature_serialize_* and
+ * If you need to convert to a format suitable for storage, transmission, or
+ * comparison, use the secp256k1_ecdsa_signature_serialize_* and
* secp256k1_ecdsa_signature_serialize_* functions.
- *
- * Furthermore, it is guaranteed to identical signatures will have identical
- * representation, so they can be memcmp'ed.
*/
typedef struct {
unsigned char data[64];
diff --git a/src/secp256k1/include/secp256k1_schnorr.h b/src/secp256k1/include/secp256k1_schnorr.h
deleted file mode 100644
index dc32fec1ea..0000000000
--- a/src/secp256k1/include/secp256k1_schnorr.h
+++ /dev/null
@@ -1,173 +0,0 @@
-#ifndef _SECP256K1_SCHNORR_
-# define _SECP256K1_SCHNORR_
-
-# include "secp256k1.h"
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/** Create a signature using a custom EC-Schnorr-SHA256 construction. It
- * produces non-malleable 64-byte signatures which support public key recovery
- * batch validation, and multiparty signing.
- * Returns: 1: signature created
- * 0: the nonce generation function failed, or the private key was
- * invalid.
- * Args: ctx: pointer to a context object, initialized for signing
- * (cannot be NULL)
- * Out: sig64: pointer to a 64-byte array where the signature will be
- * placed (cannot be NULL)
- * In: msg32: the 32-byte message hash being signed (cannot be NULL)
- * seckey: pointer to a 32-byte secret key (cannot be NULL)
- * noncefp:pointer to a nonce generation function. If NULL,
- * secp256k1_nonce_function_default is used
- * ndata: pointer to arbitrary data used by the nonce generation
- * function (can be NULL)
- */
-SECP256K1_API int secp256k1_schnorr_sign(
- const secp256k1_context* ctx,
- unsigned char *sig64,
- const unsigned char *msg32,
- const unsigned char *seckey,
- secp256k1_nonce_function noncefp,
- const void *ndata
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
-
-/** Verify a signature created by secp256k1_schnorr_sign.
- * Returns: 1: correct signature
- * 0: incorrect signature
- * Args: ctx: a secp256k1 context object, initialized for verification.
- * In: sig64: the 64-byte signature being verified (cannot be NULL)
- * msg32: the 32-byte message hash being verified (cannot be NULL)
- * pubkey: the public key to verify with (cannot be NULL)
- */
-SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_verify(
- const secp256k1_context* ctx,
- const unsigned char *sig64,
- const unsigned char *msg32,
- const secp256k1_pubkey *pubkey
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
-
-/** Recover an EC public key from a Schnorr signature created using
- * secp256k1_schnorr_sign.
- * Returns: 1: public key successfully recovered (which guarantees a correct
- * signature).
- * 0: otherwise.
- * Args: ctx: pointer to a context object, initialized for
- * verification (cannot be NULL)
- * Out: pubkey: pointer to a pubkey to set to the recovered public key
- * (cannot be NULL).
- * In: sig64: signature as 64 byte array (cannot be NULL)
- * msg32: the 32-byte message hash assumed to be signed (cannot
- * be NULL)
- */
-SECP256K1_API int secp256k1_schnorr_recover(
- const secp256k1_context* ctx,
- secp256k1_pubkey *pubkey,
- const unsigned char *sig64,
- const unsigned char *msg32
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
-
-/** Generate a nonce pair deterministically for use with
- * secp256k1_schnorr_partial_sign.
- * Returns: 1: valid nonce pair was generated.
- * 0: otherwise (nonce generation function failed)
- * Args: ctx: pointer to a context object, initialized for signing
- * (cannot be NULL)
- * Out: pubnonce: public side of the nonce (cannot be NULL)
- * privnonce32: private side of the nonce (32 byte) (cannot be NULL)
- * In: msg32: the 32-byte message hash assumed to be signed (cannot
- * be NULL)
- * sec32: the 32-byte private key (cannot be NULL)
- * noncefp: pointer to a nonce generation function. If NULL,
- * secp256k1_nonce_function_default is used
- * noncedata: pointer to arbitrary data used by the nonce generation
- * function (can be NULL)
- *
- * Do not use the output as a private/public key pair for signing/validation.
- */
-SECP256K1_API int secp256k1_schnorr_generate_nonce_pair(
- const secp256k1_context* ctx,
- secp256k1_pubkey *pubnonce,
- unsigned char *privnonce32,
- const unsigned char *msg32,
- const unsigned char *sec32,
- secp256k1_nonce_function noncefp,
- const void* noncedata
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
-
-/** Produce a partial Schnorr signature, which can be combined using
- * secp256k1_schnorr_partial_combine, to end up with a full signature that is
- * verifiable using secp256k1_schnorr_verify.
- * Returns: 1: signature created successfully.
- * 0: no valid signature exists with this combination of keys, nonces
- * and message (chance around 1 in 2^128)
- * -1: invalid private key, nonce, or public nonces.
- * Args: ctx: pointer to context object, initialized for signing (cannot
- * be NULL)
- * Out: sig64: pointer to 64-byte array to put partial signature in
- * In: msg32: pointer to 32-byte message to sign
- * sec32: pointer to 32-byte private key
- * pubnonce_others: pointer to pubkey containing the sum of the other's
- * nonces (see secp256k1_ec_pubkey_combine)
- * secnonce32: pointer to 32-byte array containing our nonce
- *
- * The intended procedure for creating a multiparty signature is:
- * - Each signer S[i] with private key x[i] and public key Q[i] runs
- * secp256k1_schnorr_generate_nonce_pair to produce a pair (k[i],R[i]) of
- * private/public nonces.
- * - All signers communicate their public nonces to each other (revealing your
- * private nonce can lead to discovery of your private key, so it should be
- * considered secret).
- * - All signers combine all the public nonces they received (excluding their
- * own) using secp256k1_ec_pubkey_combine to obtain an
- * Rall[i] = sum(R[0..i-1,i+1..n]).
- * - All signers produce a partial signature using
- * secp256k1_schnorr_partial_sign, passing in their own private key x[i],
- * their own private nonce k[i], and the sum of the others' public nonces
- * Rall[i].
- * - All signers communicate their partial signatures to each other.
- * - Someone combines all partial signatures using
- * secp256k1_schnorr_partial_combine, to obtain a full signature.
- * - The resulting signature is validatable using secp256k1_schnorr_verify, with
- * public key equal to the result of secp256k1_ec_pubkey_combine of the
- * signers' public keys (sum(Q[0..n])).
- *
- * Note that secp256k1_schnorr_partial_combine and secp256k1_ec_pubkey_combine
- * function take their arguments in any order, and it is possible to
- * pre-combine several inputs already with one call, and add more inputs later
- * by calling the function again (they are commutative and associative).
- */
-SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_sign(
- const secp256k1_context* ctx,
- unsigned char *sig64,
- const unsigned char *msg32,
- const unsigned char *sec32,
- const secp256k1_pubkey *pubnonce_others,
- const unsigned char *secnonce32
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5) SECP256K1_ARG_NONNULL(6);
-
-/** Combine multiple Schnorr partial signatures.
- * Returns: 1: the passed signatures were successfully combined.
- * 0: the resulting signature is not valid (chance of 1 in 2^256)
- * -1: some inputs were invalid, or the signatures were not created
- * using the same set of nonces
- * Args: ctx: pointer to a context object
- * Out: sig64: pointer to a 64-byte array to place the combined signature
- * (cannot be NULL)
- * In: sig64sin: pointer to an array of n pointers to 64-byte input
- * signatures
- * n: the number of signatures to combine (at least 1)
- */
-SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_partial_combine(
- const secp256k1_context* ctx,
- unsigned char *sig64,
- const unsigned char * const * sig64sin,
- size_t n
-) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
diff --git a/src/secp256k1/src/ecdsa_impl.h b/src/secp256k1/src/ecdsa_impl.h
index d110b4bb1d..9a42e519bd 100644
--- a/src/secp256k1/src/ecdsa_impl.h
+++ b/src/secp256k1/src/ecdsa_impl.h
@@ -203,7 +203,9 @@ static int secp256k1_ecdsa_sig_serialize(unsigned char *sig, size_t *size, const
static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const secp256k1_scalar *sigr, const secp256k1_scalar *sigs, const secp256k1_ge *pubkey, const secp256k1_scalar *message) {
unsigned char c[32];
secp256k1_scalar sn, u1, u2;
+#if !defined(EXHAUSTIVE_TEST_ORDER)
secp256k1_fe xr;
+#endif
secp256k1_gej pubkeyj;
secp256k1_gej pr;
@@ -219,6 +221,21 @@ static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const
if (secp256k1_gej_is_infinity(&pr)) {
return 0;
}
+
+#if defined(EXHAUSTIVE_TEST_ORDER)
+{
+ secp256k1_scalar computed_r;
+ int overflow = 0;
+ secp256k1_ge pr_ge;
+ secp256k1_ge_set_gej(&pr_ge, &pr);
+ secp256k1_fe_normalize(&pr_ge.x);
+
+ secp256k1_fe_get_b32(c, &pr_ge.x);
+ secp256k1_scalar_set_b32(&computed_r, c, &overflow);
+ /* we fully expect overflow */
+ return secp256k1_scalar_eq(sigr, &computed_r);
+}
+#else
secp256k1_scalar_get_b32(c, sigr);
secp256k1_fe_set_b32(&xr, c);
@@ -252,6 +269,7 @@ static int secp256k1_ecdsa_sig_verify(const secp256k1_ecmult_context *ctx, const
return 1;
}
return 0;
+#endif
}
static int secp256k1_ecdsa_sig_sign(const secp256k1_ecmult_gen_context *ctx, secp256k1_scalar *sigr, secp256k1_scalar *sigs, const secp256k1_scalar *seckey, const secp256k1_scalar *message, const secp256k1_scalar *nonce, int *recid) {
diff --git a/src/secp256k1/src/ecmult_const_impl.h b/src/secp256k1/src/ecmult_const_impl.h
index 7a6a25318c..0db314c48e 100644
--- a/src/secp256k1/src/ecmult_const_impl.h
+++ b/src/secp256k1/src/ecmult_const_impl.h
@@ -78,7 +78,7 @@ static int secp256k1_wnaf_const(int *wnaf, secp256k1_scalar s, int w) {
/* Negative numbers will be negated to keep their bit representation below the maximum width */
flip = secp256k1_scalar_is_high(&s);
/* We add 1 to even numbers, 2 to odd ones, noting that negation flips parity */
- bit = flip ^ (s.d[0] & 1);
+ bit = flip ^ !secp256k1_scalar_is_even(&s);
/* We check for negative one, since adding 2 to it will cause an overflow */
secp256k1_scalar_negate(&neg_s, &s);
not_neg_one = !secp256k1_scalar_is_one(&neg_s);
diff --git a/src/secp256k1/src/ecmult_gen_impl.h b/src/secp256k1/src/ecmult_gen_impl.h
index b63c4d8662..35f2546077 100644
--- a/src/secp256k1/src/ecmult_gen_impl.h
+++ b/src/secp256k1/src/ecmult_gen_impl.h
@@ -77,7 +77,7 @@ static void secp256k1_ecmult_gen_context_build(secp256k1_ecmult_gen_context *ctx
secp256k1_gej_add_var(&numsbase, &numsbase, &nums_gej, NULL);
}
}
- secp256k1_ge_set_all_gej_var(1024, prec, precj, cb);
+ secp256k1_ge_set_all_gej_var(prec, precj, 1024, cb);
}
for (j = 0; j < 64; j++) {
for (i = 0; i < 16; i++) {
diff --git a/src/secp256k1/src/ecmult_impl.h b/src/secp256k1/src/ecmult_impl.h
index 81ae08e100..4e40104ad4 100644
--- a/src/secp256k1/src/ecmult_impl.h
+++ b/src/secp256k1/src/ecmult_impl.h
@@ -7,15 +7,29 @@
#ifndef _SECP256K1_ECMULT_IMPL_H_
#define _SECP256K1_ECMULT_IMPL_H_
+#include <string.h>
+
#include "group.h"
#include "scalar.h"
#include "ecmult.h"
-#include <string.h>
-
+#if defined(EXHAUSTIVE_TEST_ORDER)
+/* We need to lower these values for exhaustive tests because
+ * the tables cannot have infinities in them (this breaks the
+ * affine-isomorphism stuff which tracks z-ratios) */
+# if EXHAUSTIVE_TEST_ORDER > 128
+# define WINDOW_A 5
+# define WINDOW_G 8
+# elif EXHAUSTIVE_TEST_ORDER > 8
+# define WINDOW_A 4
+# define WINDOW_G 4
+# else
+# define WINDOW_A 2
+# define WINDOW_G 2
+# endif
+#else
/* optimal for 128-bit and 256-bit exponents. */
#define WINDOW_A 5
-
/** larger numbers may result in slightly better performance, at the cost of
exponentially larger precomputed tables. */
#ifdef USE_ENDOMORPHISM
@@ -25,6 +39,7 @@
/** One table for window size 16: 1.375 MiB. */
#define WINDOW_G 16
#endif
+#endif
/** The number of entries a table with precomputed multiples needs to have. */
#define ECMULT_TABLE_SIZE(w) (1 << ((w)-2))
@@ -103,7 +118,7 @@ static void secp256k1_ecmult_odd_multiples_table_storage_var(int n, secp256k1_ge
/* Compute the odd multiples in Jacobian form. */
secp256k1_ecmult_odd_multiples_table(n, prej, zr, a);
/* Convert them in batch to affine coordinates. */
- secp256k1_ge_set_table_gej_var(n, prea, prej, zr);
+ secp256k1_ge_set_table_gej_var(prea, prej, zr, n);
/* Convert them to compact storage form. */
for (i = 0; i < n; i++) {
secp256k1_ge_to_storage(&pre[i], &prea[i]);
diff --git a/src/secp256k1/src/field.h b/src/secp256k1/src/field.h
index c5ba074244..bbb1ee866c 100644
--- a/src/secp256k1/src/field.h
+++ b/src/secp256k1/src/field.h
@@ -30,6 +30,8 @@
#error "Please select field implementation"
#endif
+#include "util.h"
+
/** Normalize a field element. */
static void secp256k1_fe_normalize(secp256k1_fe *r);
@@ -50,6 +52,9 @@ static int secp256k1_fe_normalizes_to_zero_var(secp256k1_fe *r);
/** Set a field element equal to a small integer. Resulting field element is normalized. */
static void secp256k1_fe_set_int(secp256k1_fe *r, int a);
+/** Sets a field element equal to zero, initializing all fields. */
+static void secp256k1_fe_clear(secp256k1_fe *a);
+
/** Verify whether a field element is zero. Requires the input to be normalized. */
static int secp256k1_fe_is_zero(const secp256k1_fe *a);
@@ -110,7 +115,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a);
/** Calculate the (modular) inverses of a batch of field elements. Requires the inputs' magnitudes to be
* at most 8. The output magnitudes are 1 (but not guaranteed to be normalized). The inputs and
* outputs must not overlap in memory. */
-static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a);
+static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len);
/** Convert a field element to the storage type. */
static void secp256k1_fe_to_storage(secp256k1_fe_storage *r, const secp256k1_fe *a);
diff --git a/src/secp256k1/src/field_impl.h b/src/secp256k1/src/field_impl.h
index 52cd902eb3..5127b279bc 100644
--- a/src/secp256k1/src/field_impl.h
+++ b/src/secp256k1/src/field_impl.h
@@ -260,7 +260,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe *r, const secp256k1_fe *a) {
#endif
}
-static void secp256k1_fe_inv_all_var(size_t len, secp256k1_fe *r, const secp256k1_fe *a) {
+static void secp256k1_fe_inv_all_var(secp256k1_fe *r, const secp256k1_fe *a, size_t len) {
secp256k1_fe u;
size_t i;
if (len < 1) {
diff --git a/src/secp256k1/src/group.h b/src/secp256k1/src/group.h
index d515716744..4957b248fe 100644
--- a/src/secp256k1/src/group.h
+++ b/src/secp256k1/src/group.h
@@ -65,12 +65,12 @@ static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a);
static void secp256k1_ge_set_gej(secp256k1_ge *r, secp256k1_gej *a);
/** Set a batch of group elements equal to the inputs given in jacobian coordinates */
-static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb);
+static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb);
/** Set a batch of group elements equal to the inputs given in jacobian
* coordinates (with known z-ratios). zr must contain the known z-ratios such
* that mul(a[i].z, zr[i+1]) == a[i+1].z. zr[0] is ignored. */
-static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr);
+static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len);
/** Bring a batch inputs given in jacobian coordinates (with known z-ratios) to
* the same global z "denominator". zr must contain the known z-ratios such
diff --git a/src/secp256k1/src/group_impl.h b/src/secp256k1/src/group_impl.h
index 3e9c4c410d..2e192b62fd 100644
--- a/src/secp256k1/src/group_impl.h
+++ b/src/secp256k1/src/group_impl.h
@@ -11,6 +11,53 @@
#include "field.h"
#include "group.h"
+/* These points can be generated in sage as follows:
+ *
+ * 0. Setup a worksheet with the following parameters.
+ * b = 4 # whatever CURVE_B will be set to
+ * F = FiniteField (0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F)
+ * C = EllipticCurve ([F (0), F (b)])
+ *
+ * 1. Determine all the small orders available to you. (If there are
+ * no satisfactory ones, go back and change b.)
+ * print C.order().factor(limit=1000)
+ *
+ * 2. Choose an order as one of the prime factors listed in the above step.
+ * (You can also multiply some to get a composite order, though the
+ * tests will crash trying to invert scalars during signing.) We take a
+ * random point and scale it to drop its order to the desired value.
+ * There is some probability this won't work; just try again.
+ * order = 199
+ * P = C.random_point()
+ * P = (int(P.order()) / int(order)) * P
+ * assert(P.order() == order)
+ *
+ * 3. Print the values. You'll need to use a vim macro or something to
+ * split the hex output into 4-byte chunks.
+ * print "%x %x" % P.xy()
+ */
+#if defined(EXHAUSTIVE_TEST_ORDER)
+# if EXHAUSTIVE_TEST_ORDER == 199
+const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST(
+ 0xFA7CC9A7, 0x0737F2DB, 0xA749DD39, 0x2B4FB069,
+ 0x3B017A7D, 0xA808C2F1, 0xFB12940C, 0x9EA66C18,
+ 0x78AC123A, 0x5ED8AEF3, 0x8732BC91, 0x1F3A2868,
+ 0x48DF246C, 0x808DAE72, 0xCFE52572, 0x7F0501ED
+);
+
+const int CURVE_B = 4;
+# elif EXHAUSTIVE_TEST_ORDER == 13
+const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST(
+ 0xedc60018, 0xa51a786b, 0x2ea91f4d, 0x4c9416c0,
+ 0x9de54c3b, 0xa1316554, 0x6cf4345c, 0x7277ef15,
+ 0x54cb1b6b, 0xdc8c1273, 0x087844ea, 0x43f4603e,
+ 0x0eaf9a43, 0xf6effe55, 0x939f806d, 0x37adf8ac
+);
+const int CURVE_B = 2;
+# else
+# error No known generator for the specified exhaustive test group order.
+# endif
+#else
/** Generator for secp256k1, value 'g' defined in
* "Standards for Efficient Cryptography" (SEC2) 2.7.1.
*/
@@ -21,8 +68,11 @@ static const secp256k1_ge secp256k1_ge_const_g = SECP256K1_GE_CONST(
0xFD17B448UL, 0xA6855419UL, 0x9C47D08FUL, 0xFB10D4B8UL
);
+const int CURVE_B = 7;
+#endif
+
static void secp256k1_ge_set_gej_zinv(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zi) {
- secp256k1_fe zi2;
+ secp256k1_fe zi2;
secp256k1_fe zi3;
secp256k1_fe_sqr(&zi2, zi);
secp256k1_fe_mul(&zi3, &zi2, zi);
@@ -76,7 +126,7 @@ static void secp256k1_ge_set_gej_var(secp256k1_ge *r, secp256k1_gej *a) {
r->y = a->y;
}
-static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_callback *cb) {
+static void secp256k1_ge_set_all_gej_var(secp256k1_ge *r, const secp256k1_gej *a, size_t len, const secp256k1_callback *cb) {
secp256k1_fe *az;
secp256k1_fe *azi;
size_t i;
@@ -89,7 +139,7 @@ static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp
}
azi = (secp256k1_fe *)checked_malloc(cb, sizeof(secp256k1_fe) * count);
- secp256k1_fe_inv_all_var(count, azi, az);
+ secp256k1_fe_inv_all_var(azi, az, count);
free(az);
count = 0;
@@ -102,7 +152,7 @@ static void secp256k1_ge_set_all_gej_var(size_t len, secp256k1_ge *r, const secp
free(azi);
}
-static void secp256k1_ge_set_table_gej_var(size_t len, secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr) {
+static void secp256k1_ge_set_table_gej_var(secp256k1_ge *r, const secp256k1_gej *a, const secp256k1_fe *zr, size_t len) {
size_t i = len - 1;
secp256k1_fe zi;
@@ -145,9 +195,15 @@ static void secp256k1_ge_globalz_set_table_gej(size_t len, secp256k1_ge *r, secp
static void secp256k1_gej_set_infinity(secp256k1_gej *r) {
r->infinity = 1;
- secp256k1_fe_set_int(&r->x, 0);
- secp256k1_fe_set_int(&r->y, 0);
- secp256k1_fe_set_int(&r->z, 0);
+ secp256k1_fe_clear(&r->x);
+ secp256k1_fe_clear(&r->y);
+ secp256k1_fe_clear(&r->z);
+}
+
+static void secp256k1_ge_set_infinity(secp256k1_ge *r) {
+ r->infinity = 1;
+ secp256k1_fe_clear(&r->x);
+ secp256k1_fe_clear(&r->y);
}
static void secp256k1_gej_clear(secp256k1_gej *r) {
@@ -169,7 +225,7 @@ static int secp256k1_ge_set_xquad(secp256k1_ge *r, const secp256k1_fe *x) {
secp256k1_fe_sqr(&x2, x);
secp256k1_fe_mul(&x3, x, &x2);
r->infinity = 0;
- secp256k1_fe_set_int(&c, 7);
+ secp256k1_fe_set_int(&c, CURVE_B);
secp256k1_fe_add(&c, &x3);
return secp256k1_fe_sqrt(&r->y, &c);
}
@@ -228,7 +284,7 @@ static int secp256k1_gej_is_valid_var(const secp256k1_gej *a) {
secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
secp256k1_fe_sqr(&z2, &a->z);
secp256k1_fe_sqr(&z6, &z2); secp256k1_fe_mul(&z6, &z6, &z2);
- secp256k1_fe_mul_int(&z6, 7);
+ secp256k1_fe_mul_int(&z6, CURVE_B);
secp256k1_fe_add(&x3, &z6);
secp256k1_fe_normalize_weak(&x3);
return secp256k1_fe_equal_var(&y2, &x3);
@@ -242,7 +298,7 @@ static int secp256k1_ge_is_valid_var(const secp256k1_ge *a) {
/* y^2 = x^3 + 7 */
secp256k1_fe_sqr(&y2, &a->y);
secp256k1_fe_sqr(&x3, &a->x); secp256k1_fe_mul(&x3, &x3, &a->x);
- secp256k1_fe_set_int(&c, 7);
+ secp256k1_fe_set_int(&c, CURVE_B);
secp256k1_fe_add(&x3, &c);
secp256k1_fe_normalize_weak(&x3);
return secp256k1_fe_equal_var(&y2, &x3);
@@ -260,7 +316,7 @@ static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, s
/** For secp256k1, 2Q is infinity if and only if Q is infinity. This is because if 2Q = infinity,
* Q must equal -Q, or that Q.y == -(Q.y), or Q.y is 0. For a point on y^2 = x^3 + 7 to have
* y=0, x^3 must be -7 mod p. However, -7 has no cube root mod p.
- *
+ *
* Having said this, if this function receives a point on a sextic twist, e.g. by
* a fault attack, it is possible for y to be 0. This happens for y^2 = x^3 + 6,
* since -6 does have a cube root mod p. For this point, this function will not set
diff --git a/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java b/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java
index be67048fbe..1c67802fba 100644
--- a/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java
+++ b/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1.java
@@ -32,7 +32,7 @@ import static org.bitcoin.NativeSecp256k1Util.*;
* <p>You can find an example library that can be used for this at https://github.com/bitcoin/secp256k1</p>
*
* <p>To build secp256k1 for use with bitcoinj, run
- * `./configure --enable-jni --enable-experimental --enable-module-schnorr --enable-module-ecdh`
+ * `./configure --enable-jni --enable-experimental --enable-module-ecdh`
* and `make` then copy `.libs/libsecp256k1.so` to your system library path
* or point the JVM to the folder containing it with -Djava.library.path
* </p>
@@ -417,36 +417,6 @@ public class NativeSecp256k1 {
}
}
- public static byte[] schnorrSign(byte[] data, byte[] sec) throws AssertFailException {
- Preconditions.checkArgument(data.length == 32 && sec.length <= 32);
-
- ByteBuffer byteBuff = nativeECDSABuffer.get();
- if (byteBuff == null) {
- byteBuff = ByteBuffer.allocateDirect(32 + 32);
- byteBuff.order(ByteOrder.nativeOrder());
- nativeECDSABuffer.set(byteBuff);
- }
- byteBuff.rewind();
- byteBuff.put(data);
- byteBuff.put(sec);
-
- byte[][] retByteArray;
-
- r.lock();
- try {
- retByteArray = secp256k1_schnorr_sign(byteBuff, Secp256k1Context.getContext());
- } finally {
- r.unlock();
- }
-
- byte[] sigArr = retByteArray[0];
- int retVal = new BigInteger(new byte[] { retByteArray[1][0] }).intValue();
-
- assertEquals(sigArr.length, 64, "Got bad signature length.");
-
- return retVal == 0 ? new byte[0] : sigArr;
- }
-
private static native long secp256k1_ctx_clone(long context);
private static native int secp256k1_context_randomize(ByteBuffer byteBuff, long context);
@@ -471,8 +441,6 @@ public class NativeSecp256k1 {
private static native byte[][] secp256k1_ec_pubkey_parse(ByteBuffer byteBuff, long context, int inputLen);
- private static native byte[][] secp256k1_schnorr_sign(ByteBuffer byteBuff, long context);
-
private static native byte[][] secp256k1_ecdh(ByteBuffer byteBuff, long context, int inputLen);
}
diff --git a/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java b/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java
index f18ce95810..c00d08899b 100644
--- a/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java
+++ b/src/secp256k1/src/java/org/bitcoin/NativeSecp256k1Test.java
@@ -167,22 +167,6 @@ public class NativeSecp256k1Test {
assertEquals( result, true, "testRandomize");
}
- /**
- * This tests signSchnorr() for a valid secretkey
- */
- public static void testSchnorrSign() throws AssertFailException{
-
- byte[] data = BaseEncoding.base16().lowerCase().decode("CF80CD8AED482D5D1527D7DC72FCEFF84E6326592848447D2DC0B0E87DFC9A90".toLowerCase()); //sha256hash of "testing"
- byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase());
-
- byte[] resultArr = NativeSecp256k1.schnorrSign(data, sec);
- String sigString = javax.xml.bind.DatatypeConverter.printHexBinary(resultArr);
- assertEquals( sigString, "C5E929AA058B982048760422D3B563749B7D0E50C5EBD8CD2FFC23214BD6A2F1B072C13880997EBA847CF20F2F90FCE07C1CA33A890A4127095A351127F8D95F" , "testSchnorrSign");
- }
-
- /**
- * This tests signSchnorr() for a valid secretkey
- */
public static void testCreateECDHSecret() throws AssertFailException{
byte[] sec = BaseEncoding.base16().lowerCase().decode("67E56582298859DDAE725F972992A07C6C4FB9F62A8FFF58CE3CA926A1063530".toLowerCase());
@@ -216,11 +200,6 @@ public class NativeSecp256k1Test {
testSignPos();
testSignNeg();
- //Test Schnorr (partial support) //TODO
- testSchnorrSign();
- //testSchnorrVerify
- //testSchnorrRecovery
-
//Test privKeyTweakAdd() 1
testPrivKeyTweakAdd_1();
diff --git a/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c b/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c
index dba9524dd4..bcef7b32ce 100644
--- a/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c
+++ b/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.c
@@ -5,7 +5,6 @@
#include "include/secp256k1.h"
#include "include/secp256k1_ecdh.h"
#include "include/secp256k1_recovery.h"
-#include "include/secp256k1_schnorr.h"
SECP256K1_API jlong JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ctx_1clone
@@ -333,39 +332,6 @@ SECP256K1_API jlong JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1p
return 0;
}
-SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1schnorr_1sign
- (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l)
-{
- secp256k1_context *ctx = (secp256k1_context*)(uintptr_t)ctx_l;
- unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject);
- unsigned char* secKey = (unsigned char*) (data + 32);
-
- jobjectArray retArray;
- jbyteArray sigArray, intsByteArray;
- unsigned char intsarray[1];
- unsigned char sig[64];
-
- int ret = secp256k1_schnorr_sign(ctx, sig, data, secKey, NULL, NULL);
-
- intsarray[0] = ret;
-
- retArray = (*env)->NewObjectArray(env, 2,
- (*env)->FindClass(env, "[B"),
- (*env)->NewByteArray(env, 1));
-
- sigArray = (*env)->NewByteArray(env, 64);
- (*env)->SetByteArrayRegion(env, sigArray, 0, 64, (jbyte*)sig);
- (*env)->SetObjectArrayElement(env, retArray, 0, sigArray);
-
- intsByteArray = (*env)->NewByteArray(env, 1);
- (*env)->SetByteArrayRegion(env, intsByteArray, 0, 1, (jbyte*)intsarray);
- (*env)->SetObjectArrayElement(env, retArray, 1, intsByteArray);
-
- (void)classObject;
-
- return retArray;
-}
-
SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdh
(JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l, jint publen)
{
diff --git a/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h b/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h
index 4125a1f523..fe613c9e9e 100644
--- a/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h
+++ b/src/secp256k1/src/java/org_bitcoin_NativeSecp256k1.h
@@ -106,14 +106,6 @@ SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1e
/*
* Class: org_bitcoin_NativeSecp256k1
- * Method: secp256k1_schnorr_sign
- * Signature: (Ljava/nio/ByteBuffer;JI)[[B
- */
-SECP256K1_API jobjectArray JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1schnorr_1sign
- (JNIEnv* env, jclass classObject, jobject byteBufferObject, jlong ctx_l);
-
-/*
- * Class: org_bitcoin_NativeSecp256k1
* Method: secp256k1_ecdh
* Signature: (Ljava/nio/ByteBuffer;JI)[[B
*/
diff --git a/src/secp256k1/src/modules/recovery/main_impl.h b/src/secp256k1/src/modules/recovery/main_impl.h
index ec42f4bb6c..86f2f0cb2b 100644..100755
--- a/src/secp256k1/src/modules/recovery/main_impl.h
+++ b/src/secp256k1/src/modules/recovery/main_impl.h
@@ -138,16 +138,15 @@ int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecd
secp256k1_scalar_set_b32(&sec, seckey, &overflow);
/* Fail if the secret key is invalid. */
if (!overflow && !secp256k1_scalar_is_zero(&sec)) {
+ unsigned char nonce32[32];
unsigned int count = 0;
secp256k1_scalar_set_b32(&msg, msg32, NULL);
while (1) {
- unsigned char nonce32[32];
ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count);
if (!ret) {
break;
}
secp256k1_scalar_set_b32(&non, nonce32, &overflow);
- memset(nonce32, 0, 32);
if (!secp256k1_scalar_is_zero(&non) && !overflow) {
if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, &recid)) {
break;
@@ -155,6 +154,7 @@ int secp256k1_ecdsa_sign_recoverable(const secp256k1_context* ctx, secp256k1_ecd
}
count++;
}
+ memset(nonce32, 0, 32);
secp256k1_scalar_clear(&msg);
secp256k1_scalar_clear(&non);
secp256k1_scalar_clear(&sec);
diff --git a/src/secp256k1/src/modules/schnorr/Makefile.am.include b/src/secp256k1/src/modules/schnorr/Makefile.am.include
deleted file mode 100644
index f1af8e8325..0000000000
--- a/src/secp256k1/src/modules/schnorr/Makefile.am.include
+++ /dev/null
@@ -1,10 +0,0 @@
-include_HEADERS += include/secp256k1_schnorr.h
-noinst_HEADERS += src/modules/schnorr/main_impl.h
-noinst_HEADERS += src/modules/schnorr/schnorr.h
-noinst_HEADERS += src/modules/schnorr/schnorr_impl.h
-noinst_HEADERS += src/modules/schnorr/tests_impl.h
-if USE_BENCHMARK
-noinst_PROGRAMS += bench_schnorr_verify
-bench_schnorr_verify_SOURCES = src/bench_schnorr_verify.c
-bench_schnorr_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
-endif
diff --git a/src/secp256k1/src/modules/schnorr/main_impl.h b/src/secp256k1/src/modules/schnorr/main_impl.h
deleted file mode 100644
index fa176a1767..0000000000
--- a/src/secp256k1/src/modules/schnorr/main_impl.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2014-2015 Pieter Wuille *
- * Distributed under the MIT software license, see the accompanying *
- * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
- **********************************************************************/
-
-#ifndef SECP256K1_MODULE_SCHNORR_MAIN
-#define SECP256K1_MODULE_SCHNORR_MAIN
-
-#include "include/secp256k1_schnorr.h"
-#include "modules/schnorr/schnorr_impl.h"
-
-static void secp256k1_schnorr_msghash_sha256(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) {
- secp256k1_sha256_t sha;
- secp256k1_sha256_initialize(&sha);
- secp256k1_sha256_write(&sha, r32, 32);
- secp256k1_sha256_write(&sha, msg32, 32);
- secp256k1_sha256_finalize(&sha, h32);
-}
-
-static const unsigned char secp256k1_schnorr_algo16[17] = "Schnorr+SHA256 ";
-
-int secp256k1_schnorr_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void* noncedata) {
- secp256k1_scalar sec, non;
- int ret = 0;
- int overflow = 0;
- unsigned int count = 0;
- VERIFY_CHECK(ctx != NULL);
- ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
- ARG_CHECK(msg32 != NULL);
- ARG_CHECK(sig64 != NULL);
- ARG_CHECK(seckey != NULL);
- if (noncefp == NULL) {
- noncefp = secp256k1_nonce_function_default;
- }
-
- secp256k1_scalar_set_b32(&sec, seckey, NULL);
- while (1) {
- unsigned char nonce32[32];
- ret = noncefp(nonce32, msg32, seckey, secp256k1_schnorr_algo16, (void*)noncedata, count);
- if (!ret) {
- break;
- }
- secp256k1_scalar_set_b32(&non, nonce32, &overflow);
- memset(nonce32, 0, 32);
- if (!secp256k1_scalar_is_zero(&non) && !overflow) {
- if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, NULL, secp256k1_schnorr_msghash_sha256, msg32)) {
- break;
- }
- }
- count++;
- }
- if (!ret) {
- memset(sig64, 0, 64);
- }
- secp256k1_scalar_clear(&non);
- secp256k1_scalar_clear(&sec);
- return ret;
-}
-
-int secp256k1_schnorr_verify(const secp256k1_context* ctx, const unsigned char *sig64, const unsigned char *msg32, const secp256k1_pubkey *pubkey) {
- secp256k1_ge q;
- VERIFY_CHECK(ctx != NULL);
- ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx));
- ARG_CHECK(msg32 != NULL);
- ARG_CHECK(sig64 != NULL);
- ARG_CHECK(pubkey != NULL);
-
- secp256k1_pubkey_load(ctx, &q, pubkey);
- return secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32);
-}
-
-int secp256k1_schnorr_recover(const secp256k1_context* ctx, secp256k1_pubkey *pubkey, const unsigned char *sig64, const unsigned char *msg32) {
- secp256k1_ge q;
-
- VERIFY_CHECK(ctx != NULL);
- ARG_CHECK(secp256k1_ecmult_context_is_built(&ctx->ecmult_ctx));
- ARG_CHECK(msg32 != NULL);
- ARG_CHECK(sig64 != NULL);
- ARG_CHECK(pubkey != NULL);
-
- if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &q, secp256k1_schnorr_msghash_sha256, msg32)) {
- secp256k1_pubkey_save(pubkey, &q);
- return 1;
- } else {
- memset(pubkey, 0, sizeof(*pubkey));
- return 0;
- }
-}
-
-int secp256k1_schnorr_generate_nonce_pair(const secp256k1_context* ctx, secp256k1_pubkey *pubnonce, unsigned char *privnonce32, const unsigned char *sec32, const unsigned char *msg32, secp256k1_nonce_function noncefp, const void* noncedata) {
- int count = 0;
- int ret = 1;
- secp256k1_gej Qj;
- secp256k1_ge Q;
- secp256k1_scalar sec;
-
- VERIFY_CHECK(ctx != NULL);
- ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
- ARG_CHECK(msg32 != NULL);
- ARG_CHECK(sec32 != NULL);
- ARG_CHECK(pubnonce != NULL);
- ARG_CHECK(privnonce32 != NULL);
-
- if (noncefp == NULL) {
- noncefp = secp256k1_nonce_function_default;
- }
-
- do {
- int overflow;
- ret = noncefp(privnonce32, sec32, msg32, secp256k1_schnorr_algo16, (void*)noncedata, count++);
- if (!ret) {
- break;
- }
- secp256k1_scalar_set_b32(&sec, privnonce32, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&sec)) {
- continue;
- }
- secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &Qj, &sec);
- secp256k1_ge_set_gej(&Q, &Qj);
-
- secp256k1_pubkey_save(pubnonce, &Q);
- break;
- } while(1);
-
- secp256k1_scalar_clear(&sec);
- if (!ret) {
- memset(pubnonce, 0, sizeof(*pubnonce));
- }
- return ret;
-}
-
-int secp256k1_schnorr_partial_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const unsigned char *sec32, const secp256k1_pubkey *pubnonce_others, const unsigned char *secnonce32) {
- int overflow = 0;
- secp256k1_scalar sec, non;
- secp256k1_ge pubnon;
- VERIFY_CHECK(ctx != NULL);
- ARG_CHECK(secp256k1_ecmult_gen_context_is_built(&ctx->ecmult_gen_ctx));
- ARG_CHECK(msg32 != NULL);
- ARG_CHECK(sig64 != NULL);
- ARG_CHECK(sec32 != NULL);
- ARG_CHECK(secnonce32 != NULL);
- ARG_CHECK(pubnonce_others != NULL);
-
- secp256k1_scalar_set_b32(&sec, sec32, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&sec)) {
- return -1;
- }
- secp256k1_scalar_set_b32(&non, secnonce32, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&non)) {
- return -1;
- }
- secp256k1_pubkey_load(ctx, &pubnon, pubnonce_others);
- return secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64, &sec, &non, &pubnon, secp256k1_schnorr_msghash_sha256, msg32);
-}
-
-int secp256k1_schnorr_partial_combine(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char * const *sig64sin, size_t n) {
- ARG_CHECK(sig64 != NULL);
- ARG_CHECK(n >= 1);
- ARG_CHECK(sig64sin != NULL);
- return secp256k1_schnorr_sig_combine(sig64, n, sig64sin);
-}
-
-#endif
diff --git a/src/secp256k1/src/modules/schnorr/schnorr.h b/src/secp256k1/src/modules/schnorr/schnorr.h
deleted file mode 100644
index de18147bd5..0000000000
--- a/src/secp256k1/src/modules/schnorr/schnorr.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/***********************************************************************
- * Copyright (c) 2014-2015 Pieter Wuille *
- * Distributed under the MIT software license, see the accompanying *
- * file COPYING or http://www.opensource.org/licenses/mit-license.php. *
- ***********************************************************************/
-
-#ifndef _SECP256K1_MODULE_SCHNORR_H_
-#define _SECP256K1_MODULE_SCHNORR_H_
-
-#include "scalar.h"
-#include "group.h"
-
-typedef void (*secp256k1_schnorr_msghash)(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32);
-
-static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32);
-static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32);
-static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32);
-static int secp256k1_schnorr_sig_combine(unsigned char *sig64, size_t n, const unsigned char * const *sig64ins);
-
-#endif
diff --git a/src/secp256k1/src/modules/schnorr/schnorr_impl.h b/src/secp256k1/src/modules/schnorr/schnorr_impl.h
deleted file mode 100644
index e13ab6db7c..0000000000
--- a/src/secp256k1/src/modules/schnorr/schnorr_impl.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/***********************************************************************
- * Copyright (c) 2014-2015 Pieter Wuille *
- * Distributed under the MIT software license, see the accompanying *
- * file COPYING or http://www.opensource.org/licenses/mit-license.php. *
- ***********************************************************************/
-
-#ifndef _SECP256K1_SCHNORR_IMPL_H_
-#define _SECP256K1_SCHNORR_IMPL_H_
-
-#include <string.h>
-
-#include "schnorr.h"
-#include "num.h"
-#include "field.h"
-#include "group.h"
-#include "ecmult.h"
-#include "ecmult_gen.h"
-
-/**
- * Custom Schnorr-based signature scheme. They support multiparty signing, public key
- * recovery and batch validation.
- *
- * Rationale for verifying R's y coordinate:
- * In order to support batch validation and public key recovery, the full R point must
- * be known to verifiers, rather than just its x coordinate. In order to not risk
- * being more strict in batch validation than normal validation, validators must be
- * required to reject signatures with incorrect y coordinate. This is only possible
- * by including a (relatively slow) field inverse, or a field square root. However,
- * batch validation offers potentially much higher benefits than this cost.
- *
- * Rationale for having an implicit y coordinate oddness:
- * If we commit to having the full R point known to verifiers, there are two mechanism.
- * Either include its oddness in the signature, or give it an implicit fixed value.
- * As the R y coordinate can be flipped by a simple negation of the nonce, we choose the
- * latter, as it comes with nearly zero impact on signing or validation performance, and
- * saves a byte in the signature.
- *
- * Signing:
- * Inputs: 32-byte message m, 32-byte scalar key x (!=0), 32-byte scalar nonce k (!=0)
- *
- * Compute point R = k * G. Reject nonce if R's y coordinate is odd (or negate nonce).
- * Compute 32-byte r, the serialization of R's x coordinate.
- * Compute scalar h = Hash(r || m). Reject nonce if h == 0 or h >= order.
- * Compute scalar s = k - h * x.
- * The signature is (r, s).
- *
- *
- * Verification:
- * Inputs: 32-byte message m, public key point Q, signature: (32-byte r, scalar s)
- *
- * Signature is invalid if s >= order.
- * Signature is invalid if r >= p.
- * Compute scalar h = Hash(r || m). Signature is invalid if h == 0 or h >= order.
- * Option 1 (faster for single verification):
- * Compute point R = h * Q + s * G. Signature is invalid if R is infinity or R's y coordinate is odd.
- * Signature is valid if the serialization of R's x coordinate equals r.
- * Option 2 (allows batch validation and pubkey recovery):
- * Decompress x coordinate r into point R, with odd y coordinate. Fail if R is not on the curve.
- * Signature is valid if R + h * Q + s * G == 0.
- */
-
-static int secp256k1_schnorr_sig_sign(const secp256k1_ecmult_gen_context* ctx, unsigned char *sig64, const secp256k1_scalar *key, const secp256k1_scalar *nonce, const secp256k1_ge *pubnonce, secp256k1_schnorr_msghash hash, const unsigned char *msg32) {
- secp256k1_gej Rj;
- secp256k1_ge Ra;
- unsigned char h32[32];
- secp256k1_scalar h, s;
- int overflow;
- secp256k1_scalar n;
-
- if (secp256k1_scalar_is_zero(key) || secp256k1_scalar_is_zero(nonce)) {
- return 0;
- }
- n = *nonce;
-
- secp256k1_ecmult_gen(ctx, &Rj, &n);
- if (pubnonce != NULL) {
- secp256k1_gej_add_ge(&Rj, &Rj, pubnonce);
- }
- secp256k1_ge_set_gej(&Ra, &Rj);
- secp256k1_fe_normalize(&Ra.y);
- if (secp256k1_fe_is_odd(&Ra.y)) {
- /* R's y coordinate is odd, which is not allowed (see rationale above).
- Force it to be even by negating the nonce. Note that this even works
- for multiparty signing, as the R point is known to all participants,
- which can all decide to flip the sign in unison, resulting in the
- overall R point to be negated too. */
- secp256k1_scalar_negate(&n, &n);
- }
- secp256k1_fe_normalize(&Ra.x);
- secp256k1_fe_get_b32(sig64, &Ra.x);
- hash(h32, sig64, msg32);
- overflow = 0;
- secp256k1_scalar_set_b32(&h, h32, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&h)) {
- secp256k1_scalar_clear(&n);
- return 0;
- }
- secp256k1_scalar_mul(&s, &h, key);
- secp256k1_scalar_negate(&s, &s);
- secp256k1_scalar_add(&s, &s, &n);
- secp256k1_scalar_clear(&n);
- secp256k1_scalar_get_b32(sig64 + 32, &s);
- return 1;
-}
-
-static int secp256k1_schnorr_sig_verify(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, const secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) {
- secp256k1_gej Qj, Rj;
- secp256k1_ge Ra;
- secp256k1_fe Rx;
- secp256k1_scalar h, s;
- unsigned char hh[32];
- int overflow;
-
- if (secp256k1_ge_is_infinity(pubkey)) {
- return 0;
- }
- hash(hh, sig64, msg32);
- overflow = 0;
- secp256k1_scalar_set_b32(&h, hh, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&h)) {
- return 0;
- }
- overflow = 0;
- secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow);
- if (overflow) {
- return 0;
- }
- if (!secp256k1_fe_set_b32(&Rx, sig64)) {
- return 0;
- }
- secp256k1_gej_set_ge(&Qj, pubkey);
- secp256k1_ecmult(ctx, &Rj, &Qj, &h, &s);
- if (secp256k1_gej_is_infinity(&Rj)) {
- return 0;
- }
- secp256k1_ge_set_gej_var(&Ra, &Rj);
- secp256k1_fe_normalize_var(&Ra.y);
- if (secp256k1_fe_is_odd(&Ra.y)) {
- return 0;
- }
- return secp256k1_fe_equal_var(&Rx, &Ra.x);
-}
-
-static int secp256k1_schnorr_sig_recover(const secp256k1_ecmult_context* ctx, const unsigned char *sig64, secp256k1_ge *pubkey, secp256k1_schnorr_msghash hash, const unsigned char *msg32) {
- secp256k1_gej Qj, Rj;
- secp256k1_ge Ra;
- secp256k1_fe Rx;
- secp256k1_scalar h, s;
- unsigned char hh[32];
- int overflow;
-
- hash(hh, sig64, msg32);
- overflow = 0;
- secp256k1_scalar_set_b32(&h, hh, &overflow);
- if (overflow || secp256k1_scalar_is_zero(&h)) {
- return 0;
- }
- overflow = 0;
- secp256k1_scalar_set_b32(&s, sig64 + 32, &overflow);
- if (overflow) {
- return 0;
- }
- if (!secp256k1_fe_set_b32(&Rx, sig64)) {
- return 0;
- }
- if (!secp256k1_ge_set_xo_var(&Ra, &Rx, 0)) {
- return 0;
- }
- secp256k1_gej_set_ge(&Rj, &Ra);
- secp256k1_scalar_inverse_var(&h, &h);
- secp256k1_scalar_negate(&s, &s);
- secp256k1_scalar_mul(&s, &s, &h);
- secp256k1_ecmult(ctx, &Qj, &Rj, &h, &s);
- if (secp256k1_gej_is_infinity(&Qj)) {
- return 0;
- }
- secp256k1_ge_set_gej(pubkey, &Qj);
- return 1;
-}
-
-static int secp256k1_schnorr_sig_combine(unsigned char *sig64, size_t n, const unsigned char * const *sig64ins) {
- secp256k1_scalar s = SECP256K1_SCALAR_CONST(0, 0, 0, 0, 0, 0, 0, 0);
- size_t i;
- for (i = 0; i < n; i++) {
- secp256k1_scalar si;
- int overflow;
- secp256k1_scalar_set_b32(&si, sig64ins[i] + 32, &overflow);
- if (overflow) {
- return -1;
- }
- if (i) {
- if (memcmp(sig64ins[i - 1], sig64ins[i], 32) != 0) {
- return -1;
- }
- }
- secp256k1_scalar_add(&s, &s, &si);
- }
- if (secp256k1_scalar_is_zero(&s)) {
- return 0;
- }
- memcpy(sig64, sig64ins[0], 32);
- secp256k1_scalar_get_b32(sig64 + 32, &s);
- secp256k1_scalar_clear(&s);
- return 1;
-}
-
-#endif
diff --git a/src/secp256k1/src/modules/schnorr/tests_impl.h b/src/secp256k1/src/modules/schnorr/tests_impl.h
deleted file mode 100644
index 5bd14a03e3..0000000000
--- a/src/secp256k1/src/modules/schnorr/tests_impl.h
+++ /dev/null
@@ -1,175 +0,0 @@
-/**********************************************************************
- * Copyright (c) 2014-2015 Pieter Wuille *
- * Distributed under the MIT software license, see the accompanying *
- * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
- **********************************************************************/
-
-#ifndef SECP256K1_MODULE_SCHNORR_TESTS
-#define SECP256K1_MODULE_SCHNORR_TESTS
-
-#include "include/secp256k1_schnorr.h"
-
-void test_schnorr_end_to_end(void) {
- unsigned char privkey[32];
- unsigned char message[32];
- unsigned char schnorr_signature[64];
- secp256k1_pubkey pubkey, recpubkey;
-
- /* Generate a random key and message. */
- {
- secp256k1_scalar key;
- random_scalar_order_test(&key);
- secp256k1_scalar_get_b32(privkey, &key);
- secp256k1_rand256_test(message);
- }
-
- /* Construct and verify corresponding public key. */
- CHECK(secp256k1_ec_seckey_verify(ctx, privkey) == 1);
- CHECK(secp256k1_ec_pubkey_create(ctx, &pubkey, privkey) == 1);
-
- /* Schnorr sign. */
- CHECK(secp256k1_schnorr_sign(ctx, schnorr_signature, message, privkey, NULL, NULL) == 1);
- CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 1);
- CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) == 1);
- CHECK(memcmp(&pubkey, &recpubkey, sizeof(pubkey)) == 0);
- /* Destroy signature and verify again. */
- schnorr_signature[secp256k1_rand_bits(6)] += 1 + secp256k1_rand_int(255);
- CHECK(secp256k1_schnorr_verify(ctx, schnorr_signature, message, &pubkey) == 0);
- CHECK(secp256k1_schnorr_recover(ctx, &recpubkey, schnorr_signature, message) != 1 ||
- memcmp(&pubkey, &recpubkey, sizeof(pubkey)) != 0);
-}
-
-/** Horribly broken hash function. Do not use for anything but tests. */
-void test_schnorr_hash(unsigned char *h32, const unsigned char *r32, const unsigned char *msg32) {
- int i;
- for (i = 0; i < 32; i++) {
- h32[i] = r32[i] ^ msg32[i];
- }
-}
-
-void test_schnorr_sign_verify(void) {
- unsigned char msg32[32];
- unsigned char sig64[3][64];
- secp256k1_gej pubkeyj[3];
- secp256k1_ge pubkey[3];
- secp256k1_scalar nonce[3], key[3];
- int i = 0;
- int k;
-
- secp256k1_rand256_test(msg32);
-
- for (k = 0; k < 3; k++) {
- random_scalar_order_test(&key[k]);
-
- do {
- random_scalar_order_test(&nonce[k]);
- if (secp256k1_schnorr_sig_sign(&ctx->ecmult_gen_ctx, sig64[k], &key[k], &nonce[k], NULL, &test_schnorr_hash, msg32)) {
- break;
- }
- } while(1);
-
- secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &pubkeyj[k], &key[k]);
- secp256k1_ge_set_gej_var(&pubkey[k], &pubkeyj[k]);
- CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32));
-
- for (i = 0; i < 4; i++) {
- int pos = secp256k1_rand_bits(6);
- int mod = 1 + secp256k1_rand_int(255);
- sig64[k][pos] ^= mod;
- CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64[k], &pubkey[k], &test_schnorr_hash, msg32) == 0);
- sig64[k][pos] ^= mod;
- }
- }
-}
-
-void test_schnorr_threshold(void) {
- unsigned char msg[32];
- unsigned char sec[5][32];
- secp256k1_pubkey pub[5];
- unsigned char nonce[5][32];
- secp256k1_pubkey pubnonce[5];
- unsigned char sig[5][64];
- const unsigned char* sigs[5];
- unsigned char allsig[64];
- const secp256k1_pubkey* pubs[5];
- secp256k1_pubkey allpub;
- int n, i;
- int damage;
- int ret = 0;
-
- damage = secp256k1_rand_bits(1) ? (1 + secp256k1_rand_int(4)) : 0;
- secp256k1_rand256_test(msg);
- n = 2 + secp256k1_rand_int(4);
- for (i = 0; i < n; i++) {
- do {
- secp256k1_rand256_test(sec[i]);
- } while (!secp256k1_ec_seckey_verify(ctx, sec[i]));
- CHECK(secp256k1_ec_pubkey_create(ctx, &pub[i], sec[i]));
- CHECK(secp256k1_schnorr_generate_nonce_pair(ctx, &pubnonce[i], nonce[i], msg, sec[i], NULL, NULL));
- pubs[i] = &pub[i];
- }
- if (damage == 1) {
- nonce[secp256k1_rand_int(n)][secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255);
- } else if (damage == 2) {
- sec[secp256k1_rand_int(n)][secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255);
- }
- for (i = 0; i < n; i++) {
- secp256k1_pubkey allpubnonce;
- const secp256k1_pubkey *pubnonces[4];
- int j;
- for (j = 0; j < i; j++) {
- pubnonces[j] = &pubnonce[j];
- }
- for (j = i + 1; j < n; j++) {
- pubnonces[j - 1] = &pubnonce[j];
- }
- CHECK(secp256k1_ec_pubkey_combine(ctx, &allpubnonce, pubnonces, n - 1));
- ret |= (secp256k1_schnorr_partial_sign(ctx, sig[i], msg, sec[i], &allpubnonce, nonce[i]) != 1) * 1;
- sigs[i] = sig[i];
- }
- if (damage == 3) {
- sig[secp256k1_rand_int(n)][secp256k1_rand_bits(6)] ^= 1 + secp256k1_rand_int(255);
- }
- ret |= (secp256k1_ec_pubkey_combine(ctx, &allpub, pubs, n) != 1) * 2;
- if ((ret & 1) == 0) {
- ret |= (secp256k1_schnorr_partial_combine(ctx, allsig, sigs, n) != 1) * 4;
- }
- if (damage == 4) {
- allsig[secp256k1_rand_int(32)] ^= 1 + secp256k1_rand_int(255);
- }
- if ((ret & 7) == 0) {
- ret |= (secp256k1_schnorr_verify(ctx, allsig, msg, &allpub) != 1) * 8;
- }
- CHECK((ret == 0) == (damage == 0));
-}
-
-void test_schnorr_recovery(void) {
- unsigned char msg32[32];
- unsigned char sig64[64];
- secp256k1_ge Q;
-
- secp256k1_rand256_test(msg32);
- secp256k1_rand256_test(sig64);
- secp256k1_rand256_test(sig64 + 32);
- if (secp256k1_schnorr_sig_recover(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1) {
- CHECK(secp256k1_schnorr_sig_verify(&ctx->ecmult_ctx, sig64, &Q, &test_schnorr_hash, msg32) == 1);
- }
-}
-
-void run_schnorr_tests(void) {
- int i;
- for (i = 0; i < 32*count; i++) {
- test_schnorr_end_to_end();
- }
- for (i = 0; i < 32 * count; i++) {
- test_schnorr_sign_verify();
- }
- for (i = 0; i < 16 * count; i++) {
- test_schnorr_recovery();
- }
- for (i = 0; i < 10 * count; i++) {
- test_schnorr_threshold();
- }
-}
-
-#endif
diff --git a/src/secp256k1/src/scalar.h b/src/secp256k1/src/scalar.h
index b590ccd6dd..27e9d8375e 100644
--- a/src/secp256k1/src/scalar.h
+++ b/src/secp256k1/src/scalar.h
@@ -13,7 +13,9 @@
#include "libsecp256k1-config.h"
#endif
-#if defined(USE_SCALAR_4X64)
+#if defined(EXHAUSTIVE_TEST_ORDER)
+#include "scalar_low.h"
+#elif defined(USE_SCALAR_4X64)
#include "scalar_4x64.h"
#elif defined(USE_SCALAR_8X32)
#include "scalar_8x32.h"
diff --git a/src/secp256k1/src/scalar_4x64_impl.h b/src/secp256k1/src/scalar_4x64_impl.h
index aa2703dd23..56e7bd82af 100644
--- a/src/secp256k1/src/scalar_4x64_impl.h
+++ b/src/secp256k1/src/scalar_4x64_impl.h
@@ -282,8 +282,8 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"movq 56(%%rsi), %%r14\n"
/* Initialize r8,r9,r10 */
"movq 0(%%rsi), %%r8\n"
- "movq $0, %%r9\n"
- "movq $0, %%r10\n"
+ "xorq %%r9, %%r9\n"
+ "xorq %%r10, %%r10\n"
/* (r8,r9) += n0 * c0 */
"movq %8, %%rax\n"
"mulq %%r11\n"
@@ -291,7 +291,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq %%rdx, %%r9\n"
/* extract m0 */
"movq %%r8, %q0\n"
- "movq $0, %%r8\n"
+ "xorq %%r8, %%r8\n"
/* (r9,r10) += l1 */
"addq 8(%%rsi), %%r9\n"
"adcq $0, %%r10\n"
@@ -309,7 +309,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq $0, %%r8\n"
/* extract m1 */
"movq %%r9, %q1\n"
- "movq $0, %%r9\n"
+ "xorq %%r9, %%r9\n"
/* (r10,r8,r9) += l2 */
"addq 16(%%rsi), %%r10\n"
"adcq $0, %%r8\n"
@@ -332,7 +332,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq $0, %%r9\n"
/* extract m2 */
"movq %%r10, %q2\n"
- "movq $0, %%r10\n"
+ "xorq %%r10, %%r10\n"
/* (r8,r9,r10) += l3 */
"addq 24(%%rsi), %%r8\n"
"adcq $0, %%r9\n"
@@ -355,7 +355,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq $0, %%r10\n"
/* extract m3 */
"movq %%r8, %q3\n"
- "movq $0, %%r8\n"
+ "xorq %%r8, %%r8\n"
/* (r9,r10,r8) += n3 * c1 */
"movq %9, %%rax\n"
"mulq %%r14\n"
@@ -387,8 +387,8 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"movq %q11, %%r13\n"
/* Initialize (r8,r9,r10) */
"movq %q5, %%r8\n"
- "movq $0, %%r9\n"
- "movq $0, %%r10\n"
+ "xorq %%r9, %%r9\n"
+ "xorq %%r10, %%r10\n"
/* (r8,r9) += m4 * c0 */
"movq %12, %%rax\n"
"mulq %%r11\n"
@@ -396,7 +396,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq %%rdx, %%r9\n"
/* extract p0 */
"movq %%r8, %q0\n"
- "movq $0, %%r8\n"
+ "xorq %%r8, %%r8\n"
/* (r9,r10) += m1 */
"addq %q6, %%r9\n"
"adcq $0, %%r10\n"
@@ -414,7 +414,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq $0, %%r8\n"
/* extract p1 */
"movq %%r9, %q1\n"
- "movq $0, %%r9\n"
+ "xorq %%r9, %%r9\n"
/* (r10,r8,r9) += m2 */
"addq %q7, %%r10\n"
"adcq $0, %%r8\n"
@@ -472,7 +472,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"movq %%rax, 0(%q6)\n"
/* Move to (r8,r9) */
"movq %%rdx, %%r8\n"
- "movq $0, %%r9\n"
+ "xorq %%r9, %%r9\n"
/* (r8,r9) += p1 */
"addq %q2, %%r8\n"
"adcq $0, %%r9\n"
@@ -483,7 +483,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq %%rdx, %%r9\n"
/* Extract r1 */
"movq %%r8, 8(%q6)\n"
- "movq $0, %%r8\n"
+ "xorq %%r8, %%r8\n"
/* (r9,r8) += p4 */
"addq %%r10, %%r9\n"
"adcq $0, %%r8\n"
@@ -492,7 +492,7 @@ static void secp256k1_scalar_reduce_512(secp256k1_scalar *r, const uint64_t *l)
"adcq $0, %%r8\n"
/* Extract r2 */
"movq %%r9, 16(%q6)\n"
- "movq $0, %%r9\n"
+ "xorq %%r9, %%r9\n"
/* (r8,r9) += p3 */
"addq %q4, %%r8\n"
"adcq $0, %%r9\n"
diff --git a/src/secp256k1/src/scalar_impl.h b/src/secp256k1/src/scalar_impl.h
index c5baf4df41..f5b2376407 100644
--- a/src/secp256k1/src/scalar_impl.h
+++ b/src/secp256k1/src/scalar_impl.h
@@ -14,7 +14,9 @@
#include "libsecp256k1-config.h"
#endif
-#if defined(USE_SCALAR_4X64)
+#if defined(EXHAUSTIVE_TEST_ORDER)
+#include "scalar_low_impl.h"
+#elif defined(USE_SCALAR_4X64)
#include "scalar_4x64_impl.h"
#elif defined(USE_SCALAR_8X32)
#include "scalar_8x32_impl.h"
@@ -31,17 +33,37 @@ static void secp256k1_scalar_get_num(secp256k1_num *r, const secp256k1_scalar *a
/** secp256k1 curve order, see secp256k1_ecdsa_const_order_as_fe in ecdsa_impl.h */
static void secp256k1_scalar_order_get_num(secp256k1_num *r) {
+#if defined(EXHAUSTIVE_TEST_ORDER)
+ static const unsigned char order[32] = {
+ 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,EXHAUSTIVE_TEST_ORDER
+ };
+#else
static const unsigned char order[32] = {
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,
0xBA,0xAE,0xDC,0xE6,0xAF,0x48,0xA0,0x3B,
0xBF,0xD2,0x5E,0x8C,0xD0,0x36,0x41,0x41
};
+#endif
secp256k1_num_set_bin(r, order, 32);
}
#endif
static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar *x) {
+#if defined(EXHAUSTIVE_TEST_ORDER)
+ int i;
+ *r = 0;
+ for (i = 0; i < EXHAUSTIVE_TEST_ORDER; i++)
+ if ((i * *x) % EXHAUSTIVE_TEST_ORDER == 1)
+ *r = i;
+ /* If this VERIFY_CHECK triggers we were given a noninvertible scalar (and thus
+ * have a composite group order; fix it in exhaustive_tests.c). */
+ VERIFY_CHECK(*r != 0);
+}
+#else
secp256k1_scalar *t;
int i;
/* First compute x ^ (2^N - 1) for some values of N. */
@@ -233,9 +255,9 @@ static void secp256k1_scalar_inverse(secp256k1_scalar *r, const secp256k1_scalar
}
SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) {
- /* d[0] is present and is the lowest word for all representations */
return !(a->d[0] & 1);
}
+#endif
static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_scalar *x) {
#if defined(USE_SCALAR_INV_BUILTIN)
@@ -259,6 +281,18 @@ static void secp256k1_scalar_inverse_var(secp256k1_scalar *r, const secp256k1_sc
}
#ifdef USE_ENDOMORPHISM
+#if defined(EXHAUSTIVE_TEST_ORDER)
+/**
+ * Find k1 and k2 given k, such that k1 + k2 * lambda == k mod n; unlike in the
+ * full case we don't bother making k1 and k2 be small, we just want them to be
+ * nontrivial to get full test coverage for the exhaustive tests. We therefore
+ * (arbitrarily) set k2 = k + 5 and k1 = k - k2 * lambda.
+ */
+static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) {
+ *r2 = (*a + 5) % EXHAUSTIVE_TEST_ORDER;
+ *r1 = (*a + (EXHAUSTIVE_TEST_ORDER - *r2) * EXHAUSTIVE_TEST_LAMBDA) % EXHAUSTIVE_TEST_ORDER;
+}
+#else
/**
* The Secp256k1 curve has an endomorphism, where lambda * (x, y) = (beta * x, y), where
* lambda is {0x53,0x63,0xad,0x4c,0xc0,0x5c,0x30,0xe0,0xa5,0x26,0x1c,0x02,0x88,0x12,0x64,0x5a,
@@ -331,5 +365,6 @@ static void secp256k1_scalar_split_lambda(secp256k1_scalar *r1, secp256k1_scalar
secp256k1_scalar_add(r1, r1, a);
}
#endif
+#endif
#endif
diff --git a/src/secp256k1/src/scalar_low.h b/src/secp256k1/src/scalar_low.h
new file mode 100644
index 0000000000..5574c44c7a
--- /dev/null
+++ b/src/secp256k1/src/scalar_low.h
@@ -0,0 +1,15 @@
+/**********************************************************************
+ * Copyright (c) 2015 Andrew Poelstra *
+ * Distributed under the MIT software license, see the accompanying *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_
+#define _SECP256K1_SCALAR_REPR_
+
+#include <stdint.h>
+
+/** A scalar modulo the group order of the secp256k1 curve. */
+typedef uint32_t secp256k1_scalar;
+
+#endif
diff --git a/src/secp256k1/src/scalar_low_impl.h b/src/secp256k1/src/scalar_low_impl.h
new file mode 100644
index 0000000000..4f94441f49
--- /dev/null
+++ b/src/secp256k1/src/scalar_low_impl.h
@@ -0,0 +1,114 @@
+/**********************************************************************
+ * Copyright (c) 2015 Andrew Poelstra *
+ * Distributed under the MIT software license, see the accompanying *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef _SECP256K1_SCALAR_REPR_IMPL_H_
+#define _SECP256K1_SCALAR_REPR_IMPL_H_
+
+#include "scalar.h"
+
+#include <string.h>
+
+SECP256K1_INLINE static int secp256k1_scalar_is_even(const secp256k1_scalar *a) {
+ return !(*a & 1);
+}
+
+SECP256K1_INLINE static void secp256k1_scalar_clear(secp256k1_scalar *r) { *r = 0; }
+SECP256K1_INLINE static void secp256k1_scalar_set_int(secp256k1_scalar *r, unsigned int v) { *r = v; }
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
+ if (offset < 32)
+ return ((*a >> offset) & ((((uint32_t)1) << count) - 1));
+ else
+ return 0;
+}
+
+SECP256K1_INLINE static unsigned int secp256k1_scalar_get_bits_var(const secp256k1_scalar *a, unsigned int offset, unsigned int count) {
+ return secp256k1_scalar_get_bits(a, offset, count);
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_check_overflow(const secp256k1_scalar *a) { return *a >= EXHAUSTIVE_TEST_ORDER; }
+
+static int secp256k1_scalar_add(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
+ *r = (*a + *b) % EXHAUSTIVE_TEST_ORDER;
+ return *r < *b;
+}
+
+static void secp256k1_scalar_cadd_bit(secp256k1_scalar *r, unsigned int bit, int flag) {
+ if (flag && bit < 32)
+ *r += (1 << bit);
+#ifdef VERIFY
+ VERIFY_CHECK(secp256k1_scalar_check_overflow(r) == 0);
+#endif
+}
+
+static void secp256k1_scalar_set_b32(secp256k1_scalar *r, const unsigned char *b32, int *overflow) {
+ const int base = 0x100 % EXHAUSTIVE_TEST_ORDER;
+ int i;
+ *r = 0;
+ for (i = 0; i < 32; i++) {
+ *r = ((*r * base) + b32[i]) % EXHAUSTIVE_TEST_ORDER;
+ }
+ /* just deny overflow, it basically always happens */
+ if (overflow) *overflow = 0;
+}
+
+static void secp256k1_scalar_get_b32(unsigned char *bin, const secp256k1_scalar* a) {
+ memset(bin, 0, 32);
+ bin[28] = *a >> 24; bin[29] = *a >> 16; bin[30] = *a >> 8; bin[31] = *a;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_zero(const secp256k1_scalar *a) {
+ return *a == 0;
+}
+
+static void secp256k1_scalar_negate(secp256k1_scalar *r, const secp256k1_scalar *a) {
+ if (*a == 0) {
+ *r = 0;
+ } else {
+ *r = EXHAUSTIVE_TEST_ORDER - *a;
+ }
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_is_one(const secp256k1_scalar *a) {
+ return *a == 1;
+}
+
+static int secp256k1_scalar_is_high(const secp256k1_scalar *a) {
+ return *a > EXHAUSTIVE_TEST_ORDER / 2;
+}
+
+static int secp256k1_scalar_cond_negate(secp256k1_scalar *r, int flag) {
+ if (flag) secp256k1_scalar_negate(r, r);
+ return flag ? -1 : 1;
+}
+
+static void secp256k1_scalar_mul(secp256k1_scalar *r, const secp256k1_scalar *a, const secp256k1_scalar *b) {
+ *r = (*a * *b) % EXHAUSTIVE_TEST_ORDER;
+}
+
+static int secp256k1_scalar_shr_int(secp256k1_scalar *r, int n) {
+ int ret;
+ VERIFY_CHECK(n > 0);
+ VERIFY_CHECK(n < 16);
+ ret = *r & ((1 << n) - 1);
+ *r >>= n;
+ return ret;
+}
+
+static void secp256k1_scalar_sqr(secp256k1_scalar *r, const secp256k1_scalar *a) {
+ *r = (*a * *a) % EXHAUSTIVE_TEST_ORDER;
+}
+
+static void secp256k1_scalar_split_128(secp256k1_scalar *r1, secp256k1_scalar *r2, const secp256k1_scalar *a) {
+ *r1 = *a;
+ *r2 = 0;
+}
+
+SECP256K1_INLINE static int secp256k1_scalar_eq(const secp256k1_scalar *a, const secp256k1_scalar *b) {
+ return *a == *b;
+}
+
+#endif
diff --git a/src/secp256k1/src/secp256k1.c b/src/secp256k1/src/secp256k1.c
index 7973d60c36..fb8b882faa 100644..100755
--- a/src/secp256k1/src/secp256k1.c
+++ b/src/secp256k1/src/secp256k1.c
@@ -359,16 +359,15 @@ int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature
secp256k1_scalar_set_b32(&sec, seckey, &overflow);
/* Fail if the secret key is invalid. */
if (!overflow && !secp256k1_scalar_is_zero(&sec)) {
+ unsigned char nonce32[32];
unsigned int count = 0;
secp256k1_scalar_set_b32(&msg, msg32, NULL);
while (1) {
- unsigned char nonce32[32];
ret = noncefp(nonce32, msg32, seckey, NULL, (void*)noncedata, count);
if (!ret) {
break;
}
secp256k1_scalar_set_b32(&non, nonce32, &overflow);
- memset(nonce32, 0, 32);
if (!overflow && !secp256k1_scalar_is_zero(&non)) {
if (secp256k1_ecdsa_sig_sign(&ctx->ecmult_gen_ctx, &r, &s, &sec, &msg, &non, NULL)) {
break;
@@ -376,6 +375,7 @@ int secp256k1_ecdsa_sign(const secp256k1_context* ctx, secp256k1_ecdsa_signature
}
count++;
}
+ memset(nonce32, 0, 32);
secp256k1_scalar_clear(&msg);
secp256k1_scalar_clear(&non);
secp256k1_scalar_clear(&sec);
diff --git a/src/secp256k1/src/tests.c b/src/secp256k1/src/tests.c
index b32cb90813..9ae7d30281 100644
--- a/src/secp256k1/src/tests.c
+++ b/src/secp256k1/src/tests.c
@@ -520,7 +520,7 @@ void test_num_mod(void) {
secp256k1_num order, n;
/* check that 0 mod anything is 0 */
- random_scalar_order_test(&s);
+ random_scalar_order_test(&s);
secp256k1_scalar_get_num(&order, &s);
secp256k1_scalar_set_int(&s, 0);
secp256k1_scalar_get_num(&n, &s);
@@ -535,7 +535,7 @@ void test_num_mod(void) {
CHECK(secp256k1_num_is_zero(&n));
/* check that increasing the number past 2^256 does not break this */
- random_scalar_order_test(&s);
+ random_scalar_order_test(&s);
secp256k1_scalar_get_num(&n, &s);
/* multiply by 2^8, which'll test this case with high probability */
for (i = 0; i < 8; ++i) {
@@ -568,7 +568,7 @@ void test_num_jacobi(void) {
/* we first need a scalar which is not a multiple of 5 */
do {
secp256k1_num fiven;
- random_scalar_order_test(&sqr);
+ random_scalar_order_test(&sqr);
secp256k1_scalar_get_num(&fiven, &five);
secp256k1_scalar_get_num(&n, &sqr);
secp256k1_num_mod(&n, &fiven);
@@ -587,7 +587,7 @@ void test_num_jacobi(void) {
/** test with secp group order as order */
secp256k1_scalar_order_get_num(&order);
- random_scalar_order_test(&sqr);
+ random_scalar_order_test(&sqr);
secp256k1_scalar_sqr(&sqr, &sqr);
/* test residue */
secp256k1_scalar_get_num(&n, &sqr);
@@ -1733,18 +1733,18 @@ void run_field_inv_all_var(void) {
secp256k1_fe x[16], xi[16], xii[16];
int i;
/* Check it's safe to call for 0 elements */
- secp256k1_fe_inv_all_var(0, xi, x);
+ secp256k1_fe_inv_all_var(xi, x, 0);
for (i = 0; i < count; i++) {
size_t j;
size_t len = secp256k1_rand_int(15) + 1;
for (j = 0; j < len; j++) {
random_fe_non_zero(&x[j]);
}
- secp256k1_fe_inv_all_var(len, xi, x);
+ secp256k1_fe_inv_all_var(xi, x, len);
for (j = 0; j < len; j++) {
CHECK(check_fe_inverse(&x[j], &xi[j]));
}
- secp256k1_fe_inv_all_var(len, xii, xi);
+ secp256k1_fe_inv_all_var(xii, xi, len);
for (j = 0; j < len; j++) {
CHECK(check_fe_equal(&x[j], &xii[j]));
}
@@ -1930,7 +1930,7 @@ void test_ge(void) {
zs[i] = gej[i].z;
}
}
- secp256k1_fe_inv_all_var(4 * runs + 1, zinv, zs);
+ secp256k1_fe_inv_all_var(zinv, zs, 4 * runs + 1);
free(zs);
}
@@ -2050,8 +2050,8 @@ void test_ge(void) {
secp256k1_fe_mul(&zr[i + 1], &zinv[i], &gej[i + 1].z);
}
}
- secp256k1_ge_set_table_gej_var(4 * runs + 1, ge_set_table, gej, zr);
- secp256k1_ge_set_all_gej_var(4 * runs + 1, ge_set_all, gej, &ctx->error_callback);
+ secp256k1_ge_set_table_gej_var(ge_set_table, gej, zr, 4 * runs + 1);
+ secp256k1_ge_set_all_gej_var(ge_set_all, gej, 4 * runs + 1, &ctx->error_callback);
for (i = 0; i < 4 * runs + 1; i++) {
secp256k1_fe s;
random_fe_non_zero(&s);
diff --git a/src/secp256k1/src/tests_exhaustive.c b/src/secp256k1/src/tests_exhaustive.c
new file mode 100644
index 0000000000..bda6ee475c
--- /dev/null
+++ b/src/secp256k1/src/tests_exhaustive.c
@@ -0,0 +1,329 @@
+/***********************************************************************
+ * Copyright (c) 2016 Andrew Poelstra *
+ * Distributed under the MIT software license, see the accompanying *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#if defined HAVE_CONFIG_H
+#include "libsecp256k1-config.h"
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <time.h>
+
+#undef USE_ECMULT_STATIC_PRECOMPUTATION
+
+#ifndef EXHAUSTIVE_TEST_ORDER
+/* see group_impl.h for allowable values */
+#define EXHAUSTIVE_TEST_ORDER 13
+#define EXHAUSTIVE_TEST_LAMBDA 9 /* cube root of 1 mod 13 */
+#endif
+
+#include "include/secp256k1.h"
+#include "group.h"
+#include "secp256k1.c"
+#include "testrand_impl.h"
+
+/** stolen from tests.c */
+void ge_equals_ge(const secp256k1_ge *a, const secp256k1_ge *b) {
+ CHECK(a->infinity == b->infinity);
+ if (a->infinity) {
+ return;
+ }
+ CHECK(secp256k1_fe_equal_var(&a->x, &b->x));
+ CHECK(secp256k1_fe_equal_var(&a->y, &b->y));
+}
+
+void ge_equals_gej(const secp256k1_ge *a, const secp256k1_gej *b) {
+ secp256k1_fe z2s;
+ secp256k1_fe u1, u2, s1, s2;
+ CHECK(a->infinity == b->infinity);
+ if (a->infinity) {
+ return;
+ }
+ /* Check a.x * b.z^2 == b.x && a.y * b.z^3 == b.y, to avoid inverses. */
+ secp256k1_fe_sqr(&z2s, &b->z);
+ secp256k1_fe_mul(&u1, &a->x, &z2s);
+ u2 = b->x; secp256k1_fe_normalize_weak(&u2);
+ secp256k1_fe_mul(&s1, &a->y, &z2s); secp256k1_fe_mul(&s1, &s1, &b->z);
+ s2 = b->y; secp256k1_fe_normalize_weak(&s2);
+ CHECK(secp256k1_fe_equal_var(&u1, &u2));
+ CHECK(secp256k1_fe_equal_var(&s1, &s2));
+}
+
+void random_fe(secp256k1_fe *x) {
+ unsigned char bin[32];
+ do {
+ secp256k1_rand256(bin);
+ if (secp256k1_fe_set_b32(x, bin)) {
+ return;
+ }
+ } while(1);
+}
+/** END stolen from tests.c */
+
+int secp256k1_nonce_function_smallint(unsigned char *nonce32, const unsigned char *msg32,
+ const unsigned char *key32, const unsigned char *algo16,
+ void *data, unsigned int attempt) {
+ secp256k1_scalar s;
+ int *idata = data;
+ (void)msg32;
+ (void)key32;
+ (void)algo16;
+ /* Some nonces cannot be used because they'd cause s and/or r to be zero.
+ * The signing function has retry logic here that just re-calls the nonce
+ * function with an increased `attempt`. So if attempt > 0 this means we
+ * need to change the nonce to avoid an infinite loop. */
+ if (attempt > 0) {
+ (*idata)++;
+ }
+ secp256k1_scalar_set_int(&s, *idata);
+ secp256k1_scalar_get_b32(nonce32, &s);
+ return 1;
+}
+
+#ifdef USE_ENDOMORPHISM
+void test_exhaustive_endomorphism(const secp256k1_ge *group, int order) {
+ int i;
+ for (i = 0; i < order; i++) {
+ secp256k1_ge res;
+ secp256k1_ge_mul_lambda(&res, &group[i]);
+ ge_equals_ge(&group[i * EXHAUSTIVE_TEST_LAMBDA % EXHAUSTIVE_TEST_ORDER], &res);
+ }
+}
+#endif
+
+void test_exhaustive_addition(const secp256k1_ge *group, const secp256k1_gej *groupj, int order) {
+ int i, j;
+
+ /* Sanity-check (and check infinity functions) */
+ CHECK(secp256k1_ge_is_infinity(&group[0]));
+ CHECK(secp256k1_gej_is_infinity(&groupj[0]));
+ for (i = 1; i < order; i++) {
+ CHECK(!secp256k1_ge_is_infinity(&group[i]));
+ CHECK(!secp256k1_gej_is_infinity(&groupj[i]));
+ }
+
+ /* Check all addition formulae */
+ for (j = 0; j < order; j++) {
+ secp256k1_fe fe_inv;
+ secp256k1_fe_inv(&fe_inv, &groupj[j].z);
+ for (i = 0; i < order; i++) {
+ secp256k1_ge zless_gej;
+ secp256k1_gej tmp;
+ /* add_var */
+ secp256k1_gej_add_var(&tmp, &groupj[i], &groupj[j], NULL);
+ ge_equals_gej(&group[(i + j) % order], &tmp);
+ /* add_ge */
+ if (j > 0) {
+ secp256k1_gej_add_ge(&tmp, &groupj[i], &group[j]);
+ ge_equals_gej(&group[(i + j) % order], &tmp);
+ }
+ /* add_ge_var */
+ secp256k1_gej_add_ge_var(&tmp, &groupj[i], &group[j], NULL);
+ ge_equals_gej(&group[(i + j) % order], &tmp);
+ /* add_zinv_var */
+ zless_gej.infinity = groupj[j].infinity;
+ zless_gej.x = groupj[j].x;
+ zless_gej.y = groupj[j].y;
+ secp256k1_gej_add_zinv_var(&tmp, &groupj[i], &zless_gej, &fe_inv);
+ ge_equals_gej(&group[(i + j) % order], &tmp);
+ }
+ }
+
+ /* Check doubling */
+ for (i = 0; i < order; i++) {
+ secp256k1_gej tmp;
+ if (i > 0) {
+ secp256k1_gej_double_nonzero(&tmp, &groupj[i], NULL);
+ ge_equals_gej(&group[(2 * i) % order], &tmp);
+ }
+ secp256k1_gej_double_var(&tmp, &groupj[i], NULL);
+ ge_equals_gej(&group[(2 * i) % order], &tmp);
+ }
+
+ /* Check negation */
+ for (i = 1; i < order; i++) {
+ secp256k1_ge tmp;
+ secp256k1_gej tmpj;
+ secp256k1_ge_neg(&tmp, &group[i]);
+ ge_equals_ge(&group[order - i], &tmp);
+ secp256k1_gej_neg(&tmpj, &groupj[i]);
+ ge_equals_gej(&group[order - i], &tmpj);
+ }
+}
+
+void test_exhaustive_ecmult(const secp256k1_context *ctx, const secp256k1_ge *group, const secp256k1_gej *groupj, int order) {
+ int i, j, r_log;
+ for (r_log = 1; r_log < order; r_log++) {
+ for (j = 0; j < order; j++) {
+ for (i = 0; i < order; i++) {
+ secp256k1_gej tmp;
+ secp256k1_scalar na, ng;
+ secp256k1_scalar_set_int(&na, i);
+ secp256k1_scalar_set_int(&ng, j);
+
+ secp256k1_ecmult(&ctx->ecmult_ctx, &tmp, &groupj[r_log], &na, &ng);
+ ge_equals_gej(&group[(i * r_log + j) % order], &tmp);
+
+ if (i > 0) {
+ secp256k1_ecmult_const(&tmp, &group[i], &ng);
+ ge_equals_gej(&group[(i * j) % order], &tmp);
+ }
+ }
+ }
+ }
+}
+
+void r_from_k(secp256k1_scalar *r, const secp256k1_ge *group, int k) {
+ secp256k1_fe x;
+ unsigned char x_bin[32];
+ k %= EXHAUSTIVE_TEST_ORDER;
+ x = group[k].x;
+ secp256k1_fe_normalize(&x);
+ secp256k1_fe_get_b32(x_bin, &x);
+ secp256k1_scalar_set_b32(r, x_bin, NULL);
+}
+
+void test_exhaustive_verify(const secp256k1_context *ctx, const secp256k1_ge *group, int order) {
+ int s, r, msg, key;
+ for (s = 1; s < order; s++) {
+ for (r = 1; r < order; r++) {
+ for (msg = 1; msg < order; msg++) {
+ for (key = 1; key < order; key++) {
+ secp256k1_ge nonconst_ge;
+ secp256k1_ecdsa_signature sig;
+ secp256k1_pubkey pk;
+ secp256k1_scalar sk_s, msg_s, r_s, s_s;
+ secp256k1_scalar s_times_k_s, msg_plus_r_times_sk_s;
+ int k, should_verify;
+ unsigned char msg32[32];
+
+ secp256k1_scalar_set_int(&s_s, s);
+ secp256k1_scalar_set_int(&r_s, r);
+ secp256k1_scalar_set_int(&msg_s, msg);
+ secp256k1_scalar_set_int(&sk_s, key);
+
+ /* Verify by hand */
+ /* Run through every k value that gives us this r and check that *one* works.
+ * Note there could be none, there could be multiple, ECDSA is weird. */
+ should_verify = 0;
+ for (k = 0; k < order; k++) {
+ secp256k1_scalar check_x_s;
+ r_from_k(&check_x_s, group, k);
+ if (r_s == check_x_s) {
+ secp256k1_scalar_set_int(&s_times_k_s, k);
+ secp256k1_scalar_mul(&s_times_k_s, &s_times_k_s, &s_s);
+ secp256k1_scalar_mul(&msg_plus_r_times_sk_s, &r_s, &sk_s);
+ secp256k1_scalar_add(&msg_plus_r_times_sk_s, &msg_plus_r_times_sk_s, &msg_s);
+ should_verify |= secp256k1_scalar_eq(&s_times_k_s, &msg_plus_r_times_sk_s);
+ }
+ }
+ /* nb we have a "high s" rule */
+ should_verify &= !secp256k1_scalar_is_high(&s_s);
+
+ /* Verify by calling verify */
+ secp256k1_ecdsa_signature_save(&sig, &r_s, &s_s);
+ memcpy(&nonconst_ge, &group[sk_s], sizeof(nonconst_ge));
+ secp256k1_pubkey_save(&pk, &nonconst_ge);
+ secp256k1_scalar_get_b32(msg32, &msg_s);
+ CHECK(should_verify ==
+ secp256k1_ecdsa_verify(ctx, &sig, msg32, &pk));
+ }
+ }
+ }
+ }
+}
+
+void test_exhaustive_sign(const secp256k1_context *ctx, const secp256k1_ge *group, int order) {
+ int i, j, k;
+
+ /* Loop */
+ for (i = 1; i < order; i++) { /* message */
+ for (j = 1; j < order; j++) { /* key */
+ for (k = 1; k < order; k++) { /* nonce */
+ secp256k1_ecdsa_signature sig;
+ secp256k1_scalar sk, msg, r, s, expected_r;
+ unsigned char sk32[32], msg32[32];
+ secp256k1_scalar_set_int(&msg, i);
+ secp256k1_scalar_set_int(&sk, j);
+ secp256k1_scalar_get_b32(sk32, &sk);
+ secp256k1_scalar_get_b32(msg32, &msg);
+
+ secp256k1_ecdsa_sign(ctx, &sig, msg32, sk32, secp256k1_nonce_function_smallint, &k);
+
+ secp256k1_ecdsa_signature_load(ctx, &r, &s, &sig);
+ /* Note that we compute expected_r *after* signing -- this is important
+ * because our nonce-computing function function might change k during
+ * signing. */
+ r_from_k(&expected_r, group, k);
+ CHECK(r == expected_r);
+ CHECK((k * s) % order == (i + r * j) % order ||
+ (k * (EXHAUSTIVE_TEST_ORDER - s)) % order == (i + r * j) % order);
+ }
+ }
+ }
+
+ /* We would like to verify zero-knowledge here by counting how often every
+ * possible (s, r) tuple appears, but because the group order is larger
+ * than the field order, when coercing the x-values to scalar values, some
+ * appear more often than others, so we are actually not zero-knowledge.
+ * (This effect also appears in the real code, but the difference is on the
+ * order of 1/2^128th the field order, so the deviation is not useful to a
+ * computationally bounded attacker.)
+ */
+}
+
+int main(void) {
+ int i;
+ secp256k1_gej groupj[EXHAUSTIVE_TEST_ORDER];
+ secp256k1_ge group[EXHAUSTIVE_TEST_ORDER];
+
+ /* Build context */
+ secp256k1_context *ctx = secp256k1_context_create(SECP256K1_CONTEXT_SIGN | SECP256K1_CONTEXT_VERIFY);
+
+ /* TODO set z = 1, then do num_tests runs with random z values */
+
+ /* Generate the entire group */
+ secp256k1_gej_set_infinity(&groupj[0]);
+ secp256k1_ge_set_gej(&group[0], &groupj[0]);
+ for (i = 1; i < EXHAUSTIVE_TEST_ORDER; i++) {
+ /* Set a different random z-value for each Jacobian point */
+ secp256k1_fe z;
+ random_fe(&z);
+
+ secp256k1_gej_add_ge(&groupj[i], &groupj[i - 1], &secp256k1_ge_const_g);
+ secp256k1_ge_set_gej(&group[i], &groupj[i]);
+ secp256k1_gej_rescale(&groupj[i], &z);
+
+ /* Verify against ecmult_gen */
+ {
+ secp256k1_scalar scalar_i;
+ secp256k1_gej generatedj;
+ secp256k1_ge generated;
+
+ secp256k1_scalar_set_int(&scalar_i, i);
+ secp256k1_ecmult_gen(&ctx->ecmult_gen_ctx, &generatedj, &scalar_i);
+ secp256k1_ge_set_gej(&generated, &generatedj);
+
+ CHECK(group[i].infinity == 0);
+ CHECK(generated.infinity == 0);
+ CHECK(secp256k1_fe_equal_var(&generated.x, &group[i].x));
+ CHECK(secp256k1_fe_equal_var(&generated.y, &group[i].y));
+ }
+ }
+
+ /* Run the tests */
+#ifdef USE_ENDOMORPHISM
+ test_exhaustive_endomorphism(group, EXHAUSTIVE_TEST_ORDER);
+#endif
+ test_exhaustive_addition(group, groupj, EXHAUSTIVE_TEST_ORDER);
+ test_exhaustive_ecmult(ctx, group, groupj, EXHAUSTIVE_TEST_ORDER);
+ test_exhaustive_sign(ctx, group, EXHAUSTIVE_TEST_ORDER);
+ test_exhaustive_verify(ctx, group, EXHAUSTIVE_TEST_ORDER);
+
+ return 0;
+}
+
diff --git a/src/serialize.h b/src/serialize.h
index 1f51da82ff..e4d72d2348 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,6 +13,7 @@
#include <ios>
#include <limits>
#include <map>
+#include <memory>
#include <set>
#include <stdint.h>
#include <string>
@@ -25,6 +26,20 @@
static const unsigned int MAX_SIZE = 0x02000000;
/**
+ * Dummy data type to identify deserializing constructors.
+ *
+ * By convention, a constructor of a type T with signature
+ *
+ * template <typename Stream> T::T(deserialize_type, Stream& s)
+ *
+ * is a deserializing constructor, which builds the type by
+ * deserializing it from s. If T contains const fields, this
+ * is likely the only way to do so.
+ */
+struct deserialize_type {};
+constexpr deserialize_type deserialize {};
+
+/**
* Used to bypass the rule against non-const reference to temporary
* where it makes sense with wrappers such as CFlatData or CTxDB
*/
@@ -44,34 +59,6 @@ inline T* NCONST_PTR(const T* val)
return const_cast<T*>(val);
}
-/**
- * Important: Do not use the following functions in new code, but use v.data()
- * and v.data() + v.size() respectively directly. They were once introduced to
- * have a compatible, safe way to get the begin and end pointer of a vector.
- * However with C++11 the language has built-in functionality for this and it's
- * more readable to just use that.
- */
-template <typename V>
-inline typename V::value_type* begin_ptr(V& v)
-{
- return v.data();
-}
-template <typename V>
-inline const typename V::value_type* begin_ptr(const V& v)
-{
- return v.data();
-}
-template <typename V>
-inline typename V::value_type* end_ptr(V& v)
-{
- return v.data() + v.size();
-}
-template <typename V>
-inline const typename V::value_type* end_ptr(const V& v)
-{
- return v.data() + v.size();
-}
-
/*
* Lowest-level serialization and conversion.
* @note Sizes of these types are verified in the tests
@@ -151,6 +138,8 @@ inline float ser_uint32_to_float(uint32_t y)
// i.e. anything that supports .read(char*, size_t) and .write(char*, size_t)
//
+class CSizeComputer;
+
enum
{
// primary actions
@@ -159,7 +148,8 @@ enum
SER_GETHASH = (1 << 2),
};
-#define READWRITE(obj) (::SerReadWrite(s, (obj), nType, nVersion, ser_action))
+#define READWRITE(obj) (::SerReadWrite(s, (obj), ser_action))
+#define READWRITEMANY(...) (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
/**
* Implement three methods for serializable objects. These are actually wrappers over
@@ -167,63 +157,42 @@ enum
* code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be
* added as members.
*/
-#define ADD_SERIALIZE_METHODS \
- size_t GetSerializeSize(int nType, int nVersion) const { \
- CSizeComputer s(nType, nVersion); \
- NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);\
- return s.size(); \
- } \
- template<typename Stream> \
- void Serialize(Stream& s, int nType, int nVersion) const { \
- NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize(), nType, nVersion);\
- } \
- template<typename Stream> \
- void Unserialize(Stream& s, int nType, int nVersion) { \
- SerializationOp(s, CSerActionUnserialize(), nType, nVersion); \
+#define ADD_SERIALIZE_METHODS \
+ template<typename Stream> \
+ void Serialize(Stream& s) const { \
+ NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize()); \
+ } \
+ template<typename Stream> \
+ void Unserialize(Stream& s) { \
+ SerializationOp(s, CSerActionUnserialize()); \
}
-/*
- * Basic Types
- */
-inline unsigned int GetSerializeSize(char a, int, int=0) { return 1; }
-inline unsigned int GetSerializeSize(int8_t a, int, int=0) { return 1; }
-inline unsigned int GetSerializeSize(uint8_t a, int, int=0) { return 1; }
-inline unsigned int GetSerializeSize(int16_t a, int, int=0) { return 2; }
-inline unsigned int GetSerializeSize(uint16_t a, int, int=0) { return 2; }
-inline unsigned int GetSerializeSize(int32_t a, int, int=0) { return 4; }
-inline unsigned int GetSerializeSize(uint32_t a, int, int=0) { return 4; }
-inline unsigned int GetSerializeSize(int64_t a, int, int=0) { return 8; }
-inline unsigned int GetSerializeSize(uint64_t a, int, int=0) { return 8; }
-inline unsigned int GetSerializeSize(float a, int, int=0) { return 4; }
-inline unsigned int GetSerializeSize(double a, int, int=0) { return 8; }
-
-template<typename Stream> inline void Serialize(Stream& s, char a, int, int=0) { ser_writedata8(s, a); } // TODO Get rid of bare char
-template<typename Stream> inline void Serialize(Stream& s, int8_t a, int, int=0) { ser_writedata8(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, uint8_t a, int, int=0) { ser_writedata8(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, int16_t a, int, int=0) { ser_writedata16(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, uint16_t a, int, int=0) { ser_writedata16(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, int32_t a, int, int=0) { ser_writedata32(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, uint32_t a, int, int=0) { ser_writedata32(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, int64_t a, int, int=0) { ser_writedata64(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, uint64_t a, int, int=0) { ser_writedata64(s, a); }
-template<typename Stream> inline void Serialize(Stream& s, float a, int, int=0) { ser_writedata32(s, ser_float_to_uint32(a)); }
-template<typename Stream> inline void Serialize(Stream& s, double a, int, int=0) { ser_writedata64(s, ser_double_to_uint64(a)); }
-
-template<typename Stream> inline void Unserialize(Stream& s, char& a, int, int=0) { a = ser_readdata8(s); } // TODO Get rid of bare char
-template<typename Stream> inline void Unserialize(Stream& s, int8_t& a, int, int=0) { a = ser_readdata8(s); }
-template<typename Stream> inline void Unserialize(Stream& s, uint8_t& a, int, int=0) { a = ser_readdata8(s); }
-template<typename Stream> inline void Unserialize(Stream& s, int16_t& a, int, int=0) { a = ser_readdata16(s); }
-template<typename Stream> inline void Unserialize(Stream& s, uint16_t& a, int, int=0) { a = ser_readdata16(s); }
-template<typename Stream> inline void Unserialize(Stream& s, int32_t& a, int, int=0) { a = ser_readdata32(s); }
-template<typename Stream> inline void Unserialize(Stream& s, uint32_t& a, int, int=0) { a = ser_readdata32(s); }
-template<typename Stream> inline void Unserialize(Stream& s, int64_t& a, int, int=0) { a = ser_readdata64(s); }
-template<typename Stream> inline void Unserialize(Stream& s, uint64_t& a, int, int=0) { a = ser_readdata64(s); }
-template<typename Stream> inline void Unserialize(Stream& s, float& a, int, int=0) { a = ser_uint32_to_float(ser_readdata32(s)); }
-template<typename Stream> inline void Unserialize(Stream& s, double& a, int, int=0) { a = ser_uint64_to_double(ser_readdata64(s)); }
-
-inline unsigned int GetSerializeSize(bool a, int, int=0) { return sizeof(char); }
-template<typename Stream> inline void Serialize(Stream& s, bool a, int, int=0) { char f=a; ser_writedata8(s, f); }
-template<typename Stream> inline void Unserialize(Stream& s, bool& a, int, int=0) { char f=ser_readdata8(s); a=f; }
+template<typename Stream> inline void Serialize(Stream& s, char a ) { ser_writedata8(s, a); } // TODO Get rid of bare char
+template<typename Stream> inline void Serialize(Stream& s, int8_t a ) { ser_writedata8(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, uint8_t a ) { ser_writedata8(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, int16_t a ) { ser_writedata16(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, uint16_t a) { ser_writedata16(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, int32_t a ) { ser_writedata32(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, uint32_t a) { ser_writedata32(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, int64_t a ) { ser_writedata64(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, uint64_t a) { ser_writedata64(s, a); }
+template<typename Stream> inline void Serialize(Stream& s, float a ) { ser_writedata32(s, ser_float_to_uint32(a)); }
+template<typename Stream> inline void Serialize(Stream& s, double a ) { ser_writedata64(s, ser_double_to_uint64(a)); }
+
+template<typename Stream> inline void Unserialize(Stream& s, char& a ) { a = ser_readdata8(s); } // TODO Get rid of bare char
+template<typename Stream> inline void Unserialize(Stream& s, int8_t& a ) { a = ser_readdata8(s); }
+template<typename Stream> inline void Unserialize(Stream& s, uint8_t& a ) { a = ser_readdata8(s); }
+template<typename Stream> inline void Unserialize(Stream& s, int16_t& a ) { a = ser_readdata16(s); }
+template<typename Stream> inline void Unserialize(Stream& s, uint16_t& a) { a = ser_readdata16(s); }
+template<typename Stream> inline void Unserialize(Stream& s, int32_t& a ) { a = ser_readdata32(s); }
+template<typename Stream> inline void Unserialize(Stream& s, uint32_t& a) { a = ser_readdata32(s); }
+template<typename Stream> inline void Unserialize(Stream& s, int64_t& a ) { a = ser_readdata64(s); }
+template<typename Stream> inline void Unserialize(Stream& s, uint64_t& a) { a = ser_readdata64(s); }
+template<typename Stream> inline void Unserialize(Stream& s, float& a ) { a = ser_uint32_to_float(ser_readdata32(s)); }
+template<typename Stream> inline void Unserialize(Stream& s, double& a ) { a = ser_uint64_to_double(ser_readdata64(s)); }
+
+template<typename Stream> inline void Serialize(Stream& s, bool a) { char f=a; ser_writedata8(s, f); }
+template<typename Stream> inline void Unserialize(Stream& s, bool& a) { char f=ser_readdata8(s); a=f; }
@@ -245,6 +214,8 @@ inline unsigned int GetSizeOfCompactSize(uint64_t nSize)
else return sizeof(unsigned char) + sizeof(uint64_t);
}
+inline void WriteCompactSize(CSizeComputer& os, uint64_t nSize);
+
template<typename Stream>
void WriteCompactSize(Stream& os, uint64_t nSize)
{
@@ -339,6 +310,9 @@ inline unsigned int GetSizeOfVarInt(I n)
return nRet;
}
+template<typename I>
+inline void WriteVarInt(CSizeComputer& os, I n);
+
template<typename Stream, typename I>
void WriteVarInt(Stream& os, I n)
{
@@ -388,33 +362,28 @@ public:
template <class T, class TAl>
explicit CFlatData(std::vector<T,TAl> &v)
{
- pbegin = (char*)begin_ptr(v);
- pend = (char*)end_ptr(v);
+ pbegin = (char*)v.data();
+ pend = (char*)(v.data() + v.size());
}
template <unsigned int N, typename T, typename S, typename D>
explicit CFlatData(prevector<N, T, S, D> &v)
{
- pbegin = (char*)begin_ptr(v);
- pend = (char*)end_ptr(v);
+ pbegin = (char*)v.data();
+ pend = (char*)(v.data() + v.size());
}
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<typename Stream>
- void Serialize(Stream& s, int, int=0) const
+ void Serialize(Stream& s) const
{
s.write(pbegin, pend - pbegin);
}
template<typename Stream>
- void Unserialize(Stream& s, int, int=0)
+ void Unserialize(Stream& s)
{
s.read(pbegin, pend - pbegin);
}
@@ -428,17 +397,13 @@ protected:
public:
CVarInt(I& nIn) : n(nIn) { }
- unsigned int GetSerializeSize(int, int) const {
- return GetSizeOfVarInt<I>(n);
- }
-
template<typename Stream>
- void Serialize(Stream &s, int, int) const {
+ void Serialize(Stream &s) const {
WriteVarInt<Stream,I>(s, n);
}
template<typename Stream>
- void Unserialize(Stream& s, int, int) {
+ void Unserialize(Stream& s) {
n = ReadVarInt<Stream,I>(s);
}
};
@@ -450,17 +415,13 @@ protected:
public:
CCompactSize(uint64_t& nIn) : n(nIn) { }
- unsigned int GetSerializeSize(int, int) const {
- return GetSizeOfCompactSize(n);
- }
-
template<typename Stream>
- void Serialize(Stream &s, int, int) const {
+ void Serialize(Stream &s) const {
WriteCompactSize<Stream>(s, n);
}
template<typename Stream>
- void Unserialize(Stream& s, int, int) {
+ void Unserialize(Stream& s) {
n = ReadCompactSize<Stream>(s);
}
};
@@ -471,10 +432,10 @@ class LimitedString
protected:
std::string& string;
public:
- LimitedString(std::string& string) : string(string) {}
+ LimitedString(std::string& _string) : string(_string) {}
template<typename Stream>
- void Unserialize(Stream& s, int, int=0)
+ void Unserialize(Stream& s)
{
size_t size = ReadCompactSize(s);
if (size > Limit) {
@@ -486,17 +447,12 @@ public:
}
template<typename Stream>
- void Serialize(Stream& s, int, int=0) const
+ void Serialize(Stream& s) const
{
WriteCompactSize(s, string.size());
if (!string.empty())
s.write((char*)&string[0], string.size());
}
-
- unsigned int GetSerializeSize(int, int=0) const
- {
- return GetSizeOfCompactSize(string.size()) + string.size();
- }
};
template<typename I>
@@ -509,85 +465,76 @@ CVarInt<I> WrapVarInt(I& n) { return CVarInt<I>(n); }
/**
* string
*/
-template<typename C> unsigned int GetSerializeSize(const std::basic_string<C>& str, int, int=0);
-template<typename Stream, typename C> void Serialize(Stream& os, const std::basic_string<C>& str, int, int=0);
-template<typename Stream, typename C> void Unserialize(Stream& is, std::basic_string<C>& str, int, int=0);
+template<typename Stream, typename C> void Serialize(Stream& os, const std::basic_string<C>& str);
+template<typename Stream, typename C> void Unserialize(Stream& is, std::basic_string<C>& str);
/**
* prevector
* prevectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.
*/
-template<unsigned int N, typename T> unsigned int GetSerializeSize_impl(const prevector<N, T>& v, int nType, int nVersion, const unsigned char&);
-template<unsigned int N, typename T, typename V> unsigned int GetSerializeSize_impl(const prevector<N, T>& v, int nType, int nVersion, const V&);
-template<unsigned int N, typename T> inline unsigned int GetSerializeSize(const prevector<N, T>& v, int nType, int nVersion);
-template<typename Stream, unsigned int N, typename T> void Serialize_impl(Stream& os, const prevector<N, T>& v, int nType, int nVersion, const unsigned char&);
-template<typename Stream, unsigned int N, typename T, typename V> void Serialize_impl(Stream& os, const prevector<N, T>& v, int nType, int nVersion, const V&);
-template<typename Stream, unsigned int N, typename T> inline void Serialize(Stream& os, const prevector<N, T>& v, int nType, int nVersion);
-template<typename Stream, unsigned int N, typename T> void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, const unsigned char&);
-template<typename Stream, unsigned int N, typename T, typename V> void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, const V&);
-template<typename Stream, unsigned int N, typename T> inline void Unserialize(Stream& is, prevector<N, T>& v, int nType, int nVersion);
+template<typename Stream, unsigned int N, typename T> void Serialize_impl(Stream& os, const prevector<N, T>& v, const unsigned char&);
+template<typename Stream, unsigned int N, typename T, typename V> void Serialize_impl(Stream& os, const prevector<N, T>& v, const V&);
+template<typename Stream, unsigned int N, typename T> inline void Serialize(Stream& os, const prevector<N, T>& v);
+template<typename Stream, unsigned int N, typename T> void Unserialize_impl(Stream& is, prevector<N, T>& v, const unsigned char&);
+template<typename Stream, unsigned int N, typename T, typename V> void Unserialize_impl(Stream& is, prevector<N, T>& v, const V&);
+template<typename Stream, unsigned int N, typename T> inline void Unserialize(Stream& is, prevector<N, T>& v);
/**
* vector
* vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.
*/
-template<typename T, typename A> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
-template<typename T, typename A, typename V> unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const V&);
-template<typename T, typename A> inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion);
-template<typename Stream, typename T, typename A> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
-template<typename Stream, typename T, typename A, typename V> void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const V&);
-template<typename Stream, typename T, typename A> inline void Serialize(Stream& os, const std::vector<T, A>& v, int nType, int nVersion);
-template<typename Stream, typename T, typename A> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const unsigned char&);
-template<typename Stream, typename T, typename A, typename V> void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const V&);
-template<typename Stream, typename T, typename A> inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion);
+template<typename Stream, typename T, typename A> void Serialize_impl(Stream& os, const std::vector<T, A>& v, const unsigned char&);
+template<typename Stream, typename T, typename A, typename V> void Serialize_impl(Stream& os, const std::vector<T, A>& v, const V&);
+template<typename Stream, typename T, typename A> inline void Serialize(Stream& os, const std::vector<T, A>& v);
+template<typename Stream, typename T, typename A> void Unserialize_impl(Stream& is, std::vector<T, A>& v, const unsigned char&);
+template<typename Stream, typename T, typename A, typename V> void Unserialize_impl(Stream& is, std::vector<T, A>& v, const V&);
+template<typename Stream, typename T, typename A> inline void Unserialize(Stream& is, std::vector<T, A>& v);
/**
* pair
*/
-template<typename K, typename T> unsigned int GetSerializeSize(const std::pair<K, T>& item, int nType, int nVersion);
-template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion);
-template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion);
+template<typename Stream, typename K, typename T> void Serialize(Stream& os, const std::pair<K, T>& item);
+template<typename Stream, typename K, typename T> void Unserialize(Stream& is, std::pair<K, T>& item);
/**
* map
*/
-template<typename K, typename T, typename Pred, typename A> unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion);
-template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion);
-template<typename Stream, typename K, typename T, typename Pred, typename A> void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion);
+template<typename Stream, typename K, typename T, typename Pred, typename A> void Serialize(Stream& os, const std::map<K, T, Pred, A>& m);
+template<typename Stream, typename K, typename T, typename Pred, typename A> void Unserialize(Stream& is, std::map<K, T, Pred, A>& m);
/**
* set
*/
-template<typename K, typename Pred, typename A> unsigned int GetSerializeSize(const std::set<K, Pred, A>& m, int nType, int nVersion);
-template<typename Stream, typename K, typename Pred, typename A> void Serialize(Stream& os, const std::set<K, Pred, A>& m, int nType, int nVersion);
-template<typename Stream, typename K, typename Pred, typename A> void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion);
+template<typename Stream, typename K, typename Pred, typename A> void Serialize(Stream& os, const std::set<K, Pred, A>& m);
+template<typename Stream, typename K, typename Pred, typename A> void Unserialize(Stream& is, std::set<K, Pred, A>& m);
+/**
+ * shared_ptr
+ */
+template<typename Stream, typename T> void Serialize(Stream& os, const std::shared_ptr<const T>& p);
+template<typename Stream, typename T> void Unserialize(Stream& os, std::shared_ptr<const T>& p);
+/**
+ * unique_ptr
+ */
+template<typename Stream, typename T> void Serialize(Stream& os, const std::unique_ptr<const T>& p);
+template<typename Stream, typename T> void Unserialize(Stream& os, std::unique_ptr<const T>& p);
/**
* 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<typename T>
-inline unsigned int GetSerializeSize(const T& a, long nType, int nVersion)
-{
- return a.GetSerializeSize((int)nType, nVersion);
-}
-
template<typename Stream, typename T>
-inline void Serialize(Stream& os, const T& a, long nType, int nVersion)
+inline void Serialize(Stream& os, const T& a)
{
- a.Serialize(os, (int)nType, nVersion);
+ a.Serialize(os);
}
template<typename Stream, typename T>
-inline void Unserialize(Stream& is, T& a, long nType, int nVersion)
+inline void Unserialize(Stream& is, T& a)
{
- a.Unserialize(is, (int)nType, nVersion);
+ a.Unserialize(is);
}
@@ -597,14 +544,8 @@ inline void Unserialize(Stream& is, T& a, long nType, int nVersion)
/**
* string
*/
-template<typename C>
-unsigned int GetSerializeSize(const std::basic_string<C>& str, int, int)
-{
- return GetSizeOfCompactSize(str.size()) + str.size() * sizeof(str[0]);
-}
-
template<typename Stream, typename C>
-void Serialize(Stream& os, const std::basic_string<C>& str, int, int)
+void Serialize(Stream& os, const std::basic_string<C>& str)
{
WriteCompactSize(os, str.size());
if (!str.empty())
@@ -612,7 +553,7 @@ void Serialize(Stream& os, const std::basic_string<C>& str, int, int)
}
template<typename Stream, typename C>
-void Unserialize(Stream& is, std::basic_string<C>& str, int, int)
+void Unserialize(Stream& is, std::basic_string<C>& str)
{
unsigned int nSize = ReadCompactSize(is);
str.resize(nSize);
@@ -625,30 +566,8 @@ void Unserialize(Stream& is, std::basic_string<C>& str, int, int)
/**
* prevector
*/
-template<unsigned int N, typename T>
-unsigned int GetSerializeSize_impl(const prevector<N, T>& v, int nType, int nVersion, const unsigned char&)
-{
- return (GetSizeOfCompactSize(v.size()) + v.size() * sizeof(T));
-}
-
-template<unsigned int N, typename T, typename V>
-unsigned int GetSerializeSize_impl(const prevector<N, T>& v, int nType, int nVersion, const V&)
-{
- unsigned int nSize = GetSizeOfCompactSize(v.size());
- for (typename prevector<N, T>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
- nSize += GetSerializeSize((*vi), nType, nVersion);
- return nSize;
-}
-
-template<unsigned int N, typename T>
-inline unsigned int GetSerializeSize(const prevector<N, T>& v, int nType, int nVersion)
-{
- return GetSerializeSize_impl(v, nType, nVersion, T());
-}
-
-
template<typename Stream, unsigned int N, typename T>
-void Serialize_impl(Stream& os, const prevector<N, T>& v, int nType, int nVersion, const unsigned char&)
+void Serialize_impl(Stream& os, const prevector<N, T>& v, const unsigned char&)
{
WriteCompactSize(os, v.size());
if (!v.empty())
@@ -656,22 +575,22 @@ void Serialize_impl(Stream& os, const prevector<N, T>& v, int nType, int nVersio
}
template<typename Stream, unsigned int N, typename T, typename V>
-void Serialize_impl(Stream& os, const prevector<N, T>& v, int nType, int nVersion, const V&)
+void Serialize_impl(Stream& os, const prevector<N, T>& v, const V&)
{
WriteCompactSize(os, v.size());
for (typename prevector<N, T>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
- ::Serialize(os, (*vi), nType, nVersion);
+ ::Serialize(os, (*vi));
}
template<typename Stream, unsigned int N, typename T>
-inline void Serialize(Stream& os, const prevector<N, T>& v, int nType, int nVersion)
+inline void Serialize(Stream& os, const prevector<N, T>& v)
{
- Serialize_impl(os, v, nType, nVersion, T());
+ Serialize_impl(os, v, T());
}
template<typename Stream, unsigned int N, typename T>
-void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, const unsigned char&)
+void Unserialize_impl(Stream& is, prevector<N, T>& v, const unsigned char&)
{
// Limit size per read so bogus size value won't cause out of memory
v.clear();
@@ -687,7 +606,7 @@ void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, c
}
template<typename Stream, unsigned int N, typename T, typename V>
-void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, const V&)
+void Unserialize_impl(Stream& is, prevector<N, T>& v, const V&)
{
v.clear();
unsigned int nSize = ReadCompactSize(is);
@@ -700,14 +619,14 @@ void Unserialize_impl(Stream& is, prevector<N, T>& v, int nType, int nVersion, c
nMid = nSize;
v.resize(nMid);
for (; i < nMid; i++)
- Unserialize(is, v[i], nType, nVersion);
+ Unserialize(is, v[i]);
}
}
template<typename Stream, unsigned int N, typename T>
-inline void Unserialize(Stream& is, prevector<N, T>& v, int nType, int nVersion)
+inline void Unserialize(Stream& is, prevector<N, T>& v)
{
- Unserialize_impl(is, v, nType, nVersion, T());
+ Unserialize_impl(is, v, T());
}
@@ -715,30 +634,8 @@ inline void Unserialize(Stream& is, prevector<N, T>& v, int nType, int nVersion)
/**
* vector
*/
-template<typename T, typename A>
-unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
-{
- return (GetSizeOfCompactSize(v.size()) + v.size() * sizeof(T));
-}
-
-template<typename T, typename A, typename V>
-unsigned int GetSerializeSize_impl(const std::vector<T, A>& v, int nType, int nVersion, const V&)
-{
- unsigned int nSize = GetSizeOfCompactSize(v.size());
- for (typename std::vector<T, A>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
- nSize += GetSerializeSize((*vi), nType, nVersion);
- return nSize;
-}
-
-template<typename T, typename A>
-inline unsigned int GetSerializeSize(const std::vector<T, A>& v, int nType, int nVersion)
-{
- return GetSerializeSize_impl(v, nType, nVersion, T());
-}
-
-
template<typename Stream, typename T, typename A>
-void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
+void Serialize_impl(Stream& os, const std::vector<T, A>& v, const unsigned char&)
{
WriteCompactSize(os, v.size());
if (!v.empty())
@@ -746,22 +643,22 @@ void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVers
}
template<typename Stream, typename T, typename A, typename V>
-void Serialize_impl(Stream& os, const std::vector<T, A>& v, int nType, int nVersion, const V&)
+void Serialize_impl(Stream& os, const std::vector<T, A>& v, const V&)
{
WriteCompactSize(os, v.size());
for (typename std::vector<T, A>::const_iterator vi = v.begin(); vi != v.end(); ++vi)
- ::Serialize(os, (*vi), nType, nVersion);
+ ::Serialize(os, (*vi));
}
template<typename Stream, typename T, typename A>
-inline void Serialize(Stream& os, const std::vector<T, A>& v, int nType, int nVersion)
+inline void Serialize(Stream& os, const std::vector<T, A>& v)
{
- Serialize_impl(os, v, nType, nVersion, T());
+ Serialize_impl(os, v, T());
}
template<typename Stream, typename T, typename A>
-void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const unsigned char&)
+void Unserialize_impl(Stream& is, std::vector<T, A>& v, const unsigned char&)
{
// Limit size per read so bogus size value won't cause out of memory
v.clear();
@@ -777,7 +674,7 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
}
template<typename Stream, typename T, typename A, typename V>
-void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion, const V&)
+void Unserialize_impl(Stream& is, std::vector<T, A>& v, const V&)
{
v.clear();
unsigned int nSize = ReadCompactSize(is);
@@ -790,14 +687,14 @@ void Unserialize_impl(Stream& is, std::vector<T, A>& v, int nType, int nVersion,
nMid = nSize;
v.resize(nMid);
for (; i < nMid; i++)
- Unserialize(is, v[i], nType, nVersion);
+ Unserialize(is, v[i]);
}
}
template<typename Stream, typename T, typename A>
-inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersion)
+inline void Unserialize(Stream& is, std::vector<T, A>& v)
{
- Unserialize_impl(is, v, nType, nVersion, T());
+ Unserialize_impl(is, v, T());
}
@@ -805,24 +702,18 @@ inline void Unserialize(Stream& is, std::vector<T, A>& v, int nType, int nVersio
/**
* pair
*/
-template<typename K, typename T>
-unsigned int GetSerializeSize(const std::pair<K, T>& item, int nType, int nVersion)
-{
- return GetSerializeSize(item.first, nType, nVersion) + GetSerializeSize(item.second, nType, nVersion);
-}
-
template<typename Stream, typename K, typename T>
-void Serialize(Stream& os, const std::pair<K, T>& item, int nType, int nVersion)
+void Serialize(Stream& os, const std::pair<K, T>& item)
{
- Serialize(os, item.first, nType, nVersion);
- Serialize(os, item.second, nType, nVersion);
+ Serialize(os, item.first);
+ Serialize(os, item.second);
}
template<typename Stream, typename K, typename T>
-void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion)
+void Unserialize(Stream& is, std::pair<K, T>& item)
{
- Unserialize(is, item.first, nType, nVersion);
- Unserialize(is, item.second, nType, nVersion);
+ Unserialize(is, item.first);
+ Unserialize(is, item.second);
}
@@ -830,25 +721,16 @@ void Unserialize(Stream& is, std::pair<K, T>& item, int nType, int nVersion)
/**
* map
*/
-template<typename K, typename T, typename Pred, typename A>
-unsigned int GetSerializeSize(const std::map<K, T, Pred, A>& m, int nType, int nVersion)
-{
- unsigned int nSize = GetSizeOfCompactSize(m.size());
- for (typename std::map<K, T, Pred, A>::const_iterator mi = m.begin(); mi != m.end(); ++mi)
- nSize += GetSerializeSize((*mi), nType, nVersion);
- return nSize;
-}
-
template<typename Stream, typename K, typename T, typename Pred, typename A>
-void Serialize(Stream& os, const std::map<K, T, Pred, A>& m, int nType, int nVersion)
+void Serialize(Stream& os, const std::map<K, T, Pred, A>& m)
{
WriteCompactSize(os, m.size());
for (typename std::map<K, T, Pred, A>::const_iterator mi = m.begin(); mi != m.end(); ++mi)
- Serialize(os, (*mi), nType, nVersion);
+ Serialize(os, (*mi));
}
template<typename Stream, typename K, typename T, typename Pred, typename A>
-void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion)
+void Unserialize(Stream& is, std::map<K, T, Pred, A>& m)
{
m.clear();
unsigned int nSize = ReadCompactSize(is);
@@ -856,7 +738,7 @@ void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion
for (unsigned int i = 0; i < nSize; i++)
{
std::pair<K, T> item;
- Unserialize(is, item, nType, nVersion);
+ Unserialize(is, item);
mi = m.insert(mi, item);
}
}
@@ -866,25 +748,16 @@ void Unserialize(Stream& is, std::map<K, T, Pred, A>& m, int nType, int nVersion
/**
* set
*/
-template<typename K, typename Pred, typename A>
-unsigned int GetSerializeSize(const std::set<K, Pred, A>& m, int nType, int nVersion)
-{
- unsigned int nSize = GetSizeOfCompactSize(m.size());
- for (typename std::set<K, Pred, A>::const_iterator it = m.begin(); it != m.end(); ++it)
- nSize += GetSerializeSize((*it), nType, nVersion);
- return nSize;
-}
-
template<typename Stream, typename K, typename Pred, typename A>
-void Serialize(Stream& os, const std::set<K, Pred, A>& m, int nType, int nVersion)
+void Serialize(Stream& os, const std::set<K, Pred, A>& m)
{
WriteCompactSize(os, m.size());
for (typename std::set<K, Pred, A>::const_iterator it = m.begin(); it != m.end(); ++it)
- Serialize(os, (*it), nType, nVersion);
+ Serialize(os, (*it));
}
template<typename Stream, typename K, typename Pred, typename A>
-void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
+void Unserialize(Stream& is, std::set<K, Pred, A>& m)
{
m.clear();
unsigned int nSize = ReadCompactSize(is);
@@ -892,7 +765,7 @@ void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
for (unsigned int i = 0; i < nSize; i++)
{
K key;
- Unserialize(is, key, nType, nVersion);
+ Unserialize(is, key);
it = m.insert(it, key);
}
}
@@ -900,27 +773,61 @@ void Unserialize(Stream& is, std::set<K, Pred, A>& m, int nType, int nVersion)
/**
+ * unique_ptr
+ */
+template<typename Stream, typename T> void
+Serialize(Stream& os, const std::unique_ptr<const T>& p)
+{
+ Serialize(os, *p);
+}
+
+template<typename Stream, typename T>
+void Unserialize(Stream& is, std::unique_ptr<const T>& p)
+{
+ p.reset(new T(deserialize, is));
+}
+
+
+
+/**
+ * shared_ptr
+ */
+template<typename Stream, typename T> void
+Serialize(Stream& os, const std::shared_ptr<const T>& p)
+{
+ Serialize(os, *p);
+}
+
+template<typename Stream, typename T>
+void Unserialize(Stream& is, std::shared_ptr<const T>& p)
+{
+ p = std::make_shared<const T>(deserialize, is);
+}
+
+
+
+/**
* Support for ADD_SERIALIZE_METHODS and READWRITE macro
*/
struct CSerActionSerialize
{
- bool ForRead() const { return false; }
+ constexpr bool ForRead() const { return false; }
};
struct CSerActionUnserialize
{
- bool ForRead() const { return true; }
+ constexpr bool ForRead() const { return true; }
};
template<typename Stream, typename T>
-inline void SerReadWrite(Stream& s, const T& obj, int nType, int nVersion, CSerActionSerialize ser_action)
+inline void SerReadWrite(Stream& s, const T& obj, CSerActionSerialize ser_action)
{
- ::Serialize(s, obj, nType, nVersion);
+ ::Serialize(s, obj);
}
template<typename Stream, typename T>
-inline void SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionUnserialize ser_action)
+inline void SerReadWrite(Stream& s, T& obj, CSerActionUnserialize ser_action)
{
- ::Unserialize(s, obj, nType, nVersion);
+ ::Unserialize(s, obj);
}
@@ -931,33 +838,122 @@ inline void SerReadWrite(Stream& s, T& obj, int nType, int nVersion, CSerActionU
+/* ::GetSerializeSize implementations
+ *
+ * Computing the serialized size of objects is done through a special stream
+ * object of type CSizeComputer, which only records the number of bytes written
+ * to it.
+ *
+ * If your Serialize or SerializationOp method has non-trivial overhead for
+ * serialization, it may be worthwhile to implement a specialized version for
+ * CSizeComputer, which uses the s.seek() method to record bytes that would
+ * be written instead.
+ */
class CSizeComputer
{
protected:
size_t nSize;
+ const int nType;
+ const int nVersion;
public:
- int nType;
- int nVersion;
-
CSizeComputer(int nTypeIn, int nVersionIn) : nSize(0), nType(nTypeIn), nVersion(nVersionIn) {}
- CSizeComputer& write(const char *psz, size_t nSize)
+ void write(const char *psz, size_t _nSize)
{
- this->nSize += nSize;
- return *this;
+ this->nSize += _nSize;
+ }
+
+ /** Pretend _nSize bytes are written, without specifying them. */
+ void seek(size_t _nSize)
+ {
+ this->nSize += _nSize;
}
template<typename T>
CSizeComputer& operator<<(const T& obj)
{
- ::Serialize(*this, obj, nType, nVersion);
+ ::Serialize(*this, obj);
return (*this);
}
size_t size() const {
return nSize;
}
+
+ int GetVersion() const { return nVersion; }
+ int GetType() const { return nType; }
};
+template<typename Stream>
+void SerializeMany(Stream& s)
+{
+}
+
+template<typename Stream, typename Arg>
+void SerializeMany(Stream& s, Arg&& arg)
+{
+ ::Serialize(s, std::forward<Arg>(arg));
+}
+
+template<typename Stream, typename Arg, typename... Args>
+void SerializeMany(Stream& s, Arg&& arg, Args&&... args)
+{
+ ::Serialize(s, std::forward<Arg>(arg));
+ ::SerializeMany(s, std::forward<Args>(args)...);
+}
+
+template<typename Stream>
+inline void UnserializeMany(Stream& s)
+{
+}
+
+template<typename Stream, typename Arg>
+inline void UnserializeMany(Stream& s, Arg& arg)
+{
+ ::Unserialize(s, arg);
+}
+
+template<typename Stream, typename Arg, typename... Args>
+inline void UnserializeMany(Stream& s, Arg& arg, Args&... args)
+{
+ ::Unserialize(s, arg);
+ ::UnserializeMany(s, args...);
+}
+
+template<typename Stream, typename... Args>
+inline void SerReadWriteMany(Stream& s, CSerActionSerialize ser_action, Args&&... args)
+{
+ ::SerializeMany(s, std::forward<Args>(args)...);
+}
+
+template<typename Stream, typename... Args>
+inline void SerReadWriteMany(Stream& s, CSerActionUnserialize ser_action, Args&... args)
+{
+ ::UnserializeMany(s, args...);
+}
+
+template<typename I>
+inline void WriteVarInt(CSizeComputer &s, I n)
+{
+ s.seek(GetSizeOfVarInt<I>(n));
+}
+
+inline void WriteCompactSize(CSizeComputer &s, uint64_t nSize)
+{
+ s.seek(GetSizeOfCompactSize(nSize));
+}
+
+template <typename T>
+size_t GetSerializeSize(const T& t, int nType, int nVersion = 0)
+{
+ return (CSizeComputer(nType, nVersion) << t).size();
+}
+
+template <typename S, typename T>
+size_t GetSerializeSize(const S& s, const T& t)
+{
+ return (CSizeComputer(s.GetType(), s.GetVersion()) << t).size();
+}
+
#endif // BITCOIN_SERIALIZE_H
diff --git a/src/streams.h b/src/streams.h
index 7132364eb1..1d3b55c91e 100644
--- a/src/streams.h
+++ b/src/streams.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -26,17 +26,18 @@ template<typename Stream>
class OverrideStream
{
Stream* stream;
-public:
+
const int nType;
const int nVersion;
+public:
OverrideStream(Stream* stream_, int nType_, int nVersion_) : stream(stream_), nType(nType_), nVersion(nVersion_) {}
template<typename T>
OverrideStream<Stream>& operator<<(const T& obj)
{
// Serialize to this stream
- ::Serialize(*this->stream, obj, nType, nVersion);
+ ::Serialize(*this, obj);
return (*this);
}
@@ -44,9 +45,22 @@ public:
OverrideStream<Stream>& operator>>(T& obj)
{
// Unserialize from this stream
- ::Unserialize(*this->stream, obj, nType, nVersion);
+ ::Unserialize(*this, obj);
return (*this);
}
+
+ void write(const char* pch, size_t nSize)
+ {
+ stream->write(pch, nSize);
+ }
+
+ void read(char* pch, size_t nSize)
+ {
+ stream->read(pch, nSize);
+ }
+
+ int GetVersion() const { return nVersion; }
+ int GetType() const { return nType; }
};
template<typename S>
@@ -55,6 +69,75 @@ OverrideStream<S> WithOrVersion(S* s, int nVersionFlag)
return OverrideStream<S>(s, s->GetType(), s->GetVersion() | nVersionFlag);
}
+/* Minimal stream for overwriting and/or appending to an existing byte vector
+ *
+ * The referenced vector will grow as necessary
+ */
+class CVectorWriter
+{
+ public:
+
+/*
+ * @param[in] nTypeIn Serialization Type
+ * @param[in] nVersionIn Serialization Version (including any flags)
+ * @param[in] vchDataIn Referenced byte vector to overwrite/append
+ * @param[in] nPosIn Starting position. Vector index where writes should start. The vector will initially
+ * grow as necessary to max(index, vec.size()). So to append, use vec.size().
+*/
+ CVectorWriter(int nTypeIn, int nVersionIn, std::vector<unsigned char>& vchDataIn, size_t nPosIn) : nType(nTypeIn), nVersion(nVersionIn), vchData(vchDataIn), nPos(nPosIn)
+ {
+ if(nPos > vchData.size())
+ vchData.resize(nPos);
+ }
+/*
+ * (other params same as above)
+ * @param[in] args A list of items to serialize starting at nPos.
+*/
+ template <typename... Args>
+ CVectorWriter(int nTypeIn, int nVersionIn, std::vector<unsigned char>& vchDataIn, size_t nPosIn, Args&&... args) : CVectorWriter(nTypeIn, nVersionIn, vchDataIn, nPosIn)
+ {
+ ::SerializeMany(*this, std::forward<Args>(args)...);
+ }
+ void write(const char* pch, size_t nSize)
+ {
+ assert(nPos <= vchData.size());
+ size_t nOverwrite = std::min(nSize, vchData.size() - nPos);
+ if (nOverwrite) {
+ memcpy(vchData.data() + nPos, reinterpret_cast<const unsigned char*>(pch), nOverwrite);
+ }
+ if (nOverwrite < nSize) {
+ vchData.insert(vchData.end(), reinterpret_cast<const unsigned char*>(pch) + nOverwrite, reinterpret_cast<const unsigned char*>(pch) + nSize);
+ }
+ nPos += nSize;
+ }
+ template<typename T>
+ CVectorWriter& operator<<(const T& obj)
+ {
+ // Serialize to this stream
+ ::Serialize(*this, obj);
+ return (*this);
+ }
+ int GetVersion() const
+ {
+ return nVersion;
+ }
+ int GetType() const
+ {
+ return nType;
+ }
+ void seek(size_t nSize)
+ {
+ nPos += nSize;
+ if(nPos > vchData.size())
+ vchData.resize(nPos);
+ }
+private:
+ const int nType;
+ const int nVersion;
+ std::vector<unsigned char>& vchData;
+ size_t nPos;
+};
+
/** Double ended buffer combining vector and stream-like interfaces.
*
* >> and << read and write unformatted data using the above serialization templates.
@@ -66,9 +149,10 @@ protected:
typedef CSerializeData vector_type;
vector_type vch;
unsigned int nReadPos;
-public:
+
int nType;
int nVersion;
+public:
typedef vector_type::allocator_type allocator_type;
typedef vector_type::size_type size_type;
@@ -90,12 +174,10 @@ public:
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())
{
@@ -112,6 +194,13 @@ public:
Init(nTypeIn, nVersionIn);
}
+ template <typename... Args>
+ CDataStream(int nTypeIn, int nVersionIn, Args&&... args)
+ {
+ Init(nTypeIn, nVersionIn);
+ ::SerializeMany(*this, std::forward<Args>(args)...);
+ }
+
void Init(int nTypeIn, int nVersionIn)
{
nReadPos = 0;
@@ -154,6 +243,8 @@ public:
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); }
+ value_type* data() { return vch.data() + nReadPos; }
+ const value_type* data() const { return vch.data() + nReadPos; }
void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
{
@@ -168,7 +259,6 @@ public:
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);
@@ -181,7 +271,6 @@ public:
else
vch.insert(it, first, last);
}
-#endif
iterator erase(iterator it)
{
@@ -244,13 +333,11 @@ public:
int in_avail() { return size(); }
void SetType(int n) { nType = n; }
- int GetType() { return nType; }
+ int GetType() const { return nType; }
void SetVersion(int n) { nVersion = n; }
- int GetVersion() { return nVersion; }
- void ReadVersion() { *this >> nVersion; }
- void WriteVersion() { *this << nVersion; }
+ int GetVersion() const { return nVersion; }
- CDataStream& read(char* pch, size_t nSize)
+ void read(char* pch, size_t nSize)
{
// Read from the beginning of the buffer
unsigned int nReadPosNext = nReadPos + nSize;
@@ -263,14 +350,13 @@ public:
memcpy(pch, &vch[nReadPos], nSize);
nReadPos = 0;
vch.clear();
- return (*this);
+ return;
}
memcpy(pch, &vch[nReadPos], nSize);
nReadPos = nReadPosNext;
- return (*this);
}
- CDataStream& ignore(int nSize)
+ void ignore(int nSize)
{
// Ignore from the beginning of the buffer
if (nSize < 0) {
@@ -283,21 +369,19 @@ public:
throw std::ios_base::failure("CDataStream::ignore(): end of data");
nReadPos = 0;
vch.clear();
- return (*this);
+ return;
}
nReadPos = nReadPosNext;
- return (*this);
}
- CDataStream& write(const char* pch, size_t nSize)
+ void write(const char* pch, size_t nSize)
{
// Write to the end of the buffer
vch.insert(vch.end(), pch, pch + nSize);
- return (*this);
}
template<typename Stream>
- void Serialize(Stream& s, int nType, int nVersion) const
+ void Serialize(Stream& s) const
{
// Special case: stream << stream concatenates like stream += stream
if (!vch.empty())
@@ -305,17 +389,10 @@ public:
}
template<typename T>
- unsigned int GetSerializeSize(const T& obj)
- {
- // Tells the size of the object if serialized to this stream
- return ::GetSerializeSize(obj, nType, nVersion);
- }
-
- template<typename T>
CDataStream& operator<<(const T& obj)
{
// Serialize to this stream
- ::Serialize(*this, obj, nType, nVersion);
+ ::Serialize(*this, obj);
return (*this);
}
@@ -323,7 +400,7 @@ public:
CDataStream& operator>>(T& obj)
{
// Unserialize from this stream
- ::Unserialize(*this, obj, nType, nVersion);
+ ::Unserialize(*this, obj);
return (*this);
}
@@ -378,17 +455,15 @@ private:
CAutoFile(const CAutoFile&);
CAutoFile& operator=(const CAutoFile&);
- int nType;
- int nVersion;
-
+ const int nType;
+ const int nVersion;
+
FILE* file;
public:
- CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn)
+ CAutoFile(FILE* filenew, int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn)
{
file = filenew;
- nType = nTypeIn;
- nVersion = nVersionIn;
}
~CAutoFile()
@@ -423,23 +498,18 @@ public:
//
// Stream subset
//
- 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; }
+ int GetType() const { return nType; }
+ int GetVersion() const { return nVersion; }
- CAutoFile& read(char* pch, size_t nSize)
+ void 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)
throw std::ios_base::failure(feof(file) ? "CAutoFile::read: end of file" : "CAutoFile::read: fread failed");
- return (*this);
}
- CAutoFile& ignore(size_t nSize)
+ void ignore(size_t nSize)
{
if (!file)
throw std::ios_base::failure("CAutoFile::ignore: file handle is NULL");
@@ -450,23 +520,14 @@ public:
throw std::ios_base::failure(feof(file) ? "CAutoFile::ignore: end of file" : "CAutoFile::read: fread failed");
nSize -= nNow;
}
- return (*this);
}
- CAutoFile& write(const char* pch, size_t nSize)
+ void 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)
throw std::ios_base::failure("CAutoFile::write: write failed");
- return (*this);
- }
-
- template<typename T>
- unsigned int GetSerializeSize(const T& obj)
- {
- // Tells the size of the object if serialized to this stream
- return ::GetSerializeSize(obj, nType, nVersion);
}
template<typename T>
@@ -475,7 +536,7 @@ public:
// Serialize to this stream
if (!file)
throw std::ios_base::failure("CAutoFile::operator<<: file handle is NULL");
- ::Serialize(*this, obj, nType, nVersion);
+ ::Serialize(*this, obj);
return (*this);
}
@@ -485,7 +546,7 @@ public:
// Unserialize from this stream
if (!file)
throw std::ios_base::failure("CAutoFile::operator>>: file handle is NULL");
- ::Unserialize(*this, obj, nType, nVersion);
+ ::Unserialize(*this, obj);
return (*this);
}
};
@@ -503,8 +564,8 @@ private:
CBufferedFile(const CBufferedFile&);
CBufferedFile& operator=(const CBufferedFile&);
- int nType;
- int nVersion;
+ const int nType;
+ const int nVersion;
FILE *src; // source file
uint64_t nSrcPos; // how many bytes have been read from source
@@ -534,11 +595,9 @@ protected:
public:
CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
- nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
+ nType(nTypeIn), nVersion(nVersionIn), nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
{
src = fileIn;
- nType = nTypeIn;
- nVersion = nVersionIn;
}
~CBufferedFile()
@@ -546,6 +605,9 @@ public:
fclose();
}
+ int GetVersion() const { return nVersion; }
+ int GetType() const { return nType; }
+
void fclose()
{
if (src) {
@@ -560,7 +622,7 @@ public:
}
// read a number of bytes
- CBufferedFile& read(char *pch, size_t nSize) {
+ void read(char *pch, size_t nSize) {
if (nSize + nReadPos > nReadLimit)
throw std::ios_base::failure("Read attempted past buffer limit");
if (nSize + nRewind > vchBuf.size())
@@ -579,7 +641,6 @@ public:
pch += nNow;
nSize -= nNow;
}
- return (*this);
}
// return the current reading position
@@ -625,7 +686,7 @@ public:
template<typename T>
CBufferedFile& operator>>(T& obj) {
// Unserialize from this stream
- ::Unserialize(*this, obj, nType, nVersion);
+ ::Unserialize(*this, obj);
return (*this);
}
diff --git a/src/support/allocators/secure.h b/src/support/allocators/secure.h
index 67064314ef..9daba86ef3 100644
--- a/src/support/allocators/secure.h
+++ b/src/support/allocators/secure.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/support/events.h b/src/support/events.h
new file mode 100644
index 0000000000..4f2f3cf9ef
--- /dev/null
+++ b/src/support/events.h
@@ -0,0 +1,56 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_SUPPORT_EVENTS_H
+#define BITCOIN_SUPPORT_EVENTS_H
+
+#include <ios>
+#include <memory>
+
+#include <event2/event.h>
+#include <event2/http.h>
+
+#define MAKE_RAII(type) \
+/* deleter */\
+struct type##_deleter {\
+ void operator()(struct type* ob) {\
+ type##_free(ob);\
+ }\
+};\
+/* unique ptr typedef */\
+typedef std::unique_ptr<struct type, type##_deleter> raii_##type
+
+MAKE_RAII(event_base);
+MAKE_RAII(event);
+MAKE_RAII(evhttp);
+MAKE_RAII(evhttp_request);
+MAKE_RAII(evhttp_connection);
+
+raii_event_base obtain_event_base() {
+ auto result = raii_event_base(event_base_new());
+ if (!result.get())
+ throw std::runtime_error("cannot create event_base");
+ return result;
+}
+
+raii_event obtain_event(struct event_base* base, evutil_socket_t s, short events, event_callback_fn cb, void* arg) {
+ return raii_event(event_new(base, s, events, cb, arg));
+}
+
+raii_evhttp obtain_evhttp(struct event_base* base) {
+ return raii_evhttp(evhttp_new(base));
+}
+
+raii_evhttp_request obtain_evhttp_request(void(*cb)(struct evhttp_request *, void *), void *arg) {
+ return raii_evhttp_request(evhttp_request_new(cb, arg));
+}
+
+raii_evhttp_connection obtain_evhttp_connection_base(struct event_base* base, std::string host, uint16_t port) {
+ auto result = raii_evhttp_connection(evhttp_connection_base_new(base, NULL, host.c_str(), port));
+ if (!result.get())
+ throw std::runtime_error("create connection failed");
+ return result;
+}
+
+#endif // BITCOIN_SUPPORT_EVENTS_H
diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp
index 813869a131..01273c9791 100644
--- a/src/support/lockedpool.cpp
+++ b/src/support/lockedpool.cpp
@@ -26,6 +26,8 @@
#include <unistd.h> // for sysconf
#endif
+#include <algorithm>
+
LockedPoolManager* LockedPoolManager::_instance = NULL;
std::once_flag LockedPoolManager::init_flag;
@@ -45,7 +47,7 @@ Arena::Arena(void *base_in, size_t size_in, size_t alignment_in):
base(static_cast<char*>(base_in)), end(static_cast<char*>(base_in) + size_in), alignment(alignment_in)
{
// Start with one free chunk that covers the entire arena
- chunks.emplace(base, Chunk(size_in, false));
+ chunks_free.emplace(base, size_in);
}
Arena::~Arena()
@@ -57,24 +59,30 @@ void* Arena::alloc(size_t size)
// Round to next multiple of alignment
size = align_up(size, alignment);
- // Don't handle zero-sized chunks, or those bigger than MAX_SIZE
- if (size == 0 || size >= Chunk::MAX_SIZE) {
+ // Don't handle zero-sized chunks
+ if (size == 0)
return nullptr;
- }
- for (auto& chunk: chunks) {
- if (!chunk.second.isInUse() && size <= chunk.second.getSize()) {
- char* _base = chunk.first;
- size_t leftover = chunk.second.getSize() - size;
- if (leftover > 0) { // Split chunk
- chunks.emplace(_base + size, Chunk(leftover, false));
- chunk.second.setSize(size);
- }
- chunk.second.setInUse(true);
- return reinterpret_cast<void*>(_base);
- }
+ // Pick a large enough free-chunk
+ auto it = std::find_if(chunks_free.begin(), chunks_free.end(),
+ [=](const std::map<char*, size_t>::value_type& chunk){ return chunk.second >= size; });
+ if (it == chunks_free.end())
+ return nullptr;
+
+ // Create the used-chunk, taking its space from the end of the free-chunk
+ auto alloced = chunks_used.emplace(it->first + it->second - size, size).first;
+ if (!(it->second -= size))
+ chunks_free.erase(it);
+ return reinterpret_cast<void*>(alloced->first);
+}
+
+/* extend the Iterator if other begins at its end */
+template <class Iterator, class Pair> bool extend(Iterator it, const Pair& other) {
+ if (it->first + it->second == other.first) {
+ it->second += other.second;
+ return true;
}
- return nullptr;
+ return false;
}
void Arena::free(void *ptr)
@@ -83,65 +91,49 @@ void Arena::free(void *ptr)
if (ptr == nullptr) {
return;
}
- auto i = chunks.find(static_cast<char*>(ptr));
- if (i == chunks.end() || !i->second.isInUse()) {
- throw std::runtime_error("Arena: invalid or double free");
- }
- i->second.setInUse(false);
-
- if (i != chunks.begin()) { // Absorb into previous chunk if exists and free
- auto prev = i;
- --prev;
- if (!prev->second.isInUse()) {
- // Absorb current chunk size into previous chunk.
- prev->second.setSize(prev->second.getSize() + i->second.getSize());
- // Erase current chunk. Erasing does not invalidate current
- // iterators for a map, except for that pointing to the object
- // itself, which will be overwritten in the next statement.
- chunks.erase(i);
- // From here on, the previous chunk is our current chunk.
- i = prev;
- }
- }
- auto next = i;
- ++next;
- if (next != chunks.end()) { // Absorb next chunk if exists and free
- if (!next->second.isInUse()) {
- // Absurb next chunk size into current chunk
- i->second.setSize(i->second.getSize() + next->second.getSize());
- // Erase next chunk.
- chunks.erase(next);
- }
+ // Remove chunk from used map
+ auto i = chunks_used.find(static_cast<char*>(ptr));
+ if (i == chunks_used.end()) {
+ throw std::runtime_error("Arena: invalid or double free");
}
+ auto freed = *i;
+ chunks_used.erase(i);
+
+ // Add space to free map, coalescing contiguous chunks
+ auto next = chunks_free.upper_bound(freed.first);
+ auto prev = (next == chunks_free.begin()) ? chunks_free.end() : std::prev(next);
+ if (prev == chunks_free.end() || !extend(prev, freed))
+ prev = chunks_free.emplace_hint(next, freed);
+ if (next != chunks_free.end() && extend(prev, *next))
+ chunks_free.erase(next);
}
Arena::Stats Arena::stats() const
{
- Arena::Stats r;
- r.used = r.free = r.total = r.chunks_used = r.chunks_free = 0;
- for (const auto& chunk: chunks) {
- if (chunk.second.isInUse()) {
- r.used += chunk.second.getSize();
- r.chunks_used += 1;
- } else {
- r.free += chunk.second.getSize();
- r.chunks_free += 1;
- }
- r.total += chunk.second.getSize();
- }
+ Arena::Stats r{ 0, 0, 0, chunks_used.size(), chunks_free.size() };
+ for (const auto& chunk: chunks_used)
+ r.used += chunk.second;
+ for (const auto& chunk: chunks_free)
+ r.free += chunk.second;
+ r.total = r.used + r.free;
return r;
}
#ifdef ARENA_DEBUG
+void printchunk(char* base, size_t sz, bool used) {
+ std::cout <<
+ "0x" << std::hex << std::setw(16) << std::setfill('0') << base <<
+ " 0x" << std::hex << std::setw(16) << std::setfill('0') << sz <<
+ " 0x" << used << std::endl;
+}
void Arena::walk() const
{
- for (const auto& chunk: chunks) {
- std::cout <<
- "0x" << std::hex << std::setw(16) << std::setfill('0') << chunk.first <<
- " 0x" << std::hex << std::setw(16) << std::setfill('0') << chunk.second.getSize() <<
- " 0x" << chunk.second.isInUse() << std::endl;
- }
+ for (const auto& chunk: chunks_used)
+ printchunk(chunk.first, chunk.second, true);
+ std::cout << std::endl;
+ for (const auto& chunk: chunks_free)
+ printchunk(chunk.first, chunk.second, false);
std::cout << std::endl;
}
#endif
@@ -276,6 +268,11 @@ LockedPool::~LockedPool()
void* LockedPool::alloc(size_t size)
{
std::lock_guard<std::mutex> lock(mutex);
+
+ // Don't handle impossible sizes
+ if (size == 0 || size > ARENA_SIZE)
+ return nullptr;
+
// Try allocating from each current arena
for (auto &arena: arenas) {
void *addr = arena.alloc(size);
@@ -307,9 +304,7 @@ void LockedPool::free(void *ptr)
LockedPool::Stats LockedPool::stats() const
{
std::lock_guard<std::mutex> lock(mutex);
- LockedPool::Stats r;
- r.used = r.free = r.total = r.chunks_used = r.chunks_free = 0;
- r.locked = cumulative_bytes_locked;
+ LockedPool::Stats r{0, 0, 0, cumulative_bytes_locked, 0, 0};
for (const auto &arena: arenas) {
Arena::Stats i = arena.stats();
r.used += i.used;
diff --git a/src/support/lockedpool.h b/src/support/lockedpool.h
index 526c17a73f..f5212bc266 100644
--- a/src/support/lockedpool.h
+++ b/src/support/lockedpool.h
@@ -50,27 +50,6 @@ public:
Arena(void *base, size_t size, size_t alignment);
virtual ~Arena();
- /** A chunk of memory.
- */
- struct Chunk
- {
- /** Most significant bit of size_t. This is used to mark
- * in-usedness of chunk.
- */
- const static size_t SIZE_MSB = 1LLU << ((sizeof(size_t)*8)-1);
- /** Maximum size of a chunk */
- const static size_t MAX_SIZE = SIZE_MSB - 1;
-
- Chunk(size_t size_in, bool used_in):
- size(size_in | (used_in ? SIZE_MSB : 0)) {}
-
- bool isInUse() const { return size & SIZE_MSB; }
- void setInUse(bool used_in) { size = (size & ~SIZE_MSB) | (used_in ? SIZE_MSB : 0); }
- size_t getSize() const { return size & ~SIZE_MSB; }
- void setSize(size_t size_in) { size = (size & SIZE_MSB) | size_in; }
- private:
- size_t size;
- };
/** Memory statistics. */
struct Stats
{
@@ -112,7 +91,8 @@ private:
/** Map of chunk address to chunk information. This class makes use of the
* sorted order to merge previous and next chunks during deallocation.
*/
- std::map<char*, Chunk> chunks;
+ std::map<char*, size_t> chunks_free;
+ std::map<char*, size_t> chunks_used;
/** Base address of arena */
char* base;
/** End address of arena */
@@ -129,7 +109,7 @@ private:
* An arena manages a contiguous region of memory. The pool starts out with one arena
* but can grow to multiple arenas if the need arises.
*
- * Unlike a normal C heap, the administrative structures are seperate from the managed
+ * Unlike a normal C heap, the administrative structures are separate from the managed
* memory. This has been done as the sizes and bases of objects are not in themselves sensitive
* information, as to conserve precious locked memory. In some operating systems
* the amount of memory that can be locked is small.
diff --git a/src/sync.cpp b/src/sync.cpp
index 641ed2c8ca..a18d0f1485 100644
--- a/src/sync.cpp
+++ b/src/sync.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/sync.h b/src/sync.h
index 7733910749..3b29050e0e 100644
--- a/src/sync.h
+++ b/src/sync.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -264,7 +264,6 @@ public:
grant.Release();
grant.sem = sem;
grant.fHaveGrant = fHaveGrant;
- sem = NULL;
fHaveGrant = false;
}
diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp
index 4aa7166815..9345a44fb0 100644
--- a/src/test/DoS_tests.cpp
+++ b/src/test/DoS_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,12 +6,13 @@
#include "chainparams.h"
#include "keystore.h"
-#include "main.h"
#include "net.h"
+#include "net_processing.h"
#include "pow.h"
#include "script/sign.h"
#include "serialize.h"
#include "util.h"
+#include "validation.h"
#include "test/test_bitcoin.h"
@@ -23,15 +24,15 @@
#include <boost/test/unit_test.hpp>
// Tests this internal-to-main.cpp method:
-extern bool AddOrphanTx(const CTransaction& tx, NodeId peer);
+extern bool AddOrphanTx(const CTransactionRef& tx, NodeId peer);
extern void EraseOrphansFor(NodeId peer);
extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans);
struct COrphanTx {
- CTransaction tx;
+ CTransactionRef tx;
NodeId fromPeer;
+ int64_t nTimeExpire;
};
extern std::map<uint256, COrphanTx> mapOrphanTransactions;
-extern std::map<uint256, std::set<uint256> > mapOrphanTransactionsByPrev;
CService ip(uint32_t i)
{
@@ -46,62 +47,72 @@ BOOST_FIXTURE_TEST_SUITE(DoS_tests, TestingSetup)
BOOST_AUTO_TEST_CASE(DoS_banning)
{
+ std::atomic<bool> interruptDummy(false);
+
connman->ClearBanned();
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 0, 0, "", true);
- GetNodeSignals().InitializeNode(dummyNode1.GetId(), &dummyNode1);
+ dummyNode1.SetSendVersion(PROTOCOL_VERSION);
+ GetNodeSignals().InitializeNode(&dummyNode1, *connman);
dummyNode1.nVersion = 1;
Misbehaving(dummyNode1.GetId(), 100); // Should get banned
- SendMessages(&dummyNode1, *connman);
+ SendMessages(&dummyNode1, *connman, interruptDummy);
BOOST_CHECK(connman->IsBanned(addr1));
BOOST_CHECK(!connman->IsBanned(ip(0xa0b0c001|0x0000ff00))); // Different IP, not banned
CAddress addr2(ip(0xa0b0c002), NODE_NONE);
CNode dummyNode2(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr2, 1, 1, "", true);
- GetNodeSignals().InitializeNode(dummyNode2.GetId(), &dummyNode2);
+ dummyNode2.SetSendVersion(PROTOCOL_VERSION);
+ GetNodeSignals().InitializeNode(&dummyNode2, *connman);
dummyNode2.nVersion = 1;
Misbehaving(dummyNode2.GetId(), 50);
- SendMessages(&dummyNode2, *connman);
+ SendMessages(&dummyNode2, *connman, interruptDummy);
BOOST_CHECK(!connman->IsBanned(addr2)); // 2 not banned yet...
BOOST_CHECK(connman->IsBanned(addr1)); // ... but 1 still should be
Misbehaving(dummyNode2.GetId(), 50);
- SendMessages(&dummyNode2, *connman);
+ SendMessages(&dummyNode2, *connman, interruptDummy);
BOOST_CHECK(connman->IsBanned(addr2));
}
BOOST_AUTO_TEST_CASE(DoS_banscore)
{
+ std::atomic<bool> interruptDummy(false);
+
connman->ClearBanned();
- mapArgs["-banscore"] = "111"; // because 11 is my favorite number
+ ForceSetArg("-banscore", "111"); // because 11 is my favorite number
CAddress addr1(ip(0xa0b0c001), NODE_NONE);
CNode dummyNode1(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr1, 3, 1, "", true);
- GetNodeSignals().InitializeNode(dummyNode1.GetId(), &dummyNode1);
+ dummyNode1.SetSendVersion(PROTOCOL_VERSION);
+ GetNodeSignals().InitializeNode(&dummyNode1, *connman);
dummyNode1.nVersion = 1;
Misbehaving(dummyNode1.GetId(), 100);
- SendMessages(&dummyNode1, *connman);
+ SendMessages(&dummyNode1, *connman, interruptDummy);
BOOST_CHECK(!connman->IsBanned(addr1));
Misbehaving(dummyNode1.GetId(), 10);
- SendMessages(&dummyNode1, *connman);
+ SendMessages(&dummyNode1, *connman, interruptDummy);
BOOST_CHECK(!connman->IsBanned(addr1));
Misbehaving(dummyNode1.GetId(), 1);
- SendMessages(&dummyNode1, *connman);
+ SendMessages(&dummyNode1, *connman, interruptDummy);
BOOST_CHECK(connman->IsBanned(addr1));
- mapArgs.erase("-banscore");
+ ForceSetArg("-banscore", std::to_string(DEFAULT_BANSCORE_THRESHOLD));
}
BOOST_AUTO_TEST_CASE(DoS_bantime)
{
+ std::atomic<bool> interruptDummy(false);
+
connman->ClearBanned();
int64_t nStartTime = GetTime();
SetMockTime(nStartTime); // Overrides future calls to GetTime()
CAddress addr(ip(0xa0b0c001), NODE_NONE);
CNode dummyNode(id++, NODE_NETWORK, 0, INVALID_SOCKET, addr, 4, 4, "", true);
- GetNodeSignals().InitializeNode(dummyNode.GetId(), &dummyNode);
+ dummyNode.SetSendVersion(PROTOCOL_VERSION);
+ GetNodeSignals().InitializeNode(&dummyNode, *connman);
dummyNode.nVersion = 1;
Misbehaving(dummyNode.GetId(), 100);
- SendMessages(&dummyNode, *connman);
+ SendMessages(&dummyNode, *connman, interruptDummy);
BOOST_CHECK(connman->IsBanned(addr));
SetMockTime(nStartTime+60*60);
@@ -111,7 +122,7 @@ BOOST_AUTO_TEST_CASE(DoS_bantime)
BOOST_CHECK(!connman->IsBanned(addr));
}
-CTransaction RandomOrphan()
+CTransactionRef RandomOrphan()
{
std::map<uint256, COrphanTx>::iterator it;
it = mapOrphanTransactions.lower_bound(GetRandHash());
@@ -139,30 +150,30 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
tx.vout[0].nValue = 1*CENT;
tx.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
- AddOrphanTx(tx, i);
+ AddOrphanTx(MakeTransactionRef(tx), i);
}
// ... and 50 that depend on other orphans:
for (int i = 0; i < 50; i++)
{
- CTransaction txPrev = RandomOrphan();
+ CTransactionRef txPrev = RandomOrphan();
CMutableTransaction tx;
tx.vin.resize(1);
tx.vin[0].prevout.n = 0;
- tx.vin[0].prevout.hash = txPrev.GetHash();
+ tx.vin[0].prevout.hash = txPrev->GetHash();
tx.vout.resize(1);
tx.vout[0].nValue = 1*CENT;
tx.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
- SignSignature(keystore, txPrev, tx, 0, SIGHASH_ALL);
+ SignSignature(keystore, *txPrev, tx, 0, SIGHASH_ALL);
- AddOrphanTx(tx, i);
+ AddOrphanTx(MakeTransactionRef(tx), i);
}
// This really-big orphan should be ignored:
for (int i = 0; i < 10; i++)
{
- CTransaction txPrev = RandomOrphan();
+ CTransactionRef txPrev = RandomOrphan();
CMutableTransaction tx;
tx.vout.resize(1);
@@ -172,15 +183,15 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
for (unsigned int j = 0; j < tx.vin.size(); j++)
{
tx.vin[j].prevout.n = j;
- tx.vin[j].prevout.hash = txPrev.GetHash();
+ tx.vin[j].prevout.hash = txPrev->GetHash();
}
- SignSignature(keystore, txPrev, tx, 0, SIGHASH_ALL);
+ SignSignature(keystore, *txPrev, tx, 0, SIGHASH_ALL);
// Re-use same signature for other inputs
// (they don't have to be valid for this test)
for (unsigned int j = 1; j < tx.vin.size(); j++)
tx.vin[j].scriptSig = tx.vin[0].scriptSig;
- BOOST_CHECK(!AddOrphanTx(tx, i));
+ BOOST_CHECK(!AddOrphanTx(MakeTransactionRef(tx), i));
}
// Test EraseOrphansFor:
@@ -198,7 +209,6 @@ BOOST_AUTO_TEST_CASE(DoS_mapOrphans)
BOOST_CHECK(mapOrphanTransactions.size() <= 10);
LimitOrphanTxSize(0);
BOOST_CHECK(mapOrphanTransactions.empty());
- BOOST_CHECK(mapOrphanTransactionsByPrev.empty());
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp
index adff09f754..48313915e7 100644
--- a/src/test/addrman_tests.cpp
+++ b/src/test/addrman_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "addrman.h"
@@ -10,8 +10,6 @@
#include "netbase.h"
#include "random.h"
-using namespace std;
-
class CAddrManTest : public CAddrMan
{
uint64_t state;
@@ -365,7 +363,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
// Test 22: Sanity check, GetAddr should never return anything if addrman
// is empty.
BOOST_CHECK(addrman.size() == 0);
- vector<CAddress> vAddr1 = addrman.GetAddr();
+ std::vector<CAddress> vAddr1 = addrman.GetAddr();
BOOST_CHECK(vAddr1.size() == 0);
CAddress addr1 = CAddress(ResolveService("250.250.2.1", 8333), NODE_NONE);
@@ -401,7 +399,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
int octet1 = i % 256;
int octet2 = (i / 256) % 256;
int octet3 = (i / (256 * 2)) % 256;
- string strAddr = boost::to_string(octet1) + "." + boost::to_string(octet2) + "." + boost::to_string(octet3) + ".23";
+ std::string strAddr = boost::to_string(octet1) + "." + boost::to_string(octet2) + "." + boost::to_string(octet3) + ".23";
CAddress addr = CAddress(ResolveService(strAddr), NODE_NONE);
// Ensure that for all addrs in addrman, isTerrible == false.
@@ -410,7 +408,7 @@ BOOST_AUTO_TEST_CASE(addrman_getaddr)
if (i % 8 == 0)
addrman.Good(addr);
}
- vector<CAddress> vAddr = addrman.GetAddr();
+ std::vector<CAddress> vAddr = addrman.GetAddr();
size_t percent23 = (addrman.size() * 23) / 100;
BOOST_CHECK(vAddr.size() == percent23);
@@ -452,7 +450,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_tried_bucket)
BOOST_CHECK(info1.GetKey() != info2.GetKey());
BOOST_CHECK(info1.GetTriedBucket(nKey1) != info2.GetTriedBucket(nKey1));
- set<int> buckets;
+ std::set<int> buckets;
for (int i = 0; i < 255; i++) {
CAddrInfo infoi = CAddrInfo(
CAddress(ResolveService("250.1.1." + boost::to_string(i)), NODE_NONE),
@@ -505,7 +503,7 @@ BOOST_AUTO_TEST_CASE(caddrinfo_get_new_bucket)
BOOST_CHECK(info1.GetKey() != info2.GetKey());
BOOST_CHECK(info1.GetNewBucket(nKey1) == info2.GetNewBucket(nKey1));
- set<int> buckets;
+ std::set<int> buckets;
for (int i = 0; i < 255; i++) {
CAddrInfo infoi = CAddrInfo(
CAddress(ResolveService("250.1.1." + boost::to_string(i)), NODE_NONE),
diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp
index f0e848655f..3f15a0dec1 100644
--- a/src/test/allocator_tests.cpp
+++ b/src/test/allocator_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -39,7 +39,6 @@ BOOST_AUTO_TEST_CASE(arena_tests)
}
void *a0 = b.alloc(128);
- BOOST_CHECK(a0 == synth_base); // first allocation must start at beginning
void *a1 = b.alloc(256);
void *a2 = b.alloc(512);
BOOST_CHECK(b.stats().used == 896);
@@ -63,8 +62,10 @@ BOOST_AUTO_TEST_CASE(arena_tests)
BOOST_CHECK(b.stats().used == 128);
b.free(a3);
BOOST_CHECK(b.stats().used == 0);
+ BOOST_CHECK_EQUAL(b.stats().chunks_used, 0);
BOOST_CHECK(b.stats().total == synth_size);
BOOST_CHECK(b.stats().free == synth_size);
+ BOOST_CHECK_EQUAL(b.stats().chunks_free, 1);
std::vector<void*> addr;
BOOST_CHECK(b.alloc(0) == nullptr); // allocating 0 always returns nullptr
@@ -74,7 +75,6 @@ BOOST_AUTO_TEST_CASE(arena_tests)
// Sweeping allocate all memory
for (int x=0; x<1024; ++x)
addr.push_back(b.alloc(1024));
- BOOST_CHECK(addr[0] == synth_base); // first allocation must start at beginning
BOOST_CHECK(b.stats().free == 0);
BOOST_CHECK(b.alloc(1024) == nullptr); // memory is full, this must return nullptr
BOOST_CHECK(b.alloc(0) == nullptr);
@@ -166,6 +166,16 @@ BOOST_AUTO_TEST_CASE(lockedpool_tests_mock)
BOOST_CHECK(pool.stats().total == 0);
BOOST_CHECK(pool.stats().locked == 0);
+ // Ensure unreasonable requests are refused without allocating anything
+ void *invalid_toosmall = pool.alloc(0);
+ BOOST_CHECK(invalid_toosmall == nullptr);
+ BOOST_CHECK(pool.stats().used == 0);
+ BOOST_CHECK(pool.stats().free == 0);
+ void *invalid_toobig = pool.alloc(LockedPool::ARENA_SIZE+1);
+ BOOST_CHECK(invalid_toobig == nullptr);
+ BOOST_CHECK(pool.stats().used == 0);
+ BOOST_CHECK(pool.stats().free == 0);
+
void *a0 = pool.alloc(LockedPool::ARENA_SIZE / 2);
BOOST_CHECK(a0);
BOOST_CHECK(pool.stats().locked == LockedPool::ARENA_SIZE);
diff --git a/src/test/arith_uint256_tests.cpp b/src/test/arith_uint256_tests.cpp
index b19d2faea0..45ae7d4636 100644
--- a/src/test/arith_uint256_tests.cpp
+++ b/src/test/arith_uint256_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp
index ac3ab4c83f..6cd998990b 100644
--- a/src/test/base58_tests.cpp
+++ b/src/test/base58_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(base58_EncodeBase58)
std::vector<unsigned char> sourcedata = ParseHex(test[0].get_str());
std::string base58string = test[1].get_str();
BOOST_CHECK_MESSAGE(
- EncodeBase58(begin_ptr(sourcedata), end_ptr(sourcedata)) == base58string,
+ EncodeBase58(sourcedata.data(), sourcedata.data() + sourcedata.size()) == base58string,
strTest);
}
}
diff --git a/src/test/bctest.py b/src/test/bctest.py
index 47cff98bca..adc5d0e418 100644
--- a/src/test/bctest.py
+++ b/src/test/bctest.py
@@ -1,4 +1,4 @@
-# Copyright 2014 BitPay, Inc.
+# Copyright 2014 BitPay Inc.
# Copyright 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/test/bitcoin-util-test.py b/src/test/bitcoin-util-test.py
index eeb05c0b88..e2087187aa 100755
--- a/src/test/bitcoin-util-test.py
+++ b/src/test/bitcoin-util-test.py
@@ -1,11 +1,10 @@
#!/usr/bin/env python
-# Copyright 2014 BitPay, Inc.
+# Copyright 2014 BitPay Inc.
# Copyright 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from __future__ import division,print_function,unicode_literals
import os
-import sys
import bctest
import buildenv
import argparse
@@ -15,7 +14,7 @@ help_text="""Test framework for bitcoin utils.
Runs automatically during `make check`.
-Can also be run manually from the src directory by specifiying the source directory:
+Can also be run manually from the src directory by specifying the source directory:
test/bitcoin-util-test.py --srcdir='srcdir' [--verbose]
"""
diff --git a/src/test/blockencodings_tests.cpp b/src/test/blockencodings_tests.cpp
index b0d9184816..311ac024f3 100644
--- a/src/test/blockencodings_tests.cpp
+++ b/src/test/blockencodings_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,6 +11,8 @@
#include <boost/test/unit_test.hpp>
+std::vector<std::pair<uint256, CTransactionRef>> extra_txn;
+
struct RegtestingSetup : public TestingSetup {
RegtestingSetup() : TestingSetup(CBaseChainParams::REGTEST) {}
};
@@ -26,21 +28,21 @@ static CBlock BuildBlockTestCase() {
tx.vout[0].nValue = 42;
block.vtx.resize(3);
- block.vtx[0] = tx;
+ block.vtx[0] = MakeTransactionRef(tx);
block.nVersion = 42;
block.hashPrevBlock = GetRandHash();
block.nBits = 0x207fffff;
tx.vin[0].prevout.hash = GetRandHash();
tx.vin[0].prevout.n = 0;
- block.vtx[1] = tx;
+ block.vtx[1] = MakeTransactionRef(tx);
tx.vin.resize(10);
for (size_t i = 0; i < tx.vin.size(); i++) {
tx.vin[i].prevout.hash = GetRandHash();
tx.vin[i].prevout.n = 0;
}
- block.vtx[2] = tx;
+ block.vtx[2] = MakeTransactionRef(tx);
bool mutated;
block.hashMerkleRoot = BlockMerkleRoot(block, &mutated);
@@ -59,8 +61,8 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[2].GetHash(), entry.FromTx(block.vtx[2]));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+ pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(*block.vtx[2]));
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
// Do a simple ShortTxIDs RT
{
@@ -73,29 +75,35 @@ BOOST_AUTO_TEST_CASE(SimpleRoundTripTest)
stream >> shortIDs2;
PartiallyDownloadedBlock partialBlock(&pool);
- BOOST_CHECK(partialBlock.InitData(shortIDs2) == READ_STATUS_OK);
+ BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
BOOST_CHECK( partialBlock.IsTxAvailable(0));
BOOST_CHECK(!partialBlock.IsTxAvailable(1));
BOOST_CHECK( partialBlock.IsTxAvailable(2));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
- std::vector<std::shared_ptr<const CTransaction>> removed;
- pool.removeRecursive(block.vtx[2], &removed);
- BOOST_CHECK_EQUAL(removed.size(), 1);
+ size_t poolSize = pool.size();
+ pool.removeRecursive(*block.vtx[2]);
+ BOOST_CHECK_EQUAL(pool.size(), poolSize - 1);
CBlock block2;
- std::vector<CTransaction> vtx_missing;
- BOOST_CHECK(partialBlock.FillBlock(block2, vtx_missing) == READ_STATUS_INVALID); // No transactions
+ {
+ PartiallyDownloadedBlock tmp = partialBlock;
+ BOOST_CHECK(partialBlock.FillBlock(block2, {}) == READ_STATUS_INVALID); // No transactions
+ partialBlock = tmp;
+ }
- vtx_missing.push_back(block.vtx[2]); // Wrong transaction
- partialBlock.FillBlock(block2, vtx_missing); // Current implementation doesn't check txn here, but don't require that
+ // Wrong transaction
+ {
+ PartiallyDownloadedBlock tmp = partialBlock;
+ partialBlock.FillBlock(block2, {block.vtx[2]}); // Current implementation doesn't check txn here, but don't require that
+ partialBlock = tmp;
+ }
bool mutated;
BOOST_CHECK(block.hashMerkleRoot != BlockMerkleRoot(block2, &mutated));
- vtx_missing[0] = block.vtx[1];
CBlock block3;
- BOOST_CHECK(partialBlock.FillBlock(block3, vtx_missing) == READ_STATUS_OK);
+ BOOST_CHECK(partialBlock.FillBlock(block3, {block.vtx[1]}) == READ_STATUS_OK);
BOOST_CHECK_EQUAL(block.GetHash().ToString(), block3.GetHash().ToString());
BOOST_CHECK_EQUAL(block.hashMerkleRoot.ToString(), BlockMerkleRoot(block3, &mutated).ToString());
BOOST_CHECK(!mutated);
@@ -129,7 +137,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(header);
READWRITE(nonce);
size_t shorttxids_size = shorttxids.size();
@@ -152,8 +160,10 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[2].GetHash(), entry.FromTx(block.vtx[2]));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+ pool.addUnchecked(block.vtx[2]->GetHash(), entry.FromTx(*block.vtx[2]));
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+
+ uint256 txhash;
// Test with pre-forwarding tx 1, but not coinbase
{
@@ -161,8 +171,8 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
shortIDs.prefilledtxn.resize(1);
shortIDs.prefilledtxn[0] = {1, block.vtx[1]};
shortIDs.shorttxids.resize(2);
- shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[0].GetHash());
- shortIDs.shorttxids[1] = shortIDs.GetShortID(block.vtx[2].GetHash());
+ shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[0]->GetHash());
+ shortIDs.shorttxids[1] = shortIDs.GetShortID(block.vtx[2]->GetHash());
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << shortIDs;
@@ -171,32 +181,43 @@ BOOST_AUTO_TEST_CASE(NonCoinbasePreforwardRTTest)
stream >> shortIDs2;
PartiallyDownloadedBlock partialBlock(&pool);
- BOOST_CHECK(partialBlock.InitData(shortIDs2) == READ_STATUS_OK);
+ BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
BOOST_CHECK(!partialBlock.IsTxAvailable(0));
BOOST_CHECK( partialBlock.IsTxAvailable(1));
BOOST_CHECK( partialBlock.IsTxAvailable(2));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
CBlock block2;
- std::vector<CTransaction> vtx_missing;
- BOOST_CHECK(partialBlock.FillBlock(block2, vtx_missing) == READ_STATUS_INVALID); // No transactions
+ {
+ PartiallyDownloadedBlock tmp = partialBlock;
+ BOOST_CHECK(partialBlock.FillBlock(block2, {}) == READ_STATUS_INVALID); // No transactions
+ partialBlock = tmp;
+ }
- vtx_missing.push_back(block.vtx[1]); // Wrong transaction
- partialBlock.FillBlock(block2, vtx_missing); // Current implementation doesn't check txn here, but don't require that
+ // Wrong transaction
+ {
+ PartiallyDownloadedBlock tmp = partialBlock;
+ partialBlock.FillBlock(block2, {block.vtx[1]}); // Current implementation doesn't check txn here, but don't require that
+ partialBlock = tmp;
+ }
bool mutated;
BOOST_CHECK(block.hashMerkleRoot != BlockMerkleRoot(block2, &mutated));
- vtx_missing[0] = block.vtx[0];
CBlock block3;
- BOOST_CHECK(partialBlock.FillBlock(block3, vtx_missing) == READ_STATUS_OK);
+ PartiallyDownloadedBlock partialBlockCopy = partialBlock;
+ BOOST_CHECK(partialBlock.FillBlock(block3, {block.vtx[0]}) == READ_STATUS_OK);
BOOST_CHECK_EQUAL(block.GetHash().ToString(), block3.GetHash().ToString());
BOOST_CHECK_EQUAL(block.hashMerkleRoot.ToString(), BlockMerkleRoot(block3, &mutated).ToString());
BOOST_CHECK(!mutated);
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
+ txhash = block.vtx[2]->GetHash();
+ block.vtx.clear();
+ block2.vtx.clear();
+ block3.vtx.clear();
+ BOOST_CHECK_EQUAL(pool.mapTx.find(txhash)->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1); // + 1 because of partialBlockCopy.
}
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[2].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+ BOOST_CHECK_EQUAL(pool.mapTx.find(txhash)->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
}
BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
@@ -205,8 +226,10 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
TestMemPoolEntryHelper entry;
CBlock block(BuildBlockTestCase());
- pool.addUnchecked(block.vtx[1].GetHash(), entry.FromTx(block.vtx[1]));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+ pool.addUnchecked(block.vtx[1]->GetHash(), entry.FromTx(*block.vtx[1]));
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+
+ uint256 txhash;
// Test with pre-forwarding coinbase + tx 2 with tx 1 in mempool
{
@@ -215,7 +238,7 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
shortIDs.prefilledtxn[0] = {0, block.vtx[0]};
shortIDs.prefilledtxn[1] = {1, block.vtx[2]}; // id == 1 as it is 1 after index 1
shortIDs.shorttxids.resize(1);
- shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[1].GetHash());
+ shortIDs.shorttxids[0] = shortIDs.GetShortID(block.vtx[1]->GetHash());
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << shortIDs;
@@ -224,24 +247,27 @@ BOOST_AUTO_TEST_CASE(SufficientPreforwardRTTest)
stream >> shortIDs2;
PartiallyDownloadedBlock partialBlock(&pool);
- BOOST_CHECK(partialBlock.InitData(shortIDs2) == READ_STATUS_OK);
+ BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
BOOST_CHECK( partialBlock.IsTxAvailable(0));
BOOST_CHECK( partialBlock.IsTxAvailable(1));
BOOST_CHECK( partialBlock.IsTxAvailable(2));
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
+ BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1]->GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
CBlock block2;
- std::vector<CTransaction> vtx_missing;
- BOOST_CHECK(partialBlock.FillBlock(block2, vtx_missing) == READ_STATUS_OK);
+ PartiallyDownloadedBlock partialBlockCopy = partialBlock;
+ BOOST_CHECK(partialBlock.FillBlock(block2, {}) == READ_STATUS_OK);
BOOST_CHECK_EQUAL(block.GetHash().ToString(), block2.GetHash().ToString());
bool mutated;
BOOST_CHECK_EQUAL(block.hashMerkleRoot.ToString(), BlockMerkleRoot(block2, &mutated).ToString());
BOOST_CHECK(!mutated);
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1);
+ txhash = block.vtx[1]->GetHash();
+ block.vtx.clear();
+ block2.vtx.clear();
+ BOOST_CHECK_EQUAL(pool.mapTx.find(txhash)->GetSharedTx().use_count(), SHARED_TX_OFFSET + 1); // + 1 because of partialBlockCopy.
}
- BOOST_CHECK_EQUAL(pool.mapTx.find(block.vtx[1].GetHash())->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
+ BOOST_CHECK_EQUAL(pool.mapTx.find(txhash)->GetSharedTx().use_count(), SHARED_TX_OFFSET + 0);
}
BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
@@ -255,7 +281,7 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
CBlock block;
block.vtx.resize(1);
- block.vtx[0] = coinbase;
+ block.vtx[0] = MakeTransactionRef(std::move(coinbase));
block.nVersion = 42;
block.hashPrevBlock = GetRandHash();
block.nBits = 0x207fffff;
@@ -276,11 +302,11 @@ BOOST_AUTO_TEST_CASE(EmptyBlockRoundTripTest)
stream >> shortIDs2;
PartiallyDownloadedBlock partialBlock(&pool);
- BOOST_CHECK(partialBlock.InitData(shortIDs2) == READ_STATUS_OK);
+ BOOST_CHECK(partialBlock.InitData(shortIDs2, extra_txn) == READ_STATUS_OK);
BOOST_CHECK(partialBlock.IsTxAvailable(0));
CBlock block2;
- std::vector<CTransaction> vtx_missing;
+ std::vector<CTransactionRef> vtx_missing;
BOOST_CHECK(partialBlock.FillBlock(block2, vtx_missing) == READ_STATUS_OK);
BOOST_CHECK_EQUAL(block.GetHash().ToString(), block2.GetHash().ToString());
BOOST_CHECK_EQUAL(block.hashMerkleRoot.ToString(), BlockMerkleRoot(block2, &mutated).ToString());
diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp
index 042fad42da..27bc92d670 100644
--- a/src/test/bloom_tests.cpp
+++ b/src/test/bloom_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -21,8 +21,6 @@
#include <boost/test/unit_test.hpp>
#include <boost/tuple/tuple.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(bloom_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
@@ -30,30 +28,30 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize)
CBloomFilter filter(3, 0.01, 0, BLOOM_UPDATE_ALL);
filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8"));
- BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+ BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
// One bit different in first byte
- BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter contains something it shouldn't!");
+ BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter contains something it shouldn't!");
filter.insert(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"));
- BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "BloomFilter doesn't contain just-inserted object (2)!");
+ BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "Bloom filter doesn't contain just-inserted object (2)!");
filter.insert(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5"));
- BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "BloomFilter doesn't contain just-inserted object (3)!");
+ BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "Bloom filter doesn't contain just-inserted object (3)!");
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- filter.Serialize(stream, SER_NETWORK, PROTOCOL_VERSION);
+ stream << filter;
- vector<unsigned char> vch = ParseHex("03614e9b050000000000000001");
- vector<char> expected(vch.size());
+ std::vector<unsigned char> vch = ParseHex("03614e9b050000000000000001");
+ std::vector<char> expected(vch.size());
for (unsigned int i = 0; i < vch.size(); i++)
expected[i] = (char)vch[i];
BOOST_CHECK_EQUAL_COLLECTIONS(stream.begin(), stream.end(), expected.begin(), expected.end());
- BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+ BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
filter.clear();
- BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter should be empty!");
+ BOOST_CHECK_MESSAGE( !filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter should be empty!");
}
BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
@@ -62,21 +60,21 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
CBloomFilter filter(3, 0.01, 2147483649UL, BLOOM_UPDATE_ALL);
filter.insert(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8"));
- BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter doesn't contain just-inserted object!");
+ BOOST_CHECK_MESSAGE( filter.contains(ParseHex("99108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter doesn't contain just-inserted object!");
// One bit different in first byte
- BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "BloomFilter contains something it shouldn't!");
+ BOOST_CHECK_MESSAGE(!filter.contains(ParseHex("19108ad8ed9bb6274d3980bab5a85c048f0950c8")), "Bloom filter contains something it shouldn't!");
filter.insert(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee"));
- BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "BloomFilter doesn't contain just-inserted object (2)!");
+ BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b5a2c786d9ef4658287ced5914b37a1b4aa32eee")), "Bloom filter doesn't contain just-inserted object (2)!");
filter.insert(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5"));
- BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "BloomFilter doesn't contain just-inserted object (3)!");
+ BOOST_CHECK_MESSAGE(filter.contains(ParseHex("b9300670b4c5366e95b2699e8b18bc75e5f729c5")), "Bloom filter doesn't contain just-inserted object (3)!");
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- filter.Serialize(stream, SER_NETWORK, PROTOCOL_VERSION);
+ stream << filter;
- vector<unsigned char> vch = ParseHex("03ce4299050000000100008001");
- vector<char> expected(vch.size());
+ std::vector<unsigned char> vch = ParseHex("03ce4299050000000100008001");
+ std::vector<char> expected(vch.size());
for (unsigned int i = 0; i < vch.size(); i++)
expected[i] = (char)vch[i];
@@ -86,24 +84,24 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_serialize_with_tweak)
BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
{
- string strSecret = string("5Kg1gnAjaLfKiwhhPpGS3QfRg2m6awQvaj98JCZBZQ5SuS2F15C");
+ std::string strSecret = std::string("5Kg1gnAjaLfKiwhhPpGS3QfRg2m6awQvaj98JCZBZQ5SuS2F15C");
CBitcoinSecret vchSecret;
BOOST_CHECK(vchSecret.SetString(strSecret));
CKey key = vchSecret.GetKey();
CPubKey pubkey = key.GetPubKey();
- vector<unsigned char> vchPubKey(pubkey.begin(), pubkey.end());
+ std::vector<unsigned char> vchPubKey(pubkey.begin(), pubkey.end());
CBloomFilter filter(2, 0.001, 0, BLOOM_UPDATE_ALL);
filter.insert(vchPubKey);
uint160 hash = pubkey.GetID();
- filter.insert(vector<unsigned char>(hash.begin(), hash.end()));
+ filter.insert(std::vector<unsigned char>(hash.begin(), hash.end()));
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
- filter.Serialize(stream, SER_NETWORK, PROTOCOL_VERSION);
+ stream << filter;
- vector<unsigned char> vch = ParseHex("038fc16b080000000000000001");
- vector<char> expected(vch.size());
+ std::vector<unsigned char> vch = ParseHex("038fc16b080000000000000001");
+ std::vector<char> expected(vch.size());
for (unsigned int i = 0; i < vch.size(); i++)
expected[i] = (char)vch[i];
@@ -114,16 +112,14 @@ BOOST_AUTO_TEST_CASE(bloom_create_insert_key)
BOOST_AUTO_TEST_CASE(bloom_match)
{
// Random real transaction (b4749f017444b051c44dfd2720e88f314ff94f3dd6d56d40ef65854fcd7fff6b)
- CTransaction tx;
CDataStream stream(ParseHex("01000000010b26e9b7735eb6aabdf358bab62f9816a21ba9ebdb719d5299e88607d722c190000000008b4830450220070aca44506c5cef3a16ed519d7c3c39f8aab192c4e1c90d065f37b8a4af6141022100a8e160b856c2d43d27d8fba71e5aef6405b8643ac4cb7cb3c462aced7f14711a0141046d11fee51b0e60666d5049a9101a72741df480b96ee26488a4d3466b95c9a40ac5eeef87e10a5cd336c19a84565f80fa6c547957b7700ff4dfbdefe76036c339ffffffff021bff3d11000000001976a91404943fdd508053c75000106d3bc6e2754dbcff1988ac2f15de00000000001976a914a266436d2965547608b9e15d9032a7b9d64fa43188ac00000000"), SER_DISK, CLIENT_VERSION);
- stream >> tx;
+ CTransaction tx(deserialize, stream);
// and one which spends it (e2769b09e784f32f62ef849763d4f45b98e07ba658647343b915ff832b110436)
unsigned char ch[] = {0x01, 0x00, 0x00, 0x00, 0x01, 0x6b, 0xff, 0x7f, 0xcd, 0x4f, 0x85, 0x65, 0xef, 0x40, 0x6d, 0xd5, 0xd6, 0x3d, 0x4f, 0xf9, 0x4f, 0x31, 0x8f, 0xe8, 0x20, 0x27, 0xfd, 0x4d, 0xc4, 0x51, 0xb0, 0x44, 0x74, 0x01, 0x9f, 0x74, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x49, 0x30, 0x46, 0x02, 0x21, 0x00, 0xda, 0x0d, 0xc6, 0xae, 0xce, 0xfe, 0x1e, 0x06, 0xef, 0xdf, 0x05, 0x77, 0x37, 0x57, 0xde, 0xb1, 0x68, 0x82, 0x09, 0x30, 0xe3, 0xb0, 0xd0, 0x3f, 0x46, 0xf5, 0xfc, 0xf1, 0x50, 0xbf, 0x99, 0x0c, 0x02, 0x21, 0x00, 0xd2, 0x5b, 0x5c, 0x87, 0x04, 0x00, 0x76, 0xe4, 0xf2, 0x53, 0xf8, 0x26, 0x2e, 0x76, 0x3e, 0x2d, 0xd5, 0x1e, 0x7f, 0xf0, 0xbe, 0x15, 0x77, 0x27, 0xc4, 0xbc, 0x42, 0x80, 0x7f, 0x17, 0xbd, 0x39, 0x01, 0x41, 0x04, 0xe6, 0xc2, 0x6e, 0xf6, 0x7d, 0xc6, 0x10, 0xd2, 0xcd, 0x19, 0x24, 0x84, 0x78, 0x9a, 0x6c, 0xf9, 0xae, 0xa9, 0x93, 0x0b, 0x94, 0x4b, 0x7e, 0x2d, 0xb5, 0x34, 0x2b, 0x9d, 0x9e, 0x5b, 0x9f, 0xf7, 0x9a, 0xff, 0x9a, 0x2e, 0xe1, 0x97, 0x8d, 0xd7, 0xfd, 0x01, 0xdf, 0xc5, 0x22, 0xee, 0x02, 0x28, 0x3d, 0x3b, 0x06, 0xa9, 0xd0, 0x3a, 0xcf, 0x80, 0x96, 0x96, 0x8d, 0x7d, 0xbb, 0x0f, 0x91, 0x78, 0xff, 0xff, 0xff, 0xff, 0x02, 0x8b, 0xa7, 0x94, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xba, 0xde, 0xec, 0xfd, 0xef, 0x05, 0x07, 0x24, 0x7f, 0xc8, 0xf7, 0x42, 0x41, 0xd7, 0x3b, 0xc0, 0x39, 0x97, 0x2d, 0x7b, 0x88, 0xac, 0x40, 0x94, 0xa8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xc1, 0x09, 0x32, 0x48, 0x3f, 0xec, 0x93, 0xed, 0x51, 0xf5, 0xfe, 0x95, 0xe7, 0x25, 0x59, 0xf2, 0xcc, 0x70, 0x43, 0xf9, 0x88, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00};
- vector<unsigned char> vch(ch, ch + sizeof(ch) -1);
+ std::vector<unsigned char> vch(ch, ch + sizeof(ch) -1);
CDataStream spendStream(vch, SER_DISK, CLIENT_VERSION);
- CTransaction spendingTx;
- spendStream >> spendingTx;
+ CTransaction spendingTx(deserialize, spendStream);
CBloomFilter filter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
filter.insert(uint256S("0xb4749f017444b051c44dfd2720e88f314ff94f3dd6d56d40ef65854fcd7fff6b"));
@@ -158,7 +154,7 @@ BOOST_AUTO_TEST_CASE(bloom_match)
filter = CBloomFilter(10, 0.000001, 0, BLOOM_UPDATE_ALL);
COutPoint prevOutPoint(uint256S("0x90c122d70786e899529d71dbeba91ba216982fb6ba58f3bdaab65e73b7e9260b"), 0);
{
- vector<unsigned char> data(32 + sizeof(unsigned int));
+ std::vector<unsigned char> data(32 + sizeof(unsigned int));
memcpy(&data[0], prevOutPoint.hash.begin(), 32);
memcpy(&data[32], &prevOutPoint.n, sizeof(unsigned int));
filter.insert(data);
@@ -198,13 +194,13 @@ BOOST_AUTO_TEST_CASE(merkle_block_1)
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
BOOST_CHECK(merkleBlock.vMatchedTxn.size() == 1);
- pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
+ std::pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
BOOST_CHECK(merkleBlock.vMatchedTxn[0].second == uint256S("0x74d681e0e03bafa802c8aa084379aa98d9fcd632ddc2ed9782b586ec87451f20"));
BOOST_CHECK(merkleBlock.vMatchedTxn[0].first == 8);
- vector<uint256> vMatched;
- vector<unsigned int> vIndex;
+ std::vector<uint256> vMatched;
+ std::vector<unsigned int> vIndex;
BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched, vIndex) == block.hashMerkleRoot);
BOOST_CHECK(vMatched.size() == merkleBlock.vMatchedTxn.size());
for (unsigned int i = 0; i < vMatched.size(); i++)
@@ -244,13 +240,13 @@ BOOST_AUTO_TEST_CASE(merkle_block_2)
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
BOOST_CHECK(merkleBlock.vMatchedTxn.size() == 1);
- pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
+ std::pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
BOOST_CHECK(merkleBlock.vMatchedTxn[0].second == uint256S("0xe980fe9f792d014e73b95203dc1335c5f9ce19ac537a419e6df5b47aecb93b70"));
BOOST_CHECK(merkleBlock.vMatchedTxn[0].first == 0);
- vector<uint256> vMatched;
- vector<unsigned int> vIndex;
+ std::vector<uint256> vMatched;
+ std::vector<unsigned int> vIndex;
BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched, vIndex) == block.hashMerkleRoot);
BOOST_CHECK(vMatched.size() == merkleBlock.vMatchedTxn.size());
for (unsigned int i = 0; i < vMatched.size(); i++)
@@ -299,13 +295,13 @@ BOOST_AUTO_TEST_CASE(merkle_block_2_with_update_none)
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
BOOST_CHECK(merkleBlock.vMatchedTxn.size() == 1);
- pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
+ std::pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
BOOST_CHECK(merkleBlock.vMatchedTxn[0].second == uint256S("0xe980fe9f792d014e73b95203dc1335c5f9ce19ac537a419e6df5b47aecb93b70"));
BOOST_CHECK(merkleBlock.vMatchedTxn[0].first == 0);
- vector<uint256> vMatched;
- vector<unsigned int> vIndex;
+ std::vector<uint256> vMatched;
+ std::vector<unsigned int> vIndex;
BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched, vIndex) == block.hashMerkleRoot);
BOOST_CHECK(vMatched.size() == merkleBlock.vMatchedTxn.size());
for (unsigned int i = 0; i < vMatched.size(); i++)
@@ -355,8 +351,8 @@ BOOST_AUTO_TEST_CASE(merkle_block_3_and_serialize)
BOOST_CHECK(merkleBlock.vMatchedTxn[0].second == uint256S("0x63194f18be0af63f2c6bc9dc0f777cbefed3d9415c4af83f3ee3a3d669c00cb5"));
BOOST_CHECK(merkleBlock.vMatchedTxn[0].first == 0);
- vector<uint256> vMatched;
- vector<unsigned int> vIndex;
+ std::vector<uint256> vMatched;
+ std::vector<unsigned int> vIndex;
BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched, vIndex) == block.hashMerkleRoot);
BOOST_CHECK(vMatched.size() == merkleBlock.vMatchedTxn.size());
for (unsigned int i = 0; i < vMatched.size(); i++)
@@ -365,8 +361,8 @@ BOOST_AUTO_TEST_CASE(merkle_block_3_and_serialize)
CDataStream merkleStream(SER_NETWORK, PROTOCOL_VERSION);
merkleStream << merkleBlock;
- vector<unsigned char> vch = ParseHex("0100000079cda856b143d9db2c1caff01d1aecc8630d30625d10e8b4b8b0000000000000b50cc069d6a3e33e3ff84a5c41d9d3febe7c770fdcc96b2c3ff60abe184f196367291b4d4c86041b8fa45d630100000001b50cc069d6a3e33e3ff84a5c41d9d3febe7c770fdcc96b2c3ff60abe184f19630101");
- vector<char> expected(vch.size());
+ std::vector<unsigned char> vch = ParseHex("0100000079cda856b143d9db2c1caff01d1aecc8630d30625d10e8b4b8b0000000000000b50cc069d6a3e33e3ff84a5c41d9d3febe7c770fdcc96b2c3ff60abe184f196367291b4d4c86041b8fa45d630100000001b50cc069d6a3e33e3ff84a5c41d9d3febe7c770fdcc96b2c3ff60abe184f19630101");
+ std::vector<char> expected(vch.size());
for (unsigned int i = 0; i < vch.size(); i++)
expected[i] = (char)vch[i];
@@ -390,13 +386,13 @@ BOOST_AUTO_TEST_CASE(merkle_block_4)
BOOST_CHECK(merkleBlock.header.GetHash() == block.GetHash());
BOOST_CHECK(merkleBlock.vMatchedTxn.size() == 1);
- pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
+ std::pair<unsigned int, uint256> pair = merkleBlock.vMatchedTxn[0];
BOOST_CHECK(merkleBlock.vMatchedTxn[0].second == uint256S("0x0a2a92f0bda4727d0a13eaddf4dd9ac6b5c61a1429e6b2b818f19b15df0ac154"));
BOOST_CHECK(merkleBlock.vMatchedTxn[0].first == 6);
- vector<uint256> vMatched;
- vector<unsigned int> vIndex;
+ std::vector<uint256> vMatched;
+ std::vector<unsigned int> vIndex;
BOOST_CHECK(merkleBlock.txn.ExtractMatches(vMatched, vIndex) == block.hashMerkleRoot);
BOOST_CHECK(vMatched.size() == merkleBlock.vMatchedTxn.size());
for (unsigned int i = 0; i < vMatched.size(); i++)
diff --git a/src/test/bswap_tests.cpp b/src/test/bswap_tests.cpp
new file mode 100644
index 0000000000..7b3134d327
--- /dev/null
+++ b/src/test/bswap_tests.cpp
@@ -0,0 +1,26 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "compat/byteswap.h"
+#include "test/test_bitcoin.h"
+
+#include <boost/test/unit_test.hpp>
+
+BOOST_FIXTURE_TEST_SUITE(bswap_tests, BasicTestingSetup)
+
+BOOST_AUTO_TEST_CASE(bswap_tests)
+{
+ // Sibling in bitcoin/src/qt/test/compattests.cpp
+ uint16_t u1 = 0x1234;
+ uint32_t u2 = 0x56789abc;
+ uint64_t u3 = 0xdef0123456789abc;
+ uint16_t e1 = 0x3412;
+ uint32_t e2 = 0xbc9a7856;
+ uint64_t e3 = 0xbc9a78563412f0de;
+ BOOST_CHECK(bswap_16(u1) == e1);
+ BOOST_CHECK(bswap_32(u2) == e2);
+ BOOST_CHECK(bswap_64(u3) == e3);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index b487686136..b25c7ccc51 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -1,14 +1,15 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "coins.h"
-#include "test_random.h"
#include "script/standard.h"
#include "uint256.h"
+#include "undo.h"
#include "utilstrencodings.h"
#include "test/test_bitcoin.h"
-#include "main.h"
+#include "test/test_random.h"
+#include "validation.h"
#include "consensus/validation.h"
#include <vector>
@@ -16,6 +17,9 @@
#include <boost/test/unit_test.hpp>
+bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out);
+void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, CTxUndo &txundo, int nHeight);
+
namespace
{
class CCoinsViewTest : public CCoinsView
@@ -80,6 +84,8 @@ public:
BOOST_CHECK_EQUAL(DynamicMemoryUsage(), ret);
}
+ CCoinsMap& map() { return cacheCoins; }
+ size_t& usage() { return cachedCoinsUsage; }
};
}
@@ -211,6 +217,22 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
BOOST_CHECK(missed_an_entry);
}
+typedef std::tuple<CTransaction,CTxUndo,CCoins> TxData;
+// Store of all necessary tx and undo data for next test
+std::map<uint256, TxData> alltxs;
+
+TxData &FindRandomFrom(const std::set<uint256> &txidset) {
+ assert(txidset.size());
+ std::set<uint256>::iterator txIt = txidset.lower_bound(GetRandHash());
+ if (txIt == txidset.end()) {
+ txIt = txidset.begin();
+ }
+ std::map<uint256, TxData>::iterator txdit = alltxs.find(*txIt);
+ assert(txdit != alltxs.end());
+ return txdit->second;
+}
+
+
// This test is similar to the previous test
// except the emphasis is on testing the functionality of UpdateCoins
// random txs are created and UpdateCoins is used to update the cache stack
@@ -227,77 +249,139 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
std::vector<CCoinsViewCacheTest*> stack; // A stack of CCoinsViewCaches on top.
stack.push_back(new CCoinsViewCacheTest(&base)); // Start with one cache.
- // Track the txids we've used and whether they have been spent or not
- std::map<uint256, CAmount> coinbaseids;
- std::set<uint256> alltxids;
+ // Track the txids we've used in various sets
+ std::set<uint256> coinbaseids;
+ std::set<uint256> disconnectedids;
std::set<uint256> duplicateids;
+ std::set<uint256> utxoset;
for (unsigned int i = 0; i < NUM_SIMULATION_ITERATIONS; i++) {
- {
+ uint32_t randiter = insecure_rand();
+
+ // 19/20 txs add a new transaction
+ if (randiter % 20 < 19) {
CMutableTransaction tx;
tx.vin.resize(1);
tx.vout.resize(1);
tx.vout[0].nValue = i; //Keep txs unique unless intended to duplicate
unsigned int height = insecure_rand();
+ CCoins oldcoins;
- // 1/10 times create a coinbase
- if (insecure_rand() % 10 == 0 || coinbaseids.size() < 10) {
- // 1/100 times create a duplicate coinbase
+ // 2/20 times create a new coinbase
+ if (randiter % 20 < 2 || coinbaseids.size() < 10) {
+ // 1/10 of those times create a duplicate coinbase
if (insecure_rand() % 10 == 0 && coinbaseids.size()) {
- std::map<uint256, CAmount>::iterator coinbaseIt = coinbaseids.lower_bound(GetRandHash());
- if (coinbaseIt == coinbaseids.end()) {
- coinbaseIt = coinbaseids.begin();
- }
- //Use same random value to have same hash and be a true duplicate
- tx.vout[0].nValue = coinbaseIt->second;
- assert(tx.GetHash() == coinbaseIt->first);
- duplicateids.insert(coinbaseIt->first);
+ TxData &txd = FindRandomFrom(coinbaseids);
+ // Reuse the exact same coinbase
+ tx = std::get<0>(txd);
+ // shouldn't be available for reconnection if its been duplicated
+ disconnectedids.erase(tx.GetHash());
+
+ duplicateids.insert(tx.GetHash());
}
else {
- coinbaseids[tx.GetHash()] = tx.vout[0].nValue;
+ coinbaseids.insert(tx.GetHash());
}
assert(CTransaction(tx).IsCoinBase());
}
- // 9/10 times create a regular tx
+
+ // 17/20 times reconnect previous or add a regular tx
else {
+
uint256 prevouthash;
- // equally likely to spend coinbase or non coinbase
- std::set<uint256>::iterator txIt = alltxids.lower_bound(GetRandHash());
- if (txIt == alltxids.end()) {
- txIt = alltxids.begin();
+ // 1/20 times reconnect a previously disconnected tx
+ if (randiter % 20 == 2 && disconnectedids.size()) {
+ TxData &txd = FindRandomFrom(disconnectedids);
+ tx = std::get<0>(txd);
+ prevouthash = tx.vin[0].prevout.hash;
+ if (!CTransaction(tx).IsCoinBase() && !utxoset.count(prevouthash)) {
+ disconnectedids.erase(tx.GetHash());
+ continue;
+ }
+
+ // If this tx is already IN the UTXO, then it must be a coinbase, and it must be a duplicate
+ if (utxoset.count(tx.GetHash())) {
+ assert(CTransaction(tx).IsCoinBase());
+ assert(duplicateids.count(tx.GetHash()));
+ }
+ disconnectedids.erase(tx.GetHash());
}
- prevouthash = *txIt;
- // Construct the tx to spend the coins of prevouthash
- tx.vin[0].prevout.hash = prevouthash;
- tx.vin[0].prevout.n = 0;
+ // 16/20 times create a regular tx
+ else {
+ TxData &txd = FindRandomFrom(utxoset);
+ prevouthash = std::get<0>(txd).GetHash();
+ // Construct the tx to spend the coins of prevouthash
+ tx.vin[0].prevout.hash = prevouthash;
+ tx.vin[0].prevout.n = 0;
+ assert(!CTransaction(tx).IsCoinBase());
+ }
+ // In this simple test coins only have two states, spent or unspent, save the unspent state to restore
+ oldcoins = result[prevouthash];
// Update the expected result of prevouthash to know these coins are spent
- CCoins& oldcoins = result[prevouthash];
- oldcoins.Clear();
+ result[prevouthash].Clear();
- // It is of particular importance here that once we spend a coinbase tx hash
- // it is no longer available to be duplicated (or spent again)
- // BIP 34 in conjunction with enforcing BIP 30 (at least until BIP 34 was active)
- // results in the fact that no coinbases were duplicated after they were already spent
- alltxids.erase(prevouthash);
- coinbaseids.erase(prevouthash);
+ utxoset.erase(prevouthash);
// The test is designed to ensure spending a duplicate coinbase will work properly
// if that ever happens and not resurrect the previously overwritten coinbase
if (duplicateids.count(prevouthash))
spent_a_duplicate_coinbase = true;
- assert(!CTransaction(tx).IsCoinBase());
}
- // Track this tx to possibly spend later
- alltxids.insert(tx.GetHash());
-
// Update the expected result to know about the new output coins
- CCoins &coins = result[tx.GetHash()];
- coins.FromTx(tx, height);
+ result[tx.GetHash()].FromTx(tx, height);
+
+ // Call UpdateCoins on the top cache
+ CTxUndo undo;
+ UpdateCoins(tx, *(stack.back()), undo, height);
+
+ // Update the utxo set for future spends
+ utxoset.insert(tx.GetHash());
+
+ // Track this tx and undo info to use later
+ alltxs.insert(std::make_pair(tx.GetHash(),std::make_tuple(tx,undo,oldcoins)));
+ }
+
+ //1/20 times undo a previous transaction
+ else if (utxoset.size()) {
+ TxData &txd = FindRandomFrom(utxoset);
- UpdateCoins(tx, *(stack.back()), height);
+ CTransaction &tx = std::get<0>(txd);
+ CTxUndo &undo = std::get<1>(txd);
+ CCoins &origcoins = std::get<2>(txd);
+
+ uint256 undohash = tx.GetHash();
+
+ // Update the expected result
+ // Remove new outputs
+ result[undohash].Clear();
+ // If not coinbase restore prevout
+ if (!tx.IsCoinBase()) {
+ result[tx.vin[0].prevout.hash] = origcoins;
+ }
+
+ // Disconnect the tx from the current UTXO
+ // See code in DisconnectBlock
+ // remove outputs
+ {
+ CCoinsModifier outs = stack.back()->ModifyCoins(undohash);
+ outs->Clear();
+ }
+ // restore inputs
+ if (!tx.IsCoinBase()) {
+ const COutPoint &out = tx.vin[0].prevout;
+ const CTxInUndo &undoin = undo.vprevout[0];
+ ApplyTxInUndo(undoin, *(stack.back()), out);
+ }
+ // Store as a candidate for reconnection
+ disconnectedids.insert(undohash);
+
+ // Update the utxoset
+ utxoset.erase(undohash);
+ if (!tx.IsCoinBase())
+ utxoset.insert(tx.vin[0].prevout.hash);
}
// Once every 1000 iterations and at the end, verify the full cache.
@@ -306,9 +390,9 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
const CCoins* coins = stack.back()->AccessCoins(it->first);
if (coins) {
BOOST_CHECK(*coins == it->second);
- } else {
+ } else {
BOOST_CHECK(it->second.IsPruned());
- }
+ }
}
}
@@ -332,7 +416,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
tip = stack.back();
}
stack.push_back(new CCoinsViewCacheTest(tip));
- }
+ }
}
}
@@ -415,4 +499,378 @@ BOOST_AUTO_TEST_CASE(ccoins_serialization)
}
}
+const static uint256 TXID;
+const static CAmount PRUNED = -1;
+const static CAmount ABSENT = -2;
+const static CAmount FAIL = -3;
+const static CAmount VALUE1 = 100;
+const static CAmount VALUE2 = 200;
+const static CAmount VALUE3 = 300;
+const static char DIRTY = CCoinsCacheEntry::DIRTY;
+const static char FRESH = CCoinsCacheEntry::FRESH;
+const static char NO_ENTRY = -1;
+
+const static auto FLAGS = {char(0), FRESH, DIRTY, char(DIRTY | FRESH)};
+const static auto CLEAN_FLAGS = {char(0), FRESH};
+const static auto ABSENT_FLAGS = {NO_ENTRY};
+
+void SetCoinsValue(CAmount value, CCoins& coins)
+{
+ assert(value != ABSENT);
+ coins.Clear();
+ assert(coins.IsPruned());
+ if (value != PRUNED) {
+ coins.vout.emplace_back();
+ coins.vout.back().nValue = value;
+ assert(!coins.IsPruned());
+ }
+}
+
+size_t InsertCoinsMapEntry(CCoinsMap& map, CAmount value, char flags)
+{
+ if (value == ABSENT) {
+ assert(flags == NO_ENTRY);
+ return 0;
+ }
+ assert(flags != NO_ENTRY);
+ CCoinsCacheEntry entry;
+ entry.flags = flags;
+ SetCoinsValue(value, entry.coins);
+ auto inserted = map.emplace(TXID, std::move(entry));
+ assert(inserted.second);
+ return inserted.first->second.coins.DynamicMemoryUsage();
+}
+
+void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags)
+{
+ auto it = map.find(TXID);
+ if (it == map.end()) {
+ value = ABSENT;
+ flags = NO_ENTRY;
+ } else {
+ if (it->second.coins.IsPruned()) {
+ assert(it->second.coins.vout.size() == 0);
+ value = PRUNED;
+ } else {
+ assert(it->second.coins.vout.size() == 1);
+ value = it->second.coins.vout[0].nValue;
+ }
+ flags = it->second.flags;
+ assert(flags != NO_ENTRY);
+ }
+}
+
+void WriteCoinsViewEntry(CCoinsView& view, CAmount value, char flags)
+{
+ CCoinsMap map;
+ InsertCoinsMapEntry(map, value, flags);
+ view.BatchWrite(map, {});
+}
+
+class SingleEntryCacheTest
+{
+public:
+ SingleEntryCacheTest(CAmount base_value, CAmount cache_value, char cache_flags)
+ {
+ WriteCoinsViewEntry(base, base_value, base_value == ABSENT ? NO_ENTRY : DIRTY);
+ cache.usage() += InsertCoinsMapEntry(cache.map(), cache_value, cache_flags);
+ }
+
+ CCoinsView root;
+ CCoinsViewCacheTest base{&root};
+ CCoinsViewCacheTest cache{&base};
+};
+
+void CheckAccessCoins(CAmount base_value, CAmount cache_value, CAmount expected_value, char cache_flags, char expected_flags)
+{
+ SingleEntryCacheTest test(base_value, cache_value, cache_flags);
+ test.cache.AccessCoins(TXID);
+ test.cache.SelfTest();
+
+ CAmount result_value;
+ char result_flags;
+ GetCoinsMapEntry(test.cache.map(), result_value, result_flags);
+ BOOST_CHECK_EQUAL(result_value, expected_value);
+ BOOST_CHECK_EQUAL(result_flags, expected_flags);
+}
+
+BOOST_AUTO_TEST_CASE(ccoins_access)
+{
+ /* Check AccessCoin behavior, requesting a coin from a cache view layered on
+ * top of a base view, and checking the resulting entry in the cache after
+ * the access.
+ *
+ * Base Cache Result Cache Result
+ * Value Value Value Flags Flags
+ */
+ CheckAccessCoins(ABSENT, ABSENT, ABSENT, NO_ENTRY , NO_ENTRY );
+ CheckAccessCoins(ABSENT, PRUNED, PRUNED, 0 , 0 );
+ CheckAccessCoins(ABSENT, PRUNED, PRUNED, FRESH , FRESH );
+ CheckAccessCoins(ABSENT, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckAccessCoins(ABSENT, PRUNED, PRUNED, DIRTY|FRESH, DIRTY|FRESH);
+ CheckAccessCoins(ABSENT, VALUE2, VALUE2, 0 , 0 );
+ CheckAccessCoins(ABSENT, VALUE2, VALUE2, FRESH , FRESH );
+ CheckAccessCoins(ABSENT, VALUE2, VALUE2, DIRTY , DIRTY );
+ CheckAccessCoins(ABSENT, VALUE2, VALUE2, DIRTY|FRESH, DIRTY|FRESH);
+ CheckAccessCoins(PRUNED, ABSENT, PRUNED, NO_ENTRY , FRESH );
+ CheckAccessCoins(PRUNED, PRUNED, PRUNED, 0 , 0 );
+ CheckAccessCoins(PRUNED, PRUNED, PRUNED, FRESH , FRESH );
+ CheckAccessCoins(PRUNED, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckAccessCoins(PRUNED, PRUNED, PRUNED, DIRTY|FRESH, DIRTY|FRESH);
+ CheckAccessCoins(PRUNED, VALUE2, VALUE2, 0 , 0 );
+ CheckAccessCoins(PRUNED, VALUE2, VALUE2, FRESH , FRESH );
+ CheckAccessCoins(PRUNED, VALUE2, VALUE2, DIRTY , DIRTY );
+ CheckAccessCoins(PRUNED, VALUE2, VALUE2, DIRTY|FRESH, DIRTY|FRESH);
+ CheckAccessCoins(VALUE1, ABSENT, VALUE1, NO_ENTRY , 0 );
+ CheckAccessCoins(VALUE1, PRUNED, PRUNED, 0 , 0 );
+ CheckAccessCoins(VALUE1, PRUNED, PRUNED, FRESH , FRESH );
+ CheckAccessCoins(VALUE1, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckAccessCoins(VALUE1, PRUNED, PRUNED, DIRTY|FRESH, DIRTY|FRESH);
+ CheckAccessCoins(VALUE1, VALUE2, VALUE2, 0 , 0 );
+ CheckAccessCoins(VALUE1, VALUE2, VALUE2, FRESH , FRESH );
+ CheckAccessCoins(VALUE1, VALUE2, VALUE2, DIRTY , DIRTY );
+ CheckAccessCoins(VALUE1, VALUE2, VALUE2, DIRTY|FRESH, DIRTY|FRESH);
+}
+
+void CheckModifyCoins(CAmount base_value, CAmount cache_value, CAmount modify_value, CAmount expected_value, char cache_flags, char expected_flags)
+{
+ SingleEntryCacheTest test(base_value, cache_value, cache_flags);
+ SetCoinsValue(modify_value, *test.cache.ModifyCoins(TXID));
+ test.cache.SelfTest();
+
+ CAmount result_value;
+ char result_flags;
+ GetCoinsMapEntry(test.cache.map(), result_value, result_flags);
+ BOOST_CHECK_EQUAL(result_value, expected_value);
+ BOOST_CHECK_EQUAL(result_flags, expected_flags);
+};
+
+BOOST_AUTO_TEST_CASE(ccoins_modify)
+{
+ /* Check ModifyCoin behavior, requesting a coin from a cache view layered on
+ * top of a base view, writing a modification to the coin, and then checking
+ * the resulting entry in the cache after the modification.
+ *
+ * Base Cache Write Result Cache Result
+ * Value Value Value Value Flags Flags
+ */
+ CheckModifyCoins(ABSENT, ABSENT, PRUNED, ABSENT, NO_ENTRY , NO_ENTRY );
+ CheckModifyCoins(ABSENT, ABSENT, VALUE3, VALUE3, NO_ENTRY , DIRTY|FRESH);
+ CheckModifyCoins(ABSENT, PRUNED, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(ABSENT, PRUNED, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(ABSENT, PRUNED, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(ABSENT, PRUNED, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(ABSENT, PRUNED, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(ABSENT, PRUNED, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(ABSENT, PRUNED, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(ABSENT, PRUNED, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+ CheckModifyCoins(ABSENT, VALUE2, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(ABSENT, VALUE2, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(ABSENT, VALUE2, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(ABSENT, VALUE2, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(ABSENT, VALUE2, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(ABSENT, VALUE2, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(ABSENT, VALUE2, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(ABSENT, VALUE2, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+ CheckModifyCoins(PRUNED, ABSENT, PRUNED, ABSENT, NO_ENTRY , NO_ENTRY );
+ CheckModifyCoins(PRUNED, ABSENT, VALUE3, VALUE3, NO_ENTRY , DIRTY|FRESH);
+ CheckModifyCoins(PRUNED, PRUNED, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(PRUNED, PRUNED, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(PRUNED, PRUNED, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(PRUNED, PRUNED, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(PRUNED, PRUNED, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(PRUNED, PRUNED, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(PRUNED, PRUNED, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(PRUNED, PRUNED, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+ CheckModifyCoins(PRUNED, VALUE2, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(PRUNED, VALUE2, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(PRUNED, VALUE2, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(PRUNED, VALUE2, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(PRUNED, VALUE2, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(PRUNED, VALUE2, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(PRUNED, VALUE2, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(PRUNED, VALUE2, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+ CheckModifyCoins(VALUE1, ABSENT, PRUNED, PRUNED, NO_ENTRY , DIRTY );
+ CheckModifyCoins(VALUE1, ABSENT, VALUE3, VALUE3, NO_ENTRY , DIRTY );
+ CheckModifyCoins(VALUE1, PRUNED, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(VALUE1, PRUNED, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(VALUE1, PRUNED, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(VALUE1, PRUNED, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(VALUE1, PRUNED, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(VALUE1, PRUNED, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(VALUE1, PRUNED, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(VALUE1, PRUNED, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+ CheckModifyCoins(VALUE1, VALUE2, PRUNED, PRUNED, 0 , DIRTY );
+ CheckModifyCoins(VALUE1, VALUE2, PRUNED, ABSENT, FRESH , NO_ENTRY );
+ CheckModifyCoins(VALUE1, VALUE2, PRUNED, PRUNED, DIRTY , DIRTY );
+ CheckModifyCoins(VALUE1, VALUE2, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY );
+ CheckModifyCoins(VALUE1, VALUE2, VALUE3, VALUE3, 0 , DIRTY );
+ CheckModifyCoins(VALUE1, VALUE2, VALUE3, VALUE3, FRESH , DIRTY|FRESH);
+ CheckModifyCoins(VALUE1, VALUE2, VALUE3, VALUE3, DIRTY , DIRTY );
+ CheckModifyCoins(VALUE1, VALUE2, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH);
+}
+
+void CheckModifyNewCoinsBase(CAmount base_value, CAmount cache_value, CAmount modify_value, CAmount expected_value, char cache_flags, char expected_flags, bool coinbase)
+{
+ SingleEntryCacheTest test(base_value, cache_value, cache_flags);
+
+ CAmount result_value;
+ char result_flags;
+ try {
+ SetCoinsValue(modify_value, *test.cache.ModifyNewCoins(TXID, coinbase));
+ GetCoinsMapEntry(test.cache.map(), result_value, result_flags);
+ } catch (std::logic_error& e) {
+ result_value = FAIL;
+ result_flags = NO_ENTRY;
+ }
+
+ BOOST_CHECK_EQUAL(result_value, expected_value);
+ BOOST_CHECK_EQUAL(result_flags, expected_flags);
+}
+
+// Simple wrapper for CheckModifyNewCoinsBase function above that loops through
+// different possible base_values, making sure each one gives the same results.
+// This wrapper lets the modify_new test below be shorter and less repetitive,
+// while still verifying that the CoinsViewCache::ModifyNewCoins implementation
+// ignores base values.
+template <typename... Args>
+void CheckModifyNewCoins(Args&&... args)
+{
+ for (CAmount base_value : {ABSENT, PRUNED, VALUE1})
+ CheckModifyNewCoinsBase(base_value, std::forward<Args>(args)...);
+}
+
+BOOST_AUTO_TEST_CASE(ccoins_modify_new)
+{
+ /* Check ModifyNewCoin behavior, requesting a new coin from a cache view,
+ * writing a modification to the coin, and then checking the resulting
+ * entry in the cache after the modification. Verify behavior with the
+ * with the ModifyNewCoin coinbase argument set to false, and to true.
+ *
+ * Cache Write Result Cache Result Coinbase
+ * Value Value Value Flags Flags
+ */
+ CheckModifyNewCoins(ABSENT, PRUNED, ABSENT, NO_ENTRY , NO_ENTRY , false);
+ CheckModifyNewCoins(ABSENT, PRUNED, PRUNED, NO_ENTRY , DIRTY , true );
+ CheckModifyNewCoins(ABSENT, VALUE3, VALUE3, NO_ENTRY , DIRTY|FRESH, false);
+ CheckModifyNewCoins(ABSENT, VALUE3, VALUE3, NO_ENTRY , DIRTY , true );
+ CheckModifyNewCoins(PRUNED, PRUNED, ABSENT, 0 , NO_ENTRY , false);
+ CheckModifyNewCoins(PRUNED, PRUNED, PRUNED, 0 , DIRTY , true );
+ CheckModifyNewCoins(PRUNED, PRUNED, ABSENT, FRESH , NO_ENTRY , false);
+ CheckModifyNewCoins(PRUNED, PRUNED, ABSENT, FRESH , NO_ENTRY , true );
+ CheckModifyNewCoins(PRUNED, PRUNED, PRUNED, DIRTY , DIRTY , false);
+ CheckModifyNewCoins(PRUNED, PRUNED, PRUNED, DIRTY , DIRTY , true );
+ CheckModifyNewCoins(PRUNED, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY , false);
+ CheckModifyNewCoins(PRUNED, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY , true );
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, 0 , DIRTY|FRESH, false);
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, 0 , DIRTY , true );
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, FRESH , DIRTY|FRESH, false);
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, FRESH , DIRTY|FRESH, true );
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, DIRTY , DIRTY , false);
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, DIRTY , DIRTY , true );
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH, false);
+ CheckModifyNewCoins(PRUNED, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH, true );
+ CheckModifyNewCoins(VALUE2, PRUNED, FAIL , 0 , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, PRUNED, PRUNED, 0 , DIRTY , true );
+ CheckModifyNewCoins(VALUE2, PRUNED, FAIL , FRESH , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, PRUNED, ABSENT, FRESH , NO_ENTRY , true );
+ CheckModifyNewCoins(VALUE2, PRUNED, FAIL , DIRTY , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, PRUNED, PRUNED, DIRTY , DIRTY , true );
+ CheckModifyNewCoins(VALUE2, PRUNED, FAIL , DIRTY|FRESH, NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, PRUNED, ABSENT, DIRTY|FRESH, NO_ENTRY , true );
+ CheckModifyNewCoins(VALUE2, VALUE3, FAIL , 0 , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, VALUE3, VALUE3, 0 , DIRTY , true );
+ CheckModifyNewCoins(VALUE2, VALUE3, FAIL , FRESH , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, VALUE3, VALUE3, FRESH , DIRTY|FRESH, true );
+ CheckModifyNewCoins(VALUE2, VALUE3, FAIL , DIRTY , NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, VALUE3, VALUE3, DIRTY , DIRTY , true );
+ CheckModifyNewCoins(VALUE2, VALUE3, FAIL , DIRTY|FRESH, NO_ENTRY , false);
+ CheckModifyNewCoins(VALUE2, VALUE3, VALUE3, DIRTY|FRESH, DIRTY|FRESH, true );
+}
+
+void CheckWriteCoins(CAmount parent_value, CAmount child_value, CAmount expected_value, char parent_flags, char child_flags, char expected_flags)
+{
+ SingleEntryCacheTest test(ABSENT, parent_value, parent_flags);
+
+ CAmount result_value;
+ char result_flags;
+ try {
+ WriteCoinsViewEntry(test.cache, child_value, child_flags);
+ test.cache.SelfTest();
+ GetCoinsMapEntry(test.cache.map(), result_value, result_flags);
+ } catch (std::logic_error& e) {
+ result_value = FAIL;
+ result_flags = NO_ENTRY;
+ }
+
+ BOOST_CHECK_EQUAL(result_value, expected_value);
+ BOOST_CHECK_EQUAL(result_flags, expected_flags);
+}
+
+BOOST_AUTO_TEST_CASE(ccoins_write)
+{
+ /* Check BatchWrite behavior, flushing one entry from a child cache to a
+ * parent cache, and checking the resulting entry in the parent cache
+ * after the write.
+ *
+ * Parent Child Result Parent Child Result
+ * Value Value Value Flags Flags Flags
+ */
+ CheckWriteCoins(ABSENT, ABSENT, ABSENT, NO_ENTRY , NO_ENTRY , NO_ENTRY );
+ CheckWriteCoins(ABSENT, PRUNED, PRUNED, NO_ENTRY , DIRTY , DIRTY );
+ CheckWriteCoins(ABSENT, PRUNED, ABSENT, NO_ENTRY , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(ABSENT, VALUE2, VALUE2, NO_ENTRY , DIRTY , DIRTY );
+ CheckWriteCoins(ABSENT, VALUE2, VALUE2, NO_ENTRY , DIRTY|FRESH, DIRTY|FRESH);
+ CheckWriteCoins(PRUNED, ABSENT, PRUNED, 0 , NO_ENTRY , 0 );
+ CheckWriteCoins(PRUNED, ABSENT, PRUNED, FRESH , NO_ENTRY , FRESH );
+ CheckWriteCoins(PRUNED, ABSENT, PRUNED, DIRTY , NO_ENTRY , DIRTY );
+ CheckWriteCoins(PRUNED, ABSENT, PRUNED, DIRTY|FRESH, NO_ENTRY , DIRTY|FRESH);
+ CheckWriteCoins(PRUNED, PRUNED, PRUNED, 0 , DIRTY , DIRTY );
+ CheckWriteCoins(PRUNED, PRUNED, PRUNED, 0 , DIRTY|FRESH, DIRTY );
+ CheckWriteCoins(PRUNED, PRUNED, ABSENT, FRESH , DIRTY , NO_ENTRY );
+ CheckWriteCoins(PRUNED, PRUNED, ABSENT, FRESH , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(PRUNED, PRUNED, PRUNED, DIRTY , DIRTY , DIRTY );
+ CheckWriteCoins(PRUNED, PRUNED, PRUNED, DIRTY , DIRTY|FRESH, DIRTY );
+ CheckWriteCoins(PRUNED, PRUNED, ABSENT, DIRTY|FRESH, DIRTY , NO_ENTRY );
+ CheckWriteCoins(PRUNED, PRUNED, ABSENT, DIRTY|FRESH, DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, 0 , DIRTY , DIRTY );
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, 0 , DIRTY|FRESH, DIRTY );
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, FRESH , DIRTY , DIRTY|FRESH);
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, FRESH , DIRTY|FRESH, DIRTY|FRESH);
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, DIRTY , DIRTY , DIRTY );
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, DIRTY , DIRTY|FRESH, DIRTY );
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, DIRTY|FRESH, DIRTY , DIRTY|FRESH);
+ CheckWriteCoins(PRUNED, VALUE2, VALUE2, DIRTY|FRESH, DIRTY|FRESH, DIRTY|FRESH);
+ CheckWriteCoins(VALUE1, ABSENT, VALUE1, 0 , NO_ENTRY , 0 );
+ CheckWriteCoins(VALUE1, ABSENT, VALUE1, FRESH , NO_ENTRY , FRESH );
+ CheckWriteCoins(VALUE1, ABSENT, VALUE1, DIRTY , NO_ENTRY , DIRTY );
+ CheckWriteCoins(VALUE1, ABSENT, VALUE1, DIRTY|FRESH, NO_ENTRY , DIRTY|FRESH);
+ CheckWriteCoins(VALUE1, PRUNED, PRUNED, 0 , DIRTY , DIRTY );
+ CheckWriteCoins(VALUE1, PRUNED, FAIL , 0 , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, PRUNED, ABSENT, FRESH , DIRTY , NO_ENTRY );
+ CheckWriteCoins(VALUE1, PRUNED, FAIL , FRESH , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, PRUNED, PRUNED, DIRTY , DIRTY , DIRTY );
+ CheckWriteCoins(VALUE1, PRUNED, FAIL , DIRTY , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, PRUNED, ABSENT, DIRTY|FRESH, DIRTY , NO_ENTRY );
+ CheckWriteCoins(VALUE1, PRUNED, FAIL , DIRTY|FRESH, DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, VALUE2, VALUE2, 0 , DIRTY , DIRTY );
+ CheckWriteCoins(VALUE1, VALUE2, FAIL , 0 , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, VALUE2, VALUE2, FRESH , DIRTY , DIRTY|FRESH);
+ CheckWriteCoins(VALUE1, VALUE2, FAIL , FRESH , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, VALUE2, VALUE2, DIRTY , DIRTY , DIRTY );
+ CheckWriteCoins(VALUE1, VALUE2, FAIL , DIRTY , DIRTY|FRESH, NO_ENTRY );
+ CheckWriteCoins(VALUE1, VALUE2, VALUE2, DIRTY|FRESH, DIRTY , DIRTY|FRESH);
+ CheckWriteCoins(VALUE1, VALUE2, FAIL , DIRTY|FRESH, DIRTY|FRESH, NO_ENTRY );
+
+ // The checks above omit cases where the child flags are not DIRTY, since
+ // they would be too repetitive (the parent cache is never updated in these
+ // cases). The loop below covers these cases and makes sure the parent cache
+ // is always left unchanged.
+ for (CAmount parent_value : {ABSENT, PRUNED, VALUE1})
+ for (CAmount child_value : {ABSENT, PRUNED, VALUE2})
+ for (char parent_flags : parent_value == ABSENT ? ABSENT_FLAGS : FLAGS)
+ for (char child_flags : child_value == ABSENT ? ABSENT_FLAGS : CLEAN_FLAGS)
+ CheckWriteCoins(parent_value, child_value, parent_value, parent_flags, child_flags, parent_flags);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp
index c7b4fb240c..4d17417179 100644
--- a/src/test/crypto_tests.cpp
+++ b/src/test/crypto_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,9 +9,9 @@
#include "crypto/sha512.h"
#include "crypto/hmac_sha256.h"
#include "crypto/hmac_sha512.h"
-#include "test_random.h"
#include "utilstrencodings.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include <vector>
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp
new file mode 100644
index 0000000000..1bc50d5ea9
--- /dev/null
+++ b/src/test/cuckoocache_tests.cpp
@@ -0,0 +1,394 @@
+// Copyright (c) 2012-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include <boost/test/unit_test.hpp>
+#include "cuckoocache.h"
+#include "test/test_bitcoin.h"
+#include "random.h"
+#include <thread>
+#include <boost/thread.hpp>
+
+
+/** Test Suite for CuckooCache
+ *
+ * 1) All tests should have a deterministic result (using insecure rand
+ * with deterministic seeds)
+ * 2) Some test methods are templated to allow for easier testing
+ * against new versions / comparing
+ * 3) Results should be treated as a regression test, ie, did the behavior
+ * change significantly from what was expected. This can be OK, depending on
+ * the nature of the change, but requires updating the tests to reflect the new
+ * expected behavior. For example improving the hit rate may cause some tests
+ * using BOOST_CHECK_CLOSE to fail.
+ *
+ */
+FastRandomContext insecure_rand(true);
+
+BOOST_AUTO_TEST_SUITE(cuckoocache_tests);
+
+
+/** insecure_GetRandHash fills in a uint256 from insecure_rand
+ */
+void insecure_GetRandHash(uint256& t)
+{
+ uint32_t* ptr = (uint32_t*)t.begin();
+ for (uint8_t j = 0; j < 8; ++j)
+ *(ptr++) = insecure_rand.rand32();
+}
+
+/** Definition copied from /src/script/sigcache.cpp
+ */
+class uint256Hasher
+{
+public:
+ template <uint8_t hash_select>
+ uint32_t operator()(const uint256& key) const
+ {
+ static_assert(hash_select <8, "SignatureCacheHasher only has 8 hashes available.");
+ uint32_t u;
+ std::memcpy(&u, key.begin() + 4 * hash_select, 4);
+ return u;
+ }
+};
+
+
+/* Test that no values not inserted into the cache are read out of it.
+ *
+ * There are no repeats in the first 200000 insecure_GetRandHash calls
+ */
+BOOST_AUTO_TEST_CASE(test_cuckoocache_no_fakes)
+{
+ insecure_rand = FastRandomContext(true);
+ CuckooCache::cache<uint256, uint256Hasher> cc{};
+ cc.setup_bytes(32 << 20);
+ uint256 v;
+ for (int x = 0; x < 100000; ++x) {
+ insecure_GetRandHash(v);
+ cc.insert(v);
+ }
+ for (int x = 0; x < 100000; ++x) {
+ insecure_GetRandHash(v);
+ BOOST_CHECK(!cc.contains(v, false));
+ }
+};
+
+/** This helper returns the hit rate when megabytes*load worth of entries are
+ * inserted into a megabytes sized cache
+ */
+template <typename Cache>
+double test_cache(size_t megabytes, double load)
+{
+ insecure_rand = FastRandomContext(true);
+ std::vector<uint256> hashes;
+ Cache set{};
+ size_t bytes = megabytes * (1 << 20);
+ set.setup_bytes(bytes);
+ uint32_t n_insert = static_cast<uint32_t>(load * (bytes / sizeof(uint256)));
+ hashes.resize(n_insert);
+ for (uint32_t i = 0; i < n_insert; ++i) {
+ uint32_t* ptr = (uint32_t*)hashes[i].begin();
+ for (uint8_t j = 0; j < 8; ++j)
+ *(ptr++) = insecure_rand.rand32();
+ }
+ /** We make a copy of the hashes because future optimizations of the
+ * cuckoocache may overwrite the inserted element, so the test is
+ * "future proofed".
+ */
+ std::vector<uint256> hashes_insert_copy = hashes;
+ /** Do the insert */
+ for (uint256& h : hashes_insert_copy)
+ set.insert(h);
+ /** Count the hits */
+ uint32_t count = 0;
+ for (uint256& h : hashes)
+ count += set.contains(h, false);
+ double hit_rate = ((double)count) / ((double)n_insert);
+ return hit_rate;
+}
+
+/** The normalized hit rate for a given load.
+ *
+ * The semantics are a little confusing, so please see the below
+ * explanation.
+ *
+ * Examples:
+ *
+ * 1) at load 0.5, we expect a perfect hit rate, so we multiply by
+ * 1.0
+ * 2) at load 2.0, we expect to see half the entries, so a perfect hit rate
+ * would be 0.5. Therefore, if we see a hit rate of 0.4, 0.4*2.0 = 0.8 is the
+ * normalized hit rate.
+ *
+ * This is basically the right semantics, but has a bit of a glitch depending on
+ * how you measure around load 1.0 as after load 1.0 your normalized hit rate
+ * becomes effectively perfect, ignoring freshness.
+ */
+double normalize_hit_rate(double hits, double load)
+{
+ return hits * std::max(load, 1.0);
+}
+
+/** Check the hit rate on loads ranging from 0.1 to 2.0 */
+BOOST_AUTO_TEST_CASE(cuckoocache_hit_rate_ok)
+{
+ /** Arbitrarily selected Hit Rate threshold that happens to work for this test
+ * as a lower bound on performance.
+ */
+ double HitRateThresh = 0.98;
+ size_t megabytes = 32;
+ for (double load = 0.1; load < 2; load *= 2) {
+ double hits = test_cache<CuckooCache::cache<uint256, uint256Hasher>>(megabytes, load);
+ BOOST_CHECK(normalize_hit_rate(hits, load) > HitRateThresh);
+ }
+}
+
+
+/** This helper checks that erased elements are preferentially inserted onto and
+ * that the hit rate of "fresher" keys is reasonable*/
+template <typename Cache>
+void test_cache_erase(size_t megabytes)
+{
+ double load = 1;
+ insecure_rand = FastRandomContext(true);
+ std::vector<uint256> hashes;
+ Cache set{};
+ size_t bytes = megabytes * (1 << 20);
+ set.setup_bytes(bytes);
+ uint32_t n_insert = static_cast<uint32_t>(load * (bytes / sizeof(uint256)));
+ hashes.resize(n_insert);
+ for (uint32_t i = 0; i < n_insert; ++i) {
+ uint32_t* ptr = (uint32_t*)hashes[i].begin();
+ for (uint8_t j = 0; j < 8; ++j)
+ *(ptr++) = insecure_rand.rand32();
+ }
+ /** We make a copy of the hashes because future optimizations of the
+ * cuckoocache may overwrite the inserted element, so the test is
+ * "future proofed".
+ */
+ std::vector<uint256> hashes_insert_copy = hashes;
+
+ /** Insert the first half */
+ for (uint32_t i = 0; i < (n_insert / 2); ++i)
+ set.insert(hashes_insert_copy[i]);
+ /** Erase the first quarter */
+ for (uint32_t i = 0; i < (n_insert / 4); ++i)
+ set.contains(hashes[i], true);
+ /** Insert the second half */
+ for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
+ set.insert(hashes_insert_copy[i]);
+
+ /** elements that we marked erased but that are still there */
+ size_t count_erased_but_contained = 0;
+ /** elements that we did not erase but are older */
+ size_t count_stale = 0;
+ /** elements that were most recently inserted */
+ size_t count_fresh = 0;
+
+ for (uint32_t i = 0; i < (n_insert / 4); ++i)
+ count_erased_but_contained += set.contains(hashes[i], false);
+ for (uint32_t i = (n_insert / 4); i < (n_insert / 2); ++i)
+ count_stale += set.contains(hashes[i], false);
+ for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
+ count_fresh += set.contains(hashes[i], false);
+
+ double hit_rate_erased_but_contained = double(count_erased_but_contained) / (double(n_insert) / 4.0);
+ double hit_rate_stale = double(count_stale) / (double(n_insert) / 4.0);
+ double hit_rate_fresh = double(count_fresh) / (double(n_insert) / 2.0);
+
+ // Check that our hit_rate_fresh is perfect
+ BOOST_CHECK_EQUAL(hit_rate_fresh, 1.0);
+ // Check that we have a more than 2x better hit rate on stale elements than
+ // erased elements.
+ BOOST_CHECK(hit_rate_stale > 2 * hit_rate_erased_but_contained);
+}
+
+BOOST_AUTO_TEST_CASE(cuckoocache_erase_ok)
+{
+ size_t megabytes = 32;
+ test_cache_erase<CuckooCache::cache<uint256, uint256Hasher>>(megabytes);
+}
+
+template <typename Cache>
+void test_cache_erase_parallel(size_t megabytes)
+{
+ double load = 1;
+ insecure_rand = FastRandomContext(true);
+ std::vector<uint256> hashes;
+ Cache set{};
+ size_t bytes = megabytes * (1 << 20);
+ set.setup_bytes(bytes);
+ uint32_t n_insert = static_cast<uint32_t>(load * (bytes / sizeof(uint256)));
+ hashes.resize(n_insert);
+ for (uint32_t i = 0; i < n_insert; ++i) {
+ uint32_t* ptr = (uint32_t*)hashes[i].begin();
+ for (uint8_t j = 0; j < 8; ++j)
+ *(ptr++) = insecure_rand.rand32();
+ }
+ /** We make a copy of the hashes because future optimizations of the
+ * cuckoocache may overwrite the inserted element, so the test is
+ * "future proofed".
+ */
+ std::vector<uint256> hashes_insert_copy = hashes;
+ boost::shared_mutex mtx;
+
+ {
+ /** Grab lock to make sure we release inserts */
+ boost::unique_lock<boost::shared_mutex> l(mtx);
+ /** Insert the first half */
+ for (uint32_t i = 0; i < (n_insert / 2); ++i)
+ set.insert(hashes_insert_copy[i]);
+ }
+
+ /** Spin up 3 threads to run contains with erase.
+ */
+ std::vector<std::thread> threads;
+ /** Erase the first quarter */
+ for (uint32_t x = 0; x < 3; ++x)
+ /** Each thread is emplaced with x copy-by-value
+ */
+ threads.emplace_back([&, x] {
+ boost::shared_lock<boost::shared_mutex> l(mtx);
+ size_t ntodo = (n_insert/4)/3;
+ size_t start = ntodo*x;
+ size_t end = ntodo*(x+1);
+ for (uint32_t i = start; i < end; ++i)
+ set.contains(hashes[i], true);
+ });
+
+ /** Wait for all threads to finish
+ */
+ for (std::thread& t : threads)
+ t.join();
+ /** Grab lock to make sure we observe erases */
+ boost::unique_lock<boost::shared_mutex> l(mtx);
+ /** Insert the second half */
+ for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
+ set.insert(hashes_insert_copy[i]);
+
+ /** elements that we marked erased but that are still there */
+ size_t count_erased_but_contained = 0;
+ /** elements that we did not erase but are older */
+ size_t count_stale = 0;
+ /** elements that were most recently inserted */
+ size_t count_fresh = 0;
+
+ for (uint32_t i = 0; i < (n_insert / 4); ++i)
+ count_erased_but_contained += set.contains(hashes[i], false);
+ for (uint32_t i = (n_insert / 4); i < (n_insert / 2); ++i)
+ count_stale += set.contains(hashes[i], false);
+ for (uint32_t i = (n_insert / 2); i < n_insert; ++i)
+ count_fresh += set.contains(hashes[i], false);
+
+ double hit_rate_erased_but_contained = double(count_erased_but_contained) / (double(n_insert) / 4.0);
+ double hit_rate_stale = double(count_stale) / (double(n_insert) / 4.0);
+ double hit_rate_fresh = double(count_fresh) / (double(n_insert) / 2.0);
+
+ // Check that our hit_rate_fresh is perfect
+ BOOST_CHECK_EQUAL(hit_rate_fresh, 1.0);
+ // Check that we have a more than 2x better hit rate on stale elements than
+ // erased elements.
+ BOOST_CHECK(hit_rate_stale > 2 * hit_rate_erased_but_contained);
+}
+BOOST_AUTO_TEST_CASE(cuckoocache_erase_parallel_ok)
+{
+ size_t megabytes = 32;
+ test_cache_erase_parallel<CuckooCache::cache<uint256, uint256Hasher>>(megabytes);
+}
+
+
+template <typename Cache>
+void test_cache_generations()
+{
+ // This test checks that for a simulation of network activity, the fresh hit
+ // rate is never below 99%, and the number of times that it is worse than
+ // 99.9% are less than 1% of the time.
+ double min_hit_rate = 0.99;
+ double tight_hit_rate = 0.999;
+ double max_rate_less_than_tight_hit_rate = 0.01;
+ // A cache that meets this specification is therefore shown to have a hit
+ // rate of at least tight_hit_rate * (1 - max_rate_less_than_tight_hit_rate) +
+ // min_hit_rate*max_rate_less_than_tight_hit_rate = 0.999*99%+0.99*1% == 99.89%
+ // hit rate with low variance.
+
+ // We use deterministic values, but this test has also passed on many
+ // iterations with non-deterministic values, so it isn't "overfit" to the
+ // specific entropy in FastRandomContext(true) and implementation of the
+ // cache.
+ insecure_rand = FastRandomContext(true);
+
+ // block_activity models a chunk of network activity. n_insert elements are
+ // adde to the cache. The first and last n/4 are stored for removal later
+ // and the middle n/2 are not stored. This models a network which uses half
+ // the signatures of recently (since the last block) added transactions
+ // immediately and never uses the other half.
+ struct block_activity {
+ std::vector<uint256> reads;
+ block_activity(uint32_t n_insert, Cache& c) : reads()
+ {
+ std::vector<uint256> inserts;
+ inserts.resize(n_insert);
+ reads.reserve(n_insert / 2);
+ for (uint32_t i = 0; i < n_insert; ++i) {
+ uint32_t* ptr = (uint32_t*)inserts[i].begin();
+ for (uint8_t j = 0; j < 8; ++j)
+ *(ptr++) = insecure_rand.rand32();
+ }
+ for (uint32_t i = 0; i < n_insert / 4; ++i)
+ reads.push_back(inserts[i]);
+ for (uint32_t i = n_insert - (n_insert / 4); i < n_insert; ++i)
+ reads.push_back(inserts[i]);
+ for (auto h : inserts)
+ c.insert(h);
+ }
+ };
+
+ const uint32_t BLOCK_SIZE = 10000;
+ // We expect window size 60 to perform reasonably given that each epoch
+ // stores 45% of the cache size (~472k).
+ const uint32_t WINDOW_SIZE = 60;
+ const uint32_t POP_AMOUNT = (BLOCK_SIZE / WINDOW_SIZE) / 2;
+ const double load = 10;
+ const size_t megabytes = 32;
+ const size_t bytes = megabytes * (1 << 20);
+ const uint32_t n_insert = static_cast<uint32_t>(load * (bytes / sizeof(uint256)));
+
+ std::vector<block_activity> hashes;
+ Cache set{};
+ set.setup_bytes(bytes);
+ hashes.reserve(n_insert / BLOCK_SIZE);
+ std::deque<block_activity> last_few;
+ uint32_t out_of_tight_tolerance = 0;
+ uint32_t total = n_insert / BLOCK_SIZE;
+ // we use the deque last_few to model a sliding window of blocks. at each
+ // step, each of the last WINDOW_SIZE block_activities checks the cache for
+ // POP_AMOUNT of the hashes that they inserted, and marks these erased.
+ for (uint32_t i = 0; i < total; ++i) {
+ if (last_few.size() == WINDOW_SIZE)
+ last_few.pop_front();
+ last_few.emplace_back(BLOCK_SIZE, set);
+ uint32_t count = 0;
+ for (auto& act : last_few)
+ for (uint32_t k = 0; k < POP_AMOUNT; ++k) {
+ count += set.contains(act.reads.back(), true);
+ act.reads.pop_back();
+ }
+ // We use last_few.size() rather than WINDOW_SIZE for the correct
+ // behavior on the first WINDOW_SIZE iterations where the deque is not
+ // full yet.
+ double hit = (double(count)) / (last_few.size() * POP_AMOUNT);
+ // Loose Check that hit rate is above min_hit_rate
+ BOOST_CHECK(hit > min_hit_rate);
+ // Tighter check, count number of times we are less than tight_hit_rate
+ // (and implicityly, greater than min_hit_rate)
+ out_of_tight_tolerance += hit < tight_hit_rate;
+ }
+ // Check that being out of tolerance happens less than
+ // max_rate_less_than_tight_hit_rate of the time
+ BOOST_CHECK(double(out_of_tight_tolerance) / double(total) < max_rate_less_than_tight_hit_rate);
+}
+BOOST_AUTO_TEST_CASE(cuckoocache_generations)
+{
+ test_cache_generations<CuckooCache::cache<uint256, uint256Hasher>>();
+}
+
+BOOST_AUTO_TEST_SUITE_END();
diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json
index de95044597..a80ab51901 100644
--- a/src/test/data/bitcoin-util-test.json
+++ b/src/test/data/bitcoin-util-test.json
@@ -1,24 +1,29 @@
[
{ "exec": "./bitcoin-tx",
- "args": ["-create"],
- "output_cmp": "blanktx.hex",
- "description": "Creates a blank transaction"
+ "args": ["-create", "nversion=1"],
+ "output_cmp": "blanktxv1.hex",
+ "description": "Creates a blank v1 transaction"
},
{ "exec": "./bitcoin-tx",
- "args": ["-json","-create"],
- "output_cmp": "blanktx.json",
- "description": "Creates a blank transaction (output in json)"
+ "args": ["-json","-create", "nversion=1"],
+ "output_cmp": "blanktxv1.json",
+ "description": "Creates a blank v1 transaction (output in json)"
},
{ "exec": "./bitcoin-tx",
"args": ["-"],
- "input": "blanktx.hex",
- "output_cmp": "blanktx.hex",
+ "input": "blanktxv2.hex",
+ "output_cmp": "blanktxv2.hex",
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx"
},
{ "exec": "./bitcoin-tx",
+ "args": ["-json","-create"],
+ "output_cmp": "blanktxv2.json",
+ "description": "Creates a blank transaction (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
"args": ["-json","-"],
- "input": "blanktx.hex",
- "output_cmp": "blanktx.json",
+ "input": "blanktxv2.hex",
+ "output_cmp": "blanktxv2.json",
"description": "Creates a blank transaction when nothing is piped into bitcoin-tx (output in json)"
},
{ "exec": "./bitcoin-tx",
@@ -103,27 +108,124 @@
"description": "Creates a new transaction with a single empty output script (output in json)"
},
{ "exec": "./bitcoin-tx",
+ "args": ["02000000000100000000000000000000000000"],
+ "output_cmp": "txcreate2.hex",
+ "description": "Parses a transation with no inputs and a single output script"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "02000000000100000000000000000000000000"],
+ "output_cmp": "txcreate2.json",
+ "description": "Parses a transation with no inputs and a single output script (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outscript=0:OP_DROP", "nversion=1"],
+ "output_cmp": "txcreatescript1.hex",
+ "description": "Create a new transaction with a single output script (OP_DROP)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outscript=0:OP_DROP", "nversion=1"],
+ "output_cmp": "txcreatescript1.json",
+ "description": "Create a new transaction with a single output script (OP_DROP) (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outscript=0:OP_DROP:S", "nversion=1"],
+ "output_cmp": "txcreatescript2.hex",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outscript=0:OP_DROP:S", "nversion=1"],
+ "output_cmp": "txcreatescript2.json",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outscript=0:OP_DROP:W", "nversion=1"],
+ "output_cmp": "txcreatescript3.hex",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outscript=0:OP_DROP:W", "nversion=1"],
+ "output_cmp": "txcreatescript3.json",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outscript=0:OP_DROP:WS", "nversion=1"],
+ "output_cmp": "txcreatescript4.hex",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2WSH, wrapped in a P2SH"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outscript=0:OP_DROP:WS", "nversion=1"],
+ "output_cmp": "txcreatescript4.json",
+ "description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
"args":
- ["-create",
+ ["-create", "nversion=1",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
"sign=ALL",
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
- "output_cmp": "txcreatesign.hex",
- "description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
+ "output_cmp": "txcreatesignv1.hex",
+ "description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction"
},
{ "exec": "./bitcoin-tx",
"args":
["-json",
- "-create",
+ "-create", "nversion=1",
"in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
"set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
"set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
"sign=ALL",
"outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
- "output_cmp": "txcreatesign.json",
- "description": "Creates a new transaction with a single input and a single output, and then signs the transaction (output in json)"
+ "output_cmp": "txcreatesignv1.json",
+ "description": "Creates a new v1 transaction with a single input and a single output, and then signs the transaction (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-create",
+ "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0",
+ "set=privatekeys:[\"5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAnchuDf\"]",
+ "set=prevtxs:[{\"txid\":\"4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485\",\"vout\":0,\"scriptPubKey\":\"76a91491b24bf9f5288532960ac687abb035127b1d28a588ac\"}]",
+ "sign=ALL",
+ "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"],
+ "output_cmp": "txcreatesignv2.hex",
+ "description": "Creates a new transaction with a single input and a single output, and then signs the transaction"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey1.hex",
+ "description": "Creates a new transaction with a single pay-to-pubkey output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey1.json",
+ "description": "Creates a new transaction with a single pay-to-pubkey output (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey2.hex",
+ "description": "Creates a new transaction with a single pay-to-witness-pubkey output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:W", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey2.json",
+ "description": "Creates a new transaction with a single pay-to-witness-pubkey output (output as json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey3.hex",
+ "description": "Creates a new transaction with a single pay-to-witness-pubkey, wrapped in P2SH output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args":
+ ["-json", "-create", "outpubkey=0:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:WS", "nversion=1"],
+ "output_cmp": "txcreateoutpubkey3.json",
+ "description": "Creates a new transaction with a single pay-to-pub-key output, wrapped in P2SH (output as json)"
},
{ "exec": "./bitcoin-tx",
"args":
@@ -153,12 +255,12 @@
{ "exec": "./bitcoin-tx",
"args":
["-json",
- "-create",
+ "-create", "nversion=1",
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0",
"outaddr=0.18:13tuJJDR2RgArmgfv6JScSdreahzgc4T6o",
"outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"],
"output_cmp": "txcreatedata1.json",
- "description": "Creates a new transaction with one input, one address output and one data output (output in json)"
+ "description": "Creates a new v1 transaction with one input, one address output and one data output (output in json)"
},
{ "exec": "./bitcoin-tx",
"args":
@@ -210,5 +312,45 @@
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:1"],
"output_cmp": "txcreatedata_seq1.json",
"description": "Adds a new input with sequence number to a transaction (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
+ "output_cmp": "txcreatemultisig1.hex",
+ "description": "Creates a new transaction with a single 2-of-3 multisig output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485", "nversion=1"],
+ "output_cmp": "txcreatemultisig1.json",
+ "description": "Creates a new transaction with a single 2-of-3 multisig output (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
+ "output_cmp": "txcreatemultisig2.hex",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:S", "nversion=1"],
+ "output_cmp": "txcreatemultisig2.json",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2SH output (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
+ "output_cmp": "txcreatemultisig3.hex",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:W", "nversion=1"],
+ "output_cmp": "txcreatemultisig3.json",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output (output in json)"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
+ "output_cmp": "txcreatemultisig4.hex",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH"
+ },
+ { "exec": "./bitcoin-tx",
+ "args": ["-json", "-create", "outmultisig=1:2:3:02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397:021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d:02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485:WS", "nversion=1"],
+ "output_cmp": "txcreatemultisig4.json",
+ "description": "Creates a new transaction with a single 2-of-3 multisig in a P2WSH output, wrapped in P2SH (output in json)"
}
]
diff --git a/src/test/data/blanktx.hex b/src/test/data/blanktxv1.hex
index 36b6f00fb6..36b6f00fb6 100644
--- a/src/test/data/blanktx.hex
+++ b/src/test/data/blanktxv1.hex
diff --git a/src/test/data/blanktx.json b/src/test/data/blanktxv1.json
index 51c25a5a98..51c25a5a98 100644
--- a/src/test/data/blanktx.json
+++ b/src/test/data/blanktxv1.json
diff --git a/src/test/data/blanktxv2.hex b/src/test/data/blanktxv2.hex
new file mode 100644
index 0000000000..22d830eda1
--- /dev/null
+++ b/src/test/data/blanktxv2.hex
@@ -0,0 +1 @@
+02000000000000000000
diff --git a/src/test/data/blanktxv2.json b/src/test/data/blanktxv2.json
new file mode 100644
index 0000000000..266919f445
--- /dev/null
+++ b/src/test/data/blanktxv2.json
@@ -0,0 +1,11 @@
+{
+ "txid": "4ebd325a4b394cff8c57e8317ccf5a8d0e2bdf1b8526f8aad6c8e43d8240621a",
+ "hash": "4ebd325a4b394cff8c57e8317ccf5a8d0e2bdf1b8526f8aad6c8e43d8240621a",
+ "version": 2,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ ],
+ "hex": "02000000000000000000"
+}
diff --git a/src/test/data/tx_valid.json b/src/test/data/tx_valid.json
index 2f299aa5fe..a3f47fcee2 100644
--- a/src/test/data/tx_valid.json
+++ b/src/test/data/tx_valid.json
@@ -53,7 +53,7 @@
["The following tests for the presence of a bug in the handling of SIGHASH_SINGLE"],
["It results in signing the constant 1, instead of something generated based on the transaction,"],
["when the input doing the signing has an index greater than the maximum output index"],
-[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0xe52b482f2faa8ecbf0db344f93c84ac908557f33 EQUALVERIFY CHECKSIG"], ["0000000000000000000000000000000000000000000000000000000000000200", 0, "1"]],
+[[["0000000000000000000000000000000000000000000000000000000000000200", 0, "1"], ["0000000000000000000000000000000000000000000000000000000000000100", 0, "DUP HASH160 0x14 0xe52b482f2faa8ecbf0db344f93c84ac908557f33 EQUALVERIFY CHECKSIG"]],
"01000000020002000000000000000000000000000000000000000000000000000000000000000000000151ffffffff0001000000000000000000000000000000000000000000000000000000000000000000006b483045022100c9cdd08798a28af9d1baf44a6c77bcc7e279f47dc487c8c899911bc48feaffcc0220503c5c50ae3998a733263c5c0f7061b483e2b56c4c41b456e7d2f5a78a74c077032102d5c25adb51b61339d2b05315791e21bbe80ea470a49db0135720983c905aace0ffffffff010000000000000000015100000000", "P2SH"],
["An invalid P2SH Transaction"],
@@ -334,9 +334,9 @@
"0100000000010100010000000000000000000000000000000000000000000000000000000000000000000023220020ff25429251b5a84f452230a3c75fd886b7fc5a7865ce4a7bb7a9d7c5be6da3dbffffffff01e8030000000000001976a9144c9c3dfac4207d5d8cb89df5722cb3d712385e3f88ac02483045022100aa5d8aa40a90f23ce2c3d11bc845ca4a12acd99cbea37de6b9f6d86edebba8cb022022dedc2aa0a255f74d04c0b76ece2d7c691f9dd11a64a8ac49f62a99c3a05f9d01232103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc71ac00000000", "P2SH,WITNESS"],
["Witness with SigHash Single|AnyoneCanPay"],
-[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
+[[["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
["0000000000000000000000000000000000000000000000000000000000000100", 1, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 2000],
-["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
+["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
["0000000000000000000000000000000000000000000000000000000000000100", 3, "0x51", 4100]],
"0100000000010400010000000000000000000000000000000000000000000000000000000000000200000000ffffffff00010000000000000000000000000000000000000000000000000000000000000100000000ffffffff00010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00010000000000000000000000000000000000000000000000000000000000000300000000ffffffff05540b0000000000000151d0070000000000000151840300000000000001513c0f00000000000001512c010000000000000151000248304502210092f4777a0f17bf5aeb8ae768dec5f2c14feabf9d1fe2c89c78dfed0f13fdb86902206da90a86042e252bcd1e80a168c719e4a1ddcc3cebea24b9812c5453c79107e9832103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc71000000000000", "P2SH,WITNESS"],
@@ -359,9 +359,9 @@
"0100000000010300010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00010000000000000000000000000000000000000000000000000000000000000100000000ffffffff00010000000000000000000000000000000000000000000000000000000000000200000000ffffffff03e8030000000000000151d0070000000000000151b80b000000000000015100024730440220699e6b0cfe015b64ca3283e6551440a34f901ba62dd4c72fe1cb815afb2e6761022021cc5e84db498b1479de14efda49093219441adc6c543e5534979605e273d80b032103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710000000000", "P2SH,WITNESS"],
["Witness with SigHash None|AnyoneCanPay"],
-[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
+[[["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
+["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
["0000000000000000000000000000000000000000000000000000000000000100", 1, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 2000],
-["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
["0000000000000000000000000000000000000000000000000000000000000100", 3, "0x51", 4100]],
"0100000000010400010000000000000000000000000000000000000000000000000000000000000200000000ffffffff00010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00010000000000000000000000000000000000000000000000000000000000000100000000ffffffff00010000000000000000000000000000000000000000000000000000000000000300000000ffffffff04b60300000000000001519e070000000000000151860b00000000000001009600000000000000015100000248304502210091b32274295c2a3fa02f5bce92fb2789e3fc6ea947fbe1a76e52ea3f4ef2381a022079ad72aefa3837a2e0c033a8652a59731da05fa4a813f4fc48e87c075037256b822103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710000000000", "P2SH,WITNESS"],
@@ -390,9 +390,9 @@
"01000000000103000100000000000000000000000000000000000000000000000000000000000000000000000200000000010000000000000000000000000000000000000000000000000000000000000100000000ffffffff000100000000000000000000000000000000000000000000000000000000000002000000000200000003e8030000000000000151d0070000000000000151b80b00000000000001510002473044022022fceb54f62f8feea77faac7083c3b56c4676a78f93745adc8a35800bc36adfa022026927df9abcf0a8777829bcfcce3ff0a385fa54c3f9df577405e3ef24ee56479022103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710000000000", "P2SH,WITNESS"],
["Witness with SigHash All|AnyoneCanPay"],
-[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
+[[["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
+["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x51", 1100],
["0000000000000000000000000000000000000000000000000000000000000100", 1, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 2000],
-["0000000000000000000000000000000000000000000000000000000000000100", 2, "0x51", 3100],
["0000000000000000000000000000000000000000000000000000000000000100", 3, "0x51", 4100]],
"0100000000010400010000000000000000000000000000000000000000000000000000000000000200000000ffffffff00010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00010000000000000000000000000000000000000000000000000000000000000100000000ffffffff00010000000000000000000000000000000000000000000000000000000000000300000000ffffffff03e8030000000000000151d0070000000000000151b80b0000000000000151000002483045022100a3cec69b52cba2d2de623eeef89e0ba1606184ea55476c0f8189fda231bc9cbb022003181ad597f7c380a7d1c740286b1d022b8b04ded028b833282e055e03b8efef812103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710000000000", "P2SH,WITNESS"],
@@ -458,8 +458,8 @@
"0100000000010200010000000000000000000000000000000000000000000000000000000000000000000000ffffffff00010000000000000000000000000000000000000000000000000000000000000100000000ffffffff02e8030000000000000151e90300000000000001510247304402206d59682663faab5e4cb733c562e22cdae59294895929ec38d7c016621ff90da0022063ef0af5f970afe8a45ea836e3509b8847ed39463253106ac17d19c437d3d56b832103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710248304502210085001a820bfcbc9f9de0298af714493f8a37b3b354bfd21a7097c3e009f2018c022050a8b4dbc8155d4d04da2f5cdd575dcf8dd0108de8bec759bd897ea01ecb3af7832103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc7100000000", "P2SH,WITNESS"],
["Witness Single|AnyoneCanPay does not hash input's position (permutation)"],
-[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 1000],
-["0000000000000000000000000000000000000000000000000000000000000100", 1, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 1001]],
+[[["0000000000000000000000000000000000000000000000000000000000000100", 1, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 1001],
+["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x00 0x14 0x4c9c3dfac4207d5d8cb89df5722cb3d712385e3f", 1000]],
"0100000000010200010000000000000000000000000000000000000000000000000000000000000100000000ffffffff00010000000000000000000000000000000000000000000000000000000000000000000000ffffffff02e9030000000000000151e80300000000000001510248304502210085001a820bfcbc9f9de0298af714493f8a37b3b354bfd21a7097c3e009f2018c022050a8b4dbc8155d4d04da2f5cdd575dcf8dd0108de8bec759bd897ea01ecb3af7832103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc710247304402206d59682663faab5e4cb733c562e22cdae59294895929ec38d7c016621ff90da0022063ef0af5f970afe8a45ea836e3509b8847ed39463253106ac17d19c437d3d56b832103596d3451025c19dbbdeb932d6bf8bfb4ad499b95b6f88db8899efac102e5fc7100000000", "P2SH,WITNESS"],
["Non witness Single|AnyoneCanPay hash input's position"],
@@ -478,7 +478,7 @@
["1b2a9a426ba603ba357ce7773cb5805cb9c7c2b386d100d1fc9263513188e680", 0, "0x00 0x20 0xd9bbfbe56af7c4b7f960a70d7ea107156913d9e5a26b0a71429df5e097ca6537", 16777215]],
"01000000000102e9b542c5176808107ff1df906f46bb1f2583b16112b95ee5380665ba7fcfc0010000000000ffffffff80e68831516392fcd100d186b3c2c7b95c80b53c77e77c35ba03a66b429a2a1b0000000000ffffffff0280969800000000001976a914de4b231626ef508c9a74a8517e6783c0546d6b2888ac80969800000000001976a9146648a8cd4531e1ec47f35916de8e259237294d1e88ac02483045022100f6a10b8604e6dc910194b79ccfc93e1bc0ec7c03453caaa8987f7d6c3413566002206216229ede9b4d6ec2d325be245c5b508ff0339bf1794078e20bfe0babc7ffe683270063ab68210392972e2eb617b2388771abe27235fd5ac44af8e61693261550447a4c3e39da98ac024730440220032521802a76ad7bf74d0e2c218b72cf0cbc867066e2e53db905ba37f130397e02207709e2188ed7f08f4c952d9d13986da504502b8c3be59617e043552f506c46ff83275163ab68210392972e2eb617b2388771abe27235fd5ac44af8e61693261550447a4c3e39da98ac00000000", "P2SH,WITNESS"],
-["BIP143 example: Same as the previous example with input-output paris swapped"],
+["BIP143 example: Same as the previous example with input-output pairs swapped"],
[[["1b2a9a426ba603ba357ce7773cb5805cb9c7c2b386d100d1fc9263513188e680", 0, "0x00 0x20 0xd9bbfbe56af7c4b7f960a70d7ea107156913d9e5a26b0a71429df5e097ca6537", 16777215],
["01c0cf7fba650638e55eb91261b183251fbb466f90dff17f10086817c542b5e9", 0, "0x00 0x20 0xba468eea561b26301e4cf69fa34bde4ad60c81e70f059f045ca9a79931004a4d", 16777215]],
"0100000000010280e68831516392fcd100d186b3c2c7b95c80b53c77e77c35ba03a66b429a2a1b0000000000ffffffffe9b542c5176808107ff1df906f46bb1f2583b16112b95ee5380665ba7fcfc0010000000000ffffffff0280969800000000001976a9146648a8cd4531e1ec47f35916de8e259237294d1e88ac80969800000000001976a914de4b231626ef508c9a74a8517e6783c0546d6b2888ac024730440220032521802a76ad7bf74d0e2c218b72cf0cbc867066e2e53db905ba37f130397e02207709e2188ed7f08f4c952d9d13986da504502b8c3be59617e043552f506c46ff83275163ab68210392972e2eb617b2388771abe27235fd5ac44af8e61693261550447a4c3e39da98ac02483045022100f6a10b8604e6dc910194b79ccfc93e1bc0ec7c03453caaa8987f7d6c3413566002206216229ede9b4d6ec2d325be245c5b508ff0339bf1794078e20bfe0babc7ffe683270063ab68210392972e2eb617b2388771abe27235fd5ac44af8e61693261550447a4c3e39da98ac00000000", "P2SH,WITNESS"],
diff --git a/src/test/data/txcreate1.hex b/src/test/data/txcreate1.hex
index e2981a51c9..9ec6ee3531 100644
--- a/src/test/data/txcreate1.hex
+++ b/src/test/data/txcreate1.hex
@@ -1 +1 @@
-01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000
+02000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000
diff --git a/src/test/data/txcreate1.json b/src/test/data/txcreate1.json
index 567e8026a3..f83e036f33 100644
--- a/src/test/data/txcreate1.json
+++ b/src/test/data/txcreate1.json
@@ -1,7 +1,7 @@
{
- "txid": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231",
- "hash": "f70f0d6c71416ed538e37549f430ab3665fee2437a42f10238c1bd490e782231",
- "version": 1,
+ "txid": "fe7d174f42dce0cffa7a527e9bc8368956057619ec817648f6138b98f2533e8f",
+ "hash": "fe7d174f42dce0cffa7a527e9bc8368956057619ec817648f6138b98f2533e8f",
+ "version": 2,
"locktime": 0,
"vin": [
{
@@ -60,5 +60,5 @@
}
}
],
- "hex": "01000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000"
+ "hex": "02000000031f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff7cca453133921c50d5025878f7f738d1df891fd359763331935784cf6b9c82bf1200000000fffffffffccd319e04a996c96cfc0bf4c07539aa90bd0b1a700ef72fae535d6504f9a6220100000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d717000000001976a914f2d4db28cad6502226ee484ae24505c2885cb12d88ac00000000"
}
diff --git a/src/test/data/txcreate2.hex b/src/test/data/txcreate2.hex
index 5243c2d02e..38bb7b1046 100644
--- a/src/test/data/txcreate2.hex
+++ b/src/test/data/txcreate2.hex
@@ -1 +1 @@
-01000000000100000000000000000000000000
+02000000000100000000000000000000000000
diff --git a/src/test/data/txcreate2.json b/src/test/data/txcreate2.json
index a70c1d302a..fb5e177db7 100644
--- a/src/test/data/txcreate2.json
+++ b/src/test/data/txcreate2.json
@@ -1,7 +1,7 @@
{
- "txid": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13",
- "hash": "cf90229625e9eb10f6be8156bf6aa5ec2eca19a42b1e05c11f3029b560a32e13",
- "version": 1,
+ "txid": "0481afb29931341d0d7861d8a2f6f26456fa042abf54a23e96440ed7946e0715",
+ "hash": "0481afb29931341d0d7861d8a2f6f26456fa042abf54a23e96440ed7946e0715",
+ "version": 2,
"locktime": 0,
"vin": [
],
@@ -16,5 +16,5 @@
}
}
],
- "hex": "01000000000100000000000000000000000000"
+ "hex": "02000000000100000000000000000000000000"
}
diff --git a/src/test/data/txcreatedata1.hex b/src/test/data/txcreatedata1.hex
index eccc7604e6..cefd1a05a6 100644
--- a/src/test/data/txcreatedata1.hex
+++ b/src/test/data/txcreatedata1.hex
@@ -1 +1 @@
-01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d71700000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
+02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0084d71700000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
diff --git a/src/test/data/txcreatedata2.hex b/src/test/data/txcreatedata2.hex
index 3c7644c297..d69cf58ba1 100644
--- a/src/test/data/txcreatedata2.hex
+++ b/src/test/data/txcreatedata2.hex
@@ -1 +1 @@
-01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
+02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000
diff --git a/src/test/data/txcreatedata2.json b/src/test/data/txcreatedata2.json
index 56dfe4a1b0..3c6da40f90 100644
--- a/src/test/data/txcreatedata2.json
+++ b/src/test/data/txcreatedata2.json
@@ -1,7 +1,7 @@
{
- "txid": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b",
- "hash": "4ed17118f5e932ba8c75c461787d171bc02a016d8557cb5bcf34cd416c27bb8b",
- "version": 1,
+ "txid": "c14b007fa3a6c1e7765919c1d14c1cfc2b8642c3a5d3be4b1fa8c4ccfec98bb0",
+ "hash": "c14b007fa3a6c1e7765919c1d14c1cfc2b8642c3a5d3be4b1fa8c4ccfec98bb0",
+ "version": 2,
"locktime": 0,
"vin": [
{
@@ -38,5 +38,5 @@
}
}
],
- "hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000"
+ "hex": "02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000ffffffff0280a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac0000000000000000526a4c4f54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e00000000"
}
diff --git a/src/test/data/txcreatedata_seq0.hex b/src/test/data/txcreatedata_seq0.hex
index db02b5e4a4..54b89d2381 100644
--- a/src/test/data/txcreatedata_seq0.hex
+++ b/src/test/data/txcreatedata_seq0.hex
@@ -1 +1 @@
-01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000
+02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000
diff --git a/src/test/data/txcreatedata_seq0.json b/src/test/data/txcreatedata_seq0.json
index 9bc0ed4593..d272a4c447 100644
--- a/src/test/data/txcreatedata_seq0.json
+++ b/src/test/data/txcreatedata_seq0.json
@@ -1,7 +1,7 @@
{
- "txid": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8",
- "hash": "71603ccb1cd76d73d76eb6cfd5f0b9df6d65d90d76860ee52cb461c4be7032e8",
- "version": 1,
+ "txid": "8df6ed527472542dd5e137c242a7c5a9f337ac34f7b257ae4af886aeaebb51b0",
+ "hash": "8df6ed527472542dd5e137c242a7c5a9f337ac34f7b257ae4af886aeaebb51b0",
+ "version": 2,
"locktime": 0,
"vin": [
{
@@ -29,5 +29,5 @@
}
}
],
- "hex": "01000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000"
+ "hex": "02000000011f5c38dfcf6f1a5f5a87c416076d392c87e6d41970d5ad5e477a02d66bde97580000000000fdffffff0180a81201000000001976a9141fc11f39be1729bf973a7ab6a615ca4729d6457488ac00000000"
}
diff --git a/src/test/data/txcreatemultisig1.hex b/src/test/data/txcreatemultisig1.hex
new file mode 100644
index 0000000000..9c00004d38
--- /dev/null
+++ b/src/test/data/txcreatemultisig1.hex
@@ -0,0 +1 @@
+01000000000100e1f5050000000069522102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff39721021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d2102df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb48553ae00000000
diff --git a/src/test/data/txcreatemultisig1.json b/src/test/data/txcreatemultisig1.json
new file mode 100644
index 0000000000..f6ce43c202
--- /dev/null
+++ b/src/test/data/txcreatemultisig1.json
@@ -0,0 +1,26 @@
+{
+ "txid": "0d1d4edfc217d9db3ab6a9298f26a52eae3c52f55a6cb8ccbc14f7c727572894",
+ "hash": "0d1d4edfc217d9db3ab6a9298f26a52eae3c52f55a6cb8ccbc14f7c727572894",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 1.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "2 02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397 021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d 02df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb485 3 OP_CHECKMULTISIG",
+ "hex": "522102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff39721021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d2102df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb48553ae",
+ "reqSigs": 2,
+ "type": "multisig",
+ "addresses": [
+ "1FoG2386FG2tAJS9acMuiDsKy67aGg9MKz",
+ "1FXtz9KU8JNmQDyHdiEm5HDiALuP3zdHvV",
+ "14LuavcBbXZYJ6Tsz3cAUQj9SuQoL2xCQX"
+ ]
+ }
+ }
+ ],
+ "hex": "01000000000100e1f5050000000069522102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff39721021ac43c7ff740014c3b33737ede99c967e4764553d1b2b83db77c83b8715fa72d2102df2089105c77f266fa11a9d33f05c735234075f2e8780824c6b709415f9fb48553ae00000000"
+}
diff --git a/src/test/data/txcreatemultisig2.hex b/src/test/data/txcreatemultisig2.hex
new file mode 100644
index 0000000000..07835c54d3
--- /dev/null
+++ b/src/test/data/txcreatemultisig2.hex
@@ -0,0 +1 @@
+01000000000100e1f5050000000017a9141c6fbaf46d64221e80cbae182c33ddf81b9294ac8700000000
diff --git a/src/test/data/txcreatemultisig2.json b/src/test/data/txcreatemultisig2.json
new file mode 100644
index 0000000000..e09d22060f
--- /dev/null
+++ b/src/test/data/txcreatemultisig2.json
@@ -0,0 +1,24 @@
+{
+ "txid": "0d861f278a3b7bce7cb5a88d71e6e6a903336f95ad5a2c29b295b63835b6eee3",
+ "hash": "0d861f278a3b7bce7cb5a88d71e6e6a903336f95ad5a2c29b295b63835b6eee3",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 1.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_HASH160 1c6fbaf46d64221e80cbae182c33ddf81b9294ac OP_EQUAL",
+ "hex": "a9141c6fbaf46d64221e80cbae182c33ddf81b9294ac87",
+ "reqSigs": 1,
+ "type": "scripthash",
+ "addresses": [
+ "34HNh57oBCRKkxNyjTuWAJkTbuGh6jg2Ms"
+ ]
+ }
+ }
+ ],
+ "hex": "01000000000100e1f5050000000017a9141c6fbaf46d64221e80cbae182c33ddf81b9294ac8700000000"
+}
diff --git a/src/test/data/txcreatemultisig3.hex b/src/test/data/txcreatemultisig3.hex
new file mode 100644
index 0000000000..8d34f28f87
--- /dev/null
+++ b/src/test/data/txcreatemultisig3.hex
@@ -0,0 +1 @@
+01000000000100e1f50500000000220020e15a86a23178f433d514dbbce042e87d72662b8b5edcacfd2e37ab7a2d135f0500000000
diff --git a/src/test/data/txcreatemultisig3.json b/src/test/data/txcreatemultisig3.json
new file mode 100644
index 0000000000..88e32bd310
--- /dev/null
+++ b/src/test/data/txcreatemultisig3.json
@@ -0,0 +1,20 @@
+{
+ "txid": "ccc552220b46a3b5140048b03395987ce4f0fa1ddf8c635bba1fa44e0f8c1d7f",
+ "hash": "ccc552220b46a3b5140048b03395987ce4f0fa1ddf8c635bba1fa44e0f8c1d7f",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 1.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "0 e15a86a23178f433d514dbbce042e87d72662b8b5edcacfd2e37ab7a2d135f05",
+ "hex": "0020e15a86a23178f433d514dbbce042e87d72662b8b5edcacfd2e37ab7a2d135f05",
+ "type": "witness_v0_scripthash"
+ }
+ }
+ ],
+ "hex": "01000000000100e1f50500000000220020e15a86a23178f433d514dbbce042e87d72662b8b5edcacfd2e37ab7a2d135f0500000000"
+}
diff --git a/src/test/data/txcreatemultisig4.hex b/src/test/data/txcreatemultisig4.hex
new file mode 100644
index 0000000000..7da54366c7
--- /dev/null
+++ b/src/test/data/txcreatemultisig4.hex
@@ -0,0 +1 @@
+01000000000100e1f5050000000017a9146edf12858999f0dae74f9c692e6694ee3621b2ac8700000000
diff --git a/src/test/data/txcreatemultisig4.json b/src/test/data/txcreatemultisig4.json
new file mode 100644
index 0000000000..fc69c7269c
--- /dev/null
+++ b/src/test/data/txcreatemultisig4.json
@@ -0,0 +1,24 @@
+{
+ "txid": "5e8b1cc73234e208d4b7ca9075f136b908c34101be7a048df4ba9ac758b61567",
+ "hash": "5e8b1cc73234e208d4b7ca9075f136b908c34101be7a048df4ba9ac758b61567",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 1.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_HASH160 6edf12858999f0dae74f9c692e6694ee3621b2ac OP_EQUAL",
+ "hex": "a9146edf12858999f0dae74f9c692e6694ee3621b2ac87",
+ "reqSigs": 1,
+ "type": "scripthash",
+ "addresses": [
+ "3BoFUz1StqcNcgUTZE5cC1eFhuYFzj3fGH"
+ ]
+ }
+ }
+ ],
+ "hex": "01000000000100e1f5050000000017a9146edf12858999f0dae74f9c692e6694ee3621b2ac8700000000"
+}
diff --git a/src/test/data/txcreateoutpubkey1.hex b/src/test/data/txcreateoutpubkey1.hex
new file mode 100644
index 0000000000..4a08244b2f
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey1.hex
@@ -0,0 +1 @@
+0100000000010000000000000000232102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397ac00000000
diff --git a/src/test/data/txcreateoutpubkey1.json b/src/test/data/txcreateoutpubkey1.json
new file mode 100644
index 0000000000..6019fa2dcd
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey1.json
@@ -0,0 +1,24 @@
+{
+ "txid": "f42b38ac12e3fafc96ba1a9ba70cbfe326744aef75df5fb9db5d6e2855ca415f",
+ "hash": "f42b38ac12e3fafc96ba1a9ba70cbfe326744aef75df5fb9db5d6e2855ca415f",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "02a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397 OP_CHECKSIG",
+ "hex": "2102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397ac",
+ "reqSigs": 1,
+ "type": "pubkey",
+ "addresses": [
+ "1FoG2386FG2tAJS9acMuiDsKy67aGg9MKz"
+ ]
+ }
+ }
+ ],
+ "hex": "0100000000010000000000000000232102a5613bd857b7048924264d1e70e08fb2a7e6527d32b7ab1bb993ac59964ff397ac00000000"
+}
diff --git a/src/test/data/txcreateoutpubkey2.hex b/src/test/data/txcreateoutpubkey2.hex
new file mode 100644
index 0000000000..8283c722ab
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey2.hex
@@ -0,0 +1 @@
+0100000000010000000000000000160014a2516e770582864a6a56ed21a102044e388c62e300000000
diff --git a/src/test/data/txcreateoutpubkey2.json b/src/test/data/txcreateoutpubkey2.json
new file mode 100644
index 0000000000..6fc3d57527
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey2.json
@@ -0,0 +1,20 @@
+{
+ "txid": "70f2a088cde460e677415fa1fb71895e90c231e6ed38ed203a35b6f848e9cc73",
+ "hash": "70f2a088cde460e677415fa1fb71895e90c231e6ed38ed203a35b6f848e9cc73",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "0 a2516e770582864a6a56ed21a102044e388c62e3",
+ "hex": "0014a2516e770582864a6a56ed21a102044e388c62e3",
+ "type": "witness_v0_keyhash"
+ }
+ }
+ ],
+ "hex": "0100000000010000000000000000160014a2516e770582864a6a56ed21a102044e388c62e300000000"
+}
diff --git a/src/test/data/txcreateoutpubkey3.hex b/src/test/data/txcreateoutpubkey3.hex
new file mode 100644
index 0000000000..84adff4d89
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey3.hex
@@ -0,0 +1 @@
+010000000001000000000000000017a914a5ab14c9804d0d8bf02f1aea4e82780733ad0a838700000000
diff --git a/src/test/data/txcreateoutpubkey3.json b/src/test/data/txcreateoutpubkey3.json
new file mode 100644
index 0000000000..a1a25fc834
--- /dev/null
+++ b/src/test/data/txcreateoutpubkey3.json
@@ -0,0 +1,24 @@
+{
+ "txid": "bfc7e898ee9f6a9652d7b8cca147e2da134502e2ada0f279ed634fc8cf833f8c",
+ "hash": "bfc7e898ee9f6a9652d7b8cca147e2da134502e2ada0f279ed634fc8cf833f8c",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_HASH160 a5ab14c9804d0d8bf02f1aea4e82780733ad0a83 OP_EQUAL",
+ "hex": "a914a5ab14c9804d0d8bf02f1aea4e82780733ad0a8387",
+ "reqSigs": 1,
+ "type": "scripthash",
+ "addresses": [
+ "3GnzN8FqgvYGYdhj8NW6UNxxVv3Uj1ApQn"
+ ]
+ }
+ }
+ ],
+ "hex": "010000000001000000000000000017a914a5ab14c9804d0d8bf02f1aea4e82780733ad0a838700000000"
+}
diff --git a/src/test/data/txcreatescript1.hex b/src/test/data/txcreatescript1.hex
new file mode 100644
index 0000000000..0adce270fb
--- /dev/null
+++ b/src/test/data/txcreatescript1.hex
@@ -0,0 +1 @@
+0100000000010000000000000000017500000000
diff --git a/src/test/data/txcreatescript1.json b/src/test/data/txcreatescript1.json
new file mode 100644
index 0000000000..8ffecba411
--- /dev/null
+++ b/src/test/data/txcreatescript1.json
@@ -0,0 +1,20 @@
+{
+ "txid": "f0851b68202f736b792649cfc960259c2374badcb644ab20cac726b5f72f61c9",
+ "hash": "f0851b68202f736b792649cfc960259c2374badcb644ab20cac726b5f72f61c9",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_DROP",
+ "hex": "75",
+ "type": "nonstandard"
+ }
+ }
+ ],
+ "hex": "0100000000010000000000000000017500000000"
+}
diff --git a/src/test/data/txcreatescript2.hex b/src/test/data/txcreatescript2.hex
new file mode 100644
index 0000000000..5afe8786e3
--- /dev/null
+++ b/src/test/data/txcreatescript2.hex
@@ -0,0 +1 @@
+010000000001000000000000000017a91471ed53322d470bb96657deb786b94f97dd46fb158700000000
diff --git a/src/test/data/txcreatescript2.json b/src/test/data/txcreatescript2.json
new file mode 100644
index 0000000000..41eb69f1af
--- /dev/null
+++ b/src/test/data/txcreatescript2.json
@@ -0,0 +1,24 @@
+{
+ "txid": "6e07a7cc075e0703f32ee8c4e5373fe654bfbc315148fda364e1be286ff290d0",
+ "hash": "6e07a7cc075e0703f32ee8c4e5373fe654bfbc315148fda364e1be286ff290d0",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_HASH160 71ed53322d470bb96657deb786b94f97dd46fb15 OP_EQUAL",
+ "hex": "a91471ed53322d470bb96657deb786b94f97dd46fb1587",
+ "reqSigs": 1,
+ "type": "scripthash",
+ "addresses": [
+ "3C5QarEGh9feKbDJ3QbMf2YNjnMoiPDhNp"
+ ]
+ }
+ }
+ ],
+ "hex": "010000000001000000000000000017a91471ed53322d470bb96657deb786b94f97dd46fb158700000000"
+}
diff --git a/src/test/data/txcreatescript3.hex b/src/test/data/txcreatescript3.hex
new file mode 100644
index 0000000000..8a2b973bf0
--- /dev/null
+++ b/src/test/data/txcreatescript3.hex
@@ -0,0 +1 @@
+01000000000100000000000000002200200bfe935e70c321c7ca3afc75ce0d0ca2f98b5422e008bb31c00c6d7f1f1c0ad600000000
diff --git a/src/test/data/txcreatescript3.json b/src/test/data/txcreatescript3.json
new file mode 100644
index 0000000000..90e7e27f9f
--- /dev/null
+++ b/src/test/data/txcreatescript3.json
@@ -0,0 +1,20 @@
+{
+ "txid": "8a234037b088e987c877030efc83374a07441c321bf9dc6dd2f206bc26507df8",
+ "hash": "8a234037b088e987c877030efc83374a07441c321bf9dc6dd2f206bc26507df8",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "0 0bfe935e70c321c7ca3afc75ce0d0ca2f98b5422e008bb31c00c6d7f1f1c0ad6",
+ "hex": "00200bfe935e70c321c7ca3afc75ce0d0ca2f98b5422e008bb31c00c6d7f1f1c0ad6",
+ "type": "witness_v0_scripthash"
+ }
+ }
+ ],
+ "hex": "01000000000100000000000000002200200bfe935e70c321c7ca3afc75ce0d0ca2f98b5422e008bb31c00c6d7f1f1c0ad600000000"
+}
diff --git a/src/test/data/txcreatescript4.hex b/src/test/data/txcreatescript4.hex
new file mode 100644
index 0000000000..b4cfe58f42
--- /dev/null
+++ b/src/test/data/txcreatescript4.hex
@@ -0,0 +1 @@
+010000000001000000000000000017a9146a2c482f4985f57e702f325816c90e3723ca81ae8700000000
diff --git a/src/test/data/txcreatescript4.json b/src/test/data/txcreatescript4.json
new file mode 100644
index 0000000000..11783751a4
--- /dev/null
+++ b/src/test/data/txcreatescript4.json
@@ -0,0 +1,24 @@
+{
+ "txid": "24225cf5e9391100d6b218134b9f03383ca4c880a1f634ac12990cf28b66adbc",
+ "hash": "24225cf5e9391100d6b218134b9f03383ca4c880a1f634ac12990cf28b66adbc",
+ "version": 1,
+ "locktime": 0,
+ "vin": [
+ ],
+ "vout": [
+ {
+ "value": 0.00,
+ "n": 0,
+ "scriptPubKey": {
+ "asm": "OP_HASH160 6a2c482f4985f57e702f325816c90e3723ca81ae OP_EQUAL",
+ "hex": "a9146a2c482f4985f57e702f325816c90e3723ca81ae87",
+ "reqSigs": 1,
+ "type": "scripthash",
+ "addresses": [
+ "3BNQbeFeJJGMAyDxPwWPuqxPMrjsFLjk3f"
+ ]
+ }
+ }
+ ],
+ "hex": "010000000001000000000000000017a9146a2c482f4985f57e702f325816c90e3723ca81ae8700000000"
+}
diff --git a/src/test/data/txcreatesign.hex b/src/test/data/txcreatesignv1.hex
index a46fcc88cb..a46fcc88cb 100644
--- a/src/test/data/txcreatesign.hex
+++ b/src/test/data/txcreatesignv1.hex
diff --git a/src/test/data/txcreatesign.json b/src/test/data/txcreatesignv1.json
index ff39e71b40..ff39e71b40 100644
--- a/src/test/data/txcreatesign.json
+++ b/src/test/data/txcreatesignv1.json
diff --git a/src/test/data/txcreatesignv2.hex b/src/test/data/txcreatesignv2.hex
new file mode 100644
index 0000000000..ee425cd98c
--- /dev/null
+++ b/src/test/data/txcreatesignv2.hex
@@ -0,0 +1 @@
+02000000018594c5bdcaec8f06b78b596f31cd292a294fd031e24eec716f43dac91ea7494d000000008a473044022079c7aa014177a2e973caf6df7c7b8f15399083b91eba370ea1e19c4caed9181e02205f8f8763505ce8e6cbdd2cd28fab3fd407a75003e7d0dc04e6bebb0a3c89e7cb01410479be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8ffffffff01a0860100000000001976a9145834479edbbe0539b31ffd3a8f8ebadc2165ed0188ac00000000
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp
index d4d825d199..e5cb48ffcf 100644
--- a/src/test/dbwrapper_tests.cpp
+++ b/src/test/dbwrapper_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,13 +10,9 @@
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
#include <boost/assert.hpp>
#include <boost/test/unit_test.hpp>
-
-using namespace std;
-using namespace boost::assign; // bring 'operator+=()' into scope
-using namespace boost::filesystem;
-
+
// Test if a string consists entirely of null characters
-bool is_null_key(const vector<unsigned char>& key) {
+bool is_null_key(const std::vector<unsigned char>& key) {
bool isnull = true;
for (unsigned int i = 0; i < key.size(); i++)
@@ -32,7 +28,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
// Perform tests both obfuscated and non-obfuscated.
for (int i = 0; i < 2; i++) {
bool obfuscate = (bool)i;
- path ph = temp_directory_path() / unique_path();
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
char key = 'k';
uint256 in = GetRandHash();
@@ -53,7 +49,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
// Perform tests both obfuscated and non-obfuscated.
for (int i = 0; i < 2; i++) {
bool obfuscate = (bool)i;
- path ph = temp_directory_path() / unique_path();
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
char key = 'i';
@@ -90,7 +86,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
// Perform tests both obfuscated and non-obfuscated.
for (int i = 0; i < 2; i++) {
bool obfuscate = (bool)i;
- path ph = temp_directory_path() / unique_path();
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
// The two keys are intentionally chosen for ordering
@@ -129,8 +125,8 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
// Test that we do not obfuscation if there is existing data.
BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
{
- // We're going to share this path between two wrappers
- path ph = temp_directory_path() / unique_path();
+ // We're going to share this boost::filesystem::path between two wrappers
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
create_directories(ph);
// Set up a non-obfuscated wrapper to write some initial data.
@@ -170,8 +166,8 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
// Ensure that we start obfuscating during a reindex.
BOOST_AUTO_TEST_CASE(existing_data_reindex)
{
- // We're going to share this path between two wrappers
- path ph = temp_directory_path() / unique_path();
+ // We're going to share this boost::filesystem::path between two wrappers
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
create_directories(ph);
// Set up a non-obfuscated wrapper to write some initial data.
@@ -206,7 +202,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
BOOST_AUTO_TEST_CASE(iterator_ordering)
{
- path ph = temp_directory_path() / unique_path();
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
CDBWrapper dbw(ph, (1 << 20), true, false, false);
for (int x=0x00; x<256; ++x) {
uint8_t key = x;
@@ -241,11 +237,11 @@ BOOST_AUTO_TEST_CASE(iterator_ordering)
struct StringContentsSerializer {
// Used to make two serialized objects the same while letting them have a different lengths
// This is a terrible idea
- string str;
+ std::string str;
StringContentsSerializer() {}
- StringContentsSerializer(const string& inp) : str(inp) {}
+ StringContentsSerializer(const std::string& inp) : str(inp) {}
- StringContentsSerializer& operator+=(const string& s) {
+ StringContentsSerializer& operator+=(const std::string& s) {
str += s;
return *this;
}
@@ -254,7 +250,7 @@ struct StringContentsSerializer {
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
if (ser_action.ForRead()) {
str.clear();
char c = 0;
@@ -277,7 +273,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
{
char buf[10];
- path ph = temp_directory_path() / unique_path();
+ boost::filesystem::path ph = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path();
CDBWrapper dbw(ph, (1 << 20), true, false, false);
for (int x=0x00; x<10; ++x) {
for (int y = 0; y < 10; y++) {
@@ -303,7 +299,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
for (int x=seek_start; x<10; ++x) {
for (int y = 0; y < 10; y++) {
sprintf(buf, "%d", x);
- string exp_key(buf);
+ std::string exp_key(buf);
for (int z = 0; z < y; z++)
exp_key += exp_key;
StringContentsSerializer key;
diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp
index fa9624f13d..d8de765db1 100644
--- a/src/test/hash_tests.cpp
+++ b/src/test/hash_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2013-2015 The Bitcoin Core developers
+// Copyright (c) 2013-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,8 +10,6 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(hash_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(murmurhash3)
@@ -124,7 +122,11 @@ BOOST_AUTO_TEST_CASE(siphash)
}
CHashWriter ss(SER_DISK, CLIENT_VERSION);
- ss << CTransaction();
+ CMutableTransaction tx;
+ // Note these tests were originally written with tx.nVersion=1
+ // and the test would be affected by default tx version bumps if not fixed.
+ tx.nVersion = 1;
+ ss << tx;
BOOST_CHECK_EQUAL(SipHashUint256(1, 2, ss.GetHash()), 0x79751e980c2a0a35ULL);
}
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index 4978c95130..40a7fdf11d 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -16,19 +16,17 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
-static const string strSecret1 ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj");
-static const string strSecret2 ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3");
-static const string strSecret1C ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw");
-static const string strSecret2C ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g");
+static const std::string strSecret1 ("5HxWvvfubhXpYYpS3tJkw6fq9jE9j18THftkZjHHfmFiWtmAbrj");
+static const std::string strSecret2 ("5KC4ejrDjv152FGwP386VD1i2NYc5KkfSMyv1nGy1VGDxGHqVY3");
+static const std::string strSecret1C ("Kwr371tjA9u2rFSMZjTNun2PXXP3WPZu2afRHTcta6KxEUdm1vEw");
+static const std::string strSecret2C ("L3Hq7a8FEQwJkW1M2GNKDW28546Vp5miewcCzSqUD9kCAXrJdS3g");
static const CBitcoinAddress addr1 ("1QFqqMUD55ZV3PJEJZtaKCsQmjLT6JkjvJ");
static const CBitcoinAddress addr2 ("1F5y5E5FMc5YzdJtB9hLaUe43GDxEKXENJ");
static const CBitcoinAddress addr1C("1NoJrossxPBKfCHuJXT4HadJrXRE9Fxiqs");
static const CBitcoinAddress addr2C("1CRj2HyM1CXWzHAXLQtiGLyggNT9WQqsDs");
-static const string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF");
+static const std::string strAddressBad("1HV9Lc3sNHZxwj4Zk6fB38tEmBryq2cBiF");
#ifdef KEY_TESTS_DUMPINFO
@@ -37,7 +35,7 @@ void dumpKeyInfo(uint256 privkey)
CKey key;
key.resize(32);
memcpy(&secret[0], &privkey, 32);
- vector<unsigned char> sec;
+ std::vector<unsigned char> sec;
sec.resize(32);
memcpy(&sec[0], &secret[0], 32);
printf(" * secret (hex): %s\n", HexStr(sec).c_str());
@@ -51,7 +49,7 @@ void dumpKeyInfo(uint256 privkey)
printf(" * secret (base58): %s\n", bsecret.ToString().c_str());
CKey key;
key.SetSecret(secret, fCompressed);
- vector<unsigned char> vchPubKey = key.GetPubKey();
+ std::vector<unsigned char> vchPubKey = key.GetPubKey();
printf(" * pubkey (hex): %s\n", HexStr(vchPubKey).c_str());
printf(" * address (base58): %s\n", CBitcoinAddress(vchPubKey).ToString().c_str());
}
@@ -111,12 +109,12 @@ BOOST_AUTO_TEST_CASE(key_test1)
for (int n=0; n<16; n++)
{
- string strMsg = strprintf("Very secret message %i: 11", n);
+ std::string strMsg = strprintf("Very secret message %i: 11", n);
uint256 hashMsg = Hash(strMsg.begin(), strMsg.end());
// normal signatures
- vector<unsigned char> sign1, sign2, sign1C, sign2C;
+ std::vector<unsigned char> sign1, sign2, sign1C, sign2C;
BOOST_CHECK(key1.Sign (hashMsg, sign1));
BOOST_CHECK(key2.Sign (hashMsg, sign2));
@@ -145,7 +143,7 @@ BOOST_AUTO_TEST_CASE(key_test1)
// compact signatures (with key recovery)
- vector<unsigned char> csign1, csign2, csign1C, csign2C;
+ std::vector<unsigned char> csign1, csign2, csign1C, csign2C;
BOOST_CHECK(key1.SignCompact (hashMsg, csign1));
BOOST_CHECK(key2.SignCompact (hashMsg, csign2));
@@ -168,7 +166,7 @@ BOOST_AUTO_TEST_CASE(key_test1)
// test deterministic signing
std::vector<unsigned char> detsig, detsigc;
- string strMsg = "Very deterministic message";
+ std::string strMsg = "Very deterministic message";
uint256 hashMsg = Hash(strMsg.begin(), strMsg.end());
BOOST_CHECK(key1.Sign(hashMsg, detsig));
BOOST_CHECK(key1C.Sign(hashMsg, detsigc));
diff --git a/src/test/limitedmap_tests.cpp b/src/test/limitedmap_tests.cpp
index faaddffad8..55b9be5b00 100644
--- a/src/test/limitedmap_tests.cpp
+++ b/src/test/limitedmap_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(limitedmap_test)
// make sure the item is present
BOOST_CHECK(map.count(i) == 1);
- // use the iterator to check for the expected key adn value
+ // use the iterator to check for the expected key and value
BOOST_CHECK(it->first == i);
BOOST_CHECK(it->second == i + 1);
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index dbfbdd934f..d52104b4cc 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -1,9 +1,10 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
-#include "main.h"
+#include "validation.h"
+#include "net.h"
#include "test/test_bitcoin.h"
diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp
index a73dbe725c..91f549fe48 100644
--- a/src/test/mempool_tests.cpp
+++ b/src/test/mempool_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -55,17 +55,17 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
CTxMemPool testPool(CFeeRate(0));
- std::vector<std::shared_ptr<const CTransaction>> removed;
// Nothing in pool, remove should do nothing:
- testPool.removeRecursive(txParent, &removed);
- BOOST_CHECK_EQUAL(removed.size(), 0);
+ unsigned int poolSize = testPool.size();
+ testPool.removeRecursive(txParent);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize);
// Just the parent:
testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
- testPool.removeRecursive(txParent, &removed);
- BOOST_CHECK_EQUAL(removed.size(), 1);
- removed.clear();
+ poolSize = testPool.size();
+ testPool.removeRecursive(txParent);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize - 1);
// Parent, children, grandchildren:
testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
@@ -75,19 +75,21 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
testPool.addUnchecked(txGrandChild[i].GetHash(), entry.FromTx(txGrandChild[i]));
}
// Remove Child[0], GrandChild[0] should be removed:
- testPool.removeRecursive(txChild[0], &removed);
- BOOST_CHECK_EQUAL(removed.size(), 2);
- removed.clear();
+ poolSize = testPool.size();
+ testPool.removeRecursive(txChild[0]);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize - 2);
// ... make sure grandchild and child are gone:
- testPool.removeRecursive(txGrandChild[0], &removed);
- BOOST_CHECK_EQUAL(removed.size(), 0);
- testPool.removeRecursive(txChild[0], &removed);
- BOOST_CHECK_EQUAL(removed.size(), 0);
+ poolSize = testPool.size();
+ testPool.removeRecursive(txGrandChild[0]);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize);
+ poolSize = testPool.size();
+ testPool.removeRecursive(txChild[0]);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize);
// Remove parent, all children/grandchildren should go:
- testPool.removeRecursive(txParent, &removed);
- BOOST_CHECK_EQUAL(removed.size(), 5);
+ poolSize = testPool.size();
+ testPool.removeRecursive(txParent);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize - 5);
BOOST_CHECK_EQUAL(testPool.size(), 0);
- removed.clear();
// Add children and grandchildren, but NOT the parent (simulate the parent being in a block)
for (int i = 0; i < 3; i++)
@@ -97,10 +99,10 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
}
// Now remove the parent, as might happen if a block-re-org occurs but the parent cannot be
// put into the mempool (maybe because it is non-standard):
- testPool.removeRecursive(txParent, &removed);
- BOOST_CHECK_EQUAL(removed.size(), 6);
+ poolSize = testPool.size();
+ testPool.removeRecursive(txParent);
+ BOOST_CHECK_EQUAL(testPool.size(), poolSize - 6);
BOOST_CHECK_EQUAL(testPool.size(), 0);
- removed.clear();
}
template<typename name>
@@ -118,7 +120,6 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
{
CTxMemPool pool(CFeeRate(0));
TestMemPoolEntryHelper entry;
- entry.hadNoDependencies = true;
/* 3rd highest fee */
CMutableTransaction tx1 = CMutableTransaction();
@@ -321,7 +322,6 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
{
CTxMemPool pool(CFeeRate(0));
TestMemPoolEntryHelper entry;
- entry.hadNoDependencies = true;
/* 3rd highest fee */
CMutableTransaction tx1 = CMutableTransaction();
@@ -388,7 +388,12 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
pool.addUnchecked(tx6.GetHash(), entry.Fee(0LL).FromTx(tx6));
BOOST_CHECK_EQUAL(pool.size(), 6);
- sortedOrder.push_back(tx6.GetHash().ToString());
+ // Ties are broken by hash
+ if (tx3.GetHash() < tx6.GetHash())
+ sortedOrder.push_back(tx6.GetHash().ToString());
+ else
+ sortedOrder.insert(sortedOrder.end()-1,tx6.GetHash().ToString());
+
CheckSort<ancestor_score>(pool, sortedOrder);
CMutableTransaction tx7 = CMutableTransaction();
@@ -410,12 +415,16 @@ BOOST_AUTO_TEST_CASE(MempoolAncestorIndexingTest)
CheckSort<ancestor_score>(pool, sortedOrder);
/* after tx6 is mined, tx7 should move up in the sort */
- std::vector<CTransaction> vtx;
- vtx.push_back(tx6);
- pool.removeForBlock(vtx, 1, NULL, false);
+ std::vector<CTransactionRef> vtx;
+ vtx.push_back(MakeTransactionRef(tx6));
+ pool.removeForBlock(vtx, 1);
sortedOrder.erase(sortedOrder.begin()+1);
- sortedOrder.pop_back();
+ // Ties are broken by hash
+ if (tx3.GetHash() < tx6.GetHash())
+ sortedOrder.pop_back();
+ else
+ sortedOrder.erase(sortedOrder.end()-2);
sortedOrder.insert(sortedOrder.begin(), tx7.GetHash().ToString());
CheckSort<ancestor_score>(pool, sortedOrder);
}
@@ -546,7 +555,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
pool.addUnchecked(tx5.GetHash(), entry.Fee(1000LL).FromTx(tx5, &pool));
pool.addUnchecked(tx7.GetHash(), entry.Fee(9000LL).FromTx(tx7, &pool));
- std::vector<CTransaction> vtx;
+ std::vector<CTransactionRef> vtx;
SetMockTime(42);
SetMockTime(42 + CTxMemPool::ROLLING_FEE_HALFLIFE);
BOOST_CHECK_EQUAL(pool.GetMinFee(1).GetFeePerK(), maxFeeRateRemoved.GetFeePerK() + 1000);
diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp
index 66ca381ea7..af02d67f74 100644
--- a/src/test/merkle_tests.cpp
+++ b/src/test/merkle_tests.cpp
@@ -1,10 +1,10 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "consensus/merkle.h"
#include "test/test_bitcoin.h"
-#include "test_random.h"
+#include "test/test_random.h"
#include <boost/test/unit_test.hpp>
@@ -15,8 +15,8 @@ static uint256 BlockBuildMerkleTree(const CBlock& block, bool* fMutated, std::ve
{
vMerkleTree.clear();
vMerkleTree.reserve(block.vtx.size() * 2 + 16); // Safe upper bound for the number of total nodes.
- for (std::vector<CTransaction>::const_iterator it(block.vtx.begin()); it != block.vtx.end(); ++it)
- vMerkleTree.push_back(it->GetHash());
+ for (std::vector<CTransactionRef>::const_iterator it(block.vtx.begin()); it != block.vtx.end(); ++it)
+ vMerkleTree.push_back((*it)->GetHash());
int j = 0;
bool mutated = false;
for (int nSize = block.vtx.size(); nSize > 1; nSize = (nSize + 1) / 2)
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
for (int j = 0; j < ntx; j++) {
CMutableTransaction mtx;
mtx.nLockTime = j;
- block.vtx[j] = mtx;
+ block.vtx[j] = MakeTransactionRef(std::move(mtx));
}
// Compute the root of the block before mutating it.
bool unmutatedMutated = false;
@@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE(merkle_test)
std::vector<uint256> newBranch = BlockMerkleBranch(block, mtx);
std::vector<uint256> oldBranch = BlockGetMerkleBranch(block, merkleTree, mtx);
BOOST_CHECK(oldBranch == newBranch);
- BOOST_CHECK(ComputeMerkleRootFromBranch(block.vtx[mtx].GetHash(), newBranch, mtx) == oldRoot);
+ BOOST_CHECK(ComputeMerkleRootFromBranch(block.vtx[mtx]->GetHash(), newBranch, mtx) == oldRoot);
}
}
}
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index a94979fd77..2f74f57d00 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,7 +7,7 @@
#include "consensus/consensus.h"
#include "consensus/merkle.h"
#include "consensus/validation.h"
-#include "main.h"
+#include "validation.h"
#include "miner.h"
#include "pubkey.h"
#include "script/standard.h"
@@ -77,7 +77,7 @@ bool TestSequenceLocks(const CTransaction &tx, int flags)
// Implemented as an additional function, rather than a separate test case,
// to allow reusing the blockchain created in CreateNewBlock_validity.
// Note that this test assumes blockprioritysize is 0.
-void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey, std::vector<CTransaction *>& txFirst)
+void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey, std::vector<CTransactionRef>& txFirst)
{
// Test the ancestor feerate transaction selection.
TestMemPoolEntryHelper entry;
@@ -108,9 +108,9 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey,
mempool.addUnchecked(hashHighFeeTx, entry.Fee(50000).Time(GetTime()).SpendsCoinbase(false).FromTx(tx));
std::unique_ptr<CBlockTemplate> pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
- BOOST_CHECK(pblocktemplate->block.vtx[1].GetHash() == hashParentTx);
- BOOST_CHECK(pblocktemplate->block.vtx[2].GetHash() == hashHighFeeTx);
- BOOST_CHECK(pblocktemplate->block.vtx[3].GetHash() == hashMediumFeeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[1]->GetHash() == hashParentTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[2]->GetHash() == hashHighFeeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[3]->GetHash() == hashMediumFeeTx);
// Test that a package below the min relay fee doesn't get included
tx.vin[0].prevout.hash = hashHighFeeTx;
@@ -130,8 +130,8 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey,
pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
// Verify that the free tx and the low fee tx didn't get selected
for (size_t i=0; i<pblocktemplate->block.vtx.size(); ++i) {
- BOOST_CHECK(pblocktemplate->block.vtx[i].GetHash() != hashFreeTx);
- BOOST_CHECK(pblocktemplate->block.vtx[i].GetHash() != hashLowFeeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[i]->GetHash() != hashFreeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[i]->GetHash() != hashLowFeeTx);
}
// Test that packages above the min relay fee do get included, even if one
@@ -142,8 +142,8 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey,
hashLowFeeTx = tx.GetHash();
mempool.addUnchecked(hashLowFeeTx, entry.Fee(feeToUse+2).FromTx(tx));
pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
- BOOST_CHECK(pblocktemplate->block.vtx[4].GetHash() == hashFreeTx);
- BOOST_CHECK(pblocktemplate->block.vtx[5].GetHash() == hashLowFeeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[4]->GetHash() == hashFreeTx);
+ BOOST_CHECK(pblocktemplate->block.vtx[5]->GetHash() == hashLowFeeTx);
// Test that transaction selection properly updates ancestor fee
// calculations as ancestor transactions get included in a block.
@@ -166,8 +166,8 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey,
// Verify that this tx isn't selected.
for (size_t i=0; i<pblocktemplate->block.vtx.size(); ++i) {
- BOOST_CHECK(pblocktemplate->block.vtx[i].GetHash() != hashFreeTx2);
- BOOST_CHECK(pblocktemplate->block.vtx[i].GetHash() != hashLowFeeTx2);
+ BOOST_CHECK(pblocktemplate->block.vtx[i]->GetHash() != hashFreeTx2);
+ BOOST_CHECK(pblocktemplate->block.vtx[i]->GetHash() != hashLowFeeTx2);
}
// This tx will be mineable, and should cause hashLowFeeTx2 to be selected
@@ -176,7 +176,7 @@ void TestPackageSelection(const CChainParams& chainparams, CScript scriptPubKey,
tx.vout[0].nValue = 100000000 - 10000; // 10k satoshi fee
mempool.addUnchecked(tx.GetHash(), entry.Fee(10000).FromTx(tx));
pblocktemplate = BlockAssembler(chainparams).CreateNewBlock(scriptPubKey);
- BOOST_CHECK(pblocktemplate->block.vtx[8].GetHash() == hashLowFeeTx2);
+ BOOST_CHECK(pblocktemplate->block.vtx[8]->GetHash() == hashLowFeeTx2);
}
// NOTE: These tests rely on CreateNewBlock doing its own self-validation!
@@ -203,28 +203,28 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
// We can't make transactions until we have inputs
// Therefore, load 100 blocks :)
int baseheight = 0;
- std::vector<CTransaction*>txFirst;
+ std::vector<CTransactionRef> txFirst;
for (unsigned int i = 0; i < sizeof(blockinfo)/sizeof(*blockinfo); ++i)
{
CBlock *pblock = &pblocktemplate->block; // pointer for convenience
pblock->nVersion = 1;
pblock->nTime = chainActive.Tip()->GetMedianTimePast()+1;
- CMutableTransaction txCoinbase(pblock->vtx[0]);
+ CMutableTransaction txCoinbase(*pblock->vtx[0]);
txCoinbase.nVersion = 1;
txCoinbase.vin[0].scriptSig = CScript();
txCoinbase.vin[0].scriptSig.push_back(blockinfo[i].extranonce);
txCoinbase.vin[0].scriptSig.push_back(chainActive.Height());
+ txCoinbase.vout.resize(1); // Ignore the (optional) segwit commitment added by CreateNewBlock (as the hardcoded nonces don't account for this)
txCoinbase.vout[0].scriptPubKey = CScript();
- pblock->vtx[0] = CTransaction(txCoinbase);
+ pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));
if (txFirst.size() == 0)
baseheight = chainActive.Height();
if (txFirst.size() < 4)
- txFirst.push_back(new CTransaction(pblock->vtx[0]));
+ txFirst.push_back(pblock->vtx[0]);
pblock->hashMerkleRoot = BlockMerkleRoot(*pblock);
pblock->nNonce = blockinfo[i].nonce;
- CValidationState state;
- BOOST_CHECK(ProcessNewBlock(state, chainparams, NULL, pblock, true, NULL));
- BOOST_CHECK(state.IsValid());
+ std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(*pblock);
+ BOOST_CHECK(ProcessNewBlock(chainparams, shared_pblock, true, NULL));
pblock->hashPrevBlock = pblock->GetHash();
}
@@ -487,9 +487,6 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
TestPackageSelection(chainparams, scriptPubKey, txFirst);
- BOOST_FOREACH(CTransaction *_tx, txFirst)
- delete _tx;
-
fCheckpointsEnabled = true;
}
diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp
index 581b0cee1e..dd5678ea6e 100644
--- a/src/test/multisig_tests.cpp
+++ b/src/test/multisig_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2014 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,14 +17,12 @@
#include <boost/foreach.hpp>
#include <boost/test/unit_test.hpp>
-using namespace std;
-
-typedef vector<unsigned char> valtype;
+typedef std::vector<unsigned char> valtype;
BOOST_FIXTURE_TEST_SUITE(multisig_tests, BasicTestingSetup)
CScript
-sign_multisig(CScript scriptPubKey, vector<CKey> keys, CTransaction transaction, int whichIn)
+sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transaction, int whichIn)
{
uint256 hash = SignatureHash(scriptPubKey, transaction, whichIn, SIGHASH_ALL, 0, SIGVERSION_BASE);
@@ -32,7 +30,7 @@ sign_multisig(CScript scriptPubKey, vector<CKey> keys, CTransaction transaction,
result << OP_0; // CHECKMULTISIG bug workaround
BOOST_FOREACH(const CKey &key, keys)
{
- vector<unsigned char> vchSig;
+ std::vector<unsigned char> vchSig;
BOOST_CHECK(key.Sign(hash, vchSig));
vchSig.push_back((unsigned char)SIGHASH_ALL);
result << vchSig;
@@ -75,7 +73,7 @@ BOOST_AUTO_TEST_CASE(multisig_verify)
txTo[i].vout[0].nValue = 1;
}
- vector<CKey> keys;
+ std::vector<CKey> keys;
CScript s;
// Test a AND b:
@@ -200,7 +198,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
partialkeystore.AddKey(key[0]);
{
- vector<valtype> solutions;
+ std::vector<valtype> solutions;
txnouttype whichType;
CScript s;
s << ToByteVector(key[0].GetPubKey()) << OP_CHECKSIG;
@@ -213,7 +211,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(!IsMine(emptykeystore, s));
}
{
- vector<valtype> solutions;
+ std::vector<valtype> solutions;
txnouttype whichType;
CScript s;
s << OP_DUP << OP_HASH160 << ToByteVector(key[0].GetPubKey().GetID()) << OP_EQUALVERIFY << OP_CHECKSIG;
@@ -226,7 +224,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(!IsMine(emptykeystore, s));
}
{
- vector<valtype> solutions;
+ std::vector<valtype> solutions;
txnouttype whichType;
CScript s;
s << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
@@ -239,13 +237,13 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(!IsMine(partialkeystore, s));
}
{
- vector<valtype> solutions;
+ std::vector<valtype> solutions;
txnouttype whichType;
CScript s;
s << OP_1 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << OP_2 << OP_CHECKMULTISIG;
BOOST_CHECK(Solver(s, whichType, solutions));
BOOST_CHECK_EQUAL(solutions.size(), 4U);
- vector<CTxDestination> addrs;
+ std::vector<CTxDestination> addrs;
int nRequired;
BOOST_CHECK(ExtractDestinations(s, whichType, addrs, nRequired));
BOOST_CHECK(addrs[0] == keyaddr[0]);
@@ -256,7 +254,7 @@ BOOST_AUTO_TEST_CASE(multisig_Solver1)
BOOST_CHECK(!IsMine(partialkeystore, s));
}
{
- vector<valtype> solutions;
+ std::vector<valtype> solutions;
txnouttype whichType;
CScript s;
s << OP_2 << ToByteVector(key[0].GetPubKey()) << ToByteVector(key[1].GetPubKey()) << ToByteVector(key[2].GetPubKey()) << OP_3 << OP_CHECKMULTISIG;
diff --git a/src/test/net_tests.cpp b/src/test/net_tests.cpp
index e0460109d5..b9ed4952bb 100644
--- a/src/test/net_tests.cpp
+++ b/src/test/net_tests.cpp
@@ -12,12 +12,10 @@
#include "netbase.h"
#include "chainparams.h"
-using namespace std;
-
class CAddrManSerializationMock : public CAddrMan
{
public:
- virtual void Serialize(CDataStream& s, int nType, int nVersionDummy) const = 0;
+ virtual void Serialize(CDataStream& s) const = 0;
//! Ensure that bucket placement is always the same for testing purposes.
void MakeDeterministic()
@@ -30,16 +28,16 @@ public:
class CAddrManUncorrupted : public CAddrManSerializationMock
{
public:
- void Serialize(CDataStream& s, int nType, int nVersionDummy) const
+ void Serialize(CDataStream& s) const
{
- CAddrMan::Serialize(s, nType, nVersionDummy);
+ CAddrMan::Serialize(s);
}
};
class CAddrManCorrupted : public CAddrManSerializationMock
{
public:
- void Serialize(CDataStream& s, int nType, int nVersionDummy) const
+ void Serialize(CDataStream& s) const
{
// Produces corrupt output that claims addrman has 20 addrs when it only has one addr.
unsigned char nVersion = 1;
@@ -68,7 +66,7 @@ CDataStream AddrmanToStream(CAddrManSerializationMock& _addrman)
ssPeersIn << FLATDATA(Params().MessageStart());
ssPeersIn << _addrman;
std::string str = ssPeersIn.str();
- vector<unsigned char> vchData(str.begin(), str.end());
+ std::vector<unsigned char> vchData(str.begin(), str.end());
return CDataStream(vchData, SER_DISK, CLIENT_VERSION);
}
@@ -164,12 +162,12 @@ BOOST_AUTO_TEST_CASE(cnode_simple_test)
bool fInboundIn = false;
// Test that fFeeler is false by default.
- CNode* pnode1 = new CNode(id++, NODE_NETWORK, height, hSocket, addr, 0, 0, pszDest, fInboundIn);
+ std::unique_ptr<CNode> pnode1(new CNode(id++, NODE_NETWORK, height, hSocket, addr, 0, 0, pszDest, fInboundIn));
BOOST_CHECK(pnode1->fInbound == false);
BOOST_CHECK(pnode1->fFeeler == false);
fInboundIn = true;
- CNode* pnode2 = new CNode(id++, NODE_NETWORK, height, hSocket, addr, 1, 1, pszDest, fInboundIn);
+ std::unique_ptr<CNode> pnode2(new CNode(id++, NODE_NETWORK, height, hSocket, addr, 1, 1, pszDest, fInboundIn));
BOOST_CHECK(pnode2->fInbound == true);
BOOST_CHECK(pnode2->fFeeler == false);
}
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp
index 18ad5dc90b..1afef5b1ce 100644
--- a/src/test/netbase_tests.cpp
+++ b/src/test/netbase_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,8 +10,6 @@
#include <boost/assign/list_of.hpp>
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(netbase_tests, BasicTestingSetup)
static CNetAddr ResolveIP(const char* ip)
@@ -64,9 +62,9 @@ BOOST_AUTO_TEST_CASE(netbase_properties)
}
-bool static TestSplitHost(string test, string host, int port)
+bool static TestSplitHost(std::string test, std::string host, int port)
{
- string hostOut;
+ std::string hostOut;
int portOut = -1;
SplitHostPort(test, portOut, hostOut);
return hostOut == host && port == portOut;
@@ -91,7 +89,7 @@ BOOST_AUTO_TEST_CASE(netbase_splithost)
BOOST_CHECK(TestSplitHost("", "", -1));
}
-bool static TestParse(string src, string canon)
+bool static TestParse(std::string src, std::string canon)
{
CService addr(LookupNumeric(src.c_str(), 65535));
return canon == addr.ToString();
diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp
index b7f83d38f0..a1cb32019a 100644
--- a/src/test/pmt_tests.cpp
+++ b/src/test/pmt_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,16 +9,14 @@
#include "uint256.h"
#include "arith_uint256.h"
#include "version.h"
-#include "test_random.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include <vector>
#include <boost/assign/list_of.hpp>
#include <boost/test/unit_test.hpp>
-using namespace std;
-
class CPartialMerkleTreeTester : public CPartialMerkleTree
{
public:
@@ -45,14 +43,14 @@ BOOST_AUTO_TEST_CASE(pmt_test1)
for (unsigned int j=0; j<nTx; j++) {
CMutableTransaction tx;
tx.nLockTime = j; // actual transaction data doesn't matter; just make the nLockTime's unique
- block.vtx.push_back(CTransaction(tx));
+ block.vtx.push_back(MakeTransactionRef(std::move(tx)));
}
// calculate actual merkle root and height
uint256 merkleRoot1 = BlockMerkleRoot(block);
std::vector<uint256> vTxid(nTx, uint256());
for (unsigned int j=0; j<nTx; j++)
- vTxid[j] = block.vtx[j].GetHash();
+ vTxid[j] = block.vtx[j]->GetHash();
int nHeight = 1, nTx_ = nTx;
while (nTx_ > 1) {
nTx_ = (nTx_+1)/2;
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index f57c24270c..0c060801bc 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -19,26 +19,18 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
CTxMemPool mpool(CFeeRate(1000));
TestMemPoolEntryHelper entry;
CAmount basefee(2000);
- double basepri = 1e6;
CAmount deltaFee(100);
- double deltaPri=5e5;
- std::vector<CAmount> feeV[2];
- std::vector<double> priV[2];
+ std::vector<CAmount> feeV;
- // Populate vectors of increasing fees or priorities
+ // Populate vectors of increasing fees
for (int j = 0; j < 10; j++) {
- //V[0] is for fee transactions
- feeV[0].push_back(basefee * (j+1));
- priV[0].push_back(0);
- //V[1] is for priority transactions
- feeV[1].push_back(CAmount(0));
- priV[1].push_back(basepri * pow(10, j+1));
+ feeV.push_back(basefee * (j+1));
}
// Store the hashes of transactions that have been
- // added to the mempool by their associate fee/pri
+ // added to the mempool by their associate fee
// txHashes[j] is populated with transactions either of
- // fee = basefee * (j+1) OR pri = 10^6 * 10^(j+1)
+ // fee = basefee * (j+1)
std::vector<uint256> txHashes[10];
// Create a transaction template
@@ -53,30 +45,30 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
CFeeRate baseRate(basefee, GetVirtualTransactionSize(tx));
// Create a fake block
- std::vector<CTransaction> block;
+ std::vector<CTransactionRef> block;
int blocknum = 0;
// Loop through 200 blocks
// At a decay .998 and 4 fee transactions per block
// This makes the tx count about 1.33 per bucket, above the 1 threshold
while (blocknum < 200) {
- for (int j = 0; j < 10; j++) { // For each fee/pri multiple
- for (int k = 0; k < 5; k++) { // add 4 fee txs for every priority tx
+ for (int j = 0; j < 10; j++) { // For each fee
+ for (int k = 0; k < 4; k++) { // add 4 fee txs
tx.vin[0].prevout.n = 10000*blocknum+100*j+k; // make transaction unique
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
+ mpool.addUnchecked(hash, entry.Fee(feeV[j]).Time(GetTime()).Priority(0).Height(blocknum).FromTx(tx, &mpool));
txHashes[j].push_back(hash);
}
}
- //Create blocks where higher fee/pri txs are included more often
+ //Create blocks where higher fee txs are included more often
for (int h = 0; h <= blocknum%10; h++) {
- // 10/10 blocks add highest fee/pri transactions
+ // 10/10 blocks add highest fee transactions
// 9/10 blocks add 2nd highest and so on until ...
- // 1/10 blocks add lowest fee/pri transactions
+ // 1/10 blocks add lowest fee transactions
while (txHashes[9-h].size()) {
- std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[9-h].back());
+ CTransactionRef ptx = mpool.get(txHashes[9-h].back());
if (ptx)
- block.push_back(*ptx);
+ block.push_back(ptx);
txHashes[9-h].pop_back();
}
}
@@ -100,25 +92,25 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
}
std::vector<CAmount> origFeeEst;
- std::vector<double> origPriEst;
// Highest feerate is 10*baseRate and gets in all blocks,
// second highest feerate is 9*baseRate and gets in 9/10 blocks = 90%,
// third highest feerate is 8*base rate, and gets in 8/10 blocks = 80%,
- // so estimateFee(1) should return 10*baseRate.
+ // so estimateFee(1) would return 10*baseRate but is hardcoded to return failure
// Second highest feerate has 100% chance of being included by 2 blocks,
// so estimateFee(2) should return 9*baseRate etc...
for (int i = 1; i < 10;i++) {
origFeeEst.push_back(mpool.estimateFee(i).GetFeePerK());
- origPriEst.push_back(mpool.estimatePriority(i));
- if (i > 1) { // Fee estimates should be monotonically decreasing
+ if (i > 2) { // Fee estimates should be monotonically decreasing
BOOST_CHECK(origFeeEst[i-1] <= origFeeEst[i-2]);
- BOOST_CHECK(origPriEst[i-1] <= origPriEst[i-2]);
}
int mult = 11-i;
- BOOST_CHECK(origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee);
- BOOST_CHECK(origFeeEst[i-1] > mult*baseRate.GetFeePerK() - deltaFee);
- BOOST_CHECK(origPriEst[i-1] < pow(10,mult) * basepri + deltaPri);
- BOOST_CHECK(origPriEst[i-1] > pow(10,mult) * basepri - deltaPri);
+ if (i > 1) {
+ BOOST_CHECK(origFeeEst[i-1] < mult*baseRate.GetFeePerK() + deltaFee);
+ BOOST_CHECK(origFeeEst[i-1] > mult*baseRate.GetFeePerK() - deltaFee);
+ }
+ else {
+ BOOST_CHECK(origFeeEst[i-1] == CFeeRate(0).GetFeePerK());
+ }
}
// Mine 50 more blocks with no transactions happening, estimates shouldn't change
@@ -126,22 +118,21 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
while (blocknum < 250)
mpool.removeForBlock(block, ++blocknum);
- for (int i = 1; i < 10;i++) {
+ BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0));
+ for (int i = 2; i < 10;i++) {
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] + deltaFee);
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
- BOOST_CHECK(mpool.estimatePriority(i) < origPriEst[i-1] + deltaPri);
- BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri);
}
// Mine 15 more blocks with lots of transactions happening and not getting mined
// Estimates should go up
while (blocknum < 265) {
- for (int j = 0; j < 10; j++) { // For each fee/pri multiple
- for (int k = 0; k < 5; k++) { // add 4 fee txs for every priority tx
+ for (int j = 0; j < 10; j++) { // For each fee multiple
+ for (int k = 0; k < 4; k++) { // add 4 fee txs
tx.vin[0].prevout.n = 10000*blocknum+100*j+k;
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
+ mpool.addUnchecked(hash, entry.Fee(feeV[j]).Time(GetTime()).Priority(0).Height(blocknum).FromTx(tx, &mpool));
txHashes[j].push_back(hash);
}
}
@@ -152,54 +143,53 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
for (int i = 1; i < 10;i++) {
BOOST_CHECK(mpool.estimateFee(i) == CFeeRate(0) || mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
BOOST_CHECK(mpool.estimateSmartFee(i, &answerFound).GetFeePerK() > origFeeEst[answerFound-1] - deltaFee);
- BOOST_CHECK(mpool.estimatePriority(i) == -1 || mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri);
- BOOST_CHECK(mpool.estimateSmartPriority(i, &answerFound) > origPriEst[answerFound-1] - deltaPri);
}
// Mine all those transactions
// Estimates should still not be below original
for (int j = 0; j < 10; j++) {
while(txHashes[j].size()) {
- std::shared_ptr<const CTransaction> ptx = mpool.get(txHashes[j].back());
+ CTransactionRef ptx = mpool.get(txHashes[j].back());
if (ptx)
- block.push_back(*ptx);
+ block.push_back(ptx);
txHashes[j].pop_back();
}
}
mpool.removeForBlock(block, 265);
block.clear();
- for (int i = 1; i < 10;i++) {
+ BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0));
+ for (int i = 2; i < 10;i++) {
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
- BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri);
}
// Mine 200 more blocks where everything is mined every block
// Estimates should be below original estimates
while (blocknum < 465) {
- for (int j = 0; j < 10; j++) { // For each fee/pri multiple
- for (int k = 0; k < 5; k++) { // add 4 fee txs for every priority tx
+ for (int j = 0; j < 10; j++) { // For each fee multiple
+ for (int k = 0; k < 4; k++) { // add 4 fee txs
tx.vin[0].prevout.n = 10000*blocknum+100*j+k;
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
- std::shared_ptr<const CTransaction> ptx = mpool.get(hash);
+ mpool.addUnchecked(hash, entry.Fee(feeV[j]).Time(GetTime()).Priority(0).Height(blocknum).FromTx(tx, &mpool));
+ CTransactionRef ptx = mpool.get(hash);
if (ptx)
- block.push_back(*ptx);
+ block.push_back(ptx);
+
}
}
mpool.removeForBlock(block, ++blocknum);
block.clear();
}
- for (int i = 1; i < 10; i++) {
+ BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0));
+ for (int i = 2; i < 10; i++) {
BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() < origFeeEst[i-1] - deltaFee);
- BOOST_CHECK(mpool.estimatePriority(i) < origPriEst[i-1] - deltaPri);
}
// Test that if the mempool is limited, estimateSmartFee won't return a value below the mempool min fee
// and that estimateSmartPriority returns essentially an infinite value
- mpool.addUnchecked(tx.GetHash(), entry.Fee(feeV[0][5]).Time(GetTime()).Priority(priV[1][5]).Height(blocknum).FromTx(tx, &mpool));
- // evict that transaction which should set a mempool min fee of minRelayTxFee + feeV[0][5]
+ mpool.addUnchecked(tx.GetHash(), entry.Fee(feeV[5]).Time(GetTime()).Priority(0).Height(blocknum).FromTx(tx, &mpool));
+ // evict that transaction which should set a mempool min fee of minRelayTxFee + feeV[5]
mpool.TrimToSize(1);
- BOOST_CHECK(mpool.GetMinFee(1).GetFeePerK() > feeV[0][5]);
+ BOOST_CHECK(mpool.GetMinFee(1).GetFeePerK() > feeV[5]);
for (int i = 1; i < 10; i++) {
BOOST_CHECK(mpool.estimateSmartFee(i).GetFeePerK() >= mpool.estimateFee(i).GetFeePerK());
BOOST_CHECK(mpool.estimateSmartFee(i).GetFeePerK() >= mpool.GetMinFee(1).GetFeePerK());
diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp
index b6eb39bc38..4ca6f1caf0 100644
--- a/src/test/pow_tests.cpp
+++ b/src/test/pow_tests.cpp
@@ -11,8 +11,6 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup)
/* Test calculation of next difficulty target with no constraints applying */
diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp
index 6cad02e738..bd8a7819a4 100644
--- a/src/test/prevector_tests.cpp
+++ b/src/test/prevector_tests.cpp
@@ -1,15 +1,15 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <vector>
#include "prevector.h"
-#include "test_random.h"
#include "serialize.h"
#include "streams.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include <boost/test/unit_test.hpp>
@@ -169,6 +169,19 @@ public:
pre_vector.swap(pre_vector_alt);
test();
}
+
+ void move() {
+ real_vector = std::move(real_vector_alt);
+ real_vector_alt.clear();
+ pre_vector = std::move(pre_vector_alt);
+ pre_vector_alt.clear();
+ }
+
+ void copy() {
+ real_vector = real_vector_alt;
+ pre_vector = pre_vector_alt;
+ }
+
~prevector_tester() {
BOOST_CHECK_MESSAGE(passed, "insecure_rand_Rz: "
<< rand_cache.Rz
@@ -240,9 +253,15 @@ BOOST_AUTO_TEST_CASE(PrevectorTestInt)
if (((r >> 21) % 512) == 12) {
test.assign(insecure_rand() % 32, insecure_rand());
}
- if (((r >> 15) % 64) == 3) {
+ if (((r >> 15) % 8) == 3) {
test.swap();
}
+ if (((r >> 15) % 16) == 8) {
+ test.copy();
+ }
+ if (((r >> 15) % 32) == 18) {
+ test.move();
+ }
}
}
}
diff --git a/src/test/raii_event_tests.cpp b/src/test/raii_event_tests.cpp
new file mode 100644
index 0000000000..87d25c0e2c
--- /dev/null
+++ b/src/test/raii_event_tests.cpp
@@ -0,0 +1,88 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <event2/event.h>
+#include <map>
+#include <stdlib.h>
+
+#include "support/events.h"
+
+#include "test/test_bitcoin.h"
+
+#include <vector>
+
+#include <boost/test/unit_test.hpp>
+
+static std::map<void*, short> tags;
+static std::map<void*, uint16_t> orders;
+static uint16_t tagSequence = 0;
+
+static void* tag_malloc(size_t sz) {
+ void* mem = malloc(sz);
+ if (!mem) return mem;
+ tags[mem]++;
+ orders[mem] = tagSequence++;
+ return mem;
+}
+
+static void tag_free(void* mem) {
+ tags[mem]--;
+ orders[mem] = tagSequence++;
+ free(mem);
+}
+
+BOOST_FIXTURE_TEST_SUITE(raii_event_tests, BasicTestingSetup)
+
+BOOST_AUTO_TEST_CASE(raii_event_creation)
+{
+ event_set_mem_functions(tag_malloc, realloc, tag_free);
+
+ void* base_ptr = NULL;
+ {
+ auto base = obtain_event_base();
+ base_ptr = (void*)base.get();
+ BOOST_CHECK(tags[base_ptr] == 1);
+ }
+ BOOST_CHECK(tags[base_ptr] == 0);
+
+ void* event_ptr = NULL;
+ {
+ auto base = obtain_event_base();
+ auto event = obtain_event(base.get(), -1, 0, NULL, NULL);
+
+ base_ptr = (void*)base.get();
+ event_ptr = (void*)event.get();
+
+ BOOST_CHECK(tags[base_ptr] == 1);
+ BOOST_CHECK(tags[event_ptr] == 1);
+ }
+ BOOST_CHECK(tags[base_ptr] == 0);
+ BOOST_CHECK(tags[event_ptr] == 0);
+
+ event_set_mem_functions(malloc, realloc, free);
+}
+
+BOOST_AUTO_TEST_CASE(raii_event_order)
+{
+ event_set_mem_functions(tag_malloc, realloc, tag_free);
+
+ void* base_ptr = NULL;
+ void* event_ptr = NULL;
+ {
+ auto base = obtain_event_base();
+ auto event = obtain_event(base.get(), -1, 0, NULL, NULL);
+
+ base_ptr = (void*)base.get();
+ event_ptr = (void*)event.get();
+
+ // base should have allocated before event
+ BOOST_CHECK(orders[base_ptr] < orders[event_ptr]);
+ }
+ // base should be freed after event
+ BOOST_CHECK(orders[base_ptr] > orders[event_ptr]);
+
+ event_set_mem_functions(malloc, realloc, free);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/reverselock_tests.cpp b/src/test/reverselock_tests.cpp
index 8bdff97000..00dc47e13e 100644
--- a/src/test/reverselock_tests.cpp
+++ b/src/test/reverselock_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index a3d1a25589..399bdbc811 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -16,13 +16,11 @@
#include <univalue.h>
-using namespace std;
-
-UniValue CallRPC(string args)
+UniValue CallRPC(std::string args)
{
- vector<string> vArgs;
+ std::vector<std::string> vArgs;
boost::split(vArgs, args, boost::is_any_of(" \t"));
- string strMethod = vArgs[0];
+ std::string strMethod = vArgs[0];
vArgs.erase(vArgs.begin());
JSONRPCRequest request;
request.strMethod = strMethod;
@@ -35,7 +33,7 @@ UniValue CallRPC(string args)
return result;
}
catch (const UniValue& objError) {
- throw runtime_error(find_value(objError, "message").get_str());
+ throw std::runtime_error(find_value(objError, "message").get_str());
}
}
@@ -47,59 +45,81 @@ BOOST_AUTO_TEST_CASE(rpc_rawparams)
// Test raw transaction API argument handling
UniValue r;
- BOOST_CHECK_THROW(CallRPC("getrawtransaction"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("getrawtransaction not_hex"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("getrawtransaction a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed not_int"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("getrawtransaction"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("getrawtransaction not_hex"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("getrawtransaction a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed not_int"), std::runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction null null"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction not_array"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [] []"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction {} {}"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction null null"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction not_array"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction [] []"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction {} {}"), std::runtime_error);
BOOST_CHECK_NO_THROW(CallRPC("createrawtransaction [] {}"));
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [] {} extra"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction [] {} extra"), std::runtime_error);
- BOOST_CHECK_THROW(CallRPC("decoderawtransaction"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("decoderawtransaction null"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("decoderawtransaction DEADBEEF"), runtime_error);
- string rawtx = "0100000001a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece010000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b1736ddfee5db5946c5da8c0121033b9b137ee87d5a812d6f506efdd37f0affa7ffc310711c06c7f3e097c9447c52ffffffff0100e1f505000000001976a9140389035a9225b3839e2bbf32d826a1e222031fd888ac00000000";
- BOOST_CHECK_NO_THROW(r = CallRPC(string("decoderawtransaction ")+rawtx));
+ BOOST_CHECK_THROW(CallRPC("decoderawtransaction"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("decoderawtransaction null"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("decoderawtransaction DEADBEEF"), std::runtime_error);
+ std::string rawtx = "0100000001a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece010000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b1736ddfee5db5946c5da8c0121033b9b137ee87d5a812d6f506efdd37f0affa7ffc310711c06c7f3e097c9447c52ffffffff0100e1f505000000001976a9140389035a9225b3839e2bbf32d826a1e222031fd888ac00000000";
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("decoderawtransaction ")+rawtx));
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "size").get_int(), 193);
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "version").get_int(), 1);
BOOST_CHECK_EQUAL(find_value(r.get_obj(), "locktime").get_int(), 0);
- BOOST_CHECK_THROW(r = CallRPC(string("decoderawtransaction ")+rawtx+" extra"), runtime_error);
+ BOOST_CHECK_THROW(r = CallRPC(std::string("decoderawtransaction ")+rawtx+" extra"), std::runtime_error);
- BOOST_CHECK_THROW(CallRPC("signrawtransaction"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("signrawtransaction null"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("signrawtransaction ff00"), runtime_error);
- BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx));
- BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx+" null null NONE|ANYONECANPAY"));
- BOOST_CHECK_NO_THROW(CallRPC(string("signrawtransaction ")+rawtx+" [] [] NONE|ANYONECANPAY"));
- BOOST_CHECK_THROW(CallRPC(string("signrawtransaction ")+rawtx+" null null badenum"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("signrawtransaction"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("signrawtransaction null"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("signrawtransaction ff00"), std::runtime_error);
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("signrawtransaction ")+rawtx));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("signrawtransaction ")+rawtx+" null null NONE|ANYONECANPAY"));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("signrawtransaction ")+rawtx+" [] [] NONE|ANYONECANPAY"));
+ BOOST_CHECK_THROW(CallRPC(std::string("signrawtransaction ")+rawtx+" null null badenum"), std::runtime_error);
// Only check failure cases for sendrawtransaction, there's no network to send to...
- BOOST_CHECK_THROW(CallRPC("sendrawtransaction"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("sendrawtransaction null"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("sendrawtransaction DEADBEEF"), runtime_error);
- BOOST_CHECK_THROW(CallRPC(string("sendrawtransaction ")+rawtx+" extra"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("sendrawtransaction"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("sendrawtransaction null"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("sendrawtransaction DEADBEEF"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC(std::string("sendrawtransaction ")+rawtx+" extra"), std::runtime_error);
+}
+
+BOOST_AUTO_TEST_CASE(rpc_togglenetwork)
+{
+ UniValue r;
+
+ r = CallRPC("getnetworkinfo");
+ bool netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, true);
+
+ BOOST_CHECK_NO_THROW(CallRPC("setnetworkactive false"));
+ r = CallRPC("getnetworkinfo");
+ int numConnection = find_value(r.get_obj(), "connections").get_int();
+ BOOST_CHECK_EQUAL(numConnection, 0);
+
+ netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, false);
+
+ BOOST_CHECK_NO_THROW(CallRPC("setnetworkactive true"));
+ r = CallRPC("getnetworkinfo");
+ netState = find_value(r.get_obj(), "networkactive").get_bool();
+ BOOST_CHECK_EQUAL(netState, true);
}
BOOST_AUTO_TEST_CASE(rpc_rawsign)
{
UniValue r;
// input is a 1-of-2 multisig (so is output):
- string prevout =
+ std::string prevout =
"[{\"txid\":\"b4cc287e58f87cdae59417329f710f3ecd75a4ee1d2872b7248f50977c8493f3\","
"\"vout\":1,\"scriptPubKey\":\"a914b10c9df5f7edf436c697f02f1efdba4cf399615187\","
"\"redeemScript\":\"512103debedc17b3df2badbcdd86d5feb4562b86fe182e5998abd8bcd4f122c6155b1b21027e940bb73ab8732bfdf7f9216ecefca5b94d6df834e77e108f68e66f126044c052ae\"}]";
- r = CallRPC(string("createrawtransaction ")+prevout+" "+
+ r = CallRPC(std::string("createrawtransaction ")+prevout+" "+
"{\"3HqAe9LtNBjnsfM4CyYaWTnvCaUYT7v4oZ\":11}");
- string notsigned = r.get_str();
- string privkey1 = "\"KzsXybp9jX64P5ekX1KUxRQ79Jht9uzW7LorgwE65i5rWACL6LQe\"";
- string privkey2 = "\"Kyhdf5LuKTRx4ge69ybABsiUAWjVRK4XGxAKk2FQLp2HjGMy87Z4\"";
- r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"[]");
+ std::string notsigned = r.get_str();
+ std::string privkey1 = "\"KzsXybp9jX64P5ekX1KUxRQ79Jht9uzW7LorgwE65i5rWACL6LQe\"";
+ std::string privkey2 = "\"Kyhdf5LuKTRx4ge69ybABsiUAWjVRK4XGxAKk2FQLp2HjGMy87Z4\"";
+ r = CallRPC(std::string("signrawtransaction ")+notsigned+" "+prevout+" "+"[]");
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == false);
- r = CallRPC(string("signrawtransaction ")+notsigned+" "+prevout+" "+"["+privkey1+","+privkey2+"]");
+ r = CallRPC(std::string("signrawtransaction ")+notsigned+" "+prevout+" "+"["+privkey1+","+privkey2+"]");
BOOST_CHECK(find_value(r.get_obj(), "complete").get_bool() == true);
}
@@ -111,11 +131,11 @@ BOOST_AUTO_TEST_CASE(rpc_createraw_op_return)
BOOST_CHECK_NO_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"68656c6c6f776f726c64\",\"data\":\"68656c6c6f776f726c64\"}"));
// Key not "data" (bad address)
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"somedata\":\"68656c6c6f776f726c64\"}"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"somedata\":\"68656c6c6f776f726c64\"}"), std::runtime_error);
// Bad hex encoding of data output
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"12345\"}"), runtime_error);
- BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"12345g\"}"), runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"12345\"}"), std::runtime_error);
+ BOOST_CHECK_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"12345g\"}"), std::runtime_error);
// Data 81 bytes long
BOOST_CHECK_NO_THROW(CallRPC("createrawtransaction [{\"txid\":\"a3b807410df0b60fcb9736768df5823938b2f838694939ba45f3c0a1bff150ed\",\"vout\":0}] {\"data\":\"010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081\"}"));
@@ -219,23 +239,23 @@ BOOST_AUTO_TEST_CASE(json_parse_errors)
BOOST_AUTO_TEST_CASE(rpc_ban)
{
- BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
-
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));
+
UniValue r;
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0 add")));
- BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.0:8334")), runtime_error); //portnumber for setban not allowed
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0 add")));
+ BOOST_CHECK_THROW(r = CallRPC(std::string("setban 127.0.0.0:8334")), std::runtime_error); //portnumber for setban not allowed
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
UniValue ar = r.get_array();
UniValue o1 = ar[0].get_obj();
UniValue adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/32");
- BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0 remove")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("setban 127.0.0.0 remove")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/24 add 1607731200 true")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0/24 add 1607731200 true")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
@@ -243,10 +263,10 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
BOOST_CHECK_EQUAL(banned_until.get_int64(), 1607731200); // absolute time check
- BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/24 add 200")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0/24 add 200")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
@@ -257,43 +277,43 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
BOOST_CHECK(banned_until.get_int64()-now <= 200);
// must throw an exception because 127.0.0.1 is in already banned suubnet range
- BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.0.1 add")), runtime_error);
+ BOOST_CHECK_THROW(r = CallRPC(std::string("setban 127.0.0.1 add")), std::runtime_error);
- BOOST_CHECK_NO_THROW(CallRPC(string("setban 127.0.0.0/24 remove")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("setban 127.0.0.0/24 remove")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 127.0.0.0/255.255.0.0 add")));
- BOOST_CHECK_THROW(r = CallRPC(string("setban 127.0.1.1 add")), runtime_error);
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0/255.255.0.0 add")));
+ BOOST_CHECK_THROW(r = CallRPC(std::string("setban 127.0.1.1 add")), std::runtime_error);
- BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0);
- BOOST_CHECK_THROW(r = CallRPC(string("setban test add")), runtime_error); //invalid IP
+ BOOST_CHECK_THROW(r = CallRPC(std::string("setban test add")), std::runtime_error); //invalid IP
//IPv6 tests
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban FE80:0000:0000:0000:0202:B3FF:FE1E:8329 add")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban FE80:0000:0000:0000:0202:B3FF:FE1E:8329 add")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "fe80::202:b3ff:fe1e:8329/128");
- BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 2001:db8::/ffff:fffc:0:0:0:0:0:0 add")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 2001:db8::/ffff:fffc:0:0:0:0:0:0 add")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
BOOST_CHECK_EQUAL(adr.get_str(), "2001:db8::/30");
- BOOST_CHECK_NO_THROW(CallRPC(string("clearbanned")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("setban 2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128 add")));
- BOOST_CHECK_NO_THROW(r = CallRPC(string("listbanned")));
+ BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 2001:4d48:ac57:400:cacf:e9ff:fe1d:9c63/128 add")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp
index 891ecf5015..e1b0ab9258 100644
--- a/src/test/scheduler_tests.cpp
+++ b/src/test/scheduler_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp
index 1a01593a8e..f8fd8cc30c 100644
--- a/src/test/script_P2SH_tests.cpp
+++ b/src/test/script_P2SH_tests.cpp
@@ -1,11 +1,11 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "core_io.h"
#include "key.h"
#include "keystore.h"
-#include "main.h"
+#include "validation.h"
#include "policy/policy.h"
#include "script/script.h"
#include "script/script_error.h"
@@ -17,8 +17,6 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
// Helpers:
static std::vector<unsigned char>
Serialize(const CScript& s)
@@ -80,7 +78,7 @@ BOOST_AUTO_TEST_CASE(sign)
}
CMutableTransaction txFrom; // Funding transaction:
- string reason;
+ std::string reason;
txFrom.vout.resize(8);
for (int i = 0; i < 4; i++)
{
@@ -178,7 +176,7 @@ BOOST_AUTO_TEST_CASE(set)
}
CMutableTransaction txFrom; // Funding transaction:
- string reason;
+ std::string reason;
txFrom.vout.resize(4);
for (int i = 0; i < 4; i++)
{
@@ -263,7 +261,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
CCoinsViewCache coins(&coinsDummy);
CBasicKeyStore keystore;
CKey key[6];
- vector<CPubKey> keys;
+ std::vector<CPubKey> keys;
for (int i = 0; i < 6; i++)
{
key[i].MakeNewKey(true);
@@ -335,8 +333,8 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
// SignSignature doesn't know how to sign these. We're
// not testing validating signatures, so just create
// dummy signatures that DO include the correct P2SH scripts:
- txTo.vin[3].scriptSig << OP_11 << OP_11 << vector<unsigned char>(oneAndTwo.begin(), oneAndTwo.end());
- txTo.vin[4].scriptSig << vector<unsigned char>(fifteenSigops.begin(), fifteenSigops.end());
+ txTo.vin[3].scriptSig << OP_11 << OP_11 << std::vector<unsigned char>(oneAndTwo.begin(), oneAndTwo.end());
+ txTo.vin[4].scriptSig << std::vector<unsigned char>(fifteenSigops.begin(), fifteenSigops.end());
BOOST_CHECK(::AreInputsStandard(txTo, coins));
// 22 P2SH sigops for all inputs (1 for vin[0], 6 for vin[3], 15 for vin[4]
@@ -349,7 +347,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
txToNonStd1.vin.resize(1);
txToNonStd1.vin[0].prevout.n = 5;
txToNonStd1.vin[0].prevout.hash = txFrom.GetHash();
- txToNonStd1.vin[0].scriptSig << vector<unsigned char>(sixteenSigops.begin(), sixteenSigops.end());
+ txToNonStd1.vin[0].scriptSig << std::vector<unsigned char>(sixteenSigops.begin(), sixteenSigops.end());
BOOST_CHECK(!::AreInputsStandard(txToNonStd1, coins));
BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txToNonStd1, coins), 16U);
@@ -361,7 +359,7 @@ BOOST_AUTO_TEST_CASE(AreInputsStandard)
txToNonStd2.vin.resize(1);
txToNonStd2.vin[0].prevout.n = 6;
txToNonStd2.vin[0].prevout.hash = txFrom.GetHash();
- txToNonStd2.vin[0].scriptSig << vector<unsigned char>(twentySigops.begin(), twentySigops.end());
+ txToNonStd2.vin[0].scriptSig << std::vector<unsigned char>(twentySigops.begin(), twentySigops.end());
BOOST_CHECK(!::AreInputsStandard(txToNonStd2, coins));
BOOST_CHECK_EQUAL(GetP2SHSigOpCount(txToNonStd2, coins), 20U);
diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp
index 561adb8ea2..6f057f43b4 100644
--- a/src/test/script_tests.cpp
+++ b/src/test/script_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -29,15 +29,13 @@
#include <univalue.h>
-using namespace std;
-
// Uncomment if you want to output updated JSON tests.
// #define UPDATE_JSON_TESTS
static const unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC;
-unsigned int ParseScriptFlags(string strFlags);
-string FormatScriptFlags(unsigned int flags);
+unsigned int ParseScriptFlags(std::string strFlags);
+std::string FormatScriptFlags(unsigned int flags);
UniValue
read_json(const std::string& jsondata)
@@ -145,8 +143,7 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CSc
txSpend.nLockTime = 0;
txSpend.vin.resize(1);
txSpend.vout.resize(1);
- txSpend.wit.vtxinwit.resize(1);
- txSpend.wit.vtxinwit[0].scriptWitness = scriptWitness;
+ txSpend.vin[0].scriptWitness = scriptWitness;
txSpend.vin[0].prevout.hash = txCredit.GetHash();
txSpend.vin[0].prevout.n = 0;
txSpend.vin[0].scriptSig = scriptSig;
@@ -173,11 +170,14 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScript
#if defined(HAVE_CONSENSUS_LIB)
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
stream << tx2;
- if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(begin_ptr(scriptPubKey), scriptPubKey.size(), txCredit.vout[0].nValue, (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect, message);
- } else {
- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(begin_ptr(scriptPubKey), scriptPubKey.size(), 0, (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect, message);
- BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(begin_ptr(scriptPubKey), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, flags, NULL) == expect,message);
+ int libconsensus_flags = flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL;
+ if (libconsensus_flags == flags) {
+ if (flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_WITNESS) {
+ BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), txCredit.vout[0].nValue, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, NULL) == expect, message);
+ } else {
+ BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script_with_amount(scriptPubKey.data(), scriptPubKey.size(), 0, (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, NULL) == expect, message);
+ BOOST_CHECK_MESSAGE(bitcoinconsensus_verify_script(scriptPubKey.data(), scriptPubKey.size(), (const unsigned char*)&stream[0], stream.size(), 0, libconsensus_flags, NULL) == expect,message);
+ }
}
#endif
}
@@ -273,7 +273,7 @@ private:
//! The Witness embedded script
CScript witscript;
CScriptWitness scriptWitness;
- CTransaction creditTx;
+ CTransactionRef creditTx;
CMutableTransaction spendTx;
bool havePush;
std::vector<unsigned char> push;
@@ -316,8 +316,8 @@ public:
redeemscript = scriptPubKey;
scriptPubKey = CScript() << OP_HASH160 << ToByteVector(CScriptID(redeemscript)) << OP_EQUAL;
}
- creditTx = BuildCreditingTransaction(scriptPubKey, nValue);
- spendTx = BuildSpendingTransaction(CScript(), CScriptWitness(), creditTx);
+ creditTx = MakeTransactionRef(BuildCreditingTransaction(scriptPubKey, nValue));
+ spendTx = BuildSpendingTransaction(CScript(), CScriptWitness(), *creditTx);
}
TestBuilder& ScriptError(ScriptError_t err)
@@ -418,7 +418,7 @@ public:
{
TestBuilder copy = *this; // Make a copy so we can rollback the push.
DoPush();
- DoTest(creditTx.vout[0].scriptPubKey, spendTx.vin[0].scriptSig, scriptWitness, flags, comment, scriptError, nValue);
+ DoTest(creditTx->vout[0].scriptPubKey, spendTx.vin[0].scriptSig, scriptWitness, flags, comment, scriptError, nValue);
*this = copy;
return *this;
}
@@ -444,7 +444,7 @@ public:
array.push_back(wit);
}
array.push_back(FormatScript(spendTx.vin[0].scriptSig));
- array.push_back(FormatScript(creditTx.vout[0].scriptPubKey));
+ array.push_back(FormatScript(creditTx->vout[0].scriptPubKey));
array.push_back(FormatScriptFlags(flags));
array.push_back(FormatScriptError((ScriptError_t)scriptError));
array.push_back(comment);
@@ -458,7 +458,7 @@ public:
const CScript& GetScriptPubKey()
{
- return creditTx.vout[0].scriptPubKey;
+ return creditTx->vout[0].scriptPubKey;
}
};
@@ -798,7 +798,7 @@ BOOST_AUTO_TEST_CASE(script_build)
CScript witscript = CScript() << ToByteVector(keys.pubkey0);
uint256 hash;
CSHA256().Write(&witscript[0], witscript.size()).Finalize(hash.begin());
- vector<unsigned char> hashBytes = ToByteVector(hash);
+ std::vector<unsigned char> hashBytes = ToByteVector(hash);
hashBytes.pop_back();
tests.push_back(TestBuilder(CScript() << OP_0 << hashBytes,
"P2WPKH with wrong witness program length", SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_P2SH, false
@@ -963,7 +963,7 @@ BOOST_AUTO_TEST_CASE(script_json_test)
for (unsigned int idx = 0; idx < tests.size(); idx++) {
UniValue test = tests[idx];
- string strTest = test.write();
+ std::string strTest = test.write();
CScriptWitness witness;
CAmount nValue = 0;
unsigned int pos = 0;
@@ -982,9 +982,9 @@ BOOST_AUTO_TEST_CASE(script_json_test)
}
continue;
}
- string scriptSigString = test[pos++].get_str();
+ std::string scriptSigString = test[pos++].get_str();
CScript scriptSig = ParseScript(scriptSigString);
- string scriptPubKeyString = test[pos++].get_str();
+ std::string scriptPubKeyString = test[pos++].get_str();
CScript scriptPubKey = ParseScript(scriptPubKeyString);
unsigned int scriptflags = ParseScriptFlags(test[pos++].get_str());
int scriptError = ParseScriptError(test[pos++].get_str());
@@ -1003,21 +1003,21 @@ BOOST_AUTO_TEST_CASE(script_PushData)
static const unsigned char pushdata4[] = { OP_PUSHDATA4, 1, 0, 0, 0, 0x5a };
ScriptError err;
- vector<vector<unsigned char> > directStack;
+ std::vector<std::vector<unsigned char> > directStack;
BOOST_CHECK(EvalScript(directStack, CScript(&direct[0], &direct[sizeof(direct)]), SCRIPT_VERIFY_P2SH, BaseSignatureChecker(), SIGVERSION_BASE, &err));
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
- vector<vector<unsigned char> > pushdata1Stack;
+ std::vector<std::vector<unsigned char> > pushdata1Stack;
BOOST_CHECK(EvalScript(pushdata1Stack, CScript(&pushdata1[0], &pushdata1[sizeof(pushdata1)]), SCRIPT_VERIFY_P2SH, BaseSignatureChecker(), SIGVERSION_BASE, &err));
BOOST_CHECK(pushdata1Stack == directStack);
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
- vector<vector<unsigned char> > pushdata2Stack;
+ std::vector<std::vector<unsigned char> > pushdata2Stack;
BOOST_CHECK(EvalScript(pushdata2Stack, CScript(&pushdata2[0], &pushdata2[sizeof(pushdata2)]), SCRIPT_VERIFY_P2SH, BaseSignatureChecker(), SIGVERSION_BASE, &err));
BOOST_CHECK(pushdata2Stack == directStack);
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
- vector<vector<unsigned char> > pushdata4Stack;
+ std::vector<std::vector<unsigned char> > pushdata4Stack;
BOOST_CHECK(EvalScript(pushdata4Stack, CScript(&pushdata4[0], &pushdata4[sizeof(pushdata4)]), SCRIPT_VERIFY_P2SH, BaseSignatureChecker(), SIGVERSION_BASE, &err));
BOOST_CHECK(pushdata4Stack == directStack);
BOOST_CHECK_MESSAGE(err == SCRIPT_ERR_OK, ScriptErrorString(err));
@@ -1040,7 +1040,7 @@ sign_multisig(CScript scriptPubKey, std::vector<CKey> keys, CTransaction transac
result << OP_0;
BOOST_FOREACH(const CKey &key, keys)
{
- vector<unsigned char> vchSig;
+ std::vector<unsigned char> vchSig;
BOOST_CHECK(key.Sign(hash, vchSig));
vchSig.push_back((unsigned char)SIGHASH_ALL);
result << vchSig;
@@ -1159,8 +1159,8 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
// Test the CombineSignatures function
CAmount amount = 0;
CBasicKeyStore keystore;
- vector<CKey> keys;
- vector<CPubKey> pubkeys;
+ std::vector<CKey> keys;
+ std::vector<CPubKey> pubkeys;
for (int i = 0; i < 3; i++)
{
CKey key;
@@ -1221,15 +1221,15 @@ BOOST_AUTO_TEST_CASE(script_combineSigs)
BOOST_CHECK(combined.scriptSig == scriptSig);
// A couple of partially-signed versions:
- vector<unsigned char> sig1;
+ std::vector<unsigned char> sig1;
uint256 hash1 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_ALL, 0, SIGVERSION_BASE);
BOOST_CHECK(keys[0].Sign(hash1, sig1));
sig1.push_back(SIGHASH_ALL);
- vector<unsigned char> sig2;
+ std::vector<unsigned char> sig2;
uint256 hash2 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_NONE, 0, SIGVERSION_BASE);
BOOST_CHECK(keys[1].Sign(hash2, sig2));
sig2.push_back(SIGHASH_NONE);
- vector<unsigned char> sig3;
+ std::vector<unsigned char> sig3;
uint256 hash3 = SignatureHash(scriptPubKey, txTo, 0, SIGHASH_SINGLE, 0, SIGVERSION_BASE);
BOOST_CHECK(keys[2].Sign(hash3, sig3));
sig3.push_back(SIGHASH_SINGLE);
@@ -1303,9 +1303,9 @@ BOOST_AUTO_TEST_CASE(script_GetScriptAsm)
BOOST_CHECK_EQUAL("OP_CHECKLOCKTIMEVERIFY", ScriptToAsmStr(CScript() << OP_NOP2));
BOOST_CHECK_EQUAL("OP_CHECKLOCKTIMEVERIFY", ScriptToAsmStr(CScript() << OP_CHECKLOCKTIMEVERIFY));
- string derSig("304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c5090");
- string pubKey("03b0da749730dc9b4b1f4a14d6902877a92541f5368778853d9c4a0cb7802dcfb2");
- vector<unsigned char> vchPubKey = ToByteVector(ParseHex(pubKey));
+ std::string derSig("304502207fa7a6d1e0ee81132a269ad84e68d695483745cde8b541e3bf630749894e342a022100c1f7ab20e13e22fb95281a870f3dcf38d782e53023ee313d741ad0cfbc0c5090");
+ std::string pubKey("03b0da749730dc9b4b1f4a14d6902877a92541f5368778853d9c4a0cb7802dcfb2");
+ std::vector<unsigned char> vchPubKey = ToByteVector(ParseHex(pubKey));
BOOST_CHECK_EQUAL(derSig + "00 " + pubKey, ScriptToAsmStr(CScript() << ToByteVector(ParseHex(derSig + "00")) << vchPubKey, true));
BOOST_CHECK_EQUAL(derSig + "80 " + pubKey, ScriptToAsmStr(CScript() << ToByteVector(ParseHex(derSig + "80")) << vchPubKey, true));
diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp
index 6b6689c7d3..1d5893bdc3 100644
--- a/src/test/scriptnum_tests.cpp
+++ b/src/test/scriptnum_tests.cpp
@@ -12,8 +12,10 @@
BOOST_FIXTURE_TEST_SUITE(scriptnum_tests, BasicTestingSetup)
-static const int64_t values[] = \
-{ 0, 1, CHAR_MIN, CHAR_MAX, UCHAR_MAX, SHRT_MIN, USHRT_MAX, INT_MIN, INT_MAX, UINT_MAX, LONG_MIN, LONG_MAX };
+/** A selection of numbers that do not trigger int64_t overflow
+ * when added/subtracted. */
+static const int64_t values[] = { 0, 1, -2, 127, 128, -255, 256, (1LL << 15) - 1, -(1LL << 16), (1LL << 24) - 1, (1LL << 31), 1 - (1LL << 32), 1LL << 40 };
+
static const int64_t offsets[] = { 1, 0x79, 0x80, 0x81, 0xFF, 0x7FFF, 0x8000, 0xFFFF, 0x10000};
static bool verify(const CScriptNum10& bignum, const CScriptNum& scriptnum)
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index bec2c7459d..2d54668eaf 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -11,10 +11,52 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(serialize_tests, BasicTestingSetup)
+class CSerializeMethodsTestSingle
+{
+protected:
+ int intval;
+ bool boolval;
+ std::string stringval;
+ const char* charstrval;
+ CTransactionRef txval;
+public:
+ CSerializeMethodsTestSingle() = default;
+ CSerializeMethodsTestSingle(int intvalin, bool boolvalin, std::string stringvalin, const char* charstrvalin, CTransaction txvalin) : intval(intvalin), boolval(boolvalin), stringval(std::move(stringvalin)), charstrval(charstrvalin), txval(MakeTransactionRef(txvalin)){}
+ ADD_SERIALIZE_METHODS;
+
+ template <typename Stream, typename Operation>
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ READWRITE(intval);
+ READWRITE(boolval);
+ READWRITE(stringval);
+ READWRITE(FLATDATA(charstrval));
+ READWRITE(txval);
+ }
+
+ bool operator==(const CSerializeMethodsTestSingle& rhs)
+ {
+ return intval == rhs.intval && \
+ boolval == rhs.boolval && \
+ stringval == rhs.stringval && \
+ strcmp(charstrval, rhs.charstrval) == 0 && \
+ *txval == *rhs.txval;
+ }
+};
+
+class CSerializeMethodsTestMany : public CSerializeMethodsTestSingle
+{
+public:
+ using CSerializeMethodsTestSingle::CSerializeMethodsTestSingle;
+ ADD_SERIALIZE_METHODS;
+
+ template <typename Stream, typename Operation>
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ READWRITEMANY(intval, boolval, stringval, FLATDATA(charstrval), txval);
+ }
+};
+
BOOST_AUTO_TEST_CASE(sizes)
{
BOOST_CHECK_EQUAL(sizeof(char), GetSerializeSize(char(0), 0));
@@ -184,7 +226,7 @@ BOOST_AUTO_TEST_CASE(varints_bitpatterns)
BOOST_AUTO_TEST_CASE(compactsize)
{
CDataStream ss(SER_DISK, 0);
- vector<char>::size_type i, j;
+ std::vector<char>::size_type i, j;
for (i = 1; i <= MAX_SIZE; i *= 2)
{
@@ -217,7 +259,7 @@ BOOST_AUTO_TEST_CASE(noncanonical)
// Write some non-canonical CompactSize encodings, and
// make sure an exception is thrown when read back.
CDataStream ss(SER_DISK, 0);
- vector<char>::size_type n;
+ std::vector<char>::size_type n;
// zero encoded with three bytes:
ss.write("\xfd\x00\x00", 3);
@@ -297,4 +339,30 @@ BOOST_AUTO_TEST_CASE(insert_delete)
BOOST_CHECK_EQUAL(ss.size(), 0);
}
+BOOST_AUTO_TEST_CASE(class_methods)
+{
+ int intval(100);
+ bool boolval(true);
+ std::string stringval("testing");
+ const char* charstrval("testing charstr");
+ CMutableTransaction txval;
+ CSerializeMethodsTestSingle methodtest1(intval, boolval, stringval, charstrval, txval);
+ CSerializeMethodsTestMany methodtest2(intval, boolval, stringval, charstrval, txval);
+ CSerializeMethodsTestSingle methodtest3;
+ CSerializeMethodsTestMany methodtest4;
+ CDataStream ss(SER_DISK, PROTOCOL_VERSION);
+ BOOST_CHECK(methodtest1 == methodtest2);
+ ss << methodtest1;
+ ss >> methodtest4;
+ ss << methodtest2;
+ ss >> methodtest3;
+ BOOST_CHECK(methodtest1 == methodtest2);
+ BOOST_CHECK(methodtest2 == methodtest3);
+ BOOST_CHECK(methodtest3 == methodtest4);
+
+ CDataStream ss2(SER_DISK, PROTOCOL_VERSION, intval, boolval, stringval, FLATDATA(charstrval), txval);
+ ss2 >> methodtest3;
+ BOOST_CHECK(methodtest3 == methodtest4);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index 0b1050d020..5279cb243b 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -1,17 +1,17 @@
-// Copyright (c) 2013-2015 The Bitcoin Core developers
+// Copyright (c) 2013-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "consensus/validation.h"
#include "data/sighash.json.h"
#include "hash.h"
-#include "main.h" // For CheckTransaction
-#include "test_random.h"
+#include "validation.h" // For CheckTransaction
#include "script/interpreter.h"
#include "script/script.h"
#include "serialize.h"
#include "streams.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include "util.h"
#include "utilstrencodings.h"
#include "version.h"
@@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
std::string raw_tx, raw_script, sigHashHex;
int nIn, nHashType;
uint256 sh;
- CTransaction tx;
+ CTransactionRef tx;
CScript scriptCode = CScript();
try {
@@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
stream >> tx;
CValidationState state;
- BOOST_CHECK_MESSAGE(CheckTransaction(tx, state), strTest);
+ BOOST_CHECK_MESSAGE(CheckTransaction(*tx, state), strTest);
BOOST_CHECK(state.IsValid());
std::vector<unsigned char> raw = ParseHex(raw_script);
@@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(sighash_from_data)
continue;
}
- sh = SignatureHash(scriptCode, tx, nIn, nHashType, 0, SIGVERSION_BASE);
+ sh = SignatureHash(scriptCode, *tx, nIn, nHashType, 0, SIGVERSION_BASE);
BOOST_CHECK_MESSAGE(sh.GetHex() == sigHashHex, strTest);
}
}
diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp
index e8a63ae60c..13d8911f03 100644
--- a/src/test/sigopcount_tests.cpp
+++ b/src/test/sigopcount_tests.cpp
@@ -1,8 +1,8 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "main.h"
+#include "validation.h"
#include "pubkey.h"
#include "key.h"
#include "script/script.h"
@@ -15,8 +15,6 @@
#include <boost/foreach.hpp>
#include <boost/test/unit_test.hpp>
-using namespace std;
-
// Helpers:
static std::vector<unsigned char>
Serialize(const CScript& s)
@@ -73,7 +71,7 @@ ScriptError VerifyWithFlag(const CTransaction& output, const CMutableTransaction
{
ScriptError error;
CTransaction inputi(input);
- bool ret = VerifyScript(inputi.vin[0].scriptSig, output.vout[0].scriptPubKey, inputi.wit.vtxinwit.size() > 0 ? &inputi.wit.vtxinwit[0].scriptWitness : NULL, flags, TransactionSignatureChecker(&inputi, 0, output.vout[0].nValue), &error);
+ bool ret = VerifyScript(inputi.vin[0].scriptSig, output.vout[0].scriptPubKey, &inputi.vin[0].scriptWitness, flags, TransactionSignatureChecker(&inputi, 0, output.vout[0].nValue), &error);
BOOST_CHECK((ret == true) == (error == SCRIPT_ERR_OK));
return error;
@@ -84,13 +82,12 @@ ScriptError VerifyWithFlag(const CTransaction& output, const CMutableTransaction
* and witness such that spendingTx spends output zero of creationTx.
* Also inserts creationTx's output into the coins view.
*/
-void BuildTxs(CMutableTransaction& spendingTx, CCoinsViewCache& coins, CMutableTransaction& creationTx, const CScript& scriptPubKey, const CScript& scriptSig, const CTxInWitness& witness)
+void BuildTxs(CMutableTransaction& spendingTx, CCoinsViewCache& coins, CMutableTransaction& creationTx, const CScript& scriptPubKey, const CScript& scriptSig, const CScriptWitness& witness)
{
creationTx.nVersion = 1;
creationTx.vin.resize(1);
creationTx.vin[0].prevout.SetNull();
creationTx.vin[0].scriptSig = CScript();
- creationTx.wit.vtxinwit.resize(1);
creationTx.vout.resize(1);
creationTx.vout[0].nValue = 1;
creationTx.vout[0].scriptPubKey = scriptPubKey;
@@ -100,8 +97,7 @@ void BuildTxs(CMutableTransaction& spendingTx, CCoinsViewCache& coins, CMutableT
spendingTx.vin[0].prevout.hash = creationTx.GetHash();
spendingTx.vin[0].prevout.n = 0;
spendingTx.vin[0].scriptSig = scriptSig;
- spendingTx.wit.vtxinwit.resize(1);
- spendingTx.wit.vtxinwit[0] = witness;
+ spendingTx.vin[0].scriptWitness = witness;
spendingTx.vout.resize(1);
spendingTx.vout[0].nValue = 1;
spendingTx.vout[0].scriptPubKey = CScript();
@@ -133,7 +129,7 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
// Do not use a valid signature to avoid using wallet operations.
CScript scriptSig = CScript() << OP_0 << OP_0;
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, CTxInWitness());
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, CScriptWitness());
// Legacy counting only includes signature operations in scriptSigs and scriptPubKeys
// of a transaction and does not take the actual executed sig operations into account.
// spendingTx in itself does not contain a signature operation.
@@ -151,7 +147,7 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
CScript scriptPubKey = GetScriptForDestination(CScriptID(redeemScript));
CScript scriptSig = CScript() << OP_0 << OP_0 << ToByteVector(redeemScript);
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, CTxInWitness());
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, CScriptWitness());
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 2 * WITNESS_SCALE_FACTOR);
assert(VerifyWithFlag(creationTx, spendingTx, flags) == SCRIPT_ERR_CHECKMULTISIGVERIFY);
}
@@ -161,14 +157,12 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
CScript p2pk = CScript() << ToByteVector(pubkey) << OP_CHECKSIG;
CScript scriptPubKey = GetScriptForWitness(p2pk);
CScript scriptSig = CScript();
- CTxInWitness witness;
CScriptWitness scriptWitness;
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- witness.scriptWitness = scriptWitness;
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 1);
// No signature operations if we don't verify the witness.
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags & ~SCRIPT_VERIFY_WITNESS) == 0);
@@ -177,10 +171,10 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
// The sig op cost for witness version != 0 is zero.
assert(scriptPubKey[0] == 0x00);
scriptPubKey[0] = 0x51;
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 0);
scriptPubKey[0] = 0x00;
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
// The witness of a coinbase transaction is not taken into account.
spendingTx.vin[0].prevout.SetNull();
@@ -193,13 +187,11 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
CScript scriptSig = GetScriptForWitness(p2pk);
CScript scriptPubKey = GetScriptForDestination(CScriptID(scriptSig));
scriptSig = CScript() << ToByteVector(scriptSig);
- CTxInWitness witness;
CScriptWitness scriptWitness;
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- witness.scriptWitness = scriptWitness;
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 1);
assert(VerifyWithFlag(creationTx, spendingTx, flags) == SCRIPT_ERR_EQUALVERIFY);
}
@@ -209,14 +201,12 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
CScript witnessScript = CScript() << 1 << ToByteVector(pubkey) << ToByteVector(pubkey) << 2 << OP_CHECKMULTISIGVERIFY;
CScript scriptPubKey = GetScriptForWitness(witnessScript);
CScript scriptSig = CScript();
- CTxInWitness witness;
CScriptWitness scriptWitness;
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(witnessScript.begin(), witnessScript.end()));
- witness.scriptWitness = scriptWitness;
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(witnessScript.begin(), witnessScript.end()));
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 2);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags & ~SCRIPT_VERIFY_WITNESS) == 0);
assert(VerifyWithFlag(creationTx, spendingTx, flags) == SCRIPT_ERR_CHECKMULTISIGVERIFY);
@@ -228,14 +218,12 @@ BOOST_AUTO_TEST_CASE(GetTxSigOpCost)
CScript redeemScript = GetScriptForWitness(witnessScript);
CScript scriptPubKey = GetScriptForDestination(CScriptID(redeemScript));
CScript scriptSig = CScript() << ToByteVector(redeemScript);
- CTxInWitness witness;
CScriptWitness scriptWitness;
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(0));
- scriptWitness.stack.push_back(vector<unsigned char>(witnessScript.begin(), witnessScript.end()));
- witness.scriptWitness = scriptWitness;
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(0));
+ scriptWitness.stack.push_back(std::vector<unsigned char>(witnessScript.begin(), witnessScript.end()));
- BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, witness);
+ BuildTxs(spendingTx, coins, creationTx, scriptPubKey, scriptSig, scriptWitness);
assert(GetTransactionSigOpCost(CTransaction(spendingTx), coins, flags) == 2);
assert(VerifyWithFlag(creationTx, spendingTx, flags) == SCRIPT_ERR_CHECKMULTISIGVERIFY);
}
diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp
index b19f8fbffb..0b2fe0ef9d 100644
--- a/src/test/skiplist_tests.cpp
+++ b/src/test/skiplist_tests.cpp
@@ -1,11 +1,11 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
-#include "test_random.h"
#include "util.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include <vector>
@@ -100,4 +100,47 @@ BOOST_AUTO_TEST_CASE(getlocator_test)
}
}
+BOOST_AUTO_TEST_CASE(findearliestatleast_test)
+{
+ std::vector<uint256> vHashMain(100000);
+ std::vector<CBlockIndex> vBlocksMain(100000);
+ for (unsigned int i=0; i<vBlocksMain.size(); i++) {
+ vHashMain[i] = ArithToUint256(i); // Set the hash equal to the height
+ vBlocksMain[i].nHeight = i;
+ vBlocksMain[i].pprev = i ? &vBlocksMain[i - 1] : NULL;
+ vBlocksMain[i].phashBlock = &vHashMain[i];
+ vBlocksMain[i].BuildSkip();
+ if (i < 10) {
+ vBlocksMain[i].nTime = i;
+ vBlocksMain[i].nTimeMax = i;
+ } else {
+ // randomly choose something in the range [MTP, MTP*2]
+ int64_t medianTimePast = vBlocksMain[i].GetMedianTimePast();
+ int r = insecure_rand() % medianTimePast;
+ vBlocksMain[i].nTime = r + medianTimePast;
+ vBlocksMain[i].nTimeMax = std::max(vBlocksMain[i].nTime, vBlocksMain[i-1].nTimeMax);
+ }
+ }
+ // Check that we set nTimeMax up correctly.
+ unsigned int curTimeMax = 0;
+ for (unsigned int i=0; i<vBlocksMain.size(); ++i) {
+ curTimeMax = std::max(curTimeMax, vBlocksMain[i].nTime);
+ BOOST_CHECK(curTimeMax == vBlocksMain[i].nTimeMax);
+ }
+
+ // Build a CChain for the main branch.
+ CChain chain;
+ chain.SetTip(&vBlocksMain.back());
+
+ // Verify that FindEarliestAtLeast is correct.
+ for (unsigned int i=0; i<10000; ++i) {
+ // Pick a random element in vBlocksMain.
+ int r = insecure_rand() % vBlocksMain.size();
+ int64_t test_time = vBlocksMain[r].nTime;
+ CBlockIndex *ret = chain.FindEarliestAtLeast(test_time);
+ BOOST_CHECK(ret->nTimeMax >= test_time);
+ BOOST_CHECK((ret->pprev==NULL) || ret->pprev->nTimeMax < test_time);
+ BOOST_CHECK(vBlocksMain[r].GetAncestor(ret->nHeight) == ret);
+ }
+}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/streams_tests.cpp b/src/test/streams_tests.cpp
index 34f501e867..94b5cc119b 100644
--- a/src/test/streams_tests.cpp
+++ b/src/test/streams_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,12 +9,69 @@
#include <boost/assign/std/vector.hpp> // for 'operator+=()'
#include <boost/assert.hpp>
#include <boost/test/unit_test.hpp>
-
-using namespace std;
+
using namespace boost::assign; // bring 'operator+=()' into scope
BOOST_FIXTURE_TEST_SUITE(streams_tests, BasicTestingSetup)
+BOOST_AUTO_TEST_CASE(streams_vector_writer)
+{
+ unsigned char a(1);
+ unsigned char b(2);
+ unsigned char bytes[] = { 3, 4, 5, 6 };
+ std::vector<unsigned char> vch;
+
+ // Each test runs twice. Serializing a second time at the same starting
+ // point should yield the same results, even if the first test grew the
+ // vector.
+
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{1, 2}}));
+ vch.clear();
+
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2}}));
+ vch.clear();
+
+ vch.resize(5, 0);
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 1, 2, 0}}));
+ vch.clear();
+
+ vch.resize(4, 0);
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 3, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 3, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 1, 2}}));
+ vch.clear();
+
+ vch.resize(4, 0);
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 4, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 4, a, b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{0, 0, 0, 0, 1, 2}}));
+ vch.clear();
+
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, FLATDATA(bytes));
+ BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 0, FLATDATA(bytes));
+ BOOST_CHECK((vch == std::vector<unsigned char>{{3, 4, 5, 6}}));
+ vch.clear();
+
+ vch.resize(4, 8);
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, FLATDATA(bytes), b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));
+ CVectorWriter(SER_NETWORK, INIT_PROTO_VERSION, vch, 2, a, FLATDATA(bytes), b);
+ BOOST_CHECK((vch == std::vector<unsigned char>{{8, 8, 1, 3, 4, 5, 6, 2}}));
+ vch.clear();
+}
+
BOOST_AUTO_TEST_CASE(streams_serializedata_xor)
{
std::vector<char> in;
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 98f4ed939f..f0eaab2217 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -10,8 +10,9 @@
#include "consensus/consensus.h"
#include "consensus/validation.h"
#include "key.h"
-#include "main.h"
+#include "validation.h"
#include "miner.h"
+#include "net_processing.h"
#include "pubkey.h"
#include "random.h"
#include "txdb.h"
@@ -19,6 +20,7 @@
#include "ui_interface.h"
#include "rpc/server.h"
#include "rpc/register.h"
+#include "script/sigcache.h"
#include "test/testutil.h"
@@ -39,6 +41,7 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName)
ECC_Start();
SetupEnvironment();
SetupNetworking();
+ InitSignatureCache();
fPrintToDebugLog = false; // don't want to write to debug.log file
fCheckBlockIndex = true;
SelectParams(chainName);
@@ -61,7 +64,7 @@ TestingSetup::TestingSetup(const std::string& chainName) : BasicTestingSetup(cha
ClearDatadirCache();
pathTemp = GetTempPath() / strprintf("test_bitcoin_%lu_%i", (unsigned long)GetTime(), (int)(GetRand(100000)));
boost::filesystem::create_directories(pathTemp);
- mapArgs["-datadir"] = pathTemp.string();
+ ForceSetArg("-datadir", pathTemp.string());
mempool.setSanityCheck(1.0);
pblocktree = new CBlockTreeDB(1 << 20, true);
pcoinsdbview = new CCoinsViewDB(1 << 23, true);
@@ -101,7 +104,7 @@ TestChain100Setup::TestChain100Setup() : TestingSetup(CBaseChainParams::REGTEST)
{
std::vector<CMutableTransaction> noTxns;
CBlock b = CreateAndProcessBlock(noTxns, scriptPubKey);
- coinbaseTxns.push_back(b.vtx[0]);
+ coinbaseTxns.push_back(*b.vtx[0]);
}
}
@@ -119,15 +122,15 @@ TestChain100Setup::CreateAndProcessBlock(const std::vector<CMutableTransaction>&
// Replace mempool-selected txns with just coinbase plus passed-in txns:
block.vtx.resize(1);
BOOST_FOREACH(const CMutableTransaction& tx, txns)
- block.vtx.push_back(tx);
+ block.vtx.push_back(MakeTransactionRef(tx));
// IncrementExtraNonce creates a valid coinbase and merkleRoot
unsigned int extraNonce = 0;
IncrementExtraNonce(&block, chainActive.Tip(), extraNonce);
while (!CheckProofOfWork(block.GetHash(), block.nBits, chainparams.GetConsensus())) ++block.nNonce;
- CValidationState state;
- ProcessNewBlock(state, chainparams, NULL, &block, true, NULL);
+ std::shared_ptr<const CBlock> shared_pblock = std::make_shared<const CBlock>(block);
+ ProcessNewBlock(chainparams, shared_pblock, true, NULL);
CBlock result = block;
return result;
@@ -138,18 +141,17 @@ TestChain100Setup::~TestChain100Setup()
}
-CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPool *pool) {
+CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CMutableTransaction &tx, CTxMemPool *pool) {
CTransaction txn(tx);
return FromTx(txn, pool);
}
-CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CTransaction &txn, CTxMemPool *pool) {
- bool hasNoDependencies = pool ? pool->HasNoInputsOf(txn) : hadNoDependencies;
+CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPool *pool) {
// Hack to assume either its completely dependent on other mempool txs or not at all
- CAmount inChainValue = hasNoDependencies ? txn.GetValueOut() : 0;
+ CAmount inChainValue = pool && pool->HasNoInputsOf(txn) ? txn.GetValueOut() : 0;
- return CTxMemPoolEntry(txn, nFee, nTime, dPriority, nHeight,
- hasNoDependencies, inChainValue, spendsCoinbase, sigOpCost, lp);
+ return CTxMemPoolEntry(MakeTransactionRef(txn), nFee, nTime, dPriority, nHeight,
+ inChainValue, spendsCoinbase, sigOpCost, lp);
}
void Shutdown(void* parg)
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index 9819a7097d..5ef6fa764f 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -70,24 +70,22 @@ struct TestMemPoolEntryHelper
int64_t nTime;
double dPriority;
unsigned int nHeight;
- bool hadNoDependencies;
bool spendsCoinbase;
unsigned int sigOpCost;
LockPoints lp;
TestMemPoolEntryHelper() :
nFee(0), nTime(0), dPriority(0.0), nHeight(1),
- hadNoDependencies(false), spendsCoinbase(false), sigOpCost(4) { }
+ spendsCoinbase(false), sigOpCost(4) { }
- CTxMemPoolEntry FromTx(CMutableTransaction &tx, CTxMemPool *pool = NULL);
- CTxMemPoolEntry FromTx(CTransaction &tx, CTxMemPool *pool = NULL);
+ CTxMemPoolEntry FromTx(const CMutableTransaction &tx, CTxMemPool *pool = NULL);
+ CTxMemPoolEntry FromTx(const CTransaction &tx, CTxMemPool *pool = NULL);
// Change the default value
TestMemPoolEntryHelper &Fee(CAmount _fee) { nFee = _fee; return *this; }
TestMemPoolEntryHelper &Time(int64_t _time) { nTime = _time; return *this; }
TestMemPoolEntryHelper &Priority(double _priority) { dPriority = _priority; return *this; }
TestMemPoolEntryHelper &Height(unsigned int _height) { nHeight = _height; return *this; }
- TestMemPoolEntryHelper &HadNoDependencies(bool _hnd) { hadNoDependencies = _hnd; return *this; }
TestMemPoolEntryHelper &SpendsCoinbase(bool _flag) { spendsCoinbase = _flag; return *this; }
TestMemPoolEntryHelper &SigOpsCost(unsigned int _sigopsCost) { sigOpCost = _sigopsCost; return *this; }
};
diff --git a/src/test/test_bitcoin_fuzzy.cpp b/src/test/test_bitcoin_fuzzy.cpp
new file mode 100644
index 0000000000..376d8e428a
--- /dev/null
+++ b/src/test/test_bitcoin_fuzzy.cpp
@@ -0,0 +1,256 @@
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
+#include "config/bitcoin-config.h"
+#endif
+
+#include "consensus/merkle.h"
+#include "primitives/block.h"
+#include "script/script.h"
+#include "addrman.h"
+#include "chain.h"
+#include "coins.h"
+#include "compressor.h"
+#include "net.h"
+#include "protocol.h"
+#include "streams.h"
+#include "undo.h"
+#include "version.h"
+
+#include <stdint.h>
+#include <unistd.h>
+
+#include <algorithm>
+#include <vector>
+
+enum TEST_ID {
+ CBLOCK_DESERIALIZE=0,
+ CTRANSACTION_DESERIALIZE,
+ CBLOCKLOCATOR_DESERIALIZE,
+ CBLOCKMERKLEROOT,
+ CADDRMAN_DESERIALIZE,
+ CBLOCKHEADER_DESERIALIZE,
+ CBANENTRY_DESERIALIZE,
+ CTXUNDO_DESERIALIZE,
+ CBLOCKUNDO_DESERIALIZE,
+ CCOINS_DESERIALIZE,
+ CNETADDR_DESERIALIZE,
+ CSERVICE_DESERIALIZE,
+ CMESSAGEHEADER_DESERIALIZE,
+ CADDRESS_DESERIALIZE,
+ CINV_DESERIALIZE,
+ CBLOOMFILTER_DESERIALIZE,
+ CDISKBLOCKINDEX_DESERIALIZE,
+ CTXOUTCOMPRESSOR_DESERIALIZE,
+ TEST_ID_END
+};
+
+bool read_stdin(std::vector<char> &data) {
+ char buffer[1024];
+ ssize_t length=0;
+ while((length = read(STDIN_FILENO, buffer, 1024)) > 0) {
+ data.insert(data.end(), buffer, buffer+length);
+
+ if (data.size() > (1<<20)) return false;
+ }
+ return length==0;
+}
+
+int main(int argc, char **argv)
+{
+ std::vector<char> buffer;
+ if (!read_stdin(buffer)) return 0;
+
+ if (buffer.size() < sizeof(uint32_t)) return 0;
+
+ uint32_t test_id = 0xffffffff;
+ memcpy(&test_id, &buffer[0], sizeof(uint32_t));
+ buffer.erase(buffer.begin(), buffer.begin() + sizeof(uint32_t));
+
+ if (test_id >= TEST_ID_END) return 0;
+
+ CDataStream ds(buffer, SER_NETWORK, INIT_PROTO_VERSION);
+ try {
+ int nVersion;
+ ds >> nVersion;
+ ds.SetVersion(nVersion);
+ } catch (const std::ios_base::failure& e) {
+ return 0;
+ }
+
+ switch(test_id) {
+ case CBLOCK_DESERIALIZE:
+ {
+ try
+ {
+ CBlock block;
+ ds >> block;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CTRANSACTION_DESERIALIZE:
+ {
+ try
+ {
+ CTransaction tx(deserialize, ds);
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBLOCKLOCATOR_DESERIALIZE:
+ {
+ try
+ {
+ CBlockLocator bl;
+ ds >> bl;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBLOCKMERKLEROOT:
+ {
+ try
+ {
+ CBlock block;
+ ds >> block;
+ bool mutated;
+ BlockMerkleRoot(block, &mutated);
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CADDRMAN_DESERIALIZE:
+ {
+ try
+ {
+ CAddrMan am;
+ ds >> am;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBLOCKHEADER_DESERIALIZE:
+ {
+ try
+ {
+ CBlockHeader bh;
+ ds >> bh;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBANENTRY_DESERIALIZE:
+ {
+ try
+ {
+ CBanEntry be;
+ ds >> be;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CTXUNDO_DESERIALIZE:
+ {
+ try
+ {
+ CTxUndo tu;
+ ds >> tu;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBLOCKUNDO_DESERIALIZE:
+ {
+ try
+ {
+ CBlockUndo bu;
+ ds >> bu;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CCOINS_DESERIALIZE:
+ {
+ try
+ {
+ CCoins block;
+ ds >> block;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CNETADDR_DESERIALIZE:
+ {
+ try
+ {
+ CNetAddr na;
+ ds >> na;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CSERVICE_DESERIALIZE:
+ {
+ try
+ {
+ CService s;
+ ds >> s;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CMESSAGEHEADER_DESERIALIZE:
+ {
+ CMessageHeader::MessageStartChars pchMessageStart = {0x00, 0x00, 0x00, 0x00};
+ try
+ {
+ CMessageHeader mh(pchMessageStart);
+ ds >> mh;
+ if (!mh.IsValid(pchMessageStart)) {return 0;}
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CADDRESS_DESERIALIZE:
+ {
+ try
+ {
+ CAddress a;
+ ds >> a;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CINV_DESERIALIZE:
+ {
+ try
+ {
+ CInv i;
+ ds >> i;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CBLOOMFILTER_DESERIALIZE:
+ {
+ try
+ {
+ CBloomFilter bf;
+ ds >> bf;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CDISKBLOCKINDEX_DESERIALIZE:
+ {
+ try
+ {
+ CDiskBlockIndex dbi;
+ ds >> dbi;
+ } catch (const std::ios_base::failure& e) {return 0;}
+ break;
+ }
+ case CTXOUTCOMPRESSOR_DESERIALIZE:
+ {
+ CTxOut to;
+ CTxOutCompressor toc(to);
+ try
+ {
+ ds >> toc;
+ } catch (const std::ios_base::failure& e) {return 0;}
+
+ break;
+ }
+ default:
+ return 0;
+ }
+ return 0;
+}
+
diff --git a/src/test/test_random.h b/src/test/test_random.h
index e61b92b7bc..4a1637ac72 100644
--- a/src/test/test_random.h
+++ b/src/test/test_random.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/test/timedata_tests.cpp b/src/test/timedata_tests.cpp
index 1224ff8454..34863fd9d0 100644
--- a/src/test/timedata_tests.cpp
+++ b/src/test/timedata_tests.cpp
@@ -7,8 +7,6 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(timedata_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(util_MedianFilter)
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 34d9547f3d..374423179c 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -12,7 +12,7 @@
#include "core_io.h"
#include "key.h"
#include "keystore.h"
-#include "main.h" // For CheckTransaction
+#include "validation.h" // For CheckTransaction
#include "policy/policy.h"
#include "script/script.h"
#include "script/sign.h"
@@ -32,42 +32,40 @@
#include <univalue.h>
-using namespace std;
-
-typedef vector<unsigned char> valtype;
+typedef std::vector<unsigned char> valtype;
// In script_tests.cpp
extern UniValue read_json(const std::string& jsondata);
-static std::map<string, unsigned int> mapFlagNames = boost::assign::map_list_of
- (string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE)
- (string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH)
- (string("STRICTENC"), (unsigned int)SCRIPT_VERIFY_STRICTENC)
- (string("DERSIG"), (unsigned int)SCRIPT_VERIFY_DERSIG)
- (string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
- (string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY)
- (string("MINIMALDATA"), (unsigned int)SCRIPT_VERIFY_MINIMALDATA)
- (string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY)
- (string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)
- (string("CLEANSTACK"), (unsigned int)SCRIPT_VERIFY_CLEANSTACK)
- (string("MINIMALIF"), (unsigned int)SCRIPT_VERIFY_MINIMALIF)
- (string("NULLFAIL"), (unsigned int)SCRIPT_VERIFY_NULLFAIL)
- (string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)
- (string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)
- (string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS)
- (string("DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM)
- (string("WITNESS_PUBKEYTYPE"), (unsigned int)SCRIPT_VERIFY_WITNESS_PUBKEYTYPE);
-
-unsigned int ParseScriptFlags(string strFlags)
+static std::map<std::string, unsigned int> mapFlagNames = boost::assign::map_list_of
+ (std::string("NONE"), (unsigned int)SCRIPT_VERIFY_NONE)
+ (std::string("P2SH"), (unsigned int)SCRIPT_VERIFY_P2SH)
+ (std::string("STRICTENC"), (unsigned int)SCRIPT_VERIFY_STRICTENC)
+ (std::string("DERSIG"), (unsigned int)SCRIPT_VERIFY_DERSIG)
+ (std::string("LOW_S"), (unsigned int)SCRIPT_VERIFY_LOW_S)
+ (std::string("SIGPUSHONLY"), (unsigned int)SCRIPT_VERIFY_SIGPUSHONLY)
+ (std::string("MINIMALDATA"), (unsigned int)SCRIPT_VERIFY_MINIMALDATA)
+ (std::string("NULLDUMMY"), (unsigned int)SCRIPT_VERIFY_NULLDUMMY)
+ (std::string("DISCOURAGE_UPGRADABLE_NOPS"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS)
+ (std::string("CLEANSTACK"), (unsigned int)SCRIPT_VERIFY_CLEANSTACK)
+ (std::string("MINIMALIF"), (unsigned int)SCRIPT_VERIFY_MINIMALIF)
+ (std::string("NULLFAIL"), (unsigned int)SCRIPT_VERIFY_NULLFAIL)
+ (std::string("CHECKLOCKTIMEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY)
+ (std::string("CHECKSEQUENCEVERIFY"), (unsigned int)SCRIPT_VERIFY_CHECKSEQUENCEVERIFY)
+ (std::string("WITNESS"), (unsigned int)SCRIPT_VERIFY_WITNESS)
+ (std::string("DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM"), (unsigned int)SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_WITNESS_PROGRAM)
+ (std::string("WITNESS_PUBKEYTYPE"), (unsigned int)SCRIPT_VERIFY_WITNESS_PUBKEYTYPE);
+
+unsigned int ParseScriptFlags(std::string strFlags)
{
if (strFlags.empty()) {
return 0;
}
unsigned int flags = 0;
- vector<string> words;
+ std::vector<std::string> words;
boost::algorithm::split(words, strFlags, boost::algorithm::is_any_of(","));
- BOOST_FOREACH(string word, words)
+ BOOST_FOREACH(std::string word, words)
{
if (!mapFlagNames.count(word))
BOOST_ERROR("Bad test: unknown verification flag '" << word << "'");
@@ -77,13 +75,13 @@ unsigned int ParseScriptFlags(string strFlags)
return flags;
}
-string FormatScriptFlags(unsigned int flags)
+std::string FormatScriptFlags(unsigned int flags)
{
if (flags == 0) {
return "";
}
- string ret;
- std::map<string, unsigned int>::const_iterator it = mapFlagNames.begin();
+ std::string ret;
+ std::map<std::string, unsigned int>::const_iterator it = mapFlagNames.begin();
while (it != mapFlagNames.end()) {
if (flags & it->second) {
ret += it->first + ",";
@@ -109,7 +107,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
ScriptError err;
for (unsigned int idx = 0; idx < tests.size(); idx++) {
UniValue test = tests[idx];
- string strTest = test.write();
+ std::string strTest = test.write();
if (test[0].isArray())
{
if (test.size() != 3 || !test[1].isStr() || !test[2].isStr())
@@ -118,8 +116,8 @@ BOOST_AUTO_TEST_CASE(tx_valid)
continue;
}
- map<COutPoint, CScript> mapprevOutScriptPubKeys;
- map<COutPoint, int64_t> mapprevOutValues;
+ std::map<COutPoint, CScript> mapprevOutScriptPubKeys;
+ std::map<COutPoint, int64_t> mapprevOutValues;
UniValue inputs = test[0].get_array();
bool fValid = true;
for (unsigned int inpIdx = 0; inpIdx < inputs.size(); inpIdx++) {
@@ -148,10 +146,9 @@ BOOST_AUTO_TEST_CASE(tx_valid)
continue;
}
- string transaction = test[1].get_str();
+ std::string transaction = test[1].get_str();
CDataStream stream(ParseHex(transaction), SER_NETWORK, PROTOCOL_VERSION);
- CTransaction tx;
- stream >> tx;
+ CTransaction tx(deserialize, stream);
CValidationState state;
BOOST_CHECK_MESSAGE(CheckTransaction(tx, state), strTest);
@@ -171,7 +168,7 @@ BOOST_AUTO_TEST_CASE(tx_valid)
amount = mapprevOutValues[tx.vin[i].prevout];
}
unsigned int verify_flags = ParseScriptFlags(test[2].get_str());
- const CScriptWitness *witness = (i < tx.wit.vtxinwit.size()) ? &tx.wit.vtxinwit[i].scriptWitness : NULL;
+ const CScriptWitness *witness = &tx.vin[i].scriptWitness;
BOOST_CHECK_MESSAGE(VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
witness, verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err),
strTest);
@@ -195,7 +192,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
ScriptError err;
for (unsigned int idx = 0; idx < tests.size(); idx++) {
UniValue test = tests[idx];
- string strTest = test.write();
+ std::string strTest = test.write();
if (test[0].isArray())
{
if (test.size() != 3 || !test[1].isStr() || !test[2].isStr())
@@ -204,8 +201,8 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
continue;
}
- map<COutPoint, CScript> mapprevOutScriptPubKeys;
- map<COutPoint, int64_t> mapprevOutValues;
+ std::map<COutPoint, CScript> mapprevOutScriptPubKeys;
+ std::map<COutPoint, int64_t> mapprevOutValues;
UniValue inputs = test[0].get_array();
bool fValid = true;
for (unsigned int inpIdx = 0; inpIdx < inputs.size(); inpIdx++) {
@@ -234,10 +231,9 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
continue;
}
- string transaction = test[1].get_str();
+ std::string transaction = test[1].get_str();
CDataStream stream(ParseHex(transaction), SER_NETWORK, PROTOCOL_VERSION );
- CTransaction tx;
- stream >> tx;
+ CTransaction tx(deserialize, stream);
CValidationState state;
fValid = CheckTransaction(tx, state) && state.IsValid();
@@ -256,7 +252,7 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
if (mapprevOutValues.count(tx.vin[i].prevout)) {
amount = mapprevOutValues[tx.vin[i].prevout];
}
- const CScriptWitness *witness = (i < tx.wit.vtxinwit.size()) ? &tx.wit.vtxinwit[i].scriptWitness : NULL;
+ const CScriptWitness *witness = &tx.vin[i].scriptWitness;
fValid = VerifyScript(tx.vin[i].scriptSig, mapprevOutScriptPubKeys[tx.vin[i].prevout],
witness, verify_flags, TransactionSignatureChecker(&tx, i, amount, txdata), &err);
}
@@ -270,7 +266,7 @@ BOOST_AUTO_TEST_CASE(basic_transaction_tests)
{
// Random real transaction (e2769b09e784f32f62ef849763d4f45b98e07ba658647343b915ff832b110436)
unsigned char ch[] = {0x01, 0x00, 0x00, 0x00, 0x01, 0x6b, 0xff, 0x7f, 0xcd, 0x4f, 0x85, 0x65, 0xef, 0x40, 0x6d, 0xd5, 0xd6, 0x3d, 0x4f, 0xf9, 0x4f, 0x31, 0x8f, 0xe8, 0x20, 0x27, 0xfd, 0x4d, 0xc4, 0x51, 0xb0, 0x44, 0x74, 0x01, 0x9f, 0x74, 0xb4, 0x00, 0x00, 0x00, 0x00, 0x8c, 0x49, 0x30, 0x46, 0x02, 0x21, 0x00, 0xda, 0x0d, 0xc6, 0xae, 0xce, 0xfe, 0x1e, 0x06, 0xef, 0xdf, 0x05, 0x77, 0x37, 0x57, 0xde, 0xb1, 0x68, 0x82, 0x09, 0x30, 0xe3, 0xb0, 0xd0, 0x3f, 0x46, 0xf5, 0xfc, 0xf1, 0x50, 0xbf, 0x99, 0x0c, 0x02, 0x21, 0x00, 0xd2, 0x5b, 0x5c, 0x87, 0x04, 0x00, 0x76, 0xe4, 0xf2, 0x53, 0xf8, 0x26, 0x2e, 0x76, 0x3e, 0x2d, 0xd5, 0x1e, 0x7f, 0xf0, 0xbe, 0x15, 0x77, 0x27, 0xc4, 0xbc, 0x42, 0x80, 0x7f, 0x17, 0xbd, 0x39, 0x01, 0x41, 0x04, 0xe6, 0xc2, 0x6e, 0xf6, 0x7d, 0xc6, 0x10, 0xd2, 0xcd, 0x19, 0x24, 0x84, 0x78, 0x9a, 0x6c, 0xf9, 0xae, 0xa9, 0x93, 0x0b, 0x94, 0x4b, 0x7e, 0x2d, 0xb5, 0x34, 0x2b, 0x9d, 0x9e, 0x5b, 0x9f, 0xf7, 0x9a, 0xff, 0x9a, 0x2e, 0xe1, 0x97, 0x8d, 0xd7, 0xfd, 0x01, 0xdf, 0xc5, 0x22, 0xee, 0x02, 0x28, 0x3d, 0x3b, 0x06, 0xa9, 0xd0, 0x3a, 0xcf, 0x80, 0x96, 0x96, 0x8d, 0x7d, 0xbb, 0x0f, 0x91, 0x78, 0xff, 0xff, 0xff, 0xff, 0x02, 0x8b, 0xa7, 0x94, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xba, 0xde, 0xec, 0xfd, 0xef, 0x05, 0x07, 0x24, 0x7f, 0xc8, 0xf7, 0x42, 0x41, 0xd7, 0x3b, 0xc0, 0x39, 0x97, 0x2d, 0x7b, 0x88, 0xac, 0x40, 0x94, 0xa8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x19, 0x76, 0xa9, 0x14, 0xc1, 0x09, 0x32, 0x48, 0x3f, 0xec, 0x93, 0xed, 0x51, 0xf5, 0xfe, 0x95, 0xe7, 0x25, 0x59, 0xf2, 0xcc, 0x70, 0x43, 0xf9, 0x88, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00};
- vector<unsigned char> vch(ch, ch + sizeof(ch) -1);
+ std::vector<unsigned char> vch(ch, ch + sizeof(ch) -1);
CDataStream stream(vch, SER_DISK, CLIENT_VERSION);
CMutableTransaction tx;
stream >> tx;
@@ -346,36 +342,33 @@ BOOST_AUTO_TEST_CASE(test_Get)
BOOST_CHECK_EQUAL(coins.GetValueIn(t1), (50+21+22)*CENT);
}
-void CreateCreditAndSpend(const CKeyStore& keystore, const CScript& outscript, CTransaction& output, CMutableTransaction& input, bool success = true)
+void CreateCreditAndSpend(const CKeyStore& keystore, const CScript& outscript, CTransactionRef& output, CMutableTransaction& input, bool success = true)
{
CMutableTransaction outputm;
outputm.nVersion = 1;
outputm.vin.resize(1);
outputm.vin[0].prevout.SetNull();
outputm.vin[0].scriptSig = CScript();
- outputm.wit.vtxinwit.resize(1);
outputm.vout.resize(1);
outputm.vout[0].nValue = 1;
outputm.vout[0].scriptPubKey = outscript;
CDataStream ssout(SER_NETWORK, PROTOCOL_VERSION);
ssout << outputm;
ssout >> output;
- assert(output.vin.size() == 1);
- assert(output.vin[0] == outputm.vin[0]);
- assert(output.vout.size() == 1);
- assert(output.vout[0] == outputm.vout[0]);
- assert(output.wit.vtxinwit.size() == 0);
+ assert(output->vin.size() == 1);
+ assert(output->vin[0] == outputm.vin[0]);
+ assert(output->vout.size() == 1);
+ assert(output->vout[0] == outputm.vout[0]);
CMutableTransaction inputm;
inputm.nVersion = 1;
inputm.vin.resize(1);
- inputm.vin[0].prevout.hash = output.GetHash();
+ inputm.vin[0].prevout.hash = output->GetHash();
inputm.vin[0].prevout.n = 0;
- inputm.wit.vtxinwit.resize(1);
inputm.vout.resize(1);
inputm.vout[0].nValue = 1;
inputm.vout[0].scriptPubKey = CScript();
- bool ret = SignSignature(keystore, output, inputm, 0, SIGHASH_ALL);
+ bool ret = SignSignature(keystore, *output, inputm, 0, SIGHASH_ALL);
assert(ret == success);
CDataStream ssin(SER_NETWORK, PROTOCOL_VERSION);
ssin << inputm;
@@ -384,24 +377,18 @@ void CreateCreditAndSpend(const CKeyStore& keystore, const CScript& outscript, C
assert(input.vin[0] == inputm.vin[0]);
assert(input.vout.size() == 1);
assert(input.vout[0] == inputm.vout[0]);
- if (inputm.wit.IsNull()) {
- assert(input.wit.IsNull());
- } else {
- assert(!input.wit.IsNull());
- assert(input.wit.vtxinwit.size() == 1);
- assert(input.wit.vtxinwit[0].scriptWitness.stack == inputm.wit.vtxinwit[0].scriptWitness.stack);
- }
+ assert(input.vin[0].scriptWitness.stack == inputm.vin[0].scriptWitness.stack);
}
-void CheckWithFlag(const CTransaction& output, const CMutableTransaction& input, int flags, bool success)
+void CheckWithFlag(const CTransactionRef& output, const CMutableTransaction& input, int flags, bool success)
{
ScriptError error;
CTransaction inputi(input);
- bool ret = VerifyScript(inputi.vin[0].scriptSig, output.vout[0].scriptPubKey, inputi.wit.vtxinwit.size() > 0 ? &inputi.wit.vtxinwit[0].scriptWitness : NULL, flags, TransactionSignatureChecker(&inputi, 0, output.vout[0].nValue), &error);
+ bool ret = VerifyScript(inputi.vin[0].scriptSig, output->vout[0].scriptPubKey, &inputi.vin[0].scriptWitness, flags, TransactionSignatureChecker(&inputi, 0, output->vout[0].nValue), &error);
assert(ret == success);
}
-static CScript PushAll(const vector<valtype>& values)
+static CScript PushAll(const std::vector<valtype>& values)
{
CScript result;
BOOST_FOREACH(const valtype& v, values) {
@@ -418,7 +405,7 @@ static CScript PushAll(const vector<valtype>& values)
void ReplaceRedeemScript(CScript& script, const CScript& redeemScript)
{
- vector<valtype> stack;
+ std::vector<valtype> stack;
EvalScript(stack, script, SCRIPT_VERIFY_STRICTENC, BaseSignatureChecker(), SIGVERSION_BASE);
assert(stack.size() > 0);
stack.back() = std::vector<unsigned char>(redeemScript.begin(), redeemScript.end());
@@ -436,7 +423,7 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) {
CKeyID hash = key.GetPubKey().GetID();
CScript scriptPubKey = CScript() << OP_0 << std::vector<unsigned char>(hash.begin(), hash.end());
- vector<int> sigHashes;
+ std::vector<int> sigHashes;
sigHashes.push_back(SIGHASH_NONE | SIGHASH_ANYONECANPAY);
sigHashes.push_back(SIGHASH_SINGLE | SIGHASH_ANYONECANPAY);
sigHashes.push_back(SIGHASH_ALL | SIGHASH_ANYONECANPAY);
@@ -466,10 +453,10 @@ BOOST_AUTO_TEST_CASE(test_big_witness_transaction) {
assert(hashSigned);
}
- CTransaction tx;
CDataStream ssout(SER_NETWORK, PROTOCOL_VERSION);
- WithOrVersion(&ssout, 0) << mtx;
- WithOrVersion(&ssout, 0) >> tx;
+ auto vstream = WithOrVersion(&ssout, 0);
+ vstream << mtx;
+ CTransaction tx(deserialize, vstream);
// check all inputs concurrently, with the cache
PrecomputedTransactionData txdata(tx);
@@ -547,7 +534,7 @@ BOOST_AUTO_TEST_CASE(test_witness)
keystore2.AddCScript(GetScriptForWitness(scriptMulti));
keystore2.AddKeyPubKey(key3, pubkey3);
- CTransaction output1, output2;
+ CTransactionRef output1, output2;
CMutableTransaction input1, input2;
SignatureData sigdata;
@@ -639,8 +626,8 @@ BOOST_AUTO_TEST_CASE(test_witness)
CheckWithFlag(output1, input1, 0, false);
CreateCreditAndSpend(keystore2, scriptMulti, output2, input2, false);
CheckWithFlag(output2, input2, 0, false);
- BOOST_CHECK(output1 == output2);
- UpdateTransaction(input1, 0, CombineSignatures(output1.vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1.vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
+ BOOST_CHECK(*output1 == *output2);
+ UpdateTransaction(input1, 0, CombineSignatures(output1->vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1->vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true);
// P2SH 2-of-2 multisig
@@ -650,8 +637,8 @@ BOOST_AUTO_TEST_CASE(test_witness)
CreateCreditAndSpend(keystore2, GetScriptForDestination(CScriptID(scriptMulti)), output2, input2, false);
CheckWithFlag(output2, input2, 0, true);
CheckWithFlag(output2, input2, SCRIPT_VERIFY_P2SH, false);
- BOOST_CHECK(output1 == output2);
- UpdateTransaction(input1, 0, CombineSignatures(output1.vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1.vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
+ BOOST_CHECK(*output1 == *output2);
+ UpdateTransaction(input1, 0, CombineSignatures(output1->vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1->vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
CheckWithFlag(output1, input1, SCRIPT_VERIFY_P2SH, true);
CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true);
@@ -662,8 +649,8 @@ BOOST_AUTO_TEST_CASE(test_witness)
CreateCreditAndSpend(keystore2, GetScriptForWitness(scriptMulti), output2, input2, false);
CheckWithFlag(output2, input2, 0, true);
CheckWithFlag(output2, input2, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, false);
- BOOST_CHECK(output1 == output2);
- UpdateTransaction(input1, 0, CombineSignatures(output1.vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1.vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
+ BOOST_CHECK(*output1 == *output2);
+ UpdateTransaction(input1, 0, CombineSignatures(output1->vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1->vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
CheckWithFlag(output1, input1, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, true);
CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true);
@@ -674,8 +661,8 @@ BOOST_AUTO_TEST_CASE(test_witness)
CreateCreditAndSpend(keystore2, GetScriptForDestination(CScriptID(GetScriptForWitness(scriptMulti))), output2, input2, false);
CheckWithFlag(output2, input2, SCRIPT_VERIFY_P2SH, true);
CheckWithFlag(output2, input2, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, false);
- BOOST_CHECK(output1 == output2);
- UpdateTransaction(input1, 0, CombineSignatures(output1.vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1.vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
+ BOOST_CHECK(*output1 == *output2);
+ UpdateTransaction(input1, 0, CombineSignatures(output1->vout[0].scriptPubKey, MutableTransactionSignatureChecker(&input1, 0, output1->vout[0].nValue), DataFromTransaction(input1, 0), DataFromTransaction(input2, 0)));
CheckWithFlag(output1, input1, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_WITNESS, true);
CheckWithFlag(output1, input1, STANDARD_SCRIPT_VERIFY_FLAGS, true);
}
@@ -699,11 +686,11 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
key.MakeNewKey(true);
t.vout[0].scriptPubKey = GetScriptForDestination(key.GetPubKey().GetID());
- string reason;
+ std::string reason;
BOOST_CHECK(IsStandardTx(t, reason));
// Check dust with default relay fee:
- CAmount nDustThreshold = 182 * minRelayTxFee.GetFeePerK()/1000 * 3;
+ CAmount nDustThreshold = 182 * dustRelayFee.GetFeePerK()/1000 * 3;
BOOST_CHECK_EQUAL(nDustThreshold, 546);
// dust:
t.vout[0].nValue = nDustThreshold - 1;
@@ -714,14 +701,14 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
// Check dust with odd relay fee to verify rounding:
// nDustThreshold = 182 * 1234 / 1000 * 3
- minRelayTxFee = CFeeRate(1234);
+ dustRelayFee = CFeeRate(1234);
// dust:
t.vout[0].nValue = 672 - 1;
BOOST_CHECK(!IsStandardTx(t, reason));
// not dust:
t.vout[0].nValue = 672;
BOOST_CHECK(IsStandardTx(t, reason));
- minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
+ dustRelayFee = CFeeRate(DUST_RELAY_TX_FEE);
t.vout[0].scriptPubKey = CScript() << OP_1;
BOOST_CHECK(!IsStandardTx(t, reason));
diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp
index 76e4e7a4be..c5367208ba 100644
--- a/src/test/txvalidationcache_tests.cpp
+++ b/src/test/txvalidationcache_tests.cpp
@@ -1,10 +1,10 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "consensus/validation.h"
#include "key.h"
-#include "main.h"
+#include "validation.h"
#include "miner.h"
#include "pubkey.h"
#include "txmempool.h"
@@ -23,7 +23,7 @@ ToMemPool(CMutableTransaction& tx)
LOCK(cs_main);
CValidationState state;
- return AcceptToMemoryPool(mempool, state, tx, false, NULL, true, 0);
+ return AcceptToMemoryPool(mempool, state, MakeTransactionRef(tx), false, NULL, NULL, true, 0);
}
BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
@@ -39,6 +39,7 @@ BOOST_FIXTURE_TEST_CASE(tx_mempool_block_doublespend, TestChain100Setup)
spends.resize(2);
for (int i = 0; i < 2; i++)
{
+ spends[i].nVersion = 1;
spends[i].vin.resize(1);
spends[i].vin[0].prevout.hash = coinbaseTxns[0].GetHash();
spends[i].vin[0].prevout.n = 0;
diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp
index da0a3d73e0..70d83a2e54 100644
--- a/src/test/uint256_tests.cpp
+++ b/src/test/uint256_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "arith_uint256.h"
@@ -184,25 +184,25 @@ BOOST_AUTO_TEST_CASE( methods ) // GetHex SetHex begin() end() size() GetLow64 G
BOOST_CHECK(OneL.begin() + 32 == OneL.end());
BOOST_CHECK(MaxL.begin() + 32 == MaxL.end());
BOOST_CHECK(TmpL.begin() + 32 == TmpL.end());
- BOOST_CHECK(R1L.GetSerializeSize(0,PROTOCOL_VERSION) == 32);
- BOOST_CHECK(ZeroL.GetSerializeSize(0,PROTOCOL_VERSION) == 32);
+ BOOST_CHECK(GetSerializeSize(R1L, 0, PROTOCOL_VERSION) == 32);
+ BOOST_CHECK(GetSerializeSize(ZeroL, 0, PROTOCOL_VERSION) == 32);
- std::stringstream ss;
- R1L.Serialize(ss,0,PROTOCOL_VERSION);
+ CDataStream ss(0, PROTOCOL_VERSION);
+ ss << R1L;
BOOST_CHECK(ss.str() == std::string(R1Array,R1Array+32));
- TmpL.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpL;
BOOST_CHECK(R1L == TmpL);
- ss.str("");
- ZeroL.Serialize(ss,0,PROTOCOL_VERSION);
+ ss.clear();
+ ss << ZeroL;
BOOST_CHECK(ss.str() == std::string(ZeroArray,ZeroArray+32));
- TmpL.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpL;
BOOST_CHECK(ZeroL == TmpL);
- ss.str("");
- MaxL.Serialize(ss,0,PROTOCOL_VERSION);
+ ss.clear();
+ ss << MaxL;
BOOST_CHECK(ss.str() == std::string(MaxArray,MaxArray+32));
- TmpL.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpL;
BOOST_CHECK(MaxL == TmpL);
- ss.str("");
+ ss.clear();
BOOST_CHECK(R1S.GetHex() == R1S.ToString());
BOOST_CHECK(R2S.GetHex() == R2S.ToString());
@@ -230,24 +230,24 @@ BOOST_AUTO_TEST_CASE( methods ) // GetHex SetHex begin() end() size() GetLow64 G
BOOST_CHECK(OneS.begin() + 20 == OneS.end());
BOOST_CHECK(MaxS.begin() + 20 == MaxS.end());
BOOST_CHECK(TmpS.begin() + 20 == TmpS.end());
- BOOST_CHECK(R1S.GetSerializeSize(0,PROTOCOL_VERSION) == 20);
- BOOST_CHECK(ZeroS.GetSerializeSize(0,PROTOCOL_VERSION) == 20);
+ BOOST_CHECK(GetSerializeSize(R1S, 0, PROTOCOL_VERSION) == 20);
+ BOOST_CHECK(GetSerializeSize(ZeroS, 0, PROTOCOL_VERSION) == 20);
- R1S.Serialize(ss,0,PROTOCOL_VERSION);
+ ss << R1S;
BOOST_CHECK(ss.str() == std::string(R1Array,R1Array+20));
- TmpS.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpS;
BOOST_CHECK(R1S == TmpS);
- ss.str("");
- ZeroS.Serialize(ss,0,PROTOCOL_VERSION);
+ ss.clear();
+ ss << ZeroS;
BOOST_CHECK(ss.str() == std::string(ZeroArray,ZeroArray+20));
- TmpS.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpS;
BOOST_CHECK(ZeroS == TmpS);
- ss.str("");
- MaxS.Serialize(ss,0,PROTOCOL_VERSION);
+ ss.clear();
+ ss << MaxS;
BOOST_CHECK(ss.str() == std::string(MaxArray,MaxArray+20));
- TmpS.Unserialize(ss,0,PROTOCOL_VERSION);
+ ss >> TmpS;
BOOST_CHECK(MaxS == TmpS);
- ss.str("");
+ ss.clear();
}
BOOST_AUTO_TEST_CASE( conversion )
diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp
index 45d480c816..dffe8e55a8 100644
--- a/src/test/univalue_tests.cpp
+++ b/src/test/univalue_tests.cpp
@@ -1,5 +1,5 @@
-// Copyright 2014 BitPay, Inc.
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014 BitPay Inc.
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -12,8 +12,6 @@
#include <boost/test/unit_test.hpp>
-using namespace std;
-
BOOST_FIXTURE_TEST_SUITE(univalue_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(univalue_constructor)
@@ -53,7 +51,7 @@ BOOST_AUTO_TEST_CASE(univalue_constructor)
BOOST_CHECK(v7.isNum());
BOOST_CHECK_EQUAL(v7.getValStr(), "-7.21");
- string vs("yawn");
+ std::string vs("yawn");
UniValue v8(vs);
BOOST_CHECK(v8.isStr());
BOOST_CHECK_EQUAL(v8.getValStr(), "yawn");
@@ -69,41 +67,41 @@ BOOST_AUTO_TEST_CASE(univalue_typecheck)
UniValue v1;
BOOST_CHECK(v1.setNumStr("1"));
BOOST_CHECK(v1.isNum());
- BOOST_CHECK_THROW(v1.get_bool(), runtime_error);
+ BOOST_CHECK_THROW(v1.get_bool(), std::runtime_error);
UniValue v2;
BOOST_CHECK(v2.setBool(true));
BOOST_CHECK_EQUAL(v2.get_bool(), true);
- BOOST_CHECK_THROW(v2.get_int(), runtime_error);
+ BOOST_CHECK_THROW(v2.get_int(), std::runtime_error);
UniValue v3;
BOOST_CHECK(v3.setNumStr("32482348723847471234"));
- BOOST_CHECK_THROW(v3.get_int64(), runtime_error);
+ BOOST_CHECK_THROW(v3.get_int64(), std::runtime_error);
BOOST_CHECK(v3.setNumStr("1000"));
BOOST_CHECK_EQUAL(v3.get_int64(), 1000);
UniValue v4;
BOOST_CHECK(v4.setNumStr("2147483648"));
BOOST_CHECK_EQUAL(v4.get_int64(), 2147483648);
- BOOST_CHECK_THROW(v4.get_int(), runtime_error);
+ BOOST_CHECK_THROW(v4.get_int(), std::runtime_error);
BOOST_CHECK(v4.setNumStr("1000"));
BOOST_CHECK_EQUAL(v4.get_int(), 1000);
- BOOST_CHECK_THROW(v4.get_str(), runtime_error);
+ BOOST_CHECK_THROW(v4.get_str(), std::runtime_error);
BOOST_CHECK_EQUAL(v4.get_real(), 1000);
- BOOST_CHECK_THROW(v4.get_array(), runtime_error);
- BOOST_CHECK_THROW(v4.getKeys(), runtime_error);
- BOOST_CHECK_THROW(v4.getValues(), runtime_error);
- BOOST_CHECK_THROW(v4.get_obj(), runtime_error);
+ BOOST_CHECK_THROW(v4.get_array(), std::runtime_error);
+ BOOST_CHECK_THROW(v4.getKeys(), std::runtime_error);
+ BOOST_CHECK_THROW(v4.getValues(), std::runtime_error);
+ BOOST_CHECK_THROW(v4.get_obj(), std::runtime_error);
UniValue v5;
BOOST_CHECK(v5.read("[true, 10]"));
BOOST_CHECK_NO_THROW(v5.get_array());
std::vector<UniValue> vals = v5.getValues();
- BOOST_CHECK_THROW(vals[0].get_int(), runtime_error);
+ BOOST_CHECK_THROW(vals[0].get_int(), std::runtime_error);
BOOST_CHECK_EQUAL(vals[0].get_bool(), true);
BOOST_CHECK_EQUAL(vals[1].get_int(), 10);
- BOOST_CHECK_THROW(vals[1].get_bool(), runtime_error);
+ BOOST_CHECK_THROW(vals[1].get_bool(), std::runtime_error);
}
BOOST_AUTO_TEST_CASE(univalue_set)
@@ -172,13 +170,13 @@ BOOST_AUTO_TEST_CASE(univalue_array)
UniValue v((int64_t)1023LL);
BOOST_CHECK(arr.push_back(v));
- string vStr("zippy");
+ std::string vStr("zippy");
BOOST_CHECK(arr.push_back(vStr));
const char *s = "pippy";
BOOST_CHECK(arr.push_back(s));
- vector<UniValue> vec;
+ std::vector<UniValue> vec;
v.setStr("boing");
vec.push_back(v);
@@ -206,7 +204,7 @@ BOOST_AUTO_TEST_CASE(univalue_array)
BOOST_AUTO_TEST_CASE(univalue_object)
{
UniValue obj(UniValue::VOBJ);
- string strKey, strVal;
+ std::string strKey, strVal;
UniValue v;
strKey = "age";
@@ -266,7 +264,7 @@ BOOST_AUTO_TEST_CASE(univalue_object)
BOOST_CHECK(!obj.exists("nyuknyuknyuk"));
- map<string, UniValue::VType> objTypes;
+ std::map<std::string, UniValue::VType> objTypes;
objTypes["age"] = UniValue::VNUM;
objTypes["first"] = UniValue::VSTR;
objTypes["last"] = UniValue::VSTR;
@@ -294,7 +292,7 @@ BOOST_AUTO_TEST_CASE(univalue_readwrite)
UniValue v;
BOOST_CHECK(v.read(json1));
- string strJson1(json1);
+ std::string strJson1(json1);
BOOST_CHECK(v.read(strJson1));
BOOST_CHECK(v.isArray());
@@ -333,4 +331,3 @@ BOOST_AUTO_TEST_CASE(univalue_readwrite)
}
BOOST_AUTO_TEST_SUITE_END()
-
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index 0f1c7ab222..641655621c 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,18 +6,18 @@
#include "clientversion.h"
#include "primitives/transaction.h"
-#include "test_random.h"
#include "sync.h"
#include "utilstrencodings.h"
#include "utilmoneystr.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include <stdint.h>
#include <vector>
#include <boost/test/unit_test.hpp>
-using namespace std;
+extern std::map<std::string, std::string> mapArgs;
BOOST_FIXTURE_TEST_SUITE(util_tests, BasicTestingSetup)
@@ -115,13 +115,13 @@ BOOST_AUTO_TEST_CASE(util_ParseParameters)
// -a, -b and -ccc end up in map, -d ignored because it is after
// a non-option argument (non-GNU option parsing)
BOOST_CHECK(mapArgs.size() == 3 && mapMultiArgs.size() == 3);
- BOOST_CHECK(mapArgs.count("-a") && mapArgs.count("-b") && mapArgs.count("-ccc")
- && !mapArgs.count("f") && !mapArgs.count("-d"));
+ BOOST_CHECK(IsArgSet("-a") && IsArgSet("-b") && IsArgSet("-ccc")
+ && !IsArgSet("f") && !IsArgSet("-d"));
BOOST_CHECK(mapMultiArgs.count("-a") && mapMultiArgs.count("-b") && mapMultiArgs.count("-ccc")
&& !mapMultiArgs.count("f") && !mapMultiArgs.count("-d"));
BOOST_CHECK(mapArgs["-a"] == "" && mapArgs["-ccc"] == "multiple");
- BOOST_CHECK(mapMultiArgs["-ccc"].size() == 2);
+ BOOST_CHECK(mapMultiArgs.at("-ccc").size() == 2);
}
BOOST_AUTO_TEST_CASE(util_GetArg)
diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp
index 784e796998..bae0eff7e5 100644
--- a/src/test/versionbits_tests.cpp
+++ b/src/test/versionbits_tests.cpp
@@ -3,11 +3,11 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chain.h"
-#include "test_random.h"
#include "versionbits.h"
#include "test/test_bitcoin.h"
+#include "test/test_random.h"
#include "chainparams.h"
-#include "main.h"
+#include "validation.h"
#include "consensus/params.h"
#include <boost/test/unit_test.hpp>
diff --git a/src/threadinterrupt.cpp b/src/threadinterrupt.cpp
new file mode 100644
index 0000000000..9d691079ed
--- /dev/null
+++ b/src/threadinterrupt.cpp
@@ -0,0 +1,41 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "threadinterrupt.h"
+
+CThreadInterrupt::operator bool() const
+{
+ return flag.load(std::memory_order_acquire);
+}
+
+void CThreadInterrupt::reset()
+{
+ flag.store(false, std::memory_order_release);
+}
+
+void CThreadInterrupt::operator()()
+{
+ {
+ std::unique_lock<std::mutex> lock(mut);
+ flag.store(true, std::memory_order_release);
+ }
+ cond.notify_all();
+}
+
+bool CThreadInterrupt::sleep_for(std::chrono::milliseconds rel_time)
+{
+ std::unique_lock<std::mutex> lock(mut);
+ return !cond.wait_for(lock, rel_time, [this]() { return flag.load(std::memory_order_acquire); });
+}
+
+bool CThreadInterrupt::sleep_for(std::chrono::seconds rel_time)
+{
+ return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
+}
+
+bool CThreadInterrupt::sleep_for(std::chrono::minutes rel_time)
+{
+ return sleep_for(std::chrono::duration_cast<std::chrono::milliseconds>(rel_time));
+}
diff --git a/src/threadinterrupt.h b/src/threadinterrupt.h
new file mode 100644
index 0000000000..54e3102808
--- /dev/null
+++ b/src/threadinterrupt.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_THREADINTERRUPT_H
+#define BITCOIN_THREADINTERRUPT_H
+
+#include <atomic>
+#include <chrono>
+#include <condition_variable>
+#include <mutex>
+
+/*
+ A helper class for interruptible sleeps. Calling operator() will interrupt
+ any current sleep, and after that point operator bool() will return true
+ until reset.
+*/
+class CThreadInterrupt
+{
+public:
+ explicit operator bool() const;
+ void operator()();
+ void reset();
+ bool sleep_for(std::chrono::milliseconds rel_time);
+ bool sleep_for(std::chrono::seconds rel_time);
+ bool sleep_for(std::chrono::minutes rel_time);
+
+private:
+ std::condition_variable cond;
+ std::mutex mut;
+ std::atomic<bool> flag;
+};
+
+#endif //BITCOIN_THREADINTERRUPT_H
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 25fc494121..c72252e6d8 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2015 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,6 +13,7 @@
#include "ui_interface.h"
#include "util.h"
#include "utilstrencodings.h"
+#include "warnings.h"
#include <boost/foreach.hpp>
@@ -103,8 +104,8 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
if (!fMatch)
{
fDone = true;
- string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), _(PACKAGE_NAME));
- strMiscWarning = strMessage;
+ std::string strMessage = strprintf(_("Please check that your computer's date and time are correct! If your clock is wrong, %s will not work properly."), _(PACKAGE_NAME));
+ SetMiscWarning(strMessage);
uiInterface.ThreadSafeMessageBox(strMessage, "", CClientUIInterface::MSG_WARNING);
}
}
diff --git a/src/timedata.h b/src/timedata.h
index 9f2499c85c..4a2eab3487 100644
--- a/src/timedata.h
+++ b/src/timedata.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp
index 1ca6b46566..5571b7de44 100644
--- a/src/torcontrol.cpp
+++ b/src/torcontrol.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -470,7 +470,7 @@ void TorController::auth_cb(TorControlConnection& _conn, const TorControlReply&
// Finally - now create the service
if (private_key.empty()) // No private key, generate one
- private_key = "NEW:BEST";
+ private_key = "NEW:RSA1024"; // Explicitly request RSA1024 - see issue #9214
// Request hidden service, redirect port.
// Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient
// choice. TODO; refactor the shutdown sequence some day.
@@ -501,10 +501,10 @@ static std::vector<uint8_t> ComputeResponse(const std::string &key, const std::v
{
CHMAC_SHA256 computeHash((const uint8_t*)key.data(), key.size());
std::vector<uint8_t> computedHash(CHMAC_SHA256::OUTPUT_SIZE, 0);
- computeHash.Write(begin_ptr(cookie), cookie.size());
- computeHash.Write(begin_ptr(clientNonce), clientNonce.size());
- computeHash.Write(begin_ptr(serverNonce), serverNonce.size());
- computeHash.Finalize(begin_ptr(computedHash));
+ computeHash.Write(cookie.data(), cookie.size());
+ computeHash.Write(clientNonce.data(), clientNonce.size());
+ computeHash.Write(serverNonce.data(), serverNonce.size());
+ computeHash.Finalize(computedHash.data());
return computedHash;
}
diff --git a/src/txdb.cpp b/src/txdb.cpp
index 4f11c7b951..c223abd590 100644
--- a/src/txdb.cpp
+++ b/src/txdb.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/txdb.h b/src/txdb.h
index adb3f66327..7f5cf2b583 100644
--- a/src/txdb.h
+++ b/src/txdb.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -43,7 +43,7 @@ struct CDiskTxPos : public CDiskBlockPos
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(*(CDiskBlockPos*)this);
READWRITE(VARINT(nTxOffset));
}
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 313d33507f..5b085f492d 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,7 +8,7 @@
#include "clientversion.h"
#include "consensus/consensus.h"
#include "consensus/validation.h"
-#include "main.h"
+#include "validation.h"
#include "policy/policy.h"
#include "policy/fees.h"
#include "streams.h"
@@ -20,22 +20,22 @@
using namespace std;
-CTxMemPoolEntry::CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
+CTxMemPoolEntry::CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee,
int64_t _nTime, double _entryPriority, unsigned int _entryHeight,
- bool poolHasNoInputsOf, CAmount _inChainInputValue,
+ CAmount _inChainInputValue,
bool _spendsCoinbase, int64_t _sigOpsCost, LockPoints lp):
- tx(std::make_shared<CTransaction>(_tx)), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
- hadNoDependencies(poolHasNoInputsOf), inChainInputValue(_inChainInputValue),
+ tx(_tx), nFee(_nFee), nTime(_nTime), entryPriority(_entryPriority), entryHeight(_entryHeight),
+ inChainInputValue(_inChainInputValue),
spendsCoinbase(_spendsCoinbase), sigOpCost(_sigOpsCost), lockPoints(lp)
{
- nTxWeight = GetTransactionWeight(_tx);
- nModSize = _tx.CalculateModifiedSize(GetTxSize());
+ nTxWeight = GetTransactionWeight(*tx);
+ nModSize = tx->CalculateModifiedSize(GetTxSize());
nUsageSize = RecursiveDynamicUsage(*tx) + memusage::DynamicUsage(tx);
nCountWithDescendants = 1;
nSizeWithDescendants = GetTxSize();
nModFeesWithDescendants = nFee;
- CAmount nValueIn = _tx.GetValueOut()+nFee;
+ CAmount nValueIn = tx->GetValueOut()+nFee;
assert(inChainInputValue <= nValueIn);
feeDelta = 0;
@@ -359,7 +359,6 @@ CTxMemPool::CTxMemPool(const CFeeRate& _minReasonableRelayFee) :
nCheckFrequency = 0;
minerPolicyEstimator = new CBlockPolicyEstimator(_minReasonableRelayFee);
- minReasonableRelayFee = _minReasonableRelayFee;
}
CTxMemPool::~CTxMemPool()
@@ -392,7 +391,7 @@ void CTxMemPool::AddTransactionsUpdated(unsigned int n)
nTransactionsUpdated += n;
}
-bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool fCurrentEstimate)
+bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate)
{
// Add to memory pool without checking anything.
// Used by main.cpp AcceptToMemoryPool(), which DOES do
@@ -442,7 +441,7 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
nTransactionsUpdated++;
totalTxSize += entry.GetTxSize();
- minerPolicyEstimator->processTransaction(entry, fCurrentEstimate);
+ minerPolicyEstimator->processTransaction(entry, validFeeEstimate);
vTxHashes.emplace_back(tx.GetWitnessHash(), newit);
newit->vTxHashesIdx = vTxHashes.size() - 1;
@@ -503,7 +502,7 @@ void CTxMemPool::CalculateDescendants(txiter entryit, setEntries &setDescendants
}
}
-void CTxMemPool::removeRecursive(const CTransaction &origTx, std::vector<std::shared_ptr<const CTransaction>>* removed)
+void CTxMemPool::removeRecursive(const CTransaction &origTx)
{
// Remove transaction from memory pool
{
@@ -530,11 +529,6 @@ void CTxMemPool::removeRecursive(const CTransaction &origTx, std::vector<std::sh
BOOST_FOREACH(txiter it, txToRemove) {
CalculateDescendants(it, setAllRemoves);
}
- if (removed) {
- BOOST_FOREACH(txiter it, setAllRemoves) {
- removed->emplace_back(it->GetSharedTx());
- }
- }
RemoveStaged(setAllRemoves, false);
}
}
@@ -576,7 +570,7 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
RemoveStaged(setAllRemoves, false);
}
-void CTxMemPool::removeConflicts(const CTransaction &tx, std::vector<std::shared_ptr<const CTransaction>>* removed)
+void CTxMemPool::removeConflicts(const CTransaction &tx)
{
// Remove transactions which depend on inputs of tx, recursively
LOCK(cs);
@@ -586,8 +580,8 @@ void CTxMemPool::removeConflicts(const CTransaction &tx, std::vector<std::shared
const CTransaction &txConflict = *it->second;
if (txConflict != tx)
{
- removeRecursive(txConflict, removed);
ClearPrioritisation(txConflict.GetHash());
+ removeRecursive(txConflict);
}
}
}
@@ -596,32 +590,31 @@ void CTxMemPool::removeConflicts(const CTransaction &tx, std::vector<std::shared
/**
* Called when a block is connected. Removes from mempool and updates the miner fee estimator.
*/
-void CTxMemPool::removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
- std::vector<std::shared_ptr<const CTransaction>>* conflicts, bool fCurrentEstimate)
+void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight)
{
LOCK(cs);
- std::vector<CTxMemPoolEntry> entries;
- BOOST_FOREACH(const CTransaction& tx, vtx)
+ std::vector<const CTxMemPoolEntry*> entries;
+ for (const auto& tx : vtx)
{
- uint256 hash = tx.GetHash();
+ uint256 hash = tx->GetHash();
indexed_transaction_set::iterator i = mapTx.find(hash);
if (i != mapTx.end())
- entries.push_back(*i);
+ entries.push_back(&*i);
}
- BOOST_FOREACH(const CTransaction& tx, vtx)
+ // Before the txs in the new block have been removed from the mempool, update policy estimates
+ minerPolicyEstimator->processBlock(nBlockHeight, entries);
+ for (const auto& tx : vtx)
{
- txiter it = mapTx.find(tx.GetHash());
+ txiter it = mapTx.find(tx->GetHash());
if (it != mapTx.end()) {
setEntries stage;
stage.insert(it);
RemoveStaged(stage, true);
}
- removeConflicts(tx, conflicts);
- ClearPrioritisation(tx.GetHash());
+ removeConflicts(*tx);
+ ClearPrioritisation(tx->GetHash());
}
- // After the txs in the new block have been removed from the mempool, update policy estimates
- minerPolicyEstimator->processBlock(nBlockHeight, entries, fCurrentEstimate);
lastRollingFeeUpdate = GetTime();
blockSinceLastRollingFeeBump = true;
}
@@ -851,7 +844,7 @@ std::vector<TxMempoolInfo> CTxMemPool::infoAll() const
return ret;
}
-std::shared_ptr<const CTransaction> CTxMemPool::get(const uint256& hash) const
+CTransactionRef CTxMemPool::get(const uint256& hash) const
{
LOCK(cs);
indexed_transaction_set::const_iterator i = mapTx.find(hash);
@@ -895,7 +888,7 @@ CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const
{
try {
LOCK(cs);
- fileout << 109900; // version required to read: 0.10.99 or later
+ fileout << 139900; // version required to read: 0.13.99 or later
fileout << CLIENT_VERSION; // version that wrote the file
minerPolicyEstimator->Write(fileout);
}
@@ -914,9 +907,8 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
filein >> nVersionRequired >> nVersionThatWrote;
if (nVersionRequired > CLIENT_VERSION)
return error("CTxMemPool::ReadFeeEstimates(): up-version (%d) fee estimate file", nVersionRequired);
-
LOCK(cs);
- minerPolicyEstimator->Read(filein);
+ minerPolicyEstimator->Read(filein, nVersionThatWrote);
}
catch (const std::exception&) {
LogPrintf("CTxMemPool::ReadFeeEstimates(): unable to read policy estimator data (non-fatal)\n");
@@ -979,7 +971,7 @@ bool CCoinsViewMemPool::GetCoins(const uint256 &txid, CCoins &coins) const {
// If an entry in the mempool exists, always return that one, as it's guaranteed to never
// conflict with the underlying cache, and it cannot have pruned entries (as it contains full)
// transactions. First checking the underlying cache risks returning a pruned entry instead.
- shared_ptr<const CTransaction> ptx = mempool.get(txid);
+ CTransactionRef ptx = mempool.get(txid);
if (ptx) {
coins = CCoins(*ptx, MEMPOOL_HEIGHT);
return true;
@@ -1021,14 +1013,14 @@ int CTxMemPool::Expire(int64_t time) {
return stage.size();
}
-bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate)
+bool CTxMemPool::addUnchecked(const uint256&hash, const CTxMemPoolEntry &entry, bool validFeeEstimate)
{
LOCK(cs);
setEntries setAncestors;
uint64_t nNoLimit = std::numeric_limits<uint64_t>::max();
std::string dummy;
CalculateMemPoolAncestors(entry, setAncestors, nNoLimit, nNoLimit, nNoLimit, nNoLimit, dummy);
- return addUnchecked(hash, entry, setAncestors, fCurrentEstimate);
+ return addUnchecked(hash, entry, setAncestors, validFeeEstimate);
}
void CTxMemPool::UpdateChild(txiter entry, txiter child, bool add)
@@ -1083,12 +1075,12 @@ CFeeRate CTxMemPool::GetMinFee(size_t sizelimit) const {
rollingMinimumFeeRate = rollingMinimumFeeRate / pow(2.0, (time - lastRollingFeeUpdate) / halflife);
lastRollingFeeUpdate = time;
- if (rollingMinimumFeeRate < minReasonableRelayFee.GetFeePerK() / 2) {
+ if (rollingMinimumFeeRate < (double)incrementalRelayFee.GetFeePerK() / 2) {
rollingMinimumFeeRate = 0;
return CFeeRate(0);
}
}
- return std::max(CFeeRate(rollingMinimumFeeRate), minReasonableRelayFee);
+ return std::max(CFeeRate(rollingMinimumFeeRate), incrementalRelayFee);
}
void CTxMemPool::trackPackageRemoved(const CFeeRate& rate) {
@@ -1112,7 +1104,7 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe
// to have 0 fee). This way, we don't allow txn to enter mempool with feerate
// equal to txn which were removed with no block in between.
CFeeRate removed(it->GetModFeesWithDescendants(), it->GetSizeWithDescendants());
- removed += minReasonableRelayFee;
+ removed += incrementalRelayFee;
trackPackageRemoved(removed);
maxFeeRateRemoved = std::max(maxFeeRateRemoved, removed);
@@ -1143,3 +1135,10 @@ void CTxMemPool::TrimToSize(size_t sizelimit, std::vector<uint256>* pvNoSpendsRe
if (maxFeeRateRemoved > CFeeRate(0))
LogPrint("mempool", "Removed %u txn, rolling minimum fee bumped to %s\n", nTxnRemoved, maxFeeRateRemoved.ToString());
}
+
+bool CTxMemPool::TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const {
+ LOCK(cs);
+ auto it = mapTx.find(txid);
+ return it == mapTx.end() || (it->GetCountWithAncestors() < chainLimit &&
+ it->GetCountWithDescendants() < chainLimit);
+}
diff --git a/src/txmempool.h b/src/txmempool.h
index 9b0ca4655e..ffb1c1309b 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -62,7 +62,7 @@ class CTxMemPool;
/** \class CTxMemPoolEntry
*
- * CTxMemPoolEntry stores data about the correponding transaction, as well
+ * CTxMemPoolEntry stores data about the corresponding transaction, as well
* as data about all in-mempool transactions that depend on the transaction
* ("descendant" transactions).
*
@@ -80,7 +80,7 @@ class CTxMemPool;
class CTxMemPoolEntry
{
private:
- std::shared_ptr<const CTransaction> tx;
+ CTransactionRef tx;
CAmount nFee; //!< Cached to avoid expensive parent-transaction lookups
size_t nTxWeight; //!< ... and avoid recomputing tx weight (also used for GetTxSize())
size_t nModSize; //!< ... and modified size for priority
@@ -88,7 +88,6 @@ private:
int64_t nTime; //!< Local time when entering the mempool
double entryPriority; //!< Priority when entering the mempool
unsigned int entryHeight; //!< Chain height when entering the mempool
- bool hadNoDependencies; //!< Not dependent on any other txs when it entered the mempool
CAmount inChainInputValue; //!< Sum of all txin values that are already in blockchain
bool spendsCoinbase; //!< keep track of transactions that spend a coinbase
int64_t sigOpCost; //!< Total sigop cost
@@ -111,14 +110,15 @@ private:
int64_t nSigOpCostWithAncestors;
public:
- CTxMemPoolEntry(const CTransaction& _tx, const CAmount& _nFee,
+ CTxMemPoolEntry(const CTransactionRef& _tx, const CAmount& _nFee,
int64_t _nTime, double _entryPriority, unsigned int _entryHeight,
- bool poolHasNoInputsOf, CAmount _inChainInputValue, bool spendsCoinbase,
+ CAmount _inChainInputValue, bool spendsCoinbase,
int64_t nSigOpsCost, LockPoints lp);
+
CTxMemPoolEntry(const CTxMemPoolEntry& other);
const CTransaction& GetTx() const { return *this->tx; }
- std::shared_ptr<const CTransaction> GetSharedTx() const { return this->tx; }
+ CTransactionRef GetSharedTx() const { return this->tx; }
/**
* Fast calculation of lower bound of current priority as update
* from entry priority. Only inputs that were originally in-chain will age.
@@ -129,7 +129,6 @@ public:
size_t GetTxWeight() const { return nTxWeight; }
int64_t GetTime() const { return nTime; }
unsigned int GetHeight() const { return entryHeight; }
- bool WasClearAtEntry() const { return hadNoDependencies; }
int64_t GetSigOpCost() const { return sigOpCost; }
int64_t GetModifiedFee() const { return nFee + feeDelta; }
size_t DynamicMemoryUsage() const { return nUsageSize; }
@@ -322,7 +321,7 @@ class CBlockPolicyEstimator;
struct TxMempoolInfo
{
/** The transaction itself */
- std::shared_ptr<const CTransaction> tx;
+ CTransactionRef tx;
/** Time the transaction entered the mempool. */
int64_t nTime;
@@ -421,11 +420,9 @@ private:
unsigned int nTransactionsUpdated;
CBlockPolicyEstimator* minerPolicyEstimator;
- uint64_t totalTxSize; //!< sum of all mempool tx' byte sizes
+ uint64_t totalTxSize; //!< sum of all mempool tx's virtual sizes. Differs from serialized tx size since witness data is discounted. Defined in BIP 141.
uint64_t cachedInnerUsage; //!< sum of dynamic memory usage of all the map elements (NOT the maps themselves)
- CFeeRate minReasonableRelayFee;
-
mutable int64_t lastRollingFeeUpdate;
mutable bool blockSinceLastRollingFeeBump;
mutable double rollingMinimumFeeRate; //!< minimum fee to get into the pool, decreases exponentially
@@ -504,9 +501,6 @@ public:
std::map<uint256, std::pair<double, CAmount> > mapDeltas;
/** Create a new CTxMemPool.
- * minReasonableRelayFee should be a feerate which is, roughly, somewhere
- * around what it "costs" to relay a transaction around the network and
- * below which we would reasonably say a transaction has 0-effective-fee.
*/
CTxMemPool(const CFeeRate& _minReasonableRelayFee);
~CTxMemPool();
@@ -524,14 +518,13 @@ public:
// to track size/count of descendant transactions. First version of
// addUnchecked can be used to have it call CalculateMemPoolAncestors(), and
// then invoke the second version.
- bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool fCurrentEstimate = true);
- bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool fCurrentEstimate = true);
+ bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, bool validFeeEstimate = true);
+ bool addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry, setEntries &setAncestors, bool validFeeEstimate = true);
- void removeRecursive(const CTransaction &tx, std::vector<std::shared_ptr<const CTransaction>>* removed = NULL);
+ void removeRecursive(const CTransaction &tx);
void removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMemPoolHeight, int flags);
- void removeConflicts(const CTransaction &tx, std::vector<std::shared_ptr<const CTransaction>>* removed = NULL);
- void removeForBlock(const std::vector<CTransaction>& vtx, unsigned int nBlockHeight,
- std::vector<std::shared_ptr<const CTransaction>>* conflicts = NULL, bool fCurrentEstimate = true);
+ void removeConflicts(const CTransaction &tx);
+ void removeForBlock(const std::vector<CTransactionRef>& vtx, unsigned int nBlockHeight);
void clear();
void _clear(); //lock free
bool CompareDepthAndScore(const uint256& hasha, const uint256& hashb);
@@ -590,7 +583,7 @@ public:
/** The minimum fee to get into the mempool, which may itself not be enough
* for larger-sized transactions.
- * The minReasonableRelayFee constructor arg is used to bound the time it
+ * The incrementalRelayFee policy variable is used to bound the time it
* takes the fee rate to go back down all the way to 0. When the feerate
* would otherwise be half of this, it is set to 0 instead.
*/
@@ -605,6 +598,9 @@ public:
/** Expire all transaction (and their dependencies) in the mempool older than time. Return the number of removed transactions. */
int Expire(int64_t time);
+ /** Returns false if the transaction is in the mempool and not within the chain limit specified. */
+ bool TransactionWithinChainLimit(const uint256& txid, size_t chainLimit) const;
+
unsigned long size()
{
LOCK(cs);
@@ -623,7 +619,7 @@ public:
return (mapTx.count(hash) != 0);
}
- std::shared_ptr<const CTransaction> get(const uint256& hash) const;
+ CTransactionRef get(const uint256& hash) const;
TxMempoolInfo info(const uint256& hash) const;
std::vector<TxMempoolInfo> infoAll() const;
diff --git a/src/ui_interface.h b/src/ui_interface.h
index 177ff238db..065d23fbb4 100644
--- a/src/ui_interface.h
+++ b/src/ui_interface.h
@@ -1,5 +1,5 @@
// Copyright (c) 2010 Satoshi Nakamoto
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -85,6 +85,9 @@ public:
/** Number of network connections changed. */
boost::signals2::signal<void (int newNumConnections)> NotifyNumConnectionsChanged;
+ /** Network activity state changed. */
+ boost::signals2::signal<void (bool networkActive)> NotifyNetworkActiveChanged;
+
/**
* Status bar alerts changed.
*/
diff --git a/src/uint256.cpp b/src/uint256.cpp
index f22ddcd1ef..bd3d017085 100644
--- a/src/uint256.cpp
+++ b/src/uint256.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/uint256.h b/src/uint256.h
index dd8432d74c..a92ce07f11 100644
--- a/src/uint256.h
+++ b/src/uint256.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -78,11 +78,6 @@ public:
return sizeof(data);
}
- unsigned int GetSerializeSize(int nType, int nVersion) const
- {
- return sizeof(data);
- }
-
uint64_t GetUint64(int pos) const
{
const uint8_t* ptr = data + pos * 8;
@@ -97,13 +92,13 @@ public:
}
template<typename Stream>
- void Serialize(Stream& s, int nType, int nVersion) const
+ void Serialize(Stream& s) const
{
s.write((char*)data, sizeof(data));
}
template<typename Stream>
- void Unserialize(Stream& s, int nType, int nVersion)
+ void Unserialize(Stream& s)
{
s.read((char*)data, sizeof(data));
}
diff --git a/src/undo.h b/src/undo.h
index d4fc84c90c..a94e31f5cc 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -27,29 +27,23 @@ public:
CTxInUndo() : txout(), fCoinBase(false), nHeight(0), nVersion(0) {}
CTxInUndo(const CTxOut &txoutIn, bool fCoinBaseIn = false, unsigned int nHeightIn = 0, int nVersionIn = 0) : txout(txoutIn), fCoinBase(fCoinBaseIn), nHeight(nHeightIn), nVersion(nVersionIn) { }
- unsigned int GetSerializeSize(int nType, int nVersion) const {
- return ::GetSerializeSize(VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion) +
- (nHeight > 0 ? ::GetSerializeSize(VARINT(this->nVersion), nType, nVersion) : 0) +
- ::GetSerializeSize(CTxOutCompressor(REF(txout)), nType, nVersion);
- }
-
template<typename Stream>
- void Serialize(Stream &s, int nType, int nVersion) const {
- ::Serialize(s, VARINT(nHeight*2+(fCoinBase ? 1 : 0)), nType, nVersion);
+ void Serialize(Stream &s) const {
+ ::Serialize(s, VARINT(nHeight*2+(fCoinBase ? 1 : 0)));
if (nHeight > 0)
- ::Serialize(s, VARINT(this->nVersion), nType, nVersion);
- ::Serialize(s, CTxOutCompressor(REF(txout)), nType, nVersion);
+ ::Serialize(s, VARINT(this->nVersion));
+ ::Serialize(s, CTxOutCompressor(REF(txout)));
}
template<typename Stream>
- void Unserialize(Stream &s, int nType, int nVersion) {
+ void Unserialize(Stream &s) {
unsigned int nCode = 0;
- ::Unserialize(s, VARINT(nCode), nType, nVersion);
+ ::Unserialize(s, VARINT(nCode));
nHeight = nCode / 2;
fCoinBase = nCode & 1;
if (nHeight > 0)
- ::Unserialize(s, VARINT(this->nVersion), nType, nVersion);
- ::Unserialize(s, REF(CTxOutCompressor(REF(txout))), nType, nVersion);
+ ::Unserialize(s, VARINT(this->nVersion));
+ ::Unserialize(s, REF(CTxOutCompressor(REF(txout))));
}
};
@@ -63,7 +57,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(vprevout);
}
};
@@ -77,7 +71,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(vtxundo);
}
};
diff --git a/src/util.cpp b/src/util.cpp
index c20ede6221..08ee6b8b87 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -102,13 +102,14 @@ using namespace std;
const char * const BITCOIN_CONF_FILENAME = "bitcoin.conf";
const char * const BITCOIN_PID_FILENAME = "bitcoind.pid";
+CCriticalSection cs_args;
map<string, string> mapArgs;
-map<string, vector<string> > mapMultiArgs;
+static map<string, vector<string> > _mapMultiArgs;
+const map<string, vector<string> >& mapMultiArgs = _mapMultiArgs;
bool fDebug = false;
bool fPrintToConsole = false;
bool fPrintToDebugLog = true;
-bool fServer = false;
-string strMiscWarning;
+
bool fLogTimestamps = DEFAULT_LOGTIMESTAMPS;
bool fLogTimeMicros = DEFAULT_LOGTIMEMICROS;
bool fLogIPs = DEFAULT_LOGIPS;
@@ -239,9 +240,12 @@ bool LogAcceptCategory(const char* category)
static boost::thread_specific_ptr<set<string> > ptrCategory;
if (ptrCategory.get() == NULL)
{
- const vector<string>& categories = mapMultiArgs["-debug"];
- ptrCategory.reset(new set<string>(categories.begin(), categories.end()));
- // thread_specific_ptr automatically deletes the set when the thread ends.
+ if (mapMultiArgs.count("-debug")) {
+ const vector<string>& categories = mapMultiArgs.at("-debug");
+ ptrCategory.reset(new set<string>(categories.begin(), categories.end()));
+ // thread_specific_ptr automatically deletes the set when the thread ends.
+ } else
+ ptrCategory.reset(new set<string>());
}
const set<string>& setCategories = *ptrCategory.get();
@@ -259,7 +263,7 @@ bool LogAcceptCategory(const char* category)
* suppress printing of the timestamp when multiple calls are made that don't
* end in a newline. Initialize it to true, and hold it, in the calling context.
*/
-static std::string LogTimestampStr(const std::string &str, bool *fStartedNewLine)
+static std::string LogTimestampStr(const std::string &str, std::atomic_bool *fStartedNewLine)
{
string strStamped;
@@ -286,7 +290,7 @@ static std::string LogTimestampStr(const std::string &str, bool *fStartedNewLine
int LogPrintStr(const std::string &str)
{
int ret = 0; // Returns total number of characters written
- static bool fStartedNewLine = true;
+ static std::atomic_bool fStartedNewLine(true);
string strTimestamped = LogTimestampStr(str, &fStartedNewLine);
@@ -343,8 +347,9 @@ static void InterpretNegativeSetting(std::string& strKey, std::string& strValue)
void ParseParameters(int argc, const char* const argv[])
{
+ LOCK(cs_args);
mapArgs.clear();
- mapMultiArgs.clear();
+ _mapMultiArgs.clear();
for (int i = 1; i < argc; i++)
{
@@ -372,12 +377,19 @@ void ParseParameters(int argc, const char* const argv[])
InterpretNegativeSetting(str, strValue);
mapArgs[str] = strValue;
- mapMultiArgs[str].push_back(strValue);
+ _mapMultiArgs[str].push_back(strValue);
}
}
+bool IsArgSet(const std::string& strArg)
+{
+ LOCK(cs_args);
+ return mapArgs.count(strArg);
+}
+
std::string GetArg(const std::string& strArg, const std::string& strDefault)
{
+ LOCK(cs_args);
if (mapArgs.count(strArg))
return mapArgs[strArg];
return strDefault;
@@ -385,6 +397,7 @@ std::string GetArg(const std::string& strArg, const std::string& strDefault)
int64_t GetArg(const std::string& strArg, int64_t nDefault)
{
+ LOCK(cs_args);
if (mapArgs.count(strArg))
return atoi64(mapArgs[strArg]);
return nDefault;
@@ -392,6 +405,7 @@ int64_t GetArg(const std::string& strArg, int64_t nDefault)
bool GetBoolArg(const std::string& strArg, bool fDefault)
{
+ LOCK(cs_args);
if (mapArgs.count(strArg))
return InterpretBool(mapArgs[strArg]);
return fDefault;
@@ -399,6 +413,7 @@ bool GetBoolArg(const std::string& strArg, bool fDefault)
bool SoftSetArg(const std::string& strArg, const std::string& strValue)
{
+ LOCK(cs_args);
if (mapArgs.count(strArg))
return false;
mapArgs[strArg] = strValue;
@@ -413,6 +428,14 @@ bool SoftSetBoolArg(const std::string& strArg, bool fValue)
return SoftSetArg(strArg, std::string("0"));
}
+void ForceSetArg(const std::string& strArg, const std::string& strValue)
+{
+ LOCK(cs_args);
+ mapArgs[strArg] = strValue;
+}
+
+
+
static const int screenWidth = 79;
static const int optIndent = 2;
static const int msgIndent = 7;
@@ -495,8 +518,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
if (!path.empty())
return path;
- if (mapArgs.count("-datadir")) {
- path = fs::system_complete(mapArgs["-datadir"]);
+ if (IsArgSet("-datadir")) {
+ path = fs::system_complete(GetArg("-datadir", ""));
if (!fs::is_directory(path)) {
path = "";
return path;
@@ -514,6 +537,8 @@ const boost::filesystem::path &GetDataDir(bool fNetSpecific)
void ClearDatadirCache()
{
+ LOCK(csPathCached);
+
pathCached = boost::filesystem::path();
pathCachedNetSpecific = boost::filesystem::path();
}
@@ -527,26 +552,27 @@ boost::filesystem::path GetConfigFile(const std::string& confPath)
return pathConfigFile;
}
-void ReadConfigFile(const std::string& confPath,
- map<string, string>& mapSettingsRet,
- map<string, vector<string> >& mapMultiSettingsRet)
+void ReadConfigFile(const std::string& confPath)
{
boost::filesystem::ifstream streamConfig(GetConfigFile(confPath));
if (!streamConfig.good())
return; // No bitcoin.conf file is OK
- set<string> setOptions;
- setOptions.insert("*");
-
- for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it)
{
- // Don't overwrite existing settings so command line settings override bitcoin.conf
- string strKey = string("-") + it->string_key;
- string strValue = it->value[0];
- InterpretNegativeSetting(strKey, strValue);
- if (mapSettingsRet.count(strKey) == 0)
- mapSettingsRet[strKey] = strValue;
- mapMultiSettingsRet[strKey].push_back(strValue);
+ LOCK(cs_args);
+ set<string> setOptions;
+ setOptions.insert("*");
+
+ for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it)
+ {
+ // Don't overwrite existing settings so command line settings override bitcoin.conf
+ string strKey = string("-") + it->string_key;
+ string strValue = it->value[0];
+ InterpretNegativeSetting(strKey, strValue);
+ if (mapArgs.count(strKey) == 0)
+ mapArgs[strKey] = strValue;
+ _mapMultiArgs[strKey].push_back(strValue);
+ }
}
// If datadir is changed in .conf file:
ClearDatadirCache();
@@ -705,13 +731,13 @@ void ShrinkDebugFile()
// Restart the file with some of the end
std::vector <char> vch(200000,0);
fseek(file, -((long)vch.size()), SEEK_END);
- int nBytes = fread(begin_ptr(vch), 1, vch.size(), file);
+ int nBytes = fread(vch.data(), 1, vch.size(), file);
fclose(file);
file = fopen(pathLog.string().c_str(), "w");
if (file)
{
- fwrite(begin_ptr(vch), 1, nBytes, file);
+ fwrite(vch.data(), 1, nBytes, file);
fclose(file);
}
}
diff --git a/src/util.h b/src/util.h
index bbb9b5db82..e27ce121c8 100644
--- a/src/util.h
+++ b/src/util.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -41,13 +41,11 @@ public:
boost::signals2::signal<std::string (const char* psz)> Translate;
};
-extern std::map<std::string, std::string> mapArgs;
-extern std::map<std::string, std::vector<std::string> > mapMultiArgs;
+extern const std::map<std::string, std::vector<std::string> >& mapMultiArgs;
extern bool fDebug;
extern bool fPrintToConsole;
extern bool fPrintToDebugLog;
-extern bool fServer;
-extern std::string strMiscWarning;
+
extern bool fLogTimestamps;
extern bool fLogTimeMicros;
extern bool fLogIPs;
@@ -75,14 +73,15 @@ bool LogAcceptCategory(const char* category);
/** Send a string to the log output */
int LogPrintStr(const std::string &str);
-#define LogPrintf(...) LogPrint(NULL, __VA_ARGS__)
+#define LogPrint(category, ...) do { \
+ if (LogAcceptCategory((category))) { \
+ LogPrintStr(tfm::format(__VA_ARGS__)); \
+ } \
+} while(0)
-template<typename... Args>
-static inline int LogPrint(const char* category, const char* fmt, const Args&... args)
-{
- if(!LogAcceptCategory(category)) return 0; \
- return LogPrintStr(tfm::format(fmt, args...));
-}
+#define LogPrintf(...) do { \
+ LogPrintStr(tfm::format(__VA_ARGS__)); \
+} while(0)
template<typename... Args>
bool error(const char* fmt, const Args&... args)
@@ -107,7 +106,7 @@ boost::filesystem::path GetConfigFile(const std::string& confPath);
boost::filesystem::path GetPidFile();
void CreatePidFile(const boost::filesystem::path &path, pid_t pid);
#endif
-void ReadConfigFile(const std::string& confPath, std::map<std::string, std::string>& mapSettingsRet, std::map<std::string, std::vector<std::string> >& mapMultiSettingsRet);
+void ReadConfigFile(const std::string& confPath);
#ifdef WIN32
boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
#endif
@@ -125,6 +124,14 @@ inline bool IsSwitchChar(char c)
}
/**
+ * Return true if the given argument has been manually set
+ *
+ * @param strArg Argument to get (e.g. "-foo")
+ * @return true if the argument has been set
+ */
+bool IsArgSet(const std::string& strArg);
+
+/**
* Return string argument or default value
*
* @param strArg Argument to get (e.g. "-foo")
@@ -169,6 +176,9 @@ bool SoftSetArg(const std::string& strArg, const std::string& strValue);
*/
bool SoftSetBoolArg(const std::string& strArg, bool fValue);
+// Forces a arg setting, used only in testing
+void ForceSetArg(const std::string& strArg, const std::string& strValue);
+
/**
* Format a string to be used as group of options in help messages
*
diff --git a/src/utilstrencodings.cpp b/src/utilstrencodings.cpp
index 5ffdb3be15..025040c43a 100644
--- a/src/utilstrencodings.cpp
+++ b/src/utilstrencodings.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/utilstrencodings.h b/src/utilstrencodings.h
index 5744f78c6e..cb6f014fc2 100644
--- a/src/utilstrencodings.h
+++ b/src/utilstrencodings.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/utiltime.cpp b/src/utiltime.cpp
index da590f8889..7c5ee77265 100644
--- a/src/utiltime.cpp
+++ b/src/utiltime.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -74,8 +74,9 @@ void MilliSleep(int64_t n)
std::string DateTimeStrFormat(const char* pszFormat, int64_t nTime)
{
+ static std::locale classic(std::locale::classic());
// std::locale takes ownership of the pointer
- std::locale loc(std::locale::classic(), new boost::posix_time::time_facet(pszFormat));
+ std::locale loc(classic, new boost::posix_time::time_facet(pszFormat));
std::stringstream ss;
ss.imbue(loc);
ss << boost::posix_time::from_time_t(nTime);
diff --git a/src/main.cpp b/src/validation.cpp
index 3f706b1503..bb13cbaadb 100644
--- a/src/main.cpp
+++ b/src/validation.cpp
@@ -3,11 +3,9 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "main.h"
+#include "validation.h"
-#include "addrman.h"
#include "arith_uint256.h"
-#include "blockencodings.h"
#include "chainparams.h"
#include "checkpoints.h"
#include "checkqueue.h"
@@ -16,8 +14,6 @@
#include "consensus/validation.h"
#include "hash.h"
#include "init.h"
-#include "merkleblock.h"
-#include "net.h"
#include "policy/fees.h"
#include "policy/policy.h"
#include "pow.h"
@@ -27,6 +23,7 @@
#include "script/script.h"
#include "script/sigcache.h"
#include "script/standard.h"
+#include "timedata.h"
#include "tinyformat.h"
#include "txdb.h"
#include "txmempool.h"
@@ -37,6 +34,7 @@
#include "utilstrencodings.h"
#include "validationinterface.h"
#include "versionbits.h"
+#include "warnings.h"
#include <atomic>
#include <sstream>
@@ -63,11 +61,10 @@ CCriticalSection cs_main;
BlockMap mapBlockIndex;
CChain chainActive;
CBlockIndex *pindexBestHeader = NULL;
-int64_t nTimeBestReceived = 0; // Used only to inform the wallet of when we last received a block
CWaitableCriticalSection csBestBlock;
CConditionVariable cvBlockChange;
int nScriptCheckThreads = 0;
-bool fImporting = false;
+std::atomic_bool fImporting(false);
bool fReindex = false;
bool fTxIndex = false;
bool fHavePruned = false;
@@ -81,30 +78,12 @@ uint64_t nPruneTarget = 0;
int64_t nMaxTipAge = DEFAULT_MAX_TIP_AGE;
bool fEnableReplacement = DEFAULT_ENABLE_REPLACEMENT;
+uint256 hashAssumeValid;
CFeeRate minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE);
CAmount maxTxFee = DEFAULT_TRANSACTION_MAXFEE;
CTxMemPool mempool(::minRelayTxFee);
-FeeFilterRounder filterRounder(::minRelayTxFee);
-
-struct IteratorComparator
-{
- template<typename I>
- bool operator()(const I& a, const I& b)
- {
- return &(*a) < &(*b);
- }
-};
-
-struct COrphanTx {
- CTransaction tx;
- NodeId fromPeer;
- int64_t nTimeExpire;
-};
-map<uint256, COrphanTx> mapOrphanTransactions GUARDED_BY(cs_main);
-map<COutPoint, set<map<uint256, COrphanTx>::iterator, IteratorComparator>> mapOrphanTransactionsByPrev GUARDED_BY(cs_main);
-void EraseOrphansFor(NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
static void CheckBlockIndex(const Consensus::Params& consensusParams);
@@ -113,8 +92,6 @@ CScript COINBASE_FLAGS;
const string strMessageMagic = "Bitcoin Signed Message:\n";
-static const uint64_t RANDOMIZER_ID_ADDRESS_RELAY = 0x3cac0035b5866b90ULL; // SHA256("main address relay")[0:8]
-
// Internal stuff
namespace {
@@ -147,8 +124,6 @@ namespace {
* missing the data for the block.
*/
set<CBlockIndex*, CBlockIndexWorkComparator> setBlockIndexCandidates;
- /** Number of nodes with fSyncStarted. */
- int nSyncStarted = 0;
/** All pairs A->B, where A (or one of its ancestors) misses transactions, but B has transactions.
* Pruned nodes may have entries where B is missing data.
*/
@@ -175,501 +150,13 @@ namespace {
/** chainwork for the last block that preciousblock has been applied to. */
arith_uint256 nLastPreciousChainwork = 0;
- /**
- * Sources of received blocks, saved to be able to send them reject
- * messages or ban them when processing happens afterwards. Protected by
- * cs_main.
- */
- map<uint256, NodeId> mapBlockSource;
-
- /**
- * Filter for transactions that were recently rejected by
- * AcceptToMemoryPool. These are not rerequested until the chain tip
- * changes, at which point the entire filter is reset. Protected by
- * cs_main.
- *
- * Without this filter we'd be re-requesting txs from each of our peers,
- * increasing bandwidth consumption considerably. For instance, with 100
- * peers, half of which relay a tx we don't accept, that might be a 50x
- * bandwidth increase. A flooding attacker attempting to roll-over the
- * filter using minimum-sized, 60byte, transactions might manage to send
- * 1000/sec if we have fast peers, so we pick 120,000 to give our peers a
- * two minute window to send invs to us.
- *
- * Decreasing the false positive rate is fairly cheap, so we pick one in a
- * million to make it highly unlikely for users to have issues with this
- * filter.
- *
- * Memory used: 1.3 MB
- */
- std::unique_ptr<CRollingBloomFilter> recentRejects;
- uint256 hashRecentRejectsChainTip;
-
- /** Blocks that are in flight, and that are in the queue to be downloaded. Protected by cs_main. */
- struct QueuedBlock {
- uint256 hash;
- CBlockIndex* pindex; //!< Optional.
- bool fValidatedHeaders; //!< Whether this block has validated headers at the time of request.
- std::unique_ptr<PartiallyDownloadedBlock> partialBlock; //!< Optional, used for CMPCTBLOCK downloads
- };
- map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
-
- /** Stack of nodes which we have set to announce using compact blocks */
- list<NodeId> lNodesAnnouncingHeaderAndIDs;
-
- /** Number of preferable block download peers. */
- int nPreferredDownload = 0;
-
/** Dirty block index entries. */
set<CBlockIndex*> setDirtyBlockIndex;
/** Dirty block file entries. */
set<int> setDirtyFileInfo;
-
- /** Number of peers from which we're downloading blocks. */
- int nPeersWithValidatedDownloads = 0;
-
- /** Relay map, protected by cs_main. */
- typedef std::map<uint256, std::shared_ptr<const CTransaction>> MapRelay;
- MapRelay mapRelay;
- /** Expiration-time ordered list of (expire time, relay map entry) pairs, protected by cs_main). */
- std::deque<std::pair<int64_t, MapRelay::iterator>> vRelayExpiration;
-} // anon namespace
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Registration of network node signals.
-//
-
-namespace {
-
-struct CBlockReject {
- unsigned char chRejectCode;
- string strRejectReason;
- uint256 hashBlock;
-};
-
-/**
- * Maintain validation-specific state about nodes, protected by cs_main, instead
- * by CNode's own locks. This simplifies asynchronous operation, where
- * processing of incoming data is done after the ProcessMessage call returns,
- * and we're no longer holding the node's locks.
- */
-struct CNodeState {
- //! The peer's address
- CService address;
- //! Whether we have a fully established connection.
- bool fCurrentlyConnected;
- //! Accumulated misbehaviour score for this peer.
- int nMisbehavior;
- //! Whether this peer should be disconnected and banned (unless whitelisted).
- bool fShouldBan;
- //! String name of this peer (debugging/logging purposes).
- std::string name;
- //! List of asynchronously-determined block rejections to notify this peer about.
- std::vector<CBlockReject> rejects;
- //! The best known block we know this peer has announced.
- CBlockIndex *pindexBestKnownBlock;
- //! The hash of the last unknown block this peer has announced.
- uint256 hashLastUnknownBlock;
- //! The last full block we both have.
- CBlockIndex *pindexLastCommonBlock;
- //! The best header we have sent our peer.
- CBlockIndex *pindexBestHeaderSent;
- //! Length of current-streak of unconnecting headers announcements
- int nUnconnectingHeaders;
- //! Whether we've started headers synchronization with this peer.
- bool fSyncStarted;
- //! Since when we're stalling block download progress (in microseconds), or 0.
- int64_t nStallingSince;
- list<QueuedBlock> vBlocksInFlight;
- //! When the first entry in vBlocksInFlight started downloading. Don't care when vBlocksInFlight is empty.
- int64_t nDownloadingSince;
- int nBlocksInFlight;
- int nBlocksInFlightValidHeaders;
- //! Whether we consider this a preferred download peer.
- bool fPreferredDownload;
- //! Whether this peer wants invs or headers (when possible) for block announcements.
- bool fPreferHeaders;
- //! Whether this peer wants invs or cmpctblocks (when possible) for block announcements.
- bool fPreferHeaderAndIDs;
- /**
- * Whether this peer will send us cmpctblocks if we request them.
- * This is not used to gate request logic, as we really only care about fSupportsDesiredCmpctVersion,
- * but is used as a flag to "lock in" the version of compact blocks (fWantsCmpctWitness) we send.
- */
- bool fProvidesHeaderAndIDs;
- //! Whether this peer can give us witnesses
- bool fHaveWitness;
- //! Whether this peer wants witnesses in cmpctblocks/blocktxns
- bool fWantsCmpctWitness;
- /**
- * If we've announced NODE_WITNESS to this peer: whether the peer sends witnesses in cmpctblocks/blocktxns,
- * otherwise: whether this peer sends non-witnesses in cmpctblocks/blocktxns.
- */
- bool fSupportsDesiredCmpctVersion;
-
- CNodeState() {
- fCurrentlyConnected = false;
- nMisbehavior = 0;
- fShouldBan = false;
- pindexBestKnownBlock = NULL;
- hashLastUnknownBlock.SetNull();
- pindexLastCommonBlock = NULL;
- pindexBestHeaderSent = NULL;
- nUnconnectingHeaders = 0;
- fSyncStarted = false;
- nStallingSince = 0;
- nDownloadingSince = 0;
- nBlocksInFlight = 0;
- nBlocksInFlightValidHeaders = 0;
- fPreferredDownload = false;
- fPreferHeaders = false;
- fPreferHeaderAndIDs = false;
- fProvidesHeaderAndIDs = false;
- fHaveWitness = false;
- fWantsCmpctWitness = false;
- fSupportsDesiredCmpctVersion = false;
- }
-};
-
-/** Map maintaining per-node state. Requires cs_main. */
-map<NodeId, CNodeState> mapNodeState;
-
-// Requires cs_main.
-CNodeState *State(NodeId pnode) {
- map<NodeId, CNodeState>::iterator it = mapNodeState.find(pnode);
- if (it == mapNodeState.end())
- return NULL;
- return &it->second;
-}
-
-void UpdatePreferredDownload(CNode* node, CNodeState* state)
-{
- nPreferredDownload -= state->fPreferredDownload;
-
- // Whether this node should be marked as a preferred download node.
- state->fPreferredDownload = (!node->fInbound || node->fWhitelisted) && !node->fOneShot && !node->fClient;
-
- nPreferredDownload += state->fPreferredDownload;
-}
-
-void InitializeNode(NodeId nodeid, const CNode *pnode) {
- LOCK(cs_main);
- CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second;
- state.name = pnode->addrName;
- state.address = pnode->addr;
-}
-
-void FinalizeNode(NodeId nodeid, bool& fUpdateConnectionTime) {
- fUpdateConnectionTime = false;
- LOCK(cs_main);
- CNodeState *state = State(nodeid);
-
- if (state->fSyncStarted)
- nSyncStarted--;
-
- if (state->nMisbehavior == 0 && state->fCurrentlyConnected) {
- fUpdateConnectionTime = true;
- }
-
- BOOST_FOREACH(const QueuedBlock& entry, state->vBlocksInFlight) {
- mapBlocksInFlight.erase(entry.hash);
- }
- EraseOrphansFor(nodeid);
- nPreferredDownload -= state->fPreferredDownload;
- nPeersWithValidatedDownloads -= (state->nBlocksInFlightValidHeaders != 0);
- assert(nPeersWithValidatedDownloads >= 0);
-
- mapNodeState.erase(nodeid);
-
- if (mapNodeState.empty()) {
- // Do a consistency check after the last peer is removed.
- assert(mapBlocksInFlight.empty());
- assert(nPreferredDownload == 0);
- assert(nPeersWithValidatedDownloads == 0);
- }
-}
-
-// Requires cs_main.
-// Returns a bool indicating whether we requested this block.
-// Also used if a block was /not/ received and timed out or started with another peer
-bool MarkBlockAsReceived(const uint256& hash) {
- map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
- if (itInFlight != mapBlocksInFlight.end()) {
- CNodeState *state = State(itInFlight->second.first);
- state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders;
- if (state->nBlocksInFlightValidHeaders == 0 && itInFlight->second.second->fValidatedHeaders) {
- // Last validated block on the queue was received.
- nPeersWithValidatedDownloads--;
- }
- if (state->vBlocksInFlight.begin() == itInFlight->second.second) {
- // First block on the queue was received, update the start download time for the next one
- state->nDownloadingSince = std::max(state->nDownloadingSince, GetTimeMicros());
- }
- state->vBlocksInFlight.erase(itInFlight->second.second);
- state->nBlocksInFlight--;
- state->nStallingSince = 0;
- mapBlocksInFlight.erase(itInFlight);
- return true;
- }
- return false;
-}
-
-// Requires cs_main.
-// returns false, still setting pit, if the block was already in flight from the same peer
-// pit will only be valid as long as the same cs_main lock is being held
-bool MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, CBlockIndex *pindex = NULL, list<QueuedBlock>::iterator **pit = NULL) {
- CNodeState *state = State(nodeid);
- assert(state != NULL);
-
- // Short-circuit most stuff in case its from the same node
- map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator itInFlight = mapBlocksInFlight.find(hash);
- if (itInFlight != mapBlocksInFlight.end() && itInFlight->second.first == nodeid) {
- *pit = &itInFlight->second.second;
- return false;
- }
-
- // Make sure it's not listed somewhere already.
- MarkBlockAsReceived(hash);
-
- list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(),
- {hash, pindex, pindex != NULL, std::unique_ptr<PartiallyDownloadedBlock>(pit ? new PartiallyDownloadedBlock(&mempool) : NULL)});
- state->nBlocksInFlight++;
- state->nBlocksInFlightValidHeaders += it->fValidatedHeaders;
- if (state->nBlocksInFlight == 1) {
- // We're starting a block download (batch) from this peer.
- state->nDownloadingSince = GetTimeMicros();
- }
- if (state->nBlocksInFlightValidHeaders == 1 && pindex != NULL) {
- nPeersWithValidatedDownloads++;
- }
- itInFlight = mapBlocksInFlight.insert(std::make_pair(hash, std::make_pair(nodeid, it))).first;
- if (pit)
- *pit = &itInFlight->second.second;
- return true;
-}
-
-/** Check whether the last unknown block a peer advertised is not yet known. */
-void ProcessBlockAvailability(NodeId nodeid) {
- CNodeState *state = State(nodeid);
- assert(state != NULL);
-
- if (!state->hashLastUnknownBlock.IsNull()) {
- BlockMap::iterator itOld = mapBlockIndex.find(state->hashLastUnknownBlock);
- if (itOld != mapBlockIndex.end() && itOld->second->nChainWork > 0) {
- if (state->pindexBestKnownBlock == NULL || itOld->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
- state->pindexBestKnownBlock = itOld->second;
- state->hashLastUnknownBlock.SetNull();
- }
- }
-}
-
-/** Update tracking information about which blocks a peer is assumed to have. */
-void UpdateBlockAvailability(NodeId nodeid, const uint256 &hash) {
- CNodeState *state = State(nodeid);
- assert(state != NULL);
-
- ProcessBlockAvailability(nodeid);
-
- BlockMap::iterator it = mapBlockIndex.find(hash);
- if (it != mapBlockIndex.end() && it->second->nChainWork > 0) {
- // An actually better block was announced.
- if (state->pindexBestKnownBlock == NULL || it->second->nChainWork >= state->pindexBestKnownBlock->nChainWork)
- state->pindexBestKnownBlock = it->second;
- } else {
- // An unknown block was announced; just assume that the latest one is the best one.
- state->hashLastUnknownBlock = hash;
- }
-}
-
-void MaybeSetPeerAsAnnouncingHeaderAndIDs(const CNodeState* nodestate, CNode* pfrom, CConnman& connman) {
- if (!nodestate->fSupportsDesiredCmpctVersion) {
- // Never ask from peers who can't provide witnesses.
- return;
- }
- if (nodestate->fProvidesHeaderAndIDs) {
- for (std::list<NodeId>::iterator it = lNodesAnnouncingHeaderAndIDs.begin(); it != lNodesAnnouncingHeaderAndIDs.end(); it++) {
- if (*it == pfrom->GetId()) {
- lNodesAnnouncingHeaderAndIDs.erase(it);
- lNodesAnnouncingHeaderAndIDs.push_back(pfrom->GetId());
- return;
- }
- }
- bool fAnnounceUsingCMPCTBLOCK = false;
- uint64_t nCMPCTBLOCKVersion = (pfrom->GetLocalServices() & NODE_WITNESS) ? 2 : 1;
- if (lNodesAnnouncingHeaderAndIDs.size() >= 3) {
- // As per BIP152, we only get 3 of our peers to announce
- // blocks using compact encodings.
- bool found = connman.ForNode(lNodesAnnouncingHeaderAndIDs.front(), [fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion](CNode* pnodeStop){
- pnodeStop->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion);
- return true;
- });
- if(found)
- lNodesAnnouncingHeaderAndIDs.pop_front();
- }
- fAnnounceUsingCMPCTBLOCK = true;
- pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion);
- lNodesAnnouncingHeaderAndIDs.push_back(pfrom->GetId());
- }
-}
-
-// Requires cs_main
-bool CanDirectFetch(const Consensus::Params &consensusParams)
-{
- return chainActive.Tip()->GetBlockTime() > GetAdjustedTime() - consensusParams.nPowTargetSpacing * 20;
-}
-
-// Requires cs_main
-bool PeerHasHeader(CNodeState *state, CBlockIndex *pindex)
-{
- if (state->pindexBestKnownBlock && pindex == state->pindexBestKnownBlock->GetAncestor(pindex->nHeight))
- return true;
- if (state->pindexBestHeaderSent && pindex == state->pindexBestHeaderSent->GetAncestor(pindex->nHeight))
- return true;
- return false;
-}
-
-/** Find the last common ancestor two blocks have.
- * Both pa and pb must be non-NULL. */
-CBlockIndex* LastCommonAncestor(CBlockIndex* pa, CBlockIndex* pb) {
- if (pa->nHeight > pb->nHeight) {
- pa = pa->GetAncestor(pb->nHeight);
- } else if (pb->nHeight > pa->nHeight) {
- pb = pb->GetAncestor(pa->nHeight);
- }
-
- while (pa != pb && pa && pb) {
- pa = pa->pprev;
- pb = pb->pprev;
- }
-
- // Eventually all chain branches meet at the genesis block.
- assert(pa == pb);
- return pa;
-}
-
-/** Update pindexLastCommonBlock and add not-in-flight missing successors to vBlocks, until it has
- * at most count entries. */
-void FindNextBlocksToDownload(NodeId nodeid, unsigned int count, std::vector<CBlockIndex*>& vBlocks, NodeId& nodeStaller, const Consensus::Params& consensusParams) {
- if (count == 0)
- return;
-
- vBlocks.reserve(vBlocks.size() + count);
- CNodeState *state = State(nodeid);
- assert(state != NULL);
-
- // Make sure pindexBestKnownBlock is up to date, we'll need it.
- ProcessBlockAvailability(nodeid);
-
- if (state->pindexBestKnownBlock == NULL || state->pindexBestKnownBlock->nChainWork < chainActive.Tip()->nChainWork) {
- // This peer has nothing interesting.
- return;
- }
-
- if (state->pindexLastCommonBlock == NULL) {
- // Bootstrap quickly by guessing a parent of our best tip is the forking point.
- // Guessing wrong in either direction is not a problem.
- state->pindexLastCommonBlock = chainActive[std::min(state->pindexBestKnownBlock->nHeight, chainActive.Height())];
- }
-
- // If the peer reorganized, our previous pindexLastCommonBlock may not be an ancestor
- // of its current tip anymore. Go back enough to fix that.
- state->pindexLastCommonBlock = LastCommonAncestor(state->pindexLastCommonBlock, state->pindexBestKnownBlock);
- if (state->pindexLastCommonBlock == state->pindexBestKnownBlock)
- return;
-
- std::vector<CBlockIndex*> vToFetch;
- CBlockIndex *pindexWalk = state->pindexLastCommonBlock;
- // Never fetch further than the best block we know the peer has, or more than BLOCK_DOWNLOAD_WINDOW + 1 beyond the last
- // linked block we have in common with this peer. The +1 is so we can detect stalling, namely if we would be able to
- // download that next block if the window were 1 larger.
- int nWindowEnd = state->pindexLastCommonBlock->nHeight + BLOCK_DOWNLOAD_WINDOW;
- int nMaxHeight = std::min<int>(state->pindexBestKnownBlock->nHeight, nWindowEnd + 1);
- NodeId waitingfor = -1;
- while (pindexWalk->nHeight < nMaxHeight) {
- // Read up to 128 (or more, if more blocks than that are needed) successors of pindexWalk (towards
- // pindexBestKnownBlock) into vToFetch. We fetch 128, because CBlockIndex::GetAncestor may be as expensive
- // as iterating over ~100 CBlockIndex* entries anyway.
- int nToFetch = std::min(nMaxHeight - pindexWalk->nHeight, std::max<int>(count - vBlocks.size(), 128));
- vToFetch.resize(nToFetch);
- pindexWalk = state->pindexBestKnownBlock->GetAncestor(pindexWalk->nHeight + nToFetch);
- vToFetch[nToFetch - 1] = pindexWalk;
- for (unsigned int i = nToFetch - 1; i > 0; i--) {
- vToFetch[i - 1] = vToFetch[i]->pprev;
- }
-
- // Iterate over those blocks in vToFetch (in forward direction), adding the ones that
- // are not yet downloaded and not in flight to vBlocks. In the mean time, update
- // pindexLastCommonBlock as long as all ancestors are already downloaded, or if it's
- // already part of our chain (and therefore don't need it even if pruned).
- BOOST_FOREACH(CBlockIndex* pindex, vToFetch) {
- if (!pindex->IsValid(BLOCK_VALID_TREE)) {
- // We consider the chain that this peer is on invalid.
- return;
- }
- if (!State(nodeid)->fHaveWitness && IsWitnessEnabled(pindex->pprev, consensusParams)) {
- // We wouldn't download this block or its descendants from this peer.
- return;
- }
- if (pindex->nStatus & BLOCK_HAVE_DATA || chainActive.Contains(pindex)) {
- if (pindex->nChainTx)
- state->pindexLastCommonBlock = pindex;
- } else if (mapBlocksInFlight.count(pindex->GetBlockHash()) == 0) {
- // The block is not already downloaded, and not yet in flight.
- if (pindex->nHeight > nWindowEnd) {
- // We reached the end of the window.
- if (vBlocks.size() == 0 && waitingfor != nodeid) {
- // We aren't able to fetch anything, but we would be if the download window was one larger.
- nodeStaller = waitingfor;
- }
- return;
- }
- vBlocks.push_back(pindex);
- if (vBlocks.size() == count) {
- return;
- }
- } else if (waitingfor == -1) {
- // This is the first already-in-flight block.
- waitingfor = mapBlocksInFlight[pindex->GetBlockHash()].first;
- }
- }
- }
-}
-
} // anon namespace
-bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats) {
- LOCK(cs_main);
- CNodeState *state = State(nodeid);
- if (state == NULL)
- return false;
- stats.nMisbehavior = state->nMisbehavior;
- stats.nSyncHeight = state->pindexBestKnownBlock ? state->pindexBestKnownBlock->nHeight : -1;
- stats.nCommonHeight = state->pindexLastCommonBlock ? state->pindexLastCommonBlock->nHeight : -1;
- BOOST_FOREACH(const QueuedBlock& queue, state->vBlocksInFlight) {
- if (queue.pindex)
- stats.vHeightInFlight.push_back(queue.pindex->nHeight);
- }
- return true;
-}
-
-void RegisterNodeSignals(CNodeSignals& nodeSignals)
-{
- nodeSignals.ProcessMessages.connect(&ProcessMessages);
- nodeSignals.SendMessages.connect(&SendMessages);
- nodeSignals.InitializeNode.connect(&InitializeNode);
- nodeSignals.FinalizeNode.connect(&FinalizeNode);
-}
-
-void UnregisterNodeSignals(CNodeSignals& nodeSignals)
-{
- nodeSignals.ProcessMessages.disconnect(&ProcessMessages);
- nodeSignals.SendMessages.disconnect(&SendMessages);
- nodeSignals.InitializeNode.disconnect(&InitializeNode);
- nodeSignals.FinalizeNode.disconnect(&FinalizeNode);
-}
-
CBlockIndex* FindForkInGlobalIndex(const CChain& chain, const CBlockLocator& locator)
{
// Find the first block the caller has in the main chain
@@ -699,113 +186,8 @@ enum FlushStateMode {
};
// See definition for documentation
-bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode);
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// mapOrphanTransactions
-//
-
-bool AddOrphanTx(const CTransaction& tx, NodeId peer) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
-{
- uint256 hash = tx.GetHash();
- if (mapOrphanTransactions.count(hash))
- return false;
-
- // 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.
- // 100 orphans, each of which is at most 99,999 bytes big is
- // at most 10 megabytes of orphans and somewhat more byprev index (in the worst case):
- unsigned int sz = GetTransactionWeight(tx);
- if (sz >= MAX_STANDARD_TX_WEIGHT)
- {
- LogPrint("mempool", "ignoring large orphan tx (size: %u, hash: %s)\n", sz, hash.ToString());
- return false;
- }
-
- auto ret = mapOrphanTransactions.emplace(hash, COrphanTx{tx, peer, GetTime() + ORPHAN_TX_EXPIRE_TIME});
- assert(ret.second);
- BOOST_FOREACH(const CTxIn& txin, tx.vin) {
- mapOrphanTransactionsByPrev[txin.prevout].insert(ret.first);
- }
-
- LogPrint("mempool", "stored orphan tx %s (mapsz %u outsz %u)\n", hash.ToString(),
- mapOrphanTransactions.size(), mapOrphanTransactionsByPrev.size());
- return true;
-}
-
-int static EraseOrphanTx(uint256 hash) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
-{
- map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.find(hash);
- if (it == mapOrphanTransactions.end())
- return 0;
- BOOST_FOREACH(const CTxIn& txin, it->second.tx.vin)
- {
- auto itPrev = mapOrphanTransactionsByPrev.find(txin.prevout);
- if (itPrev == mapOrphanTransactionsByPrev.end())
- continue;
- itPrev->second.erase(it);
- if (itPrev->second.empty())
- mapOrphanTransactionsByPrev.erase(itPrev);
- }
- mapOrphanTransactions.erase(it);
- return 1;
-}
-
-void EraseOrphansFor(NodeId peer)
-{
- int nErased = 0;
- map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin();
- while (iter != mapOrphanTransactions.end())
- {
- map<uint256, COrphanTx>::iterator maybeErase = iter++; // increment to avoid iterator becoming invalid
- if (maybeErase->second.fromPeer == peer)
- {
- nErased += EraseOrphanTx(maybeErase->second.tx.GetHash());
- }
- }
- if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx from peer %d\n", nErased, peer);
-}
-
-
-unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
-{
- unsigned int nEvicted = 0;
- static int64_t nNextSweep;
- int64_t nNow = GetTime();
- if (nNextSweep <= nNow) {
- // Sweep out expired orphan pool entries:
- int nErased = 0;
- int64_t nMinExpTime = nNow + ORPHAN_TX_EXPIRE_TIME - ORPHAN_TX_EXPIRE_INTERVAL;
- map<uint256, COrphanTx>::iterator iter = mapOrphanTransactions.begin();
- while (iter != mapOrphanTransactions.end())
- {
- map<uint256, COrphanTx>::iterator maybeErase = iter++;
- if (maybeErase->second.nTimeExpire <= nNow) {
- nErased += EraseOrphanTx(maybeErase->second.tx.GetHash());
- } else {
- nMinExpTime = std::min(maybeErase->second.nTimeExpire, nMinExpTime);
- }
- }
- // Sweep again 5 minutes after the next entry that expires in order to batch the linear scan.
- nNextSweep = nMinExpTime + ORPHAN_TX_EXPIRE_INTERVAL;
- if (nErased > 0) LogPrint("mempool", "Erased %d orphan tx due to expiration\n", nErased);
- }
- while (mapOrphanTransactions.size() > nMaxOrphans)
- {
- // Evict a random orphan:
- uint256 randomhash = GetRandHash();
- map<uint256, COrphanTx>::iterator it = mapOrphanTransactions.lower_bound(randomhash);
- if (it == mapOrphanTransactions.end())
- it = mapOrphanTransactions.begin();
- EraseOrphanTx(it->first);
- ++nEvicted;
- }
- return nEvicted;
-}
+bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode, int nManualPruneHeight=0);
+void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight);
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
{
@@ -1067,7 +449,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
for (unsigned int i = 0; i < tx.vin.size(); i++)
{
const CTxOut &prevout = inputs.GetOutputFor(tx.vin[i]);
- nSigOps += CountWitnessSigOps(tx.vin[i].scriptSig, prevout.scriptPubKey, i < tx.wit.vtxinwit.size() ? &tx.wit.vtxinwit[i].scriptWitness : NULL, flags);
+ nSigOps += CountWitnessSigOps(tx.vin[i].scriptSig, prevout.scriptPubKey, &tx.vin[i].scriptWitness, flags);
}
return nSigOps;
}
@@ -1076,7 +458,7 @@ int64_t GetTransactionSigOpCost(const CTransaction& tx, const CCoinsViewCache& i
-bool CheckTransaction(const CTransaction& tx, CValidationState &state)
+bool CheckTransaction(const CTransaction& tx, CValidationState &state, bool fCheckDuplicateInputs)
{
// Basic checks that don't depend on any context
if (tx.vin.empty())
@@ -1100,13 +482,14 @@ bool CheckTransaction(const CTransaction& tx, CValidationState &state)
return state.DoS(100, false, REJECT_INVALID, "bad-txns-txouttotal-toolarge");
}
- // Check for duplicate inputs
- set<COutPoint> vInOutPoints;
- for (const auto& txin : tx.vin)
- {
- if (vInOutPoints.count(txin.prevout))
- return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-duplicate");
- vInOutPoints.insert(txin.prevout);
+ // Check for duplicate inputs - note that this check is slow so we skip it in CheckBlock
+ if (fCheckDuplicateInputs) {
+ set<COutPoint> vInOutPoints;
+ for (const auto& txin : tx.vin)
+ {
+ if (!vInOutPoints.insert(txin.prevout).second)
+ return state.DoS(100, false, REJECT_INVALID, "bad-txns-inputs-duplicate");
+ }
}
if (tx.IsCoinBase())
@@ -1144,10 +527,23 @@ std::string FormatStateMessage(const CValidationState &state)
state.GetRejectCode());
}
-bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransaction& tx, bool fLimitFree,
- bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount& nAbsurdFee,
- std::vector<uint256>& vHashTxnToUncache)
+static bool IsCurrentForFeeEstimation()
{
+ AssertLockHeld(cs_main);
+ if (IsInitialBlockDownload())
+ return false;
+ if (chainActive.Tip()->GetBlockTime() < (GetTime() - MAX_FEE_ESTIMATION_TIP_AGE))
+ return false;
+ if (chainActive.Height() < pindexBestHeader->nHeight - 1)
+ return false;
+ return true;
+}
+
+bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const CTransactionRef& ptx, bool fLimitFree,
+ bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced,
+ bool fOverrideMempoolLimit, const CAmount& nAbsurdFee, std::vector<uint256>& vHashTxnToUncache)
+{
+ const CTransaction& tx = *ptx;
const uint256 hash = tx.GetHash();
AssertLockHeld(cs_main);
if (pfMissingInputs)
@@ -1160,17 +556,9 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
if (tx.IsCoinBase())
return state.DoS(100, false, REJECT_INVALID, "coinbase");
- // Don't relay version 2 transactions until CSV is active, and we can be
- // sure that such transactions will be mined (unless we're on
- // -testnet/-regtest).
- const CChainParams& chainparams = Params();
- if (fRequireStandard && tx.nVersion >= 2 && VersionBitsTipState(chainparams.GetConsensus(), Consensus::DEPLOYMENT_CSV) != THRESHOLD_ACTIVE) {
- return state.DoS(0, false, REJECT_NONSTANDARD, "premature-version2-tx");
- }
-
// Reject transactions with witness before segregated witness activates (override with -prematurewitness)
bool witnessEnabled = IsWitnessEnabled(chainActive.Tip(), Params().GetConsensus());
- if (!GetBoolArg("-prematurewitness",false) && !tx.wit.IsNull() && !witnessEnabled) {
+ if (!GetBoolArg("-prematurewitness",false) && tx.HasWitness() && !witnessEnabled) {
return state.DoS(0, false, REJECT_NONSTANDARD, "no-witness-yet", true);
}
@@ -1292,7 +680,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
return state.Invalid(false, REJECT_NONSTANDARD, "bad-txns-nonstandard-inputs");
// Check for non-standard witness in P2WSH
- if (!tx.wit.IsNull() && fRequireStandard && !IsWitnessStandard(tx, view))
+ if (tx.HasWitness() && fRequireStandard && !IsWitnessStandard(tx, view))
return state.DoS(0, false, REJECT_NONSTANDARD, "bad-witness-nonstandard", true);
int64_t nSigOpsCost = GetTransactionSigOpCost(tx, view, STANDARD_SCRIPT_VERIFY_FLAGS);
@@ -1318,7 +706,8 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
}
}
- CTxMemPoolEntry entry(tx, nFees, nAcceptTime, dPriority, chainActive.Height(), pool.HasNoInputsOf(tx), inChainInputValue, fSpendsCoinbase, nSigOpsCost, lp);
+ CTxMemPoolEntry entry(ptx, nFees, nAcceptTime, dPriority, chainActive.Height(),
+ inChainInputValue, fSpendsCoinbase, nSigOpsCost, lp);
unsigned int nSize = entry.GetTxSize();
// Check that the transaction doesn't have an excessive number of
@@ -1532,7 +921,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
// SCRIPT_VERIFY_CLEANSTACK requires SCRIPT_VERIFY_WITNESS, so we
// need to turn both off, and compare against just turning off CLEANSTACK
// to see if the failure is specifically due to witness validation.
- if (tx.wit.IsNull() && CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true, txdata) &&
+ if (!tx.HasWitness() && CheckInputs(tx, state, view, true, scriptVerifyFlags & ~(SCRIPT_VERIFY_WITNESS | SCRIPT_VERIFY_CLEANSTACK), true, txdata) &&
!CheckInputs(tx, state, view, true, scriptVerifyFlags & ~SCRIPT_VERIFY_CLEANSTACK, true, txdata)) {
// Only the witness is missing, so the transaction itself may be fine.
state.SetCorruptionPossible();
@@ -1563,11 +952,18 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
hash.ToString(),
FormatMoney(nModifiedFees - nConflictingFees),
(int)nSize - (int)nConflictingSize);
+ if (plTxnReplaced)
+ plTxnReplaced->push_back(it->GetSharedTx());
}
pool.RemoveStaged(allConflicting, false);
+ // This transaction should only count for fee estimation if
+ // the node is not behind and it is not dependent on any other
+ // transactions in the mempool
+ bool validForFeeEstimation = IsCurrentForFeeEstimation() && pool.HasNoInputsOf(tx);
+
// Store transaction in memory
- pool.addUnchecked(hash, entry, setAncestors, !IsInitialBlockDownload());
+ pool.addUnchecked(hash, entry, setAncestors, validForFeeEstimation);
// trim mempool and check if tx was trimmed
if (!fOverrideMempoolLimit) {
@@ -1582,11 +978,12 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
return true;
}
-bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
+bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
+ bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced,
+ bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
{
std::vector<uint256> vHashTxToUncache;
- bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache);
+ bool res = AcceptToMemoryPoolWorker(pool, state, tx, fLimitFree, pfMissingInputs, nAcceptTime, plTxnReplaced, fOverrideMempoolLimit, nAbsurdFee, vHashTxToUncache);
if (!res) {
BOOST_FOREACH(const uint256& hashTx, vHashTxToUncache)
pcoinsTip->Uncache(hashTx);
@@ -1597,23 +994,24 @@ bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const
return res;
}
-bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
+bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
+ bool* pfMissingInputs, std::list<CTransactionRef>* plTxnReplaced,
+ bool fOverrideMempoolLimit, const CAmount nAbsurdFee)
{
- return AcceptToMemoryPoolWithTime(pool, state, tx, fLimitFree, pfMissingInputs, GetTime(), fOverrideMempoolLimit, nAbsurdFee);
+ return AcceptToMemoryPoolWithTime(pool, state, tx, fLimitFree, pfMissingInputs, GetTime(), plTxnReplaced, fOverrideMempoolLimit, nAbsurdFee);
}
/** Return transaction in txOut, and if it was found inside a block, its hash is placed in hashBlock */
-bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow)
+bool GetTransaction(const uint256 &hash, CTransactionRef &txOut, const Consensus::Params& consensusParams, uint256 &hashBlock, bool fAllowSlow)
{
CBlockIndex *pindexSlow = NULL;
LOCK(cs_main);
- std::shared_ptr<const CTransaction> ptx = mempool.get(hash);
+ CTransactionRef ptx = mempool.get(hash);
if (ptx)
{
- txOut = *ptx;
+ txOut = ptx;
return true;
}
@@ -1632,7 +1030,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::P
return error("%s: Deserialize or I/O error - %s", __func__, e.what());
}
hashBlock = header.GetHash();
- if (txOut.GetHash() != hash)
+ if (txOut->GetHash() != hash)
return error("%s: txid mismatch", __func__);
return true;
}
@@ -1653,8 +1051,8 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, const Consensus::P
if (pindexSlow) {
CBlock block;
if (ReadBlockFromDisk(block, pindexSlow, consensusParams)) {
- BOOST_FOREACH(const CTransaction &tx, block.vtx) {
- if (tx.GetHash() == hash) {
+ for (const auto& tx : block.vtx) {
+ if (tx->GetHash() == hash) {
txOut = tx;
hashBlock = pindexSlow->GetBlockHash();
return true;
@@ -1684,7 +1082,7 @@ bool WriteBlockToDisk(const CBlock& block, CDiskBlockPos& pos, const CMessageHea
return error("WriteBlockToDisk: OpenBlockFile failed");
// Write index header
- unsigned int nSize = fileout.GetSerializeSize(block);
+ unsigned int nSize = GetSerializeSize(fileout, block);
fileout << FLATDATA(messageStart) << nSize;
// Write block
@@ -1769,8 +1167,6 @@ bool IsInitialBlockDownload()
return false;
}
-bool fLargeWorkForkFound = false;
-bool fLargeWorkInvalidChainFound = false;
CBlockIndex *pindexBestForkTip = NULL, *pindexBestForkBase = NULL;
static void AlertNotify(const std::string& strMessage)
@@ -1805,7 +1201,7 @@ void CheckForkWarningConditions()
if (pindexBestForkTip || (pindexBestInvalid && pindexBestInvalid->nChainWork > chainActive.Tip()->nChainWork + (GetBlockProof(*chainActive.Tip()) * 6)))
{
- if (!fLargeWorkForkFound && pindexBestForkBase)
+ if (!GetfLargeWorkForkFound() && pindexBestForkBase)
{
std::string warning = std::string("'Warning: Large-work fork detected, forking after block ") +
pindexBestForkBase->phashBlock->ToString() + std::string("'");
@@ -1816,18 +1212,18 @@ void CheckForkWarningConditions()
LogPrintf("%s: Warning: Large valid fork found\n forking the chain at height %d (%s)\n lasting to height %d (%s).\nChain state database corruption likely.\n", __func__,
pindexBestForkBase->nHeight, pindexBestForkBase->phashBlock->ToString(),
pindexBestForkTip->nHeight, pindexBestForkTip->phashBlock->ToString());
- fLargeWorkForkFound = true;
+ SetfLargeWorkForkFound(true);
}
else
{
LogPrintf("%s: Warning: Found invalid chain at least ~6 blocks longer than our best chain.\nChain state database corruption likely.\n", __func__);
- fLargeWorkInvalidChainFound = true;
+ SetfLargeWorkInvalidChainFound(true);
}
}
else
{
- fLargeWorkForkFound = false;
- fLargeWorkInvalidChainFound = false;
+ SetfLargeWorkForkFound(false);
+ SetfLargeWorkInvalidChainFound(false);
}
}
@@ -1864,26 +1260,6 @@ void CheckForkWarningConditionsOnNewFork(CBlockIndex* pindexNewForkTip)
CheckForkWarningConditions();
}
-// Requires cs_main.
-void Misbehaving(NodeId pnode, int howmuch)
-{
- if (howmuch == 0)
- return;
-
- CNodeState *state = State(pnode);
- if (state == NULL)
- return;
-
- state->nMisbehavior += howmuch;
- int banscore = GetArg("-banscore", DEFAULT_BANSCORE_THRESHOLD);
- if (state->nMisbehavior >= banscore && state->nMisbehavior - howmuch < banscore)
- {
- LogPrintf("%s: %s peer=%d (%d -> %d) BAN THRESHOLD EXCEEDED\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior);
- state->fShouldBan = true;
- } else
- LogPrintf("%s: %s peer=%d (%d -> %d)\n", __func__, state->name, pnode, state->nMisbehavior-howmuch, state->nMisbehavior);
-}
-
void static InvalidChainFound(CBlockIndex* pindexNew)
{
if (!pindexBestInvalid || pindexNew->nChainWork > pindexBestInvalid->nChainWork)
@@ -1944,7 +1320,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
bool CScriptCheck::operator()() {
const CScript &scriptSig = ptxTo->vin[nIn].scriptSig;
- const CScriptWitness *witness = (nIn < ptxTo->wit.vtxinwit.size()) ? &ptxTo->wit.vtxinwit[nIn].scriptWitness : NULL;
+ const CScriptWitness *witness = &ptxTo->vin[nIn].scriptWitness;
if (!VerifyScript(scriptSig, scriptPubKey, witness, nFlags, CachingTransactionSignatureChecker(ptxTo, nIn, amount, cacheStore, *txdata), &error)) {
return false;
}
@@ -2018,11 +1394,10 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
// Only if ALL inputs pass do we perform expensive ECDSA signature checks.
// Helps prevent CPU exhaustion attacks.
- // Skip ECDSA signature verification when connecting blocks before the
- // last block chain checkpoint. Assuming the checkpoints are valid this
+ // Skip script verification when connecting blocks under the
+ // assumedvalid block. Assuming the assumedvalid block is valid this
// is safe because block merkle hashes are still computed and checked,
- // and any change will be caught at the next checkpoint. Of course, if
- // the checkpoint is for a chain that's invalid due to false scriptSigs
+ // Of course, if an assumed valid block is invalid due to false scriptSigs
// this optimization would allow an invalid chain to be accepted.
if (fScriptChecks) {
for (unsigned int i = 0; i < tx.vin.size(); i++) {
@@ -2074,7 +1449,7 @@ bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint
return error("%s: OpenUndoFile failed", __func__);
// Write index header
- unsigned int nSize = fileout.GetSerializeSize(blockundo);
+ unsigned int nSize = GetSerializeSize(fileout, blockundo);
fileout << FLATDATA(messageStart) << nSize;
// Write undo data
@@ -2123,7 +1498,7 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CDiskBlockPos& pos, const uin
/** Abort with a message */
bool AbortNode(const std::string& strMessage, const std::string& userMessage="")
{
- strMiscWarning = strMessage;
+ SetMiscWarning(strMessage);
LogPrintf("*** %s\n", strMessage);
uiInterface.ThreadSafeMessageBox(
userMessage.empty() ? _("Error: A fatal internal error occurred, see debug.log for details") : userMessage,
@@ -2147,7 +1522,7 @@ bool AbortNode(CValidationState& state, const std::string& strMessage, const std
* @param out The out point that corresponds to the tx input.
* @return True on success.
*/
-static bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out)
+bool ApplyTxInUndo(const CTxInUndo& undo, CCoinsViewCache& view, const COutPoint& out)
{
bool fClean = true;
@@ -2194,7 +1569,7 @@ bool DisconnectBlock(const CBlock& block, CValidationState& state, const CBlockI
// undo transactions in reverse order
for (int i = block.vtx.size() - 1; i >= 0; i--) {
- const CTransaction &tx = block.vtx[i];
+ const CTransaction &tx = *(block.vtx[i]);
uint256 hash = tx.GetHash();
// Check that all outputs are available and match the outputs in the block itself
@@ -2350,11 +1725,28 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
}
bool fScriptChecks = true;
- if (fCheckpointsEnabled) {
- CBlockIndex *pindexLastCheckpoint = Checkpoints::GetLastCheckpoint(chainparams.Checkpoints());
- if (pindexLastCheckpoint && pindexLastCheckpoint->GetAncestor(pindex->nHeight) == pindex) {
- // This block is an ancestor of a checkpoint: disable script checks
- fScriptChecks = false;
+ if (!hashAssumeValid.IsNull()) {
+ // We've been configured with the hash of a block which has been externally verified to have a valid history.
+ // A suitable default value is included with the software and updated from time to time. Because validity
+ // relative to a piece of software is an objective fact these defaults can be easily reviewed.
+ // This setting doesn't force the selection of any particular chain but makes validating some faster by
+ // effectively caching the result of part of the verification.
+ BlockMap::const_iterator it = mapBlockIndex.find(hashAssumeValid);
+ if (it != mapBlockIndex.end()) {
+ if (it->second->GetAncestor(pindex->nHeight) == pindex &&
+ pindexBestHeader->GetAncestor(pindex->nHeight) == pindex &&
+ pindexBestHeader->nChainWork >= UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) {
+ // This block is a member of the assumed verified chain and an ancestor of the best header.
+ // The equivalent time check discourages hashpower from extorting the network via DOS attack
+ // into accepting an invalid block through telling users they must manually set assumevalid.
+ // Requiring a software change or burying the invalid block, regardless of the setting, makes
+ // it hard to hide the implication of the demand. This also avoids having release candidates
+ // that are hardly doing any signature verification at all in testing without having to
+ // artificially set the default assumed verified block further back.
+ // The test against nMinimumChainWork prevents the skipping when denied access to any chain at
+ // least as good as the expected chain.
+ fScriptChecks = (GetBlockProofEquivalentTime(*pindexBestHeader, *pindex, *pindexBestHeader, chainparams.GetConsensus()) <= 60 * 60 * 24 * 7 * 2);
+ }
}
}
@@ -2388,8 +1780,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
fEnforceBIP30 = fEnforceBIP30 && (!pindexBIP34height || !(pindexBIP34height->GetBlockHash() == chainparams.GetConsensus().BIP34Hash));
if (fEnforceBIP30) {
- BOOST_FOREACH(const CTransaction& tx, block.vtx) {
- const CCoins* coins = view.AccessCoins(tx.GetHash());
+ for (const auto& tx : block.vtx) {
+ const CCoins* coins = view.AccessCoins(tx->GetHash());
if (coins && !coins->IsPruned())
return state.DoS(100, error("ConnectBlock(): tried to overwrite transaction"),
REJECT_INVALID, "bad-txns-BIP30");
@@ -2432,7 +1824,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
CCheckQueueControl<CScriptCheck> control(fScriptChecks && nScriptCheckThreads ? &scriptcheckqueue : NULL);
- std::vector<uint256> vOrphanErase;
std::vector<int> prevheights;
CAmount nFees = 0;
int nInputs = 0;
@@ -2445,7 +1836,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
txdata.reserve(block.vtx.size()); // Required so that pointers to individual PrecomputedTransactionData don't get invalidated
for (unsigned int i = 0; i < block.vtx.size(); i++)
{
- const CTransaction &tx = block.vtx[i];
+ const CTransaction &tx = *(block.vtx[i]);
nInputs += tx.vin.size();
@@ -2463,17 +1854,6 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
prevheights[j] = view.AccessCoins(tx.vin[j].prevout.hash)->nHeight;
}
- // Which orphan pool entries must we evict?
- for (size_t j = 0; j < tx.vin.size(); j++) {
- auto itByPrev = mapOrphanTransactionsByPrev.find(tx.vin[j].prevout);
- if (itByPrev == mapOrphanTransactionsByPrev.end()) continue;
- for (auto mi = itByPrev->second.begin(); mi != itByPrev->second.end(); ++mi) {
- const CTransaction& orphanTx = (*mi)->second.tx;
- const uint256& orphanHash = orphanTx.GetHash();
- vOrphanErase.push_back(orphanHash);
- }
- }
-
if (!SequenceLocks(tx, nLockTimeFlags, &prevheights, *pindex)) {
return state.DoS(100, error("%s: contains a non-BIP68-final transaction", __func__),
REJECT_INVALID, "bad-txns-nonfinal");
@@ -2515,10 +1895,10 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime3 - nTime2), 0.001 * (nTime3 - nTime2) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime3 - nTime2) / (nInputs-1), nTimeConnect * 0.000001);
CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
- if (block.vtx[0].GetValueOut() > blockReward)
+ if (block.vtx[0]->GetValueOut() > blockReward)
return state.DoS(100,
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
- block.vtx[0].GetValueOut(), blockReward),
+ block.vtx[0]->GetValueOut(), blockReward),
REJECT_INVALID, "bad-cb-amount");
if (!control.Wait())
@@ -2561,16 +1941,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
// Watch for changes to the previous coinbase transaction.
static uint256 hashPrevBestCoinBase;
GetMainSignals().UpdatedTransaction(hashPrevBestCoinBase);
- hashPrevBestCoinBase = block.vtx[0].GetHash();
+ hashPrevBestCoinBase = block.vtx[0]->GetHash();
- // Erase orphan transactions include or precluded by this block
- if (vOrphanErase.size()) {
- int nErased = 0;
- BOOST_FOREACH(uint256 &orphanHash, vOrphanErase) {
- nErased += EraseOrphanTx(orphanHash);
- }
- LogPrint("mempool", "Erased %d orphan tx included or conflicted by block\n", nErased);
- }
int64_t nTime6 = GetTimeMicros(); nTimeCallbacks += nTime6 - nTime5;
LogPrint("bench", " - Callbacks: %.2fms [%.2fs]\n", 0.001 * (nTime6 - nTime5), nTimeCallbacks * 0.000001);
@@ -2584,7 +1956,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
* if they're too large, if it's been a while since the last write,
* or always and in all cases if we're in prune mode and are deleting files.
*/
-bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
+bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode, int nManualPruneHeight) {
+ int64_t nMempoolUsage = mempool.DynamicMemoryUsage();
const CChainParams& chainparams = Params();
LOCK2(cs_main, cs_LastBlockFile);
static int64_t nLastWrite = 0;
@@ -2593,9 +1966,13 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
std::set<int> setFilesToPrune;
bool fFlushForPrune = false;
try {
- if (fPruneMode && fCheckForPruning && !fReindex) {
- FindFilesToPrune(setFilesToPrune, chainparams.PruneAfterHeight());
- fCheckForPruning = false;
+ if (fPruneMode && (fCheckForPruning || nManualPruneHeight > 0) && !fReindex) {
+ if (nManualPruneHeight > 0) {
+ FindFilesToPruneManual(setFilesToPrune, nManualPruneHeight);
+ } else {
+ FindFilesToPrune(setFilesToPrune, chainparams.PruneAfterHeight());
+ fCheckForPruning = false;
+ }
if (!setFilesToPrune.empty()) {
fFlushForPrune = true;
if (!fHavePruned) {
@@ -2615,11 +1992,13 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
if (nLastSetChain == 0) {
nLastSetChain = nNow;
}
- size_t cacheSize = pcoinsTip->DynamicMemoryUsage();
- // The cache is large and close to the limit, but we have time now (not in the middle of a block processing).
- bool fCacheLarge = mode == FLUSH_STATE_PERIODIC && cacheSize * (10.0/9) > nCoinCacheUsage;
+ int64_t nMempoolSizeMax = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
+ int64_t cacheSize = pcoinsTip->DynamicMemoryUsage();
+ int64_t nTotalSpace = nCoinCacheUsage + std::max<int64_t>(nMempoolSizeMax - nMempoolUsage, 0);
+ // The cache is large and we're within 10% and 100 MiB of the limit, but we have time now (not in the middle of a block processing).
+ bool fCacheLarge = mode == FLUSH_STATE_PERIODIC && cacheSize > std::max((9 * nTotalSpace) / 10, nTotalSpace - 100 * 1024 * 1024);
// The cache is over the limit, we have to write now.
- bool fCacheCritical = mode == FLUSH_STATE_IF_NEEDED && cacheSize > nCoinCacheUsage;
+ bool fCacheCritical = mode == FLUSH_STATE_IF_NEEDED && cacheSize > nTotalSpace;
// It's been a while since we wrote the block index to disk. Do this frequently, so we don't need to redownload after a crash.
bool fPeriodicWrite = mode == FLUSH_STATE_PERIODIC && nNow > nLastWrite + (int64_t)DATABASE_WRITE_INTERVAL * 1000000;
// It's been very long since we flushed the cache. Do this infrequently, to optimize cache usage.
@@ -2712,9 +2091,10 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
ThresholdState state = checker.GetStateFor(pindex, chainParams.GetConsensus(), warningcache[bit]);
if (state == THRESHOLD_ACTIVE || state == THRESHOLD_LOCKED_IN) {
if (state == THRESHOLD_ACTIVE) {
- strMiscWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
+ std::string strWarning = strprintf(_("Warning: unknown new rules activated (versionbit %i)"), bit);
+ SetMiscWarning(strWarning);
if (!fWarned) {
- AlertNotify(strMiscWarning);
+ AlertNotify(strWarning);
fWarned = true;
}
} else {
@@ -2734,10 +2114,11 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
warningMessages.push_back(strprintf("%d of last 100 blocks have unexpected version", nUpgraded));
if (nUpgraded > 100/2)
{
- // strMiscWarning is read by GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
- strMiscWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect");
+ std::string strWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect");
+ // notify GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
+ SetMiscWarning(strWarning);
if (!fWarned) {
- AlertNotify(strMiscWarning);
+ AlertNotify(strWarning);
fWarned = true;
}
}
@@ -2746,7 +2127,7 @@ void static UpdateTip(CBlockIndex *pindexNew, const CChainParams& chainParams) {
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(), chainActive.Tip()->nVersion,
log(chainActive.Tip()->nChainWork.getdouble())/log(2.0), (unsigned long)chainActive.Tip()->nChainTx,
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
- Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize());
+ GuessVerificationProgress(chainParams.TxData(), chainActive.Tip()), pcoinsTip->DynamicMemoryUsage() * (1.0 / (1<<20)), pcoinsTip->GetCacheSize());
if (!warningMessages.empty())
LogPrintf(" warning='%s'", boost::algorithm::join(warningMessages, ", "));
LogPrintf("\n");
@@ -2768,7 +2149,8 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara
CCoinsViewCache view(pcoinsTip);
if (!DisconnectBlock(block, state, pindexDelete, view))
return error("DisconnectTip(): DisconnectBlock %s failed", pindexDelete->GetBlockHash().ToString());
- assert(view.Flush());
+ bool flushed = view.Flush();
+ assert(flushed);
}
LogPrint("bench", "- Disconnect block: %.2fms\n", (GetTimeMicros() - nStart) * 0.001);
// Write the chain state to disk, if necessary.
@@ -2778,10 +2160,11 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara
if (!fBare) {
// Resurrect mempool transactions from the disconnected block.
std::vector<uint256> vHashUpdate;
- BOOST_FOREACH(const CTransaction &tx, block.vtx) {
+ for (const auto& it : block.vtx) {
+ const CTransaction& tx = *it;
// ignore validation errors in resurrected transactions
CValidationState stateDummy;
- if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, tx, false, NULL, true)) {
+ if (tx.IsCoinBase() || !AcceptToMemoryPool(mempool, stateDummy, it, false, NULL, NULL, true)) {
mempool.removeRecursive(tx);
} else if (mempool.exists(tx.GetHash())) {
vHashUpdate.push_back(tx.GetHash());
@@ -2799,8 +2182,8 @@ bool static DisconnectTip(CValidationState& state, const CChainParams& chainpara
UpdateTip(pindexDelete->pprev, chainparams);
// Let wallets know transactions went from 1-confirmed to
// 0-confirmed or conflicted:
- BOOST_FOREACH(const CTransaction &tx, block.vtx) {
- GetMainSignals().SyncTransaction(tx, pindexDelete->pprev, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
+ for (const auto& tx : block.vtx) {
+ GetMainSignals().SyncTransaction(*tx, pindexDelete->pprev, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
}
return true;
}
@@ -2812,28 +2195,43 @@ static int64_t nTimeChainState = 0;
static int64_t nTimePostConnect = 0;
/**
+ * Used to track blocks whose transactions were applied to the UTXO state as a
+ * part of a single ActivateBestChainStep call.
+ */
+struct ConnectTrace {
+ std::vector<std::pair<CBlockIndex*, std::shared_ptr<const CBlock> > > blocksConnected;
+};
+
+/**
* Connect a new block to chainActive. pblock is either NULL or a pointer to a CBlock
* corresponding to pindexNew, to bypass loading it again from disk.
+ *
+ * The block is always added to connectTrace (either after loading from disk or by copying
+ * pblock) - if that is not intended, care must be taken to remove the last entry in
+ * blocksConnected in case of failure.
*/
-bool static ConnectTip(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexNew, const CBlock* pblock, std::vector<std::shared_ptr<const CTransaction>> &txConflicted, std::vector<std::tuple<CTransaction,CBlockIndex*,int>> &txChanged)
+bool static ConnectTip(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexNew, const std::shared_ptr<const CBlock>& pblock, ConnectTrace& connectTrace)
{
assert(pindexNew->pprev == chainActive.Tip());
// Read block from disk.
int64_t nTime1 = GetTimeMicros();
- CBlock block;
if (!pblock) {
- if (!ReadBlockFromDisk(block, pindexNew, chainparams.GetConsensus()))
+ std::shared_ptr<CBlock> pblockNew = std::make_shared<CBlock>();
+ connectTrace.blocksConnected.emplace_back(pindexNew, pblockNew);
+ if (!ReadBlockFromDisk(*pblockNew, pindexNew, chainparams.GetConsensus()))
return AbortNode(state, "Failed to read block");
- pblock = &block;
+ } else {
+ connectTrace.blocksConnected.emplace_back(pindexNew, pblock);
}
+ const CBlock& blockConnecting = *connectTrace.blocksConnected.back().second;
// Apply the block atomically to the chain state.
int64_t nTime2 = GetTimeMicros(); nTimeReadFromDisk += nTime2 - nTime1;
int64_t nTime3;
LogPrint("bench", " - Load block from disk: %.2fms [%.2fs]\n", (nTime2 - nTime1) * 0.001, nTimeReadFromDisk * 0.000001);
{
CCoinsViewCache view(pcoinsTip);
- bool rv = ConnectBlock(*pblock, state, pindexNew, view, chainparams);
- GetMainSignals().BlockChecked(*pblock, state);
+ bool rv = ConnectBlock(blockConnecting, state, pindexNew, view, chainparams);
+ GetMainSignals().BlockChecked(blockConnecting, state);
if (!rv) {
if (state.IsInvalid())
InvalidBlockFound(pindexNew, state);
@@ -2841,7 +2239,8 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
}
nTime3 = GetTimeMicros(); nTimeConnectTotal += nTime3 - nTime2;
LogPrint("bench", " - Connect total: %.2fms [%.2fs]\n", (nTime3 - nTime2) * 0.001, nTimeConnectTotal * 0.000001);
- assert(view.Flush());
+ bool flushed = view.Flush();
+ assert(flushed);
}
int64_t nTime4 = GetTimeMicros(); nTimeFlush += nTime4 - nTime3;
LogPrint("bench", " - Flush: %.2fms [%.2fs]\n", (nTime4 - nTime3) * 0.001, nTimeFlush * 0.000001);
@@ -2851,13 +2250,10 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
int64_t nTime5 = GetTimeMicros(); nTimeChainState += nTime5 - nTime4;
LogPrint("bench", " - Writing chainstate: %.2fms [%.2fs]\n", (nTime5 - nTime4) * 0.001, nTimeChainState * 0.000001);
// Remove conflicting transactions from the mempool.;
- mempool.removeForBlock(pblock->vtx, pindexNew->nHeight, &txConflicted, !IsInitialBlockDownload());
+ mempool.removeForBlock(blockConnecting.vtx, pindexNew->nHeight);
// Update chainActive & related variables.
UpdateTip(pindexNew, chainparams);
- for(unsigned int i=0; i < pblock->vtx.size(); i++)
- txChanged.emplace_back(pblock->vtx[i], pindexNew, i);
-
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;
LogPrint("bench", " - Connect postprocess: %.2fms [%.2fs]\n", (nTime6 - nTime5) * 0.001, nTimePostConnect * 0.000001);
LogPrint("bench", "- Connect block: %.2fms [%.2fs]\n", (nTime6 - nTime1) * 0.001, nTimeTotal * 0.000001);
@@ -2938,7 +2334,7 @@ static void PruneBlockIndexCandidates() {
* Try to make some progress towards making pindexMostWork the active block.
* pblock is either NULL or a pointer to a CBlock corresponding to pindexMostWork.
*/
-static bool ActivateBestChainStep(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const CBlock* pblock, bool& fInvalidFound, std::vector<std::shared_ptr<const CTransaction>>& txConflicted, std::vector<std::tuple<CTransaction,CBlockIndex*,int>>& txChanged)
+static bool ActivateBestChainStep(CValidationState& state, const CChainParams& chainparams, CBlockIndex* pindexMostWork, const std::shared_ptr<const CBlock>& pblock, bool& fInvalidFound, ConnectTrace& connectTrace)
{
AssertLockHeld(cs_main);
const CBlockIndex *pindexOldTip = chainActive.Tip();
@@ -2971,7 +2367,7 @@ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& c
// Connect new blocks.
BOOST_REVERSE_FOREACH(CBlockIndex *pindexConnect, vpindexToConnect) {
- if (!ConnectTip(state, chainparams, pindexConnect, pindexConnect == pindexMostWork ? pblock : NULL, txConflicted, txChanged)) {
+ if (!ConnectTip(state, chainparams, pindexConnect, pindexConnect == pindexMostWork ? pblock : std::shared_ptr<const CBlock>(), connectTrace)) {
if (state.IsInvalid()) {
// The block violates a consensus rule.
if (!state.CorruptionPossible())
@@ -2979,6 +2375,8 @@ static bool ActivateBestChainStep(CValidationState& state, const CChainParams& c
state = CValidationState();
fInvalidFound = true;
fContinue = false;
+ // If we didn't actually connect the block, don't notify listeners about it
+ connectTrace.blocksConnected.pop_back();
break;
} else {
// A system error occurred (disk space, database error, ...).
@@ -3036,20 +2434,21 @@ static void NotifyHeaderTip() {
* or an activated best chain. pblock is either NULL or a pointer to a block
* that is already loaded (to avoid loading it again from disk).
*/
-bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, const CBlock *pblock) {
+bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock) {
+ // Note that while we're often called here from ProcessNewBlock, this is
+ // far from a guarantee. Things in the P2P/RPC will often end up calling
+ // us in the middle of ProcessNewBlock - do not assume pblock is set
+ // sanely for performance or correctness!
+
CBlockIndex *pindexMostWork = NULL;
CBlockIndex *pindexNewTip = NULL;
- std::vector<std::tuple<CTransaction,CBlockIndex*,int>> txChanged;
- if (pblock)
- txChanged.reserve(pblock->vtx.size());
do {
- txChanged.clear();
boost::this_thread::interruption_point();
if (ShutdownRequested())
break;
const CBlockIndex *pindexFork;
- std::vector<std::shared_ptr<const CTransaction>> txConflicted;
+ ConnectTrace connectTrace;
bool fInitialDownload;
{
LOCK(cs_main);
@@ -3063,7 +2462,8 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
return true;
bool fInvalidFound = false;
- if (!ActivateBestChainStep(state, chainparams, pindexMostWork, pblock && pblock->GetHash() == pindexMostWork->GetBlockHash() ? pblock : NULL, fInvalidFound, txConflicted, txChanged))
+ std::shared_ptr<const CBlock> nullBlockPtr;
+ if (!ActivateBestChainStep(state, chainparams, pindexMostWork, pblock && pblock->GetHash() == pindexMostWork->GetBlockHash() ? pblock : nullBlockPtr, fInvalidFound, connectTrace))
return false;
if (fInvalidFound) {
@@ -3080,13 +2480,12 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
// throw all transactions though the signal-interface
// while _not_ holding the cs_main lock
- for(std::shared_ptr<const CTransaction> tx : txConflicted)
- {
- GetMainSignals().SyncTransaction(*tx, pindexNewTip, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
+ for (const auto& pair : connectTrace.blocksConnected) {
+ assert(pair.second);
+ const CBlock& block = *(pair.second);
+ for (unsigned int i = 0; i < block.vtx.size(); i++)
+ GetMainSignals().SyncTransaction(*block.vtx[i], pair.first, i);
}
- // ... and about transactions that got confirmed:
- for(unsigned int i = 0; i < txChanged.size(); i++)
- GetMainSignals().SyncTransaction(std::get<0>(txChanged[i]), std::get<1>(txChanged[i]), std::get<2>(txChanged[i]));
// Notify external listeners about the new tip.
GetMainSignals().UpdatedBlockTip(pindexNewTip, pindexFork, fInitialDownload);
@@ -3172,6 +2571,7 @@ bool InvalidateBlock(CValidationState& state, const CChainParams& chainparams, C
InvalidChainFound(pindex);
mempool.removeForReorg(pcoinsTip, chainActive.Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
+ uiInterface.NotifyBlockTip(IsInitialBlockDownload(), pindex->pprev);
return true;
}
@@ -3232,6 +2632,7 @@ CBlockIndex* AddToBlockIndex(const CBlockHeader& block)
pindexNew->nHeight = pindexNew->pprev->nHeight + 1;
pindexNew->BuildSkip();
}
+ pindexNew->nTimeMax = (pindexNew->pprev ? std::max(pindexNew->pprev->nTimeMax, pindexNew->nTime) : pindexNew->nTime);
pindexNew->nChainWork = (pindexNew->pprev ? pindexNew->pprev->nChainWork : 0) + GetBlockProof(*pindexNew);
pindexNew->RaiseValidity(BLOCK_VALID_TREE);
if (pindexBestHeader == NULL || pindexBestHeader->nChainWork < pindexNew->nChainWork)
@@ -3425,22 +2826,22 @@ bool CheckBlock(const CBlock& block, CValidationState& state, const Consensus::P
return state.DoS(100, false, REJECT_INVALID, "bad-blk-length", false, "size limits failed");
// First transaction must be coinbase, the rest must not be
- if (block.vtx.empty() || !block.vtx[0].IsCoinBase())
+ if (block.vtx.empty() || !block.vtx[0]->IsCoinBase())
return state.DoS(100, false, REJECT_INVALID, "bad-cb-missing", false, "first tx is not coinbase");
for (unsigned int i = 1; i < block.vtx.size(); i++)
- if (block.vtx[i].IsCoinBase())
+ if (block.vtx[i]->IsCoinBase())
return state.DoS(100, false, REJECT_INVALID, "bad-cb-multiple", false, "more than one coinbase");
// Check transactions
for (const auto& tx : block.vtx)
- if (!CheckTransaction(tx, state))
+ if (!CheckTransaction(*tx, state, false))
return state.Invalid(false, state.GetRejectCode(), state.GetRejectReason(),
- strprintf("Transaction check failed (tx hash %s) %s", tx.GetHash().ToString(), state.GetDebugMessage()));
+ strprintf("Transaction check failed (tx hash %s) %s", tx->GetHash().ToString(), state.GetDebugMessage()));
unsigned int nSigOps = 0;
for (const auto& tx : block.vtx)
{
- nSigOps += GetLegacySigOpCount(tx);
+ nSigOps += GetLegacySigOpCount(*tx);
}
if (nSigOps * WITNESS_SCALE_FACTOR > MAX_BLOCK_SIGOPS_COST)
return state.DoS(100, false, REJECT_INVALID, "bad-blk-sigops", false, "out-of-bounds SigOpCount");
@@ -3476,8 +2877,8 @@ bool IsWitnessEnabled(const CBlockIndex* pindexPrev, const Consensus::Params& pa
static int GetWitnessCommitmentIndex(const CBlock& block)
{
int commitpos = -1;
- for (size_t o = 0; o < block.vtx[0].vout.size(); o++) {
- if (block.vtx[0].vout[o].scriptPubKey.size() >= 38 && block.vtx[0].vout[o].scriptPubKey[0] == OP_RETURN && block.vtx[0].vout[o].scriptPubKey[1] == 0x24 && block.vtx[0].vout[o].scriptPubKey[2] == 0xaa && block.vtx[0].vout[o].scriptPubKey[3] == 0x21 && block.vtx[0].vout[o].scriptPubKey[4] == 0xa9 && block.vtx[0].vout[o].scriptPubKey[5] == 0xed) {
+ for (size_t o = 0; o < block.vtx[0]->vout.size(); o++) {
+ if (block.vtx[0]->vout[o].scriptPubKey.size() >= 38 && block.vtx[0]->vout[o].scriptPubKey[0] == OP_RETURN && block.vtx[0]->vout[o].scriptPubKey[1] == 0x24 && block.vtx[0]->vout[o].scriptPubKey[2] == 0xaa && block.vtx[0]->vout[o].scriptPubKey[3] == 0x21 && block.vtx[0]->vout[o].scriptPubKey[4] == 0xa9 && block.vtx[0]->vout[o].scriptPubKey[5] == 0xed) {
commitpos = o;
}
}
@@ -3488,10 +2889,11 @@ void UpdateUncommittedBlockStructures(CBlock& block, const CBlockIndex* pindexPr
{
int commitpos = GetWitnessCommitmentIndex(block);
static const std::vector<unsigned char> nonce(32, 0x00);
- if (commitpos != -1 && IsWitnessEnabled(pindexPrev, consensusParams) && block.vtx[0].wit.IsEmpty()) {
- block.vtx[0].wit.vtxinwit.resize(1);
- block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.resize(1);
- block.vtx[0].wit.vtxinwit[0].scriptWitness.stack[0] = nonce;
+ if (commitpos != -1 && IsWitnessEnabled(pindexPrev, consensusParams) && !block.vtx[0]->HasWitness()) {
+ CMutableTransaction tx(*block.vtx[0]);
+ tx.vin[0].scriptWitness.stack.resize(1);
+ tx.vin[0].scriptWitness.stack[0] = nonce;
+ block.vtx[0] = MakeTransactionRef(std::move(tx));
}
}
@@ -3499,15 +2901,8 @@ std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBloc
{
std::vector<unsigned char> commitment;
int commitpos = GetWitnessCommitmentIndex(block);
- bool fHaveWitness = false;
- for (size_t t = 1; t < block.vtx.size(); t++) {
- if (!block.vtx[t].wit.IsNull()) {
- fHaveWitness = true;
- break;
- }
- }
std::vector<unsigned char> ret(32, 0x00);
- if (fHaveWitness && IsWitnessEnabled(pindexPrev, consensusParams)) {
+ if (consensusParams.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout != 0) {
if (commitpos == -1) {
uint256 witnessroot = BlockWitnessMerkleRoot(block, NULL);
CHash256().Write(witnessroot.begin(), 32).Write(&ret[0], 32).Finalize(witnessroot.begin());
@@ -3522,8 +2917,9 @@ std::vector<unsigned char> GenerateCoinbaseCommitment(CBlock& block, const CBloc
out.scriptPubKey[5] = 0xed;
memcpy(&out.scriptPubKey[6], witnessroot.begin(), 32);
commitment = std::vector<unsigned char>(out.scriptPubKey.begin(), out.scriptPubKey.end());
- const_cast<std::vector<CTxOut>*>(&block.vtx[0].vout)->push_back(out);
- block.vtx[0].UpdateHash();
+ CMutableTransaction tx(*block.vtx[0]);
+ tx.vout.push_back(out);
+ block.vtx[0] = MakeTransactionRef(std::move(tx));
}
}
UpdateUncommittedBlockStructures(block, pindexPrev, consensusParams);
@@ -3572,7 +2968,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
// Check that all transactions are finalized
for (const auto& tx : block.vtx) {
- if (!IsFinalTx(tx, nHeight, nLockTimeCutoff)) {
+ if (!IsFinalTx(*tx, nHeight, nLockTimeCutoff)) {
return state.DoS(10, false, REJECT_INVALID, "bad-txns-nonfinal", false, "non-final transaction");
}
}
@@ -3581,8 +2977,8 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
if (nHeight >= consensusParams.BIP34Height)
{
CScript expect = CScript() << nHeight;
- if (block.vtx[0].vin[0].scriptSig.size() < expect.size() ||
- !std::equal(expect.begin(), expect.end(), block.vtx[0].vin[0].scriptSig.begin())) {
+ if (block.vtx[0]->vin[0].scriptSig.size() < expect.size() ||
+ !std::equal(expect.begin(), expect.end(), block.vtx[0]->vin[0].scriptSig.begin())) {
return state.DoS(100, false, REJECT_INVALID, "bad-cb-height", false, "block height mismatch in coinbase");
}
}
@@ -3604,11 +3000,11 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
// The malleation check is ignored; as the transaction tree itself
// already does not permit it, it is impossible to trigger in the
// witness tree.
- if (block.vtx[0].wit.vtxinwit.size() != 1 || block.vtx[0].wit.vtxinwit[0].scriptWitness.stack.size() != 1 || block.vtx[0].wit.vtxinwit[0].scriptWitness.stack[0].size() != 32) {
+ if (block.vtx[0]->vin[0].scriptWitness.stack.size() != 1 || block.vtx[0]->vin[0].scriptWitness.stack[0].size() != 32) {
return state.DoS(100, false, REJECT_INVALID, "bad-witness-nonce-size", true, strprintf("%s : invalid witness nonce size", __func__));
}
- CHash256().Write(hashWitness.begin(), 32).Write(&block.vtx[0].wit.vtxinwit[0].scriptWitness.stack[0][0], 32).Finalize(hashWitness.begin());
- if (memcmp(hashWitness.begin(), &block.vtx[0].vout[commitpos].scriptPubKey[6], 32)) {
+ CHash256().Write(hashWitness.begin(), 32).Write(&block.vtx[0]->vin[0].scriptWitness.stack[0][0], 32).Finalize(hashWitness.begin());
+ if (memcmp(hashWitness.begin(), &block.vtx[0]->vout[commitpos].scriptPubKey[6], 32)) {
return state.DoS(100, false, REJECT_INVALID, "bad-witness-merkle-match", true, strprintf("%s : witness merkle commitment mismatch", __func__));
}
fHaveWitness = true;
@@ -3618,7 +3014,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
// No witness data is allowed in blocks that don't commit to witness data, as this would otherwise leave room for spam
if (!fHaveWitness) {
for (size_t i = 0; i < block.vtx.size(); i++) {
- if (!block.vtx[i].wit.IsNull()) {
+ if (block.vtx[i]->HasWitness()) {
return state.DoS(100, false, REJECT_INVALID, "unexpected-witness", true, strprintf("%s : unexpected witness data found", __func__));
}
}
@@ -3637,7 +3033,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, const Co
return true;
}
-static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex=NULL)
+static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex)
{
AssertLockHeld(cs_main);
// Check for duplicate
@@ -3686,9 +3082,30 @@ static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state
return true;
}
+// Exposed wrapper for AcceptBlockHeader
+bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& headers, CValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex)
+{
+ {
+ LOCK(cs_main);
+ for (const CBlockHeader& header : headers) {
+ CBlockIndex *pindex = NULL; // Use a temp pindex instead of ppindex to avoid a const_cast
+ if (!AcceptBlockHeader(header, state, chainparams, &pindex)) {
+ return false;
+ }
+ if (ppindex) {
+ *ppindex = pindex;
+ }
+ }
+ }
+ NotifyHeaderTip();
+ return true;
+}
+
/** Store block on disk. If dbp is non-NULL, the file is known to already reside on disk */
-static bool AcceptBlock(const CBlock& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, const CDiskBlockPos* dbp, bool* fNewBlock)
+static bool AcceptBlock(const std::shared_ptr<const CBlock>& pblock, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, const CDiskBlockPos* dbp, bool* fNewBlock)
{
+ const CBlock& block = *pblock;
+
if (fNewBlock) *fNewBlock = false;
AssertLockHeld(cs_main);
@@ -3734,6 +3151,11 @@ static bool AcceptBlock(const CBlock& block, CValidationState& state, const CCha
return error("%s: %s", __func__, FormatStateMessage(state));
}
+ // Header is valid/has work, merkle tree and segwit merkle tree are good...RELAY NOW
+ // (but if it does not build on our best tip, let the SendMessages loop relay it)
+ if (!IsInitialBlockDownload() && chainActive.Tip() == pindex->pprev)
+ GetMainSignals().NewPoWValidBlock(pindex, pblock);
+
int nHeight = pindex->nHeight;
// Write block to history file
@@ -3759,26 +3181,26 @@ static bool AcceptBlock(const CBlock& block, CValidationState& state, const CCha
return true;
}
-bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp)
+bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<const CBlock> pblock, bool fForceProcessing, bool *fNewBlock)
{
{
LOCK(cs_main);
// Store to disk
CBlockIndex *pindex = NULL;
- bool fNewBlock = false;
- bool ret = AcceptBlock(*pblock, state, chainparams, &pindex, fForceProcessing, dbp, &fNewBlock);
- if (pindex && pfrom) {
- mapBlockSource[pindex->GetBlockHash()] = pfrom->GetId();
- if (fNewBlock) pfrom->nLastBlockTime = GetTime();
- }
+ if (fNewBlock) *fNewBlock = false;
+ CValidationState state;
+ bool ret = AcceptBlock(pblock, state, chainparams, &pindex, fForceProcessing, NULL, fNewBlock);
CheckBlockIndex(chainparams.GetConsensus());
- if (!ret)
+ if (!ret) {
+ GetMainSignals().BlockChecked(*pblock, state);
return error("%s: AcceptBlock FAILED", __func__);
+ }
}
NotifyHeaderTip();
+ CValidationState state; // Only used to report errors, not invalidity - ignore it
if (!ActivateBestChain(state, chainparams, pblock))
return error("%s: ActivateBestChain failed", __func__);
@@ -3868,6 +3290,35 @@ void UnlinkPrunedFiles(std::set<int>& setFilesToPrune)
}
}
+/* Calculate the block/rev files to delete based on height specified by user with RPC command pruneblockchain */
+void FindFilesToPruneManual(std::set<int>& setFilesToPrune, int nManualPruneHeight)
+{
+ assert(fPruneMode && nManualPruneHeight > 0);
+
+ LOCK2(cs_main, cs_LastBlockFile);
+ if (chainActive.Tip() == NULL)
+ return;
+
+ // last block to prune is the lesser of (user-specified height, MIN_BLOCKS_TO_KEEP from the tip)
+ unsigned int nLastBlockWeCanPrune = min((unsigned)nManualPruneHeight, chainActive.Tip()->nHeight - MIN_BLOCKS_TO_KEEP);
+ int count=0;
+ for (int fileNumber = 0; fileNumber < nLastBlockFile; fileNumber++) {
+ if (vinfoBlockFile[fileNumber].nSize == 0 || vinfoBlockFile[fileNumber].nHeightLast > nLastBlockWeCanPrune)
+ continue;
+ PruneOneBlockFile(fileNumber);
+ setFilesToPrune.insert(fileNumber);
+ count++;
+ }
+ LogPrintf("Prune (Manual): prune_height=%d removed %d blk/rev pairs\n", nLastBlockWeCanPrune, count);
+}
+
+/* This function is called from the RPC code for pruneblockchain */
+void PruneBlockFilesManual(int nManualPruneHeight)
+{
+ CValidationState state;
+ FlushStateToDisk(state, FLUSH_STATE_NONE, nManualPruneHeight);
+}
+
/* Calculate the block/rev files that should be deleted to remain under target*/
void FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight)
{
@@ -4003,6 +3454,7 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams)
{
CBlockIndex* pindex = item.second;
pindex->nChainWork = (pindex->pprev ? pindex->pprev->nChainWork : 0) + GetBlockProof(*pindex);
+ pindex->nTimeMax = (pindex->pprev ? std::max(pindex->pprev->nTimeMax, pindex->nTime) : pindex->nTime);
// We can link the chain of blocks for which we've received transactions at some point.
// Pruned nodes may have deleted the block.
if (pindex->nTx > 0) {
@@ -4087,7 +3539,7 @@ bool static LoadBlockIndexDB(const CChainParams& chainparams)
LogPrintf("%s: hashBestChain=%s height=%d date=%s progress=%f\n", __func__,
chainActive.Tip()->GetBlockHash().ToString(), chainActive.Height(),
DateTimeStrFormat("%Y-%m-%d %H:%M:%S", chainActive.Tip()->GetBlockTime()),
- Checkpoints::GuessVerificationProgress(chainparams.Checkpoints(), chainActive.Tip()));
+ GuessVerificationProgress(chainparams.TxData(), chainActive.Tip()));
return true;
}
@@ -4290,8 +3742,6 @@ void UnloadBlockIndex()
pindexBestInvalid = NULL;
pindexBestHeader = NULL;
mempool.clear();
- mapOrphanTransactions.clear();
- mapOrphanTransactionsByPrev.clear();
mapBlocksUnlinked.clear();
vinfoBlockFile.clear();
nLastBlockFile = 0;
@@ -4397,7 +3847,8 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskB
dbp->nPos = nBlockPos;
blkdat.SetLimit(nBlockPos + nSize);
blkdat.SetPos(nBlockPos);
- CBlock block;
+ std::shared_ptr<CBlock> pblock = std::make_shared<CBlock>();
+ CBlock& block = *pblock;
blkdat >> block;
nRewind = blkdat.GetPos();
@@ -4415,7 +3866,7 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskB
if (mapBlockIndex.count(hash) == 0 || (mapBlockIndex[hash]->nStatus & BLOCK_HAVE_DATA) == 0) {
LOCK(cs_main);
CValidationState state;
- if (AcceptBlock(block, state, chainparams, NULL, true, dbp, NULL))
+ if (AcceptBlock(pblock, state, chainparams, NULL, true, dbp, NULL))
nLoaded++;
if (state.IsError())
break;
@@ -4442,16 +3893,17 @@ bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskB
std::pair<std::multimap<uint256, CDiskBlockPos>::iterator, std::multimap<uint256, CDiskBlockPos>::iterator> range = mapBlocksUnknownParent.equal_range(head);
while (range.first != range.second) {
std::multimap<uint256, CDiskBlockPos>::iterator it = range.first;
- if (ReadBlockFromDisk(block, it->second, chainparams.GetConsensus()))
+ std::shared_ptr<CBlock> pblockrecursive = std::make_shared<CBlock>();
+ if (ReadBlockFromDisk(*pblockrecursive, it->second, chainparams.GetConsensus()))
{
- LogPrint("reindex", "%s: Processing out of order child %s of %s\n", __func__, block.GetHash().ToString(),
+ LogPrint("reindex", "%s: Processing out of order child %s of %s\n", __func__, pblockrecursive->GetHash().ToString(),
head.ToString());
LOCK(cs_main);
CValidationState dummy;
- if (AcceptBlock(block, dummy, chainparams, NULL, true, &it->second, NULL))
+ if (AcceptBlock(pblockrecursive, dummy, chainparams, NULL, true, &it->second, NULL))
{
nLoaded++;
- queue.push_back(block.GetHash());
+ queue.push_back(pblockrecursive->GetHash());
}
}
range.first++;
@@ -4655,2290 +4107,11 @@ void static CheckBlockIndex(const Consensus::Params& consensusParams)
assert(nNodes == forward.size());
}
-std::string GetWarnings(const std::string& strFor)
-{
- string strStatusBar;
- string strRPC;
- string strGUI;
- const string uiAlertSeperator = "<hr />";
-
- if (!CLIENT_VERSION_IS_RELEASE) {
- strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
- strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
- }
-
- if (GetBoolArg("-testsafemode", DEFAULT_TESTSAFEMODE))
- strStatusBar = strRPC = strGUI = "testsafemode enabled";
-
- // Misc warnings like out of disk space and clock is wrong
- if (strMiscWarning != "")
- {
- strStatusBar = strMiscWarning;
- strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning;
- }
-
- if (fLargeWorkForkFound)
- {
- strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.";
- strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.");
- }
- else if (fLargeWorkInvalidChainFound)
- {
- strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.";
- strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.");
- }
-
- if (strFor == "gui")
- return strGUI;
- else if (strFor == "statusbar")
- return strStatusBar;
- else if (strFor == "rpc")
- return strRPC;
- assert(!"GetWarnings(): invalid parameter");
- return "error";
-}
-
-
-
-
-
-
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// blockchain -> download logic notification
-//
-
-PeerLogicValidation::PeerLogicValidation(CConnman* connmanIn) : connman(connmanIn) {
- // Initialize global variables that cannot be constructed at startup.
- recentRejects.reset(new CRollingBloomFilter(120000, 0.000001));
-}
-
-void PeerLogicValidation::UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload) {
- const int nNewHeight = pindexNew->nHeight;
- connman->SetBestHeight(nNewHeight);
-
- if (!fInitialDownload) {
- // Find the hashes of all blocks that weren't previously in the best chain.
- std::vector<uint256> vHashes;
- const CBlockIndex *pindexToAnnounce = pindexNew;
- while (pindexToAnnounce != pindexFork) {
- vHashes.push_back(pindexToAnnounce->GetBlockHash());
- pindexToAnnounce = pindexToAnnounce->pprev;
- if (vHashes.size() == MAX_BLOCKS_TO_ANNOUNCE) {
- // Limit announcements in case of a huge reorganization.
- // Rely on the peer's synchronization mechanism in that case.
- break;
- }
- }
- // Relay inventory, but don't relay old inventory during initial block download.
- connman->ForEachNode([nNewHeight, &vHashes](CNode* pnode) {
- if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
- BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
- pnode->PushBlockHash(hash);
- }
- }
- });
- }
-
- nTimeBestReceived = GetTime();
-}
-
-void PeerLogicValidation::BlockChecked(const CBlock& block, const CValidationState& state) {
- LOCK(cs_main);
-
- const uint256 hash(block.GetHash());
- std::map<uint256, NodeId>::iterator it = mapBlockSource.find(hash);
-
- int nDoS = 0;
- if (state.IsInvalid(nDoS)) {
- if (it != mapBlockSource.end() && State(it->second)) {
- assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
- CBlockReject reject = {(unsigned char)state.GetRejectCode(), state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), hash};
- State(it->second)->rejects.push_back(reject);
- if (nDoS > 0)
- Misbehaving(it->second, nDoS);
- }
- }
- if (it != mapBlockSource.end())
- mapBlockSource.erase(it);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Messages
-//
-
-
-bool static AlreadyHave(const CInv& inv) EXCLUSIVE_LOCKS_REQUIRED(cs_main)
-{
- switch (inv.type)
- {
- case MSG_TX:
- case MSG_WITNESS_TX:
- {
- assert(recentRejects);
- if (chainActive.Tip()->GetBlockHash() != hashRecentRejectsChainTip)
- {
- // If the chain tip has changed previously rejected transactions
- // might be now valid, e.g. due to a nLockTime'd tx becoming valid,
- // or a double-spend. Reset the rejects filter and give those
- // txs a second chance.
- hashRecentRejectsChainTip = chainActive.Tip()->GetBlockHash();
- recentRejects->reset();
- }
-
- // Use pcoinsTip->HaveCoinsInCache as a quick approximation to exclude
- // requesting or processing some txs which have already been included in a block
- return recentRejects->contains(inv.hash) ||
- mempool.exists(inv.hash) ||
- mapOrphanTransactions.count(inv.hash) ||
- pcoinsTip->HaveCoinsInCache(inv.hash);
- }
- case MSG_BLOCK:
- case MSG_WITNESS_BLOCK:
- return mapBlockIndex.count(inv.hash);
- }
- // Don't know what it is, just say we already got one
- return true;
-}
-
-static void RelayTransaction(const CTransaction& tx, CConnman& connman)
-{
- CInv inv(MSG_TX, tx.GetHash());
- connman.ForEachNode([&inv](CNode* pnode)
- {
- pnode->PushInventory(inv);
- });
-}
-
-static void RelayAddress(const CAddress& addr, bool fReachable, CConnman& connman)
-{
- int nRelayNodes = fReachable ? 2 : 1; // limited relaying of addresses outside our network(s)
-
- // Relay to a limited number of other nodes
- // Use deterministic randomness to send to the same nodes for 24 hours
- // at a time so the addrKnowns of the chosen nodes prevent repeats
- uint64_t hashAddr = addr.GetHash();
- std::multimap<uint64_t, CNode*> mapMix;
- const CSipHasher hasher = connman.GetDeterministicRandomizer(RANDOMIZER_ID_ADDRESS_RELAY).Write(hashAddr << 32).Write((GetTime() + hashAddr) / (24*60*60));
- FastRandomContext insecure_rand;
-
- auto sortfunc = [&mapMix, &hasher](CNode* pnode) {
- if (pnode->nVersion >= CADDR_TIME_VERSION) {
- uint64_t hashKey = CSipHasher(hasher).Write(pnode->id).Finalize();
- mapMix.emplace(hashKey, pnode);
- }
- };
-
- auto pushfunc = [&addr, &mapMix, &nRelayNodes, &insecure_rand] {
- for (auto mi = mapMix.begin(); mi != mapMix.end() && nRelayNodes-- > 0; ++mi)
- mi->second->PushAddress(addr, insecure_rand);
- };
-
- connman.ForEachNodeThen(std::move(sortfunc), std::move(pushfunc));
-}
-
-void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParams, CConnman& connman)
-{
- std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin();
- unsigned int nMaxSendBufferSize = connman.GetSendBufferSize();
-
- vector<CInv> vNotFound;
-
- LOCK(cs_main);
-
- while (it != pfrom->vRecvGetData.end()) {
- // Don't bother if send buffer is too full to respond anyway
- if (pfrom->nSendSize >= nMaxSendBufferSize)
- break;
-
- const CInv &inv = *it;
- {
- boost::this_thread::interruption_point();
- it++;
-
- if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK || inv.type == MSG_CMPCT_BLOCK || inv.type == MSG_WITNESS_BLOCK)
- {
- bool send = false;
- BlockMap::iterator mi = mapBlockIndex.find(inv.hash);
- if (mi != mapBlockIndex.end())
- {
- if (chainActive.Contains(mi->second)) {
- send = true;
- } else {
- static const int nOneMonth = 30 * 24 * 60 * 60;
- // To prevent fingerprinting attacks, only send blocks outside of the active
- // chain if they are valid, and no more than a month older (both in time, and in
- // best equivalent proof of work) than the best header chain we know about.
- send = mi->second->IsValid(BLOCK_VALID_SCRIPTS) && (pindexBestHeader != NULL) &&
- (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() < nOneMonth) &&
- (GetBlockProofEquivalentTime(*pindexBestHeader, *mi->second, *pindexBestHeader, consensusParams) < nOneMonth);
- if (!send) {
- LogPrintf("%s: ignoring request from peer=%i for old block that isn't in the main chain\n", __func__, pfrom->GetId());
- }
- }
- }
- // disconnect node in case we have reached the outbound limit for serving historical blocks
- // never disconnect whitelisted nodes
- static const int nOneWeek = 7 * 24 * 60 * 60; // assume > 1 week = historical
- if (send && connman.OutboundTargetReached(true) && ( ((pindexBestHeader != NULL) && (pindexBestHeader->GetBlockTime() - mi->second->GetBlockTime() > nOneWeek)) || inv.type == MSG_FILTERED_BLOCK) && !pfrom->fWhitelisted)
- {
- LogPrint("net", "historical block serving limit reached, disconnect peer=%d\n", pfrom->GetId());
-
- //disconnect node
- pfrom->fDisconnect = true;
- send = false;
- }
- // Pruned nodes may have deleted the block, so check whether
- // it's available before trying to send.
- if (send && (mi->second->nStatus & BLOCK_HAVE_DATA))
- {
- // Send block from disk
- CBlock block;
- if (!ReadBlockFromDisk(block, (*mi).second, consensusParams))
- assert(!"cannot load block from disk");
- if (inv.type == MSG_BLOCK)
- pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCK, block);
- else if (inv.type == MSG_WITNESS_BLOCK)
- pfrom->PushMessage(NetMsgType::BLOCK, block);
- else if (inv.type == MSG_FILTERED_BLOCK)
- {
- bool sendMerkleBlock = false;
- CMerkleBlock merkleBlock;
- {
- LOCK(pfrom->cs_filter);
- if (pfrom->pfilter) {
- sendMerkleBlock = true;
- merkleBlock = CMerkleBlock(block, *pfrom->pfilter);
- }
- }
- if (sendMerkleBlock) {
- pfrom->PushMessage(NetMsgType::MERKLEBLOCK, merkleBlock);
- // CMerkleBlock just contains hashes, so also push any transactions in the block the client did not see
- // This avoids hurting performance by pointlessly requiring a round-trip
- // Note that there is currently no way for a node to request any single transactions we didn't send here -
- // they must either disconnect and retry or request the full block.
- // Thus, the protocol spec specified allows for us to provide duplicate txn here,
- // however we MUST always provide at least what the remote peer needs
- typedef std::pair<unsigned int, uint256> PairType;
- BOOST_FOREACH(PairType& pair, merkleBlock.vMatchedTxn)
- pfrom->PushMessageWithFlag(SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::TX, block.vtx[pair.first]);
- }
- // else
- // no response
- }
- else if (inv.type == MSG_CMPCT_BLOCK)
- {
- // If a peer is asking for old blocks, we're almost guaranteed
- // they wont have a useful mempool to match against a compact block,
- // and we don't feel like constructing the object for them, so
- // instead we respond with the full, non-compact block.
- bool fPeerWantsWitness = State(pfrom->GetId())->fWantsCmpctWitness;
- if (CanDirectFetch(consensusParams) && mi->second->nHeight >= chainActive.Height() - MAX_CMPCTBLOCK_DEPTH) {
- CBlockHeaderAndShortTxIDs cmpctblock(block, fPeerWantsWitness);
- pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock);
- } else
- pfrom->PushMessageWithFlag(fPeerWantsWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCK, block);
- }
-
- // Trigger the peer node to send a getblocks request for the next batch of inventory
- if (inv.hash == pfrom->hashContinue)
- {
- // Bypass PushInventory, this must send even if redundant,
- // and we want it right after the last block so they don't
- // wait for other stuff first.
- vector<CInv> vInv;
- vInv.push_back(CInv(MSG_BLOCK, chainActive.Tip()->GetBlockHash()));
- pfrom->PushMessage(NetMsgType::INV, vInv);
- pfrom->hashContinue.SetNull();
- }
- }
- }
- else if (inv.type == MSG_TX || inv.type == MSG_WITNESS_TX)
- {
- // Send stream from relay memory
- bool push = false;
- auto mi = mapRelay.find(inv.hash);
- if (mi != mapRelay.end()) {
- pfrom->PushMessageWithFlag(inv.type == MSG_TX ? SERIALIZE_TRANSACTION_NO_WITNESS : 0, NetMsgType::TX, *mi->second);
- push = true;
- } else if (pfrom->timeLastMempoolReq) {
- auto txinfo = mempool.info(inv.hash);
- // To protect privacy, do not answer getdata using the mempool when
- // that TX couldn't have been INVed in reply to a MEMPOOL request.
- if (txinfo.tx && txinfo.nTime <= pfrom->timeLastMempoolReq) {
- pfrom->PushMessageWithFlag(inv.type == MSG_TX ? SERIALIZE_TRANSACTION_NO_WITNESS : 0, NetMsgType::TX, *txinfo.tx);
- push = true;
- }
- }
- if (!push) {
- vNotFound.push_back(inv);
- }
- }
-
- // Track requests for our stuff.
- GetMainSignals().Inventory(inv.hash);
-
- if (inv.type == MSG_BLOCK || inv.type == MSG_FILTERED_BLOCK || inv.type == MSG_CMPCT_BLOCK || inv.type == MSG_WITNESS_BLOCK)
- break;
- }
- }
-
- pfrom->vRecvGetData.erase(pfrom->vRecvGetData.begin(), it);
-
- if (!vNotFound.empty()) {
- // Let the peer know that we didn't find what it asked for, so it doesn't
- // have to wait around forever. Currently only SPV clients actually care
- // about this message: it's needed when they are recursively walking the
- // dependencies of relevant unconfirmed transactions. SPV clients want to
- // do that because they want to know about (and store and rebroadcast and
- // risk analyze) the dependencies of transactions relevant to them, without
- // having to download the entire memory pool.
- pfrom->PushMessage(NetMsgType::NOTFOUND, vNotFound);
- }
-}
-
-uint32_t GetFetchFlags(CNode* pfrom, CBlockIndex* pprev, const Consensus::Params& chainparams) {
- uint32_t nFetchFlags = 0;
- if ((pfrom->GetLocalServices() & NODE_WITNESS) && State(pfrom->GetId())->fHaveWitness) {
- nFetchFlags |= MSG_WITNESS_FLAG;
- }
- return nFetchFlags;
-}
-
-bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, int64_t nTimeReceived, const CChainParams& chainparams, CConnman& connman)
-{
- unsigned int nMaxSendBufferSize = connman.GetSendBufferSize();
-
- LogPrint("net", "received: %s (%u bytes) peer=%d\n", SanitizeString(strCommand), vRecv.size(), pfrom->id);
- if (mapArgs.count("-dropmessagestest") && GetRand(atoi(mapArgs["-dropmessagestest"])) == 0)
- {
- LogPrintf("dropmessagestest DROPPING RECV MESSAGE\n");
- return true;
- }
-
-
- if (!(pfrom->GetLocalServices() & NODE_BLOOM) &&
- (strCommand == NetMsgType::FILTERLOAD ||
- strCommand == NetMsgType::FILTERADD ||
- strCommand == NetMsgType::FILTERCLEAR))
- {
- if (pfrom->nVersion >= NO_BLOOM_VERSION) {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 100);
- return false;
- } else {
- pfrom->fDisconnect = true;
- return false;
- }
- }
-
-
- if (strCommand == NetMsgType::VERSION)
- {
- // Feeler connections exist only to verify if address is online.
- if (pfrom->fFeeler) {
- assert(pfrom->fInbound == false);
- pfrom->fDisconnect = true;
- }
-
- // Each connection can only send one version message
- if (pfrom->nVersion != 0)
- {
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_DUPLICATE, string("Duplicate version message"));
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 1);
- return false;
- }
-
- int64_t nTime;
- CAddress addrMe;
- CAddress addrFrom;
- uint64_t nNonce = 1;
- uint64_t nServiceInt;
- vRecv >> pfrom->nVersion >> nServiceInt >> nTime >> addrMe;
- pfrom->nServices = ServiceFlags(nServiceInt);
- if (!pfrom->fInbound)
- {
- connman.SetServices(pfrom->addr, pfrom->nServices);
- }
- if (pfrom->nServicesExpected & ~pfrom->nServices)
- {
- LogPrint("net", "peer=%d does not offer the expected services (%08x offered, %08x expected); disconnecting\n", pfrom->id, pfrom->nServices, pfrom->nServicesExpected);
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_NONSTANDARD,
- strprintf("Expected to offer services %08x", pfrom->nServicesExpected));
- pfrom->fDisconnect = true;
- return false;
- }
-
- if (pfrom->nVersion < MIN_PEER_PROTO_VERSION)
- {
- // disconnect from peers older than this proto version
- LogPrintf("peer=%d using obsolete version %i; disconnecting\n", pfrom->id, pfrom->nVersion);
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_OBSOLETE,
- strprintf("Version must be %d or greater", MIN_PEER_PROTO_VERSION));
- pfrom->fDisconnect = true;
- return false;
- }
-
- if (pfrom->nVersion == 10300)
- pfrom->nVersion = 300;
- if (!vRecv.empty())
- vRecv >> addrFrom >> nNonce;
- if (!vRecv.empty()) {
- vRecv >> LIMITED_STRING(pfrom->strSubVer, MAX_SUBVERSION_LENGTH);
- pfrom->cleanSubVer = SanitizeString(pfrom->strSubVer);
- }
- if (!vRecv.empty()) {
- vRecv >> pfrom->nStartingHeight;
- }
- {
- LOCK(pfrom->cs_filter);
- if (!vRecv.empty())
- vRecv >> pfrom->fRelayTxes; // set to true after we get the first filter* message
- else
- pfrom->fRelayTxes = true;
- }
-
- // Disconnect if we connected to ourself
- if (pfrom->fInbound && !connman.CheckIncomingNonce(nNonce))
- {
- LogPrintf("connected to self at %s, disconnecting\n", pfrom->addr.ToString());
- pfrom->fDisconnect = true;
- return true;
- }
-
- pfrom->addrLocal = addrMe;
- if (pfrom->fInbound && addrMe.IsRoutable())
- {
- SeenLocal(addrMe);
- }
-
- // Be shy and don't send version until we hear
- if (pfrom->fInbound)
- pfrom->PushVersion();
-
- pfrom->fClient = !(pfrom->nServices & NODE_NETWORK);
-
- if((pfrom->nServices & NODE_WITNESS))
- {
- LOCK(cs_main);
- State(pfrom->GetId())->fHaveWitness = true;
- }
-
- // Potentially mark this peer as a preferred download peer.
- {
- LOCK(cs_main);
- UpdatePreferredDownload(pfrom, State(pfrom->GetId()));
- }
-
- // Change version
- pfrom->PushMessage(NetMsgType::VERACK);
- pfrom->ssSend.SetVersion(min(pfrom->nVersion, PROTOCOL_VERSION));
-
- if (!pfrom->fInbound)
- {
- // Advertise our address
- if (fListen && !IsInitialBlockDownload())
- {
- CAddress addr = GetLocalAddress(&pfrom->addr, pfrom->GetLocalServices());
- FastRandomContext insecure_rand;
- if (addr.IsRoutable())
- {
- LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
- pfrom->PushAddress(addr, insecure_rand);
- } else if (IsPeerAddrLocalGood(pfrom)) {
- addr.SetIP(pfrom->addrLocal);
- LogPrint("net", "ProcessMessages: advertising address %s\n", addr.ToString());
- pfrom->PushAddress(addr, insecure_rand);
- }
- }
-
- // Get recent addresses
- if (pfrom->fOneShot || pfrom->nVersion >= CADDR_TIME_VERSION || connman.GetAddressCount() < 1000)
- {
- pfrom->PushMessage(NetMsgType::GETADDR);
- pfrom->fGetAddr = true;
- }
- connman.MarkAddressGood(pfrom->addr);
- }
-
- pfrom->fSuccessfullyConnected = true;
-
- string remoteAddr;
- if (fLogIPs)
- remoteAddr = ", peeraddr=" + pfrom->addr.ToString();
-
- LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, peer=%d%s\n",
- pfrom->cleanSubVer, pfrom->nVersion,
- pfrom->nStartingHeight, addrMe.ToString(), pfrom->id,
- remoteAddr);
-
- int64_t nTimeOffset = nTime - GetTime();
- pfrom->nTimeOffset = nTimeOffset;
- AddTimeData(pfrom->addr, nTimeOffset);
- }
-
-
- else if (pfrom->nVersion == 0)
- {
- // Must have a version message before anything else
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 1);
- return false;
- }
-
-
- else if (strCommand == NetMsgType::VERACK)
- {
- pfrom->SetRecvVersion(min(pfrom->nVersion, PROTOCOL_VERSION));
-
- // Mark this node as currently connected, so we update its timestamp later.
- if (pfrom->fNetworkNode) {
- LOCK(cs_main);
- State(pfrom->GetId())->fCurrentlyConnected = true;
- }
-
- if (pfrom->nVersion >= SENDHEADERS_VERSION) {
- // Tell our peer we prefer to receive headers rather than inv's
- // We send this to non-NODE NETWORK peers as well, because even
- // non-NODE NETWORK peers can announce blocks (such as pruning
- // nodes)
- pfrom->PushMessage(NetMsgType::SENDHEADERS);
- }
- if (pfrom->nVersion >= SHORT_IDS_BLOCKS_VERSION) {
- // Tell our peer we are willing to provide version 1 or 2 cmpctblocks
- // However, we do not request new block announcements using
- // cmpctblock messages.
- // We send this to non-NODE NETWORK peers as well, because
- // they may wish to request compact blocks from us
- bool fAnnounceUsingCMPCTBLOCK = false;
- uint64_t nCMPCTBLOCKVersion = 2;
- if (pfrom->GetLocalServices() & NODE_WITNESS)
- pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion);
- nCMPCTBLOCKVersion = 1;
- pfrom->PushMessage(NetMsgType::SENDCMPCT, fAnnounceUsingCMPCTBLOCK, nCMPCTBLOCKVersion);
- }
- }
-
-
- else if (strCommand == NetMsgType::ADDR)
- {
- vector<CAddress> vAddr;
- vRecv >> vAddr;
-
- // Don't want addr from older versions unless seeding
- if (pfrom->nVersion < CADDR_TIME_VERSION && connman.GetAddressCount() > 1000)
- return true;
- if (vAddr.size() > 1000)
- {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 20);
- return error("message addr size() = %u", vAddr.size());
- }
-
- // Store the new addresses
- vector<CAddress> vAddrOk;
- int64_t nNow = GetAdjustedTime();
- int64_t nSince = nNow - 10 * 60;
- BOOST_FOREACH(CAddress& addr, vAddr)
- {
- boost::this_thread::interruption_point();
-
- if ((addr.nServices & REQUIRED_SERVICES) != REQUIRED_SERVICES)
- continue;
-
- 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
- RelayAddress(addr, fReachable, connman);
- }
- // Do not store addresses outside our network
- if (fReachable)
- vAddrOk.push_back(addr);
- }
- connman.AddNewAddresses(vAddrOk, pfrom->addr, 2 * 60 * 60);
- if (vAddr.size() < 1000)
- pfrom->fGetAddr = false;
- if (pfrom->fOneShot)
- pfrom->fDisconnect = true;
- }
-
- else if (strCommand == NetMsgType::SENDHEADERS)
- {
- LOCK(cs_main);
- State(pfrom->GetId())->fPreferHeaders = true;
- }
-
- else if (strCommand == NetMsgType::SENDCMPCT)
- {
- bool fAnnounceUsingCMPCTBLOCK = false;
- uint64_t nCMPCTBLOCKVersion = 0;
- vRecv >> fAnnounceUsingCMPCTBLOCK >> nCMPCTBLOCKVersion;
- if (nCMPCTBLOCKVersion == 1 || ((pfrom->GetLocalServices() & NODE_WITNESS) && nCMPCTBLOCKVersion == 2)) {
- LOCK(cs_main);
- // fProvidesHeaderAndIDs is used to "lock in" version of compact blocks we send (fWantsCmpctWitness)
- if (!State(pfrom->GetId())->fProvidesHeaderAndIDs) {
- State(pfrom->GetId())->fProvidesHeaderAndIDs = true;
- State(pfrom->GetId())->fWantsCmpctWitness = nCMPCTBLOCKVersion == 2;
- }
- if (State(pfrom->GetId())->fWantsCmpctWitness == (nCMPCTBLOCKVersion == 2)) // ignore later version announces
- State(pfrom->GetId())->fPreferHeaderAndIDs = fAnnounceUsingCMPCTBLOCK;
- if (!State(pfrom->GetId())->fSupportsDesiredCmpctVersion) {
- if (pfrom->GetLocalServices() & NODE_WITNESS)
- State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 2);
- else
- State(pfrom->GetId())->fSupportsDesiredCmpctVersion = (nCMPCTBLOCKVersion == 1);
- }
- }
- }
-
-
- else if (strCommand == NetMsgType::INV)
- {
- vector<CInv> vInv;
- vRecv >> vInv;
- if (vInv.size() > MAX_INV_SZ)
- {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 20);
- return error("message inv size() = %u", vInv.size());
- }
-
- bool fBlocksOnly = !fRelayTxes;
-
- // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistrelay is true
- if (pfrom->fWhitelisted && GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY))
- fBlocksOnly = false;
-
- LOCK(cs_main);
-
- uint32_t nFetchFlags = GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus());
-
- std::vector<CInv> vToFetch;
-
- for (unsigned int nInv = 0; nInv < vInv.size(); nInv++)
- {
- CInv &inv = vInv[nInv];
-
- boost::this_thread::interruption_point();
-
- bool fAlreadyHave = AlreadyHave(inv);
- LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
-
- if (inv.type == MSG_TX) {
- inv.type |= nFetchFlags;
- }
-
- if (inv.type == MSG_BLOCK) {
- UpdateBlockAvailability(pfrom->GetId(), inv.hash);
- if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
- // First request the headers preceding the announced block. In the normal fully-synced
- // case where a new block is announced that succeeds the current tip (no reorganization),
- // there are no such headers.
- // Secondly, and only when we are close to being synced, we request the announced block directly,
- // to avoid an extra round-trip. Note that we must *first* ask for the headers, so by the
- // time the block arrives, the header chain leading up to it is already validated. Not
- // doing this will result in the received block being rejected as an orphan in case it is
- // not a direct successor.
- pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), inv.hash);
- CNodeState *nodestate = State(pfrom->GetId());
- if (CanDirectFetch(chainparams.GetConsensus()) &&
- nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER &&
- (!IsWitnessEnabled(chainActive.Tip(), chainparams.GetConsensus()) || State(pfrom->GetId())->fHaveWitness)) {
- inv.type |= nFetchFlags;
- if (nodestate->fSupportsDesiredCmpctVersion)
- vToFetch.push_back(CInv(MSG_CMPCT_BLOCK, inv.hash));
- else
- vToFetch.push_back(inv);
- // Mark block as in flight already, even though the actual "getdata" message only goes out
- // later (within the same cs_main lock, though).
- MarkBlockAsInFlight(pfrom->GetId(), inv.hash, chainparams.GetConsensus());
- }
- LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
- }
- }
- else
- {
- pfrom->AddInventoryKnown(inv);
- if (fBlocksOnly)
- LogPrint("net", "transaction (%s) inv sent in violation of protocol peer=%d\n", inv.hash.ToString(), pfrom->id);
- else if (!fAlreadyHave && !fImporting && !fReindex && !IsInitialBlockDownload())
- pfrom->AskFor(inv);
- }
-
- // Track requests for our stuff
- GetMainSignals().Inventory(inv.hash);
-
- if (pfrom->nSendSize > (nMaxSendBufferSize * 2)) {
- Misbehaving(pfrom->GetId(), 50);
- return error("send buffer size() = %u", pfrom->nSendSize);
- }
- }
-
- if (!vToFetch.empty())
- pfrom->PushMessage(NetMsgType::GETDATA, vToFetch);
- }
-
-
- else if (strCommand == NetMsgType::GETDATA)
- {
- vector<CInv> vInv;
- vRecv >> vInv;
- if (vInv.size() > MAX_INV_SZ)
- {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 20);
- return error("message getdata size() = %u", vInv.size());
- }
-
- if (fDebug || (vInv.size() != 1))
- LogPrint("net", "received getdata (%u invsz) peer=%d\n", vInv.size(), pfrom->id);
-
- if ((fDebug && vInv.size() > 0) || (vInv.size() == 1))
- LogPrint("net", "received getdata for: %s peer=%d\n", vInv[0].ToString(), pfrom->id);
-
- pfrom->vRecvGetData.insert(pfrom->vRecvGetData.end(), vInv.begin(), vInv.end());
- ProcessGetData(pfrom, chainparams.GetConsensus(), connman);
- }
-
-
- else if (strCommand == NetMsgType::GETBLOCKS)
- {
- CBlockLocator locator;
- uint256 hashStop;
- vRecv >> locator >> hashStop;
-
- LOCK(cs_main);
-
- // Find the last block the caller has in the main chain
- CBlockIndex* pindex = FindForkInGlobalIndex(chainActive, locator);
-
- // Send the rest of the chain
- if (pindex)
- pindex = chainActive.Next(pindex);
- int nLimit = 500;
- LogPrint("net", "getblocks %d to %s limit %d from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), nLimit, pfrom->id);
- for (; pindex; pindex = chainActive.Next(pindex))
- {
- if (pindex->GetBlockHash() == hashStop)
- {
- LogPrint("net", " getblocks stopping at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
- break;
- }
- // If pruning, don't inv blocks unless we have on disk and are likely to still have
- // for some reasonable time window (1 hour) that block relay might require.
- const int nPrunedBlocksLikelyToHave = MIN_BLOCKS_TO_KEEP - 3600 / chainparams.GetConsensus().nPowTargetSpacing;
- if (fPruneMode && (!(pindex->nStatus & BLOCK_HAVE_DATA) || pindex->nHeight <= chainActive.Tip()->nHeight - nPrunedBlocksLikelyToHave))
- {
- LogPrint("net", " getblocks stopping, pruned or too old block at %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
- break;
- }
- pfrom->PushInventory(CInv(MSG_BLOCK, pindex->GetBlockHash()));
- if (--nLimit <= 0)
- {
- // When this block is requested, we'll send an inv that'll
- // trigger the peer to getblocks the next batch of inventory.
- LogPrint("net", " getblocks stopping at limit %d %s\n", pindex->nHeight, pindex->GetBlockHash().ToString());
- pfrom->hashContinue = pindex->GetBlockHash();
- break;
- }
- }
- }
-
-
- else if (strCommand == NetMsgType::GETBLOCKTXN)
- {
- BlockTransactionsRequest req;
- vRecv >> req;
-
- LOCK(cs_main);
-
- BlockMap::iterator it = mapBlockIndex.find(req.blockhash);
- if (it == mapBlockIndex.end() || !(it->second->nStatus & BLOCK_HAVE_DATA)) {
- LogPrintf("Peer %d sent us a getblocktxn for a block we don't have", pfrom->id);
- return true;
- }
-
- if (it->second->nHeight < chainActive.Height() - MAX_BLOCKTXN_DEPTH) {
- LogPrint("net", "Peer %d sent us a getblocktxn for a block > %i deep", pfrom->id, MAX_BLOCKTXN_DEPTH);
- return true;
- }
-
- CBlock block;
- assert(ReadBlockFromDisk(block, it->second, chainparams.GetConsensus()));
-
- BlockTransactions resp(req);
- for (size_t i = 0; i < req.indexes.size(); i++) {
- if (req.indexes[i] >= block.vtx.size()) {
- Misbehaving(pfrom->GetId(), 100);
- LogPrintf("Peer %d sent us a getblocktxn with out-of-bounds tx indices", pfrom->id);
- return true;
- }
- resp.txn[i] = block.vtx[req.indexes[i]];
- }
- pfrom->PushMessageWithFlag(State(pfrom->GetId())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::BLOCKTXN, resp);
- }
-
-
- else if (strCommand == NetMsgType::GETHEADERS)
- {
- CBlockLocator locator;
- uint256 hashStop;
- vRecv >> locator >> hashStop;
-
- LOCK(cs_main);
- if (IsInitialBlockDownload() && !pfrom->fWhitelisted) {
- LogPrint("net", "Ignoring getheaders from peer=%d because node is in initial block download\n", pfrom->id);
- return true;
- }
-
- CNodeState *nodestate = State(pfrom->GetId());
- CBlockIndex* pindex = NULL;
- if (locator.IsNull())
- {
- // If locator is null, return the hashStop block
- BlockMap::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 = FindForkInGlobalIndex(chainActive, locator);
- if (pindex)
- pindex = chainActive.Next(pindex);
- }
-
- // we must use CBlocks, as CBlockHeaders won't include the 0x00 nTx count at the end
- vector<CBlock> vHeaders;
- int nLimit = MAX_HEADERS_RESULTS;
- LogPrint("net", "getheaders %d to %s from peer=%d\n", (pindex ? pindex->nHeight : -1), hashStop.IsNull() ? "end" : hashStop.ToString(), pfrom->id);
- for (; pindex; pindex = chainActive.Next(pindex))
- {
- vHeaders.push_back(pindex->GetBlockHeader());
- if (--nLimit <= 0 || pindex->GetBlockHash() == hashStop)
- break;
- }
- // pindex can be NULL either if we sent chainActive.Tip() OR
- // if our peer has chainActive.Tip() (and thus we are sending an empty
- // headers message). In both cases it's safe to update
- // pindexBestHeaderSent to be our tip.
- nodestate->pindexBestHeaderSent = pindex ? pindex : chainActive.Tip();
- pfrom->PushMessage(NetMsgType::HEADERS, vHeaders);
- }
-
-
- else if (strCommand == NetMsgType::TX)
- {
- // Stop processing the transaction early if
- // We are in blocks only mode and peer is either not whitelisted or whitelistrelay is off
- if (!fRelayTxes && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistrelay", DEFAULT_WHITELISTRELAY)))
- {
- LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
- return true;
- }
-
- deque<COutPoint> vWorkQueue;
- vector<uint256> vEraseQueue;
- CTransaction tx;
- vRecv >> tx;
-
- CInv inv(MSG_TX, tx.GetHash());
- pfrom->AddInventoryKnown(inv);
-
- LOCK(cs_main);
-
- bool fMissingInputs = false;
- CValidationState state;
-
- pfrom->setAskFor.erase(inv.hash);
- mapAlreadyAskedFor.erase(inv.hash);
-
- if (!AlreadyHave(inv) && AcceptToMemoryPool(mempool, state, tx, true, &fMissingInputs)) {
- mempool.check(pcoinsTip);
- RelayTransaction(tx, connman);
- for (unsigned int i = 0; i < tx.vout.size(); i++) {
- vWorkQueue.emplace_back(inv.hash, i);
- }
-
- pfrom->nLastTXTime = GetTime();
-
- LogPrint("mempool", "AcceptToMemoryPool: peer=%d: accepted %s (poolsz %u txn, %u kB)\n",
- pfrom->id,
- tx.GetHash().ToString(),
- mempool.size(), mempool.DynamicMemoryUsage() / 1000);
-
- // Recursively process any orphan transactions that depended on this one
- set<NodeId> setMisbehaving;
- while (!vWorkQueue.empty()) {
- auto itByPrev = mapOrphanTransactionsByPrev.find(vWorkQueue.front());
- vWorkQueue.pop_front();
- if (itByPrev == mapOrphanTransactionsByPrev.end())
- continue;
- for (auto mi = itByPrev->second.begin();
- mi != itByPrev->second.end();
- ++mi)
- {
- const CTransaction& orphanTx = (*mi)->second.tx;
- const uint256& orphanHash = orphanTx.GetHash();
- NodeId fromPeer = (*mi)->second.fromPeer;
- bool fMissingInputs2 = false;
- // Use a dummy CValidationState so someone can't setup nodes to counter-DoS based on orphan
- // resolution (that is, feeding people an invalid transaction based on LegitTxX in order to get
- // anyone relaying LegitTxX banned)
- CValidationState stateDummy;
-
-
- if (setMisbehaving.count(fromPeer))
- continue;
- if (AcceptToMemoryPool(mempool, stateDummy, orphanTx, true, &fMissingInputs2)) {
- LogPrint("mempool", " accepted orphan tx %s\n", orphanHash.ToString());
- RelayTransaction(orphanTx, connman);
- for (unsigned int i = 0; i < orphanTx.vout.size(); i++) {
- vWorkQueue.emplace_back(orphanHash, i);
- }
- vEraseQueue.push_back(orphanHash);
- }
- else if (!fMissingInputs2)
- {
- int nDos = 0;
- if (stateDummy.IsInvalid(nDos) && nDos > 0)
- {
- // Punish peer that gave us an invalid orphan tx
- Misbehaving(fromPeer, nDos);
- setMisbehaving.insert(fromPeer);
- LogPrint("mempool", " invalid orphan tx %s\n", orphanHash.ToString());
- }
- // Has inputs but not accepted to mempool
- // Probably non-standard or insufficient fee/priority
- LogPrint("mempool", " removed orphan tx %s\n", orphanHash.ToString());
- vEraseQueue.push_back(orphanHash);
- if (orphanTx.wit.IsNull() && !stateDummy.CorruptionPossible()) {
- // Do not use rejection cache for witness transactions or
- // witness-stripped transactions, as they can have been malleated.
- // See https://github.com/bitcoin/bitcoin/issues/8279 for details.
- assert(recentRejects);
- recentRejects->insert(orphanHash);
- }
- }
- mempool.check(pcoinsTip);
- }
- }
-
- BOOST_FOREACH(uint256 hash, vEraseQueue)
- EraseOrphanTx(hash);
- }
- else if (fMissingInputs)
- {
- bool fRejectedParents = false; // It may be the case that the orphans parents have all been rejected
- BOOST_FOREACH(const CTxIn& txin, tx.vin) {
- if (recentRejects->contains(txin.prevout.hash)) {
- fRejectedParents = true;
- break;
- }
- }
- if (!fRejectedParents) {
- BOOST_FOREACH(const CTxIn& txin, tx.vin) {
- CInv _inv(MSG_TX, txin.prevout.hash);
- pfrom->AddInventoryKnown(_inv);
- if (!AlreadyHave(_inv)) pfrom->AskFor(_inv);
- }
- AddOrphanTx(tx, pfrom->GetId());
-
- // DoS prevention: do not allow mapOrphanTransactions to grow unbounded
- unsigned int nMaxOrphanTx = (unsigned int)std::max((int64_t)0, GetArg("-maxorphantx", DEFAULT_MAX_ORPHAN_TRANSACTIONS));
- unsigned int nEvicted = LimitOrphanTxSize(nMaxOrphanTx);
- if (nEvicted > 0)
- LogPrint("mempool", "mapOrphan overflow, removed %u tx\n", nEvicted);
- } else {
- LogPrint("mempool", "not keeping orphan with rejected parents %s\n",tx.GetHash().ToString());
- }
- } else {
- if (tx.wit.IsNull() && !state.CorruptionPossible()) {
- // Do not use rejection cache for witness transactions or
- // witness-stripped transactions, as they can have been malleated.
- // See https://github.com/bitcoin/bitcoin/issues/8279 for details.
- assert(recentRejects);
- recentRejects->insert(tx.GetHash());
- }
-
- if (pfrom->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY)) {
- // Always relay transactions received from whitelisted peers, even
- // if they were already in the mempool or rejected from it due
- // to policy, allowing the node to function as a gateway for
- // nodes hidden behind it.
- //
- // Never relay transactions that we would assign a non-zero DoS
- // score for, as we expect peers to do the same with us in that
- // case.
- int nDoS = 0;
- if (!state.IsInvalid(nDoS) || nDoS == 0) {
- LogPrintf("Force relaying tx %s from whitelisted peer=%d\n", tx.GetHash().ToString(), pfrom->id);
- RelayTransaction(tx, connman);
- } else {
- LogPrintf("Not relaying invalid transaction %s from whitelisted peer=%d (%s)\n", tx.GetHash().ToString(), pfrom->id, FormatStateMessage(state));
- }
- }
- }
- int nDoS = 0;
- if (state.IsInvalid(nDoS))
- {
- LogPrint("mempoolrej", "%s from peer=%d was not accepted: %s\n", tx.GetHash().ToString(),
- pfrom->id,
- FormatStateMessage(state));
- if (state.GetRejectCode() < REJECT_INTERNAL) // Never send AcceptToMemoryPool's internal codes over P2P
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(),
- state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), inv.hash);
- if (nDoS > 0) {
- Misbehaving(pfrom->GetId(), nDoS);
- }
- }
- }
-
-
- else if (strCommand == NetMsgType::CMPCTBLOCK && !fImporting && !fReindex) // Ignore blocks received while importing
- {
- CBlockHeaderAndShortTxIDs cmpctblock;
- vRecv >> cmpctblock;
-
- LOCK(cs_main);
-
- if (mapBlockIndex.find(cmpctblock.header.hashPrevBlock) == mapBlockIndex.end()) {
- // Doesn't connect (or is genesis), instead of DoSing in AcceptBlockHeader, request deeper headers
- if (!IsInitialBlockDownload())
- pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), uint256());
- return true;
- }
-
- CBlockIndex *pindex = NULL;
- CValidationState state;
- if (!AcceptBlockHeader(cmpctblock.header, state, chainparams, &pindex)) {
- int nDoS;
- if (state.IsInvalid(nDoS)) {
- if (nDoS > 0)
- Misbehaving(pfrom->GetId(), nDoS);
- LogPrintf("Peer %d sent us invalid header via cmpctblock\n", pfrom->id);
- return true;
- }
- }
-
- // If AcceptBlockHeader returned true, it set pindex
- assert(pindex);
- UpdateBlockAvailability(pfrom->GetId(), pindex->GetBlockHash());
-
- std::map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator blockInFlightIt = mapBlocksInFlight.find(pindex->GetBlockHash());
- bool fAlreadyInFlight = blockInFlightIt != mapBlocksInFlight.end();
-
- if (pindex->nStatus & BLOCK_HAVE_DATA) // Nothing to do here
- return true;
-
- if (pindex->nChainWork <= chainActive.Tip()->nChainWork || // We know something better
- pindex->nTx != 0) { // We had this block at some point, but pruned it
- if (fAlreadyInFlight) {
- // We requested this block for some reason, but our mempool will probably be useless
- // so we just grab the block via normal getdata
- std::vector<CInv> vInv(1);
- vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
- pfrom->PushMessage(NetMsgType::GETDATA, vInv);
- }
- return true;
- }
-
- // If we're not close to tip yet, give up and let parallel block fetch work its magic
- if (!fAlreadyInFlight && !CanDirectFetch(chainparams.GetConsensus()))
- return true;
-
- CNodeState *nodestate = State(pfrom->GetId());
-
- if (IsWitnessEnabled(pindex->pprev, chainparams.GetConsensus()) && !nodestate->fSupportsDesiredCmpctVersion) {
- // Don't bother trying to process compact blocks from v1 peers
- // after segwit activates.
- return true;
- }
-
- // We want to be a bit conservative just to be extra careful about DoS
- // possibilities in compact block processing...
- if (pindex->nHeight <= chainActive.Height() + 2) {
- if ((!fAlreadyInFlight && nodestate->nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) ||
- (fAlreadyInFlight && blockInFlightIt->second.first == pfrom->GetId())) {
- list<QueuedBlock>::iterator *queuedBlockIt = NULL;
- if (!MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), chainparams.GetConsensus(), pindex, &queuedBlockIt)) {
- if (!(*queuedBlockIt)->partialBlock)
- (*queuedBlockIt)->partialBlock.reset(new PartiallyDownloadedBlock(&mempool));
- else {
- // The block was already in flight using compact blocks from the same peer
- LogPrint("net", "Peer sent us compact block we were already syncing!\n");
- return true;
- }
- }
-
- PartiallyDownloadedBlock& partialBlock = *(*queuedBlockIt)->partialBlock;
- ReadStatus status = partialBlock.InitData(cmpctblock);
- if (status == READ_STATUS_INVALID) {
- MarkBlockAsReceived(pindex->GetBlockHash()); // Reset in-flight state in case of whitelist
- Misbehaving(pfrom->GetId(), 100);
- LogPrintf("Peer %d sent us invalid compact block\n", pfrom->id);
- return true;
- } else if (status == READ_STATUS_FAILED) {
- // Duplicate txindexes, the block is now in-flight, so just request it
- std::vector<CInv> vInv(1);
- vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
- pfrom->PushMessage(NetMsgType::GETDATA, vInv);
- return true;
- }
-
- if (!fAlreadyInFlight && mapBlocksInFlight.size() == 1 && pindex->pprev->IsValid(BLOCK_VALID_CHAIN)) {
- // We seem to be rather well-synced, so it appears pfrom was the first to provide us
- // with this block! Let's get them to announce using compact blocks in the future.
- MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom, connman);
- }
-
- BlockTransactionsRequest req;
- for (size_t i = 0; i < cmpctblock.BlockTxCount(); i++) {
- if (!partialBlock.IsTxAvailable(i))
- req.indexes.push_back(i);
- }
- if (req.indexes.empty()) {
- // Dirty hack to jump to BLOCKTXN code (TODO: move message handling into their own functions)
- BlockTransactions txn;
- txn.blockhash = cmpctblock.header.GetHash();
- CDataStream blockTxnMsg(SER_NETWORK, PROTOCOL_VERSION);
- blockTxnMsg << txn;
- return ProcessMessage(pfrom, NetMsgType::BLOCKTXN, blockTxnMsg, nTimeReceived, chainparams, connman);
- } else {
- req.blockhash = pindex->GetBlockHash();
- pfrom->PushMessage(NetMsgType::GETBLOCKTXN, req);
- }
- }
- } else {
- if (fAlreadyInFlight) {
- // We requested this block, but its far into the future, so our
- // mempool will probably be useless - request the block normally
- std::vector<CInv> vInv(1);
- vInv[0] = CInv(MSG_BLOCK | GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus()), cmpctblock.header.GetHash());
- pfrom->PushMessage(NetMsgType::GETDATA, vInv);
- return true;
- } else {
- // If this was an announce-cmpctblock, we want the same treatment as a header message
- // Dirty hack to process as if it were just a headers message (TODO: move message handling into their own functions)
- std::vector<CBlock> headers;
- headers.push_back(cmpctblock.header);
- CDataStream vHeadersMsg(SER_NETWORK, PROTOCOL_VERSION);
- vHeadersMsg << headers;
- return ProcessMessage(pfrom, NetMsgType::HEADERS, vHeadersMsg, nTimeReceived, chainparams, connman);
- }
- }
- }
-
- else if (strCommand == NetMsgType::BLOCKTXN && !fImporting && !fReindex) // Ignore blocks received while importing
- {
- BlockTransactions resp;
- vRecv >> resp;
-
- CBlock block;
- bool fBlockRead = false;
- {
- LOCK(cs_main);
-
- map<uint256, pair<NodeId, list<QueuedBlock>::iterator> >::iterator it = mapBlocksInFlight.find(resp.blockhash);
- if (it == mapBlocksInFlight.end() || !it->second.second->partialBlock ||
- it->second.first != pfrom->GetId()) {
- LogPrint("net", "Peer %d sent us block transactions for block we weren't expecting\n", pfrom->id);
- return true;
- }
-
- PartiallyDownloadedBlock& partialBlock = *it->second.second->partialBlock;
- ReadStatus status = partialBlock.FillBlock(block, resp.txn);
- if (status == READ_STATUS_INVALID) {
- MarkBlockAsReceived(resp.blockhash); // Reset in-flight state in case of whitelist
- Misbehaving(pfrom->GetId(), 100);
- LogPrintf("Peer %d sent us invalid compact block/non-matching block transactions\n", pfrom->id);
- return true;
- } else if (status == READ_STATUS_FAILED) {
- // Might have collided, fall back to getdata now :(
- std::vector<CInv> invs;
- invs.push_back(CInv(MSG_BLOCK | GetFetchFlags(pfrom, chainActive.Tip(), chainparams.GetConsensus()), resp.blockhash));
- pfrom->PushMessage(NetMsgType::GETDATA, invs);
- } else {
- MarkBlockAsReceived(resp.blockhash); // it is now an empty pointer
- fBlockRead = true;
- }
- } // Don't hold cs_main when we call into ProcessNewBlock
- if (fBlockRead) {
- CValidationState state;
- // Since we requested this block (it was in mapBlocksInFlight), force it to be processed,
- // even if it would not be a candidate for new tip (missing previous block, chain not long enough, etc)
- ProcessNewBlock(state, chainparams, pfrom, &block, true, NULL);
- int nDoS;
- if (state.IsInvalid(nDoS)) {
- assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(),
- state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), block.GetHash());
- if (nDoS > 0) {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), nDoS);
- }
- }
- }
- }
-
-
- else if (strCommand == NetMsgType::HEADERS && !fImporting && !fReindex) // Ignore headers received while importing
- {
- std::vector<CBlockHeader> headers;
-
- // Bypass the normal CBlock deserialization, as we don't want to risk deserializing 2000 full blocks.
- unsigned int nCount = ReadCompactSize(vRecv);
- if (nCount > MAX_HEADERS_RESULTS) {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 20);
- return error("headers message size = %u", nCount);
- }
- headers.resize(nCount);
- for (unsigned int n = 0; n < nCount; n++) {
- vRecv >> headers[n];
- ReadCompactSize(vRecv); // ignore tx count; assume it is 0.
- }
-
- {
- LOCK(cs_main);
-
- if (nCount == 0) {
- // Nothing interesting. Stop asking this peers for more headers.
- return true;
- }
-
- CNodeState *nodestate = State(pfrom->GetId());
-
- // If this looks like it could be a block announcement (nCount <
- // MAX_BLOCKS_TO_ANNOUNCE), use special logic for handling headers that
- // don't connect:
- // - Send a getheaders message in response to try to connect the chain.
- // - The peer can send up to MAX_UNCONNECTING_HEADERS in a row that
- // don't connect before giving DoS points
- // - Once a headers message is received that is valid and does connect,
- // nUnconnectingHeaders gets reset back to 0.
- if (mapBlockIndex.find(headers[0].hashPrevBlock) == mapBlockIndex.end() && nCount < MAX_BLOCKS_TO_ANNOUNCE) {
- nodestate->nUnconnectingHeaders++;
- pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexBestHeader), uint256());
- LogPrint("net", "received header %s: missing prev block %s, sending getheaders (%d) to end (peer=%d, nUnconnectingHeaders=%d)\n",
- headers[0].GetHash().ToString(),
- headers[0].hashPrevBlock.ToString(),
- pindexBestHeader->nHeight,
- pfrom->id, nodestate->nUnconnectingHeaders);
- // Set hashLastUnknownBlock for this peer, so that if we
- // eventually get the headers - even from a different peer -
- // we can use this peer to download.
- UpdateBlockAvailability(pfrom->GetId(), headers.back().GetHash());
-
- if (nodestate->nUnconnectingHeaders % MAX_UNCONNECTING_HEADERS == 0) {
- Misbehaving(pfrom->GetId(), 20);
- }
- return true;
- }
-
- CBlockIndex *pindexLast = NULL;
- BOOST_FOREACH(const CBlockHeader& header, headers) {
- CValidationState state;
- if (pindexLast != NULL && header.hashPrevBlock != pindexLast->GetBlockHash()) {
- Misbehaving(pfrom->GetId(), 20);
- return error("non-continuous headers sequence");
- }
- if (!AcceptBlockHeader(header, state, chainparams, &pindexLast)) {
- int nDoS;
- if (state.IsInvalid(nDoS)) {
- if (nDoS > 0)
- Misbehaving(pfrom->GetId(), nDoS);
- return error("invalid header received");
- }
- }
- }
-
- if (nodestate->nUnconnectingHeaders > 0) {
- LogPrint("net", "peer=%d: resetting nUnconnectingHeaders (%d -> 0)\n", pfrom->id, nodestate->nUnconnectingHeaders);
- }
- nodestate->nUnconnectingHeaders = 0;
-
- assert(pindexLast);
- UpdateBlockAvailability(pfrom->GetId(), pindexLast->GetBlockHash());
-
- if (nCount == MAX_HEADERS_RESULTS) {
- // Headers message had its maximum size; the peer may have more headers.
- // TODO: optimize: if pindexLast is an ancestor of chainActive.Tip or pindexBestHeader, continue
- // from there instead.
- LogPrint("net", "more getheaders (%d) to end to peer=%d (startheight:%d)\n", pindexLast->nHeight, pfrom->id, pfrom->nStartingHeight);
- pfrom->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexLast), uint256());
- }
-
- bool fCanDirectFetch = CanDirectFetch(chainparams.GetConsensus());
- // If this set of headers is valid and ends in a block with at least as
- // much work as our tip, download as much as possible.
- if (fCanDirectFetch && pindexLast->IsValid(BLOCK_VALID_TREE) && chainActive.Tip()->nChainWork <= pindexLast->nChainWork) {
- vector<CBlockIndex *> vToFetch;
- CBlockIndex *pindexWalk = pindexLast;
- // Calculate all the blocks we'd need to switch to pindexLast, up to a limit.
- while (pindexWalk && !chainActive.Contains(pindexWalk) && vToFetch.size() <= MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
- if (!(pindexWalk->nStatus & BLOCK_HAVE_DATA) &&
- !mapBlocksInFlight.count(pindexWalk->GetBlockHash()) &&
- (!IsWitnessEnabled(pindexWalk->pprev, chainparams.GetConsensus()) || State(pfrom->GetId())->fHaveWitness)) {
- // We don't have this block, and it's not yet in flight.
- vToFetch.push_back(pindexWalk);
- }
- pindexWalk = pindexWalk->pprev;
- }
- // If pindexWalk still isn't on our main chain, we're looking at a
- // very large reorg at a time we think we're close to caught up to
- // the main chain -- this shouldn't really happen. Bail out on the
- // direct fetch and rely on parallel download instead.
- if (!chainActive.Contains(pindexWalk)) {
- LogPrint("net", "Large reorg, won't direct fetch to %s (%d)\n",
- pindexLast->GetBlockHash().ToString(),
- pindexLast->nHeight);
- } else {
- vector<CInv> vGetData;
- // Download as much as possible, from earliest to latest.
- BOOST_REVERSE_FOREACH(CBlockIndex *pindex, vToFetch) {
- if (nodestate->nBlocksInFlight >= MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
- // Can't download any more from this peer
- break;
- }
- uint32_t nFetchFlags = GetFetchFlags(pfrom, pindex->pprev, chainparams.GetConsensus());
- vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
- MarkBlockAsInFlight(pfrom->GetId(), pindex->GetBlockHash(), chainparams.GetConsensus(), pindex);
- LogPrint("net", "Requesting block %s from peer=%d\n",
- pindex->GetBlockHash().ToString(), pfrom->id);
- }
- if (vGetData.size() > 1) {
- LogPrint("net", "Downloading blocks toward %s (%d) via headers direct fetch\n",
- pindexLast->GetBlockHash().ToString(), pindexLast->nHeight);
- }
- if (vGetData.size() > 0) {
- if (nodestate->fSupportsDesiredCmpctVersion && vGetData.size() == 1 && mapBlocksInFlight.size() == 1 && pindexLast->pprev->IsValid(BLOCK_VALID_CHAIN)) {
- // We seem to be rather well-synced, so it appears pfrom was the first to provide us
- // with this block! Let's get them to announce using compact blocks in the future.
- MaybeSetPeerAsAnnouncingHeaderAndIDs(nodestate, pfrom, connman);
- // In any case, we want to download using a compact block, not a regular one
- vGetData[0] = CInv(MSG_CMPCT_BLOCK, vGetData[0].hash);
- }
- pfrom->PushMessage(NetMsgType::GETDATA, vGetData);
- }
- }
- }
- }
-
- NotifyHeaderTip();
- }
-
- else if (strCommand == NetMsgType::BLOCK && !fImporting && !fReindex) // Ignore blocks received while importing
- {
- CBlock block;
- vRecv >> block;
-
- LogPrint("net", "received block %s peer=%d\n", block.GetHash().ToString(), pfrom->id);
-
- CValidationState state;
- // Process all blocks from whitelisted peers, even if not requested,
- // unless we're still syncing with the network.
- // Such an unrequested block may still be processed, subject to the
- // conditions in AcceptBlock().
- bool forceProcessing = pfrom->fWhitelisted && !IsInitialBlockDownload();
- {
- LOCK(cs_main);
- // Also always process if we requested the block explicitly, as we may
- // need it even though it is not a candidate for a new best tip.
- forceProcessing |= MarkBlockAsReceived(block.GetHash());
- }
- ProcessNewBlock(state, chainparams, pfrom, &block, forceProcessing, NULL);
- int nDoS;
- if (state.IsInvalid(nDoS)) {
- assert (state.GetRejectCode() < REJECT_INTERNAL); // Blocks are never rejected with internal reject codes
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, (unsigned char)state.GetRejectCode(),
- state.GetRejectReason().substr(0, MAX_REJECT_MESSAGE_LENGTH), block.GetHash());
- if (nDoS > 0) {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), nDoS);
- }
- }
-
- }
-
-
- else if (strCommand == NetMsgType::GETADDR)
- {
- // This asymmetric behavior for inbound and outbound connections was introduced
- // to prevent a fingerprinting attack: an attacker can send specific fake addresses
- // to users' AddrMan and later request them by sending getaddr messages.
- // Making nodes which are behind NAT and can only make outgoing connections ignore
- // the getaddr message mitigates the attack.
- if (!pfrom->fInbound) {
- LogPrint("net", "Ignoring \"getaddr\" from outbound connection. peer=%d\n", pfrom->id);
- return true;
- }
-
- // Only send one GetAddr response per connection to reduce resource waste
- // and discourage addr stamping of INV announcements.
- if (pfrom->fSentAddr) {
- LogPrint("net", "Ignoring repeated \"getaddr\". peer=%d\n", pfrom->id);
- return true;
- }
- pfrom->fSentAddr = true;
-
- pfrom->vAddrToSend.clear();
- vector<CAddress> vAddr = connman.GetAddresses();
- FastRandomContext insecure_rand;
- BOOST_FOREACH(const CAddress &addr, vAddr)
- pfrom->PushAddress(addr, insecure_rand);
- }
-
-
- else if (strCommand == NetMsgType::MEMPOOL)
- {
- if (!(pfrom->GetLocalServices() & NODE_BLOOM) && !pfrom->fWhitelisted)
- {
- LogPrint("net", "mempool request with bloom filters disabled, disconnect peer=%d\n", pfrom->GetId());
- pfrom->fDisconnect = true;
- return true;
- }
-
- if (connman.OutboundTargetReached(false) && !pfrom->fWhitelisted)
- {
- LogPrint("net", "mempool request with bandwidth limit reached, disconnect peer=%d\n", pfrom->GetId());
- pfrom->fDisconnect = true;
- return true;
- }
-
- LOCK(pfrom->cs_inventory);
- pfrom->fSendMempool = true;
- }
-
-
- else if (strCommand == NetMsgType::PING)
- {
- if (pfrom->nVersion > BIP0031_VERSION)
- {
- uint64_t 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(NetMsgType::PONG, nonce);
- }
- }
-
-
- else if (strCommand == NetMsgType::PONG)
- {
- int64_t pingUsecEnd = nTimeReceived;
- uint64_t nonce = 0;
- size_t nAvail = vRecv.in_avail();
- bool bPingFinished = false;
- std::string sProblem;
-
- if (nAvail >= sizeof(nonce)) {
- vRecv >> nonce;
-
- // Only process pong message if there is an outstanding ping (old ping without nonce should never pong)
- if (pfrom->nPingNonceSent != 0) {
- if (nonce == pfrom->nPingNonceSent) {
- // Matching pong received, this ping is no longer outstanding
- bPingFinished = true;
- int64_t pingUsecTime = pingUsecEnd - pfrom->nPingUsecStart;
- if (pingUsecTime > 0) {
- // Successful ping time measurement, replace previous
- pfrom->nPingUsecTime = pingUsecTime;
- pfrom->nMinPingUsecTime = std::min(pfrom->nMinPingUsecTime, pingUsecTime);
- } else {
- // This should never happen
- sProblem = "Timing mishap";
- }
- } else {
- // Nonce mismatches are normal when pings are overlapping
- sProblem = "Nonce mismatch";
- if (nonce == 0) {
- // This is most likely a bug in another implementation somewhere; cancel this ping
- bPingFinished = true;
- sProblem = "Nonce zero";
- }
- }
- } else {
- sProblem = "Unsolicited pong without ping";
- }
- } else {
- // This is most likely a bug in another implementation somewhere; cancel this ping
- bPingFinished = true;
- sProblem = "Short payload";
- }
-
- if (!(sProblem.empty())) {
- LogPrint("net", "pong peer=%d: %s, %x expected, %x received, %u bytes\n",
- pfrom->id,
- sProblem,
- pfrom->nPingNonceSent,
- nonce,
- nAvail);
- }
- if (bPingFinished) {
- pfrom->nPingNonceSent = 0;
- }
- }
-
-
- else if (strCommand == NetMsgType::FILTERLOAD)
- {
- CBloomFilter filter;
- vRecv >> filter;
-
- if (!filter.IsWithinSizeConstraints())
- {
- // There is no excuse for sending a too-large filter
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 100);
- }
- else
- {
- LOCK(pfrom->cs_filter);
- delete pfrom->pfilter;
- pfrom->pfilter = new CBloomFilter(filter);
- pfrom->pfilter->UpdateEmptyFull();
- pfrom->fRelayTxes = true;
- }
- }
-
-
- else if (strCommand == NetMsgType::FILTERADD)
- {
- vector<unsigned char> vData;
- vRecv >> vData;
-
- // Nodes must NEVER send a data item > 520 bytes (the max size for a script data object,
- // and thus, the maximum size any matched object can have) in a filteradd message
- bool bad = false;
- if (vData.size() > MAX_SCRIPT_ELEMENT_SIZE) {
- bad = true;
- } else {
- LOCK(pfrom->cs_filter);
- if (pfrom->pfilter) {
- pfrom->pfilter->insert(vData);
- } else {
- bad = true;
- }
- }
- if (bad) {
- LOCK(cs_main);
- Misbehaving(pfrom->GetId(), 100);
- }
- }
-
-
- else if (strCommand == NetMsgType::FILTERCLEAR)
- {
- LOCK(pfrom->cs_filter);
- delete pfrom->pfilter;
- pfrom->pfilter = new CBloomFilter();
- pfrom->fRelayTxes = true;
- }
-
-
- else if (strCommand == NetMsgType::REJECT)
- {
- if (fDebug) {
- try {
- string strMsg; unsigned char ccode; string strReason;
- vRecv >> LIMITED_STRING(strMsg, CMessageHeader::COMMAND_SIZE) >> ccode >> LIMITED_STRING(strReason, MAX_REJECT_MESSAGE_LENGTH);
-
- ostringstream ss;
- ss << strMsg << " code " << itostr(ccode) << ": " << strReason;
-
- if (strMsg == NetMsgType::BLOCK || strMsg == NetMsgType::TX)
- {
- uint256 hash;
- vRecv >> hash;
- ss << ": hash " << hash.ToString();
- }
- LogPrint("net", "Reject %s\n", SanitizeString(ss.str()));
- } catch (const std::ios_base::failure&) {
- // Avoid feedback loops by preventing reject messages from triggering a new reject message.
- LogPrint("net", "Unparseable reject message received\n");
- }
- }
- }
-
- else if (strCommand == NetMsgType::FEEFILTER) {
- CAmount newFeeFilter = 0;
- vRecv >> newFeeFilter;
- if (MoneyRange(newFeeFilter)) {
- {
- LOCK(pfrom->cs_feeFilter);
- pfrom->minFeeFilter = newFeeFilter;
- }
- LogPrint("net", "received: feefilter of %s from peer=%d\n", CFeeRate(newFeeFilter).ToString(), pfrom->id);
- }
- }
-
- else if (strCommand == NetMsgType::NOTFOUND) {
- // We do not care about the NOTFOUND message, but logging an Unknown Command
- // message would be undesirable as we transmit it ourselves.
- }
-
- else {
- // Ignore unknown commands for extensibility
- LogPrint("net", "Unknown command \"%s\" from peer=%d\n", SanitizeString(strCommand), pfrom->id);
- }
-
-
-
- return true;
-}
-
-// requires LOCK(cs_vRecvMsg)
-bool ProcessMessages(CNode* pfrom, CConnman& connman)
+std::string CBlockFileInfo::ToString() const
{
- const CChainParams& chainparams = Params();
- unsigned int nMaxSendBufferSize = connman.GetSendBufferSize();
- //if (fDebug)
- // LogPrintf("%s(%u messages)\n", __func__, pfrom->vRecvMsg.size());
-
- //
- // Message format
- // (4) message start
- // (12) command
- // (4) size
- // (4) checksum
- // (x) data
- //
- bool fOk = true;
-
- if (!pfrom->vRecvGetData.empty())
- ProcessGetData(pfrom, chainparams.GetConsensus(), connman);
-
- // this maintains the order of responses
- if (!pfrom->vRecvGetData.empty()) return fOk;
-
- std::deque<CNetMessage>::iterator it = pfrom->vRecvMsg.begin();
- while (!pfrom->fDisconnect && it != pfrom->vRecvMsg.end()) {
- // Don't bother if send buffer is too full to respond anyway
- if (pfrom->nSendSize >= nMaxSendBufferSize)
- break;
-
- // get next message
- CNetMessage& msg = *it;
-
- //if (fDebug)
- // LogPrintf("%s(message %u msgsz, %u bytes, complete:%s)\n", __func__,
- // msg.hdr.nMessageSize, msg.vRecv.size(),
- // msg.complete() ? "Y" : "N");
-
- // end, if an incomplete message is found
- if (!msg.complete())
- break;
-
- // at this point, any failure means we can delete the current message
- it++;
-
- // Scan for message start
- if (memcmp(msg.hdr.pchMessageStart, chainparams.MessageStart(), CMessageHeader::MESSAGE_START_SIZE) != 0) {
- LogPrintf("PROCESSMESSAGE: INVALID MESSAGESTART %s peer=%d\n", SanitizeString(msg.hdr.GetCommand()), pfrom->id);
- fOk = false;
- break;
- }
-
- // Read header
- CMessageHeader& hdr = msg.hdr;
- if (!hdr.IsValid(chainparams.MessageStart()))
- {
- LogPrintf("PROCESSMESSAGE: ERRORS IN HEADER %s peer=%d\n", SanitizeString(hdr.GetCommand()), pfrom->id);
- continue;
- }
- string strCommand = hdr.GetCommand();
-
- // Message size
- unsigned int nMessageSize = hdr.nMessageSize;
-
- // Checksum
- CDataStream& vRecv = msg.vRecv;
- uint256 hash = Hash(vRecv.begin(), vRecv.begin() + nMessageSize);
- if (memcmp(hash.begin(), hdr.pchChecksum, CMessageHeader::CHECKSUM_SIZE) != 0)
- {
- LogPrintf("%s(%s, %u bytes): CHECKSUM ERROR expected %s was %s\n", __func__,
- SanitizeString(strCommand), nMessageSize,
- HexStr(hash.begin(), hash.begin()+CMessageHeader::CHECKSUM_SIZE),
- HexStr(hdr.pchChecksum, hdr.pchChecksum+CMessageHeader::CHECKSUM_SIZE));
- continue;
- }
-
- // Process message
- bool fRet = false;
- try
- {
- fRet = ProcessMessage(pfrom, strCommand, vRecv, msg.nTime, chainparams, connman);
- boost::this_thread::interruption_point();
- }
- catch (const std::ios_base::failure& e)
- {
- pfrom->PushMessage(NetMsgType::REJECT, strCommand, REJECT_MALFORMED, string("error parsing message"));
- if (strstr(e.what(), "end of data"))
- {
- // Allow exceptions from under-length message on vRecv
- LogPrintf("%s(%s, %u bytes): Exception '%s' caught, normally caused by a message being shorter than its stated length\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
- }
- else if (strstr(e.what(), "size too large"))
- {
- // Allow exceptions from over-long size
- LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
- }
- else if (strstr(e.what(), "non-canonical ReadCompactSize()"))
- {
- // Allow exceptions from non-canonical encoding
- LogPrintf("%s(%s, %u bytes): Exception '%s' caught\n", __func__, SanitizeString(strCommand), nMessageSize, e.what());
- }
- else
- {
- PrintExceptionContinue(&e, "ProcessMessages()");
- }
- }
- catch (const boost::thread_interrupted&) {
- throw;
- }
- catch (const std::exception& e) {
- PrintExceptionContinue(&e, "ProcessMessages()");
- } catch (...) {
- PrintExceptionContinue(NULL, "ProcessMessages()");
- }
-
- if (!fRet)
- LogPrintf("%s(%s, %u bytes) FAILED peer=%d\n", __func__, SanitizeString(strCommand), nMessageSize, pfrom->id);
-
- break;
- }
-
- // In case the connection got shut down, its receive buffer was wiped
- if (!pfrom->fDisconnect)
- pfrom->vRecvMsg.erase(pfrom->vRecvMsg.begin(), it);
-
- return fOk;
+ return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast));
}
-class CompareInvMempoolOrder
-{
- CTxMemPool *mp;
-public:
- CompareInvMempoolOrder(CTxMemPool *_mempool)
- {
- mp = _mempool;
- }
-
- bool operator()(std::set<uint256>::iterator a, std::set<uint256>::iterator b)
- {
- /* As std::make_heap produces a max-heap, we want the entries with the
- * fewest ancestors/highest fee to sort later. */
- return mp->CompareDepthAndScore(*b, *a);
- }
-};
-
-bool SendMessages(CNode* pto, CConnman& connman)
-{
- const Consensus::Params& consensusParams = Params().GetConsensus();
- {
- // Don't send anything until we get its version message
- if (pto->nVersion == 0)
- return true;
-
- //
- // Message: ping
- //
- bool pingSend = false;
- if (pto->fPingQueued) {
- // RPC ping request by user
- pingSend = true;
- }
- if (pto->nPingNonceSent == 0 && pto->nPingUsecStart + PING_INTERVAL * 1000000 < GetTimeMicros()) {
- // Ping automatically sent as a latency probe & keepalive.
- pingSend = true;
- }
- if (pingSend && !pto->fDisconnect) {
- uint64_t nonce = 0;
- while (nonce == 0) {
- GetRandBytes((unsigned char*)&nonce, sizeof(nonce));
- }
- pto->fPingQueued = false;
- pto->nPingUsecStart = GetTimeMicros();
- if (pto->nVersion > BIP0031_VERSION) {
- pto->nPingNonceSent = nonce;
- pto->PushMessage(NetMsgType::PING, nonce);
- } else {
- // Peer is too old to support ping command with nonce, pong will never arrive.
- pto->nPingNonceSent = 0;
- pto->PushMessage(NetMsgType::PING);
- }
- }
-
- TRY_LOCK(cs_main, lockMain); // Acquire cs_main for IsInitialBlockDownload() and CNodeState()
- if (!lockMain)
- return true;
-
- // Address refresh broadcast
- int64_t nNow = GetTimeMicros();
- if (!IsInitialBlockDownload() && pto->nNextLocalAddrSend < nNow) {
- AdvertiseLocal(pto);
- pto->nNextLocalAddrSend = PoissonNextSend(nNow, AVG_LOCAL_ADDRESS_BROADCAST_INTERVAL);
- }
-
- //
- // Message: addr
- //
- if (pto->nNextAddrSend < nNow) {
- pto->nNextAddrSend = PoissonNextSend(nNow, AVG_ADDRESS_BROADCAST_INTERVAL);
- vector<CAddress> vAddr;
- vAddr.reserve(pto->vAddrToSend.size());
- BOOST_FOREACH(const CAddress& addr, pto->vAddrToSend)
- {
- if (!pto->addrKnown.contains(addr.GetKey()))
- {
- pto->addrKnown.insert(addr.GetKey());
- vAddr.push_back(addr);
- // receiver rejects addr messages larger than 1000
- if (vAddr.size() >= 1000)
- {
- pto->PushMessage(NetMsgType::ADDR, vAddr);
- vAddr.clear();
- }
- }
- }
- pto->vAddrToSend.clear();
- if (!vAddr.empty())
- pto->PushMessage(NetMsgType::ADDR, vAddr);
- // we only send the big addr message once
- if (pto->vAddrToSend.capacity() > 40)
- pto->vAddrToSend.shrink_to_fit();
- }
-
- CNodeState &state = *State(pto->GetId());
- if (state.fShouldBan) {
- if (pto->fWhitelisted)
- LogPrintf("Warning: not punishing whitelisted peer %s!\n", pto->addr.ToString());
- else {
- pto->fDisconnect = true;
- if (pto->addr.IsLocal())
- LogPrintf("Warning: not banning local peer %s!\n", pto->addr.ToString());
- else
- {
- connman.Ban(pto->addr, BanReasonNodeMisbehaving);
- }
- }
- state.fShouldBan = false;
- }
-
- BOOST_FOREACH(const CBlockReject& reject, state.rejects)
- pto->PushMessage(NetMsgType::REJECT, (string)NetMsgType::BLOCK, reject.chRejectCode, reject.strRejectReason, reject.hashBlock);
- state.rejects.clear();
-
- // Start block sync
- if (pindexBestHeader == NULL)
- pindexBestHeader = chainActive.Tip();
- bool fFetch = state.fPreferredDownload || (nPreferredDownload == 0 && !pto->fClient && !pto->fOneShot); // Download if this is a nice peer, or we have no nice peers and this one might do.
- if (!state.fSyncStarted && !pto->fClient && !pto->fDisconnect && !fImporting && !fReindex) {
- // Only actively request headers from a single peer, unless we're close to today.
- if ((nSyncStarted == 0 && fFetch) || pindexBestHeader->GetBlockTime() > GetAdjustedTime() - 24 * 60 * 60) {
- state.fSyncStarted = true;
- nSyncStarted++;
- const CBlockIndex *pindexStart = pindexBestHeader;
- /* If possible, start at the block preceding the currently
- best known header. This ensures that we always get a
- non-empty list of headers back as long as the peer
- is up-to-date. With a non-empty response, we can initialise
- the peer's known best block. This wouldn't be possible
- if we requested starting at pindexBestHeader and
- got back an empty response. */
- if (pindexStart->pprev)
- pindexStart = pindexStart->pprev;
- LogPrint("net", "initial getheaders (%d) to peer=%d (startheight:%d)\n", pindexStart->nHeight, pto->id, pto->nStartingHeight);
- pto->PushMessage(NetMsgType::GETHEADERS, chainActive.GetLocator(pindexStart), uint256());
- }
- }
-
- // Resend wallet transactions that haven't gotten in a block yet
- // Except during reindex, importing and IBD, when old wallet
- // transactions become unconfirmed and spams other nodes.
- if (!fReindex && !fImporting && !IsInitialBlockDownload())
- {
- GetMainSignals().Broadcast(nTimeBestReceived, &connman);
- }
-
- //
- // Try sending block announcements via headers
- //
- {
- // If we have less than MAX_BLOCKS_TO_ANNOUNCE in our
- // list of block hashes we're relaying, and our peer wants
- // headers announcements, then find the first header
- // not yet known to our peer but would connect, and send.
- // If no header would connect, or if we have too many
- // blocks, or if the peer doesn't want headers, just
- // add all to the inv queue.
- LOCK(pto->cs_inventory);
- vector<CBlock> vHeaders;
- bool fRevertToInv = ((!state.fPreferHeaders &&
- (!state.fPreferHeaderAndIDs || pto->vBlockHashesToAnnounce.size() > 1)) ||
- pto->vBlockHashesToAnnounce.size() > MAX_BLOCKS_TO_ANNOUNCE);
- CBlockIndex *pBestIndex = NULL; // last header queued for delivery
- ProcessBlockAvailability(pto->id); // ensure pindexBestKnownBlock is up-to-date
-
- if (!fRevertToInv) {
- bool fFoundStartingHeader = false;
- // Try to find first header that our peer doesn't have, and
- // then send all headers past that one. If we come across any
- // headers that aren't on chainActive, give up.
- BOOST_FOREACH(const uint256 &hash, pto->vBlockHashesToAnnounce) {
- BlockMap::iterator mi = mapBlockIndex.find(hash);
- assert(mi != mapBlockIndex.end());
- CBlockIndex *pindex = mi->second;
- if (chainActive[pindex->nHeight] != pindex) {
- // Bail out if we reorged away from this block
- fRevertToInv = true;
- break;
- }
- if (pBestIndex != NULL && pindex->pprev != pBestIndex) {
- // This means that the list of blocks to announce don't
- // connect to each other.
- // This shouldn't really be possible to hit during
- // regular operation (because reorgs should take us to
- // a chain that has some block not on the prior chain,
- // which should be caught by the prior check), but one
- // way this could happen is by using invalidateblock /
- // reconsiderblock repeatedly on the tip, causing it to
- // be added multiple times to vBlockHashesToAnnounce.
- // Robustly deal with this rare situation by reverting
- // to an inv.
- fRevertToInv = true;
- break;
- }
- pBestIndex = pindex;
- if (fFoundStartingHeader) {
- // add this to the headers message
- vHeaders.push_back(pindex->GetBlockHeader());
- } else if (PeerHasHeader(&state, pindex)) {
- continue; // keep looking for the first new block
- } else if (pindex->pprev == NULL || PeerHasHeader(&state, pindex->pprev)) {
- // Peer doesn't have this header but they do have the prior one.
- // Start sending headers.
- fFoundStartingHeader = true;
- vHeaders.push_back(pindex->GetBlockHeader());
- } else {
- // Peer doesn't have this header or the prior one -- nothing will
- // connect, so bail out.
- fRevertToInv = true;
- break;
- }
- }
- }
- if (!fRevertToInv && !vHeaders.empty()) {
- if (vHeaders.size() == 1 && state.fPreferHeaderAndIDs) {
- // We only send up to 1 block as header-and-ids, as otherwise
- // probably means we're doing an initial-ish-sync or they're slow
- LogPrint("net", "%s sending header-and-ids %s to peer %d\n", __func__,
- vHeaders.front().GetHash().ToString(), pto->id);
- //TODO: Shouldn't need to reload block from disk, but requires refactor
- CBlock block;
- assert(ReadBlockFromDisk(block, pBestIndex, consensusParams));
- CBlockHeaderAndShortTxIDs cmpctblock(block, state.fWantsCmpctWitness);
- pto->PushMessageWithFlag(state.fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS, NetMsgType::CMPCTBLOCK, cmpctblock);
- state.pindexBestHeaderSent = pBestIndex;
- } else if (state.fPreferHeaders) {
- if (vHeaders.size() > 1) {
- LogPrint("net", "%s: %u headers, range (%s, %s), to peer=%d\n", __func__,
- vHeaders.size(),
- vHeaders.front().GetHash().ToString(),
- vHeaders.back().GetHash().ToString(), pto->id);
- } else {
- LogPrint("net", "%s: sending header %s to peer=%d\n", __func__,
- vHeaders.front().GetHash().ToString(), pto->id);
- }
- pto->PushMessage(NetMsgType::HEADERS, vHeaders);
- state.pindexBestHeaderSent = pBestIndex;
- } else
- fRevertToInv = true;
- }
- if (fRevertToInv) {
- // If falling back to using an inv, just try to inv the tip.
- // The last entry in vBlockHashesToAnnounce was our tip at some point
- // in the past.
- if (!pto->vBlockHashesToAnnounce.empty()) {
- const uint256 &hashToAnnounce = pto->vBlockHashesToAnnounce.back();
- BlockMap::iterator mi = mapBlockIndex.find(hashToAnnounce);
- assert(mi != mapBlockIndex.end());
- CBlockIndex *pindex = mi->second;
-
- // Warn if we're announcing a block that is not on the main chain.
- // This should be very rare and could be optimized out.
- // Just log for now.
- if (chainActive[pindex->nHeight] != pindex) {
- LogPrint("net", "Announcing block %s not on main chain (tip=%s)\n",
- hashToAnnounce.ToString(), chainActive.Tip()->GetBlockHash().ToString());
- }
-
- // If the peer's chain has this block, don't inv it back.
- if (!PeerHasHeader(&state, pindex)) {
- pto->PushInventory(CInv(MSG_BLOCK, hashToAnnounce));
- LogPrint("net", "%s: sending inv peer=%d hash=%s\n", __func__,
- pto->id, hashToAnnounce.ToString());
- }
- }
- }
- pto->vBlockHashesToAnnounce.clear();
- }
-
- //
- // Message: inventory
- //
- vector<CInv> vInv;
- {
- LOCK(pto->cs_inventory);
- vInv.reserve(std::max<size_t>(pto->vInventoryBlockToSend.size(), INVENTORY_BROADCAST_MAX));
-
- // Add blocks
- BOOST_FOREACH(const uint256& hash, pto->vInventoryBlockToSend) {
- vInv.push_back(CInv(MSG_BLOCK, hash));
- if (vInv.size() == MAX_INV_SZ) {
- pto->PushMessage(NetMsgType::INV, vInv);
- vInv.clear();
- }
- }
- pto->vInventoryBlockToSend.clear();
-
- // Check whether periodic sends should happen
- bool fSendTrickle = pto->fWhitelisted;
- if (pto->nNextInvSend < nNow) {
- fSendTrickle = true;
- // Use half the delay for outbound peers, as there is less privacy concern for them.
- pto->nNextInvSend = PoissonNextSend(nNow, INVENTORY_BROADCAST_INTERVAL >> !pto->fInbound);
- }
-
- // Time to send but the peer has requested we not relay transactions.
- if (fSendTrickle) {
- LOCK(pto->cs_filter);
- if (!pto->fRelayTxes) pto->setInventoryTxToSend.clear();
- }
-
- // Respond to BIP35 mempool requests
- if (fSendTrickle && pto->fSendMempool) {
- auto vtxinfo = mempool.infoAll();
- pto->fSendMempool = false;
- CAmount filterrate = 0;
- {
- LOCK(pto->cs_feeFilter);
- filterrate = pto->minFeeFilter;
- }
-
- LOCK(pto->cs_filter);
-
- for (const auto& txinfo : vtxinfo) {
- const uint256& hash = txinfo.tx->GetHash();
- CInv inv(MSG_TX, hash);
- pto->setInventoryTxToSend.erase(hash);
- if (filterrate) {
- if (txinfo.feeRate.GetFeePerK() < filterrate)
- continue;
- }
- if (pto->pfilter) {
- if (!pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) continue;
- }
- pto->filterInventoryKnown.insert(hash);
- vInv.push_back(inv);
- if (vInv.size() == MAX_INV_SZ) {
- pto->PushMessage(NetMsgType::INV, vInv);
- vInv.clear();
- }
- }
- pto->timeLastMempoolReq = GetTime();
- }
-
- // Determine transactions to relay
- if (fSendTrickle) {
- // Produce a vector with all candidates for sending
- vector<std::set<uint256>::iterator> vInvTx;
- vInvTx.reserve(pto->setInventoryTxToSend.size());
- for (std::set<uint256>::iterator it = pto->setInventoryTxToSend.begin(); it != pto->setInventoryTxToSend.end(); it++) {
- vInvTx.push_back(it);
- }
- CAmount filterrate = 0;
- {
- LOCK(pto->cs_feeFilter);
- filterrate = pto->minFeeFilter;
- }
- // Topologically and fee-rate sort the inventory we send for privacy and priority reasons.
- // A heap is used so that not all items need sorting if only a few are being sent.
- CompareInvMempoolOrder compareInvMempoolOrder(&mempool);
- std::make_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
- // No reason to drain out at many times the network's capacity,
- // especially since we have many peers and some will draw much shorter delays.
- unsigned int nRelayedTransactions = 0;
- LOCK(pto->cs_filter);
- while (!vInvTx.empty() && nRelayedTransactions < INVENTORY_BROADCAST_MAX) {
- // Fetch the top element from the heap
- std::pop_heap(vInvTx.begin(), vInvTx.end(), compareInvMempoolOrder);
- std::set<uint256>::iterator it = vInvTx.back();
- vInvTx.pop_back();
- uint256 hash = *it;
- // Remove it from the to-be-sent set
- pto->setInventoryTxToSend.erase(it);
- // Check if not in the filter already
- if (pto->filterInventoryKnown.contains(hash)) {
- continue;
- }
- // Not in the mempool anymore? don't bother sending it.
- auto txinfo = mempool.info(hash);
- if (!txinfo.tx) {
- continue;
- }
- if (filterrate && txinfo.feeRate.GetFeePerK() < filterrate) {
- continue;
- }
- if (pto->pfilter && !pto->pfilter->IsRelevantAndUpdate(*txinfo.tx)) continue;
- // Send
- vInv.push_back(CInv(MSG_TX, hash));
- nRelayedTransactions++;
- {
- // Expire old relay messages
- while (!vRelayExpiration.empty() && vRelayExpiration.front().first < nNow)
- {
- mapRelay.erase(vRelayExpiration.front().second);
- vRelayExpiration.pop_front();
- }
-
- auto ret = mapRelay.insert(std::make_pair(hash, std::move(txinfo.tx)));
- if (ret.second) {
- vRelayExpiration.push_back(std::make_pair(nNow + 15 * 60 * 1000000, ret.first));
- }
- }
- if (vInv.size() == MAX_INV_SZ) {
- pto->PushMessage(NetMsgType::INV, vInv);
- vInv.clear();
- }
- pto->filterInventoryKnown.insert(hash);
- }
- }
- }
- if (!vInv.empty())
- pto->PushMessage(NetMsgType::INV, vInv);
-
- // Detect whether we're stalling
- nNow = GetTimeMicros();
- if (!pto->fDisconnect && state.nStallingSince && state.nStallingSince < nNow - 1000000 * BLOCK_STALLING_TIMEOUT) {
- // Stalling only triggers when the block download window cannot move. During normal steady state,
- // the download window should be much larger than the to-be-downloaded set of blocks, so disconnection
- // should only happen during initial block download.
- LogPrintf("Peer=%d is stalling block download, disconnecting\n", pto->id);
- pto->fDisconnect = true;
- }
- // In case there is a block that has been in flight from this peer for 2 + 0.5 * N times the block interval
- // (with N the number of peers from which we're downloading validated blocks), disconnect due to timeout.
- // We compensate for other peers to prevent killing off peers due to our own downstream link
- // being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
- // to unreasonably increase our timeout.
- if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0) {
- QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
- int nOtherPeersWithValidatedDownloads = nPeersWithValidatedDownloads - (state.nBlocksInFlightValidHeaders > 0);
- if (nNow > state.nDownloadingSince + consensusParams.nPowTargetSpacing * (BLOCK_DOWNLOAD_TIMEOUT_BASE + BLOCK_DOWNLOAD_TIMEOUT_PER_PEER * nOtherPeersWithValidatedDownloads)) {
- LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id);
- pto->fDisconnect = true;
- }
- }
-
- //
- // Message: getdata (blocks)
- //
- vector<CInv> vGetData;
- if (!pto->fDisconnect && !pto->fClient && (fFetch || !IsInitialBlockDownload()) && state.nBlocksInFlight < MAX_BLOCKS_IN_TRANSIT_PER_PEER) {
- vector<CBlockIndex*> vToDownload;
- NodeId staller = -1;
- FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller, consensusParams);
- BOOST_FOREACH(CBlockIndex *pindex, vToDownload) {
- uint32_t nFetchFlags = GetFetchFlags(pto, pindex->pprev, consensusParams);
- vGetData.push_back(CInv(MSG_BLOCK | nFetchFlags, pindex->GetBlockHash()));
- MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex);
- LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
- pindex->nHeight, pto->id);
- }
- if (state.nBlocksInFlight == 0 && staller != -1) {
- if (State(staller)->nStallingSince == 0) {
- State(staller)->nStallingSince = nNow;
- LogPrint("net", "Stall started peer=%d\n", staller);
- }
- }
- }
-
- //
- // Message: getdata (non-blocks)
- //
- while (!pto->fDisconnect && !pto->mapAskFor.empty() && (*pto->mapAskFor.begin()).first <= nNow)
- {
- const CInv& inv = (*pto->mapAskFor.begin()).second;
- if (!AlreadyHave(inv))
- {
- if (fDebug)
- LogPrint("net", "Requesting %s peer=%d\n", inv.ToString(), pto->id);
- vGetData.push_back(inv);
- if (vGetData.size() >= 1000)
- {
- pto->PushMessage(NetMsgType::GETDATA, vGetData);
- vGetData.clear();
- }
- } else {
- //If we're not going to ask, don't expect a response.
- pto->setAskFor.erase(inv.hash);
- }
- pto->mapAskFor.erase(pto->mapAskFor.begin());
- }
- if (!vGetData.empty())
- pto->PushMessage(NetMsgType::GETDATA, vGetData);
-
- //
- // Message: feefilter
- //
- // We don't want white listed peers to filter txs to us if we have -whitelistforcerelay
- if (pto->nVersion >= FEEFILTER_VERSION && GetBoolArg("-feefilter", DEFAULT_FEEFILTER) &&
- !(pto->fWhitelisted && GetBoolArg("-whitelistforcerelay", DEFAULT_WHITELISTFORCERELAY))) {
- CAmount currentFilter = mempool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
- int64_t timeNow = GetTimeMicros();
- if (timeNow > pto->nextSendTimeFeeFilter) {
- CAmount filterToSend = filterRounder.round(currentFilter);
- if (filterToSend != pto->lastSentFeeFilter) {
- pto->PushMessage(NetMsgType::FEEFILTER, filterToSend);
- pto->lastSentFeeFilter = filterToSend;
- }
- pto->nextSendTimeFeeFilter = PoissonNextSend(timeNow, AVG_FEEFILTER_BROADCAST_INTERVAL);
- }
- // If the fee filter has changed substantially and it's still more than MAX_FEEFILTER_CHANGE_DELAY
- // until scheduled broadcast, then move the broadcast to within MAX_FEEFILTER_CHANGE_DELAY.
- else if (timeNow + MAX_FEEFILTER_CHANGE_DELAY * 1000000 < pto->nextSendTimeFeeFilter &&
- (currentFilter < 3 * pto->lastSentFeeFilter / 4 || currentFilter > 4 * pto->lastSentFeeFilter / 3)) {
- pto->nextSendTimeFeeFilter = timeNow + GetRandInt(MAX_FEEFILTER_CHANGE_DELAY) * 1000000;
- }
- }
- }
- return true;
-}
-
- std::string CBlockFileInfo::ToString() const {
- return strprintf("CBlockFileInfo(blocks=%u, size=%u, heights=%u...%u, time=%s...%s)", nBlocks, nSize, nHeightFirst, nHeightLast, DateTimeStrFormat("%Y-%m-%d", nTimeFirst), DateTimeStrFormat("%Y-%m-%d", nTimeLast));
- }
-
ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos)
{
LOCK(cs_main);
@@ -6978,7 +4151,7 @@ bool LoadMempool(void)
file >> num;
double prioritydummy = 0;
while (num--) {
- CTransaction tx;
+ CTransactionRef tx;
int64_t nTime;
int64_t nFeeDelta;
file >> tx;
@@ -6987,7 +4160,7 @@ bool LoadMempool(void)
CAmount amountdelta = nFeeDelta;
if (amountdelta) {
- mempool.PrioritiseTransaction(tx.GetHash(), tx.GetHash().ToString(), prioritydummy, amountdelta);
+ mempool.PrioritiseTransaction(tx->GetHash(), tx->GetHash().ToString(), prioritydummy, amountdelta);
}
CValidationState state;
if (nTime + nExpiryTimeout > nNow) {
@@ -7001,6 +4174,8 @@ bool LoadMempool(void)
} else {
++skipped;
}
+ if (ShutdownRequested())
+ return false;
}
std::map<uint256, CAmount> mapDeltas;
file >> mapDeltas;
@@ -7064,6 +4239,24 @@ void DumpMempool(void)
}
}
+//! Guess how far we are in the verification process at the given block index
+double GuessVerificationProgress(const ChainTxData& data, CBlockIndex *pindex) {
+ if (pindex == NULL)
+ return 0.0;
+
+ int64_t nNow = time(NULL);
+
+ double fTxTotal;
+
+ if (pindex->nChainTx <= data.nTxCount) {
+ fTxTotal = data.nTxCount + (nNow - data.nTime) * data.dTxRate;
+ } else {
+ fTxTotal = pindex->nChainTx + (nNow - pindex->GetBlockTime()) * data.dTxRate;
+ }
+
+ return pindex->nChainTx / fTxTotal;
+}
+
class CMainCleanup
{
public:
@@ -7074,9 +4267,5 @@ public:
for (; it1 != mapBlockIndex.end(); it1++)
delete (*it1).second;
mapBlockIndex.clear();
-
- // orphan transactions
- mapOrphanTransactions.clear();
- mapOrphanTransactionsByPrev.clear();
}
} instance_of_cmaincleanup;
diff --git a/src/main.h b/src/validation.h
index e80314a64b..6fcbb1c108 100644
--- a/src/main.h
+++ b/src/validation.h
@@ -1,10 +1,10 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#ifndef BITCOIN_MAIN_H
-#define BITCOIN_MAIN_H
+#ifndef BITCOIN_VALIDATION_H
+#define BITCOIN_VALIDATION_H
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
@@ -13,10 +13,9 @@
#include "amount.h"
#include "chain.h"
#include "coins.h"
-#include "net.h"
+#include "protocol.h" // For CMessageHeader::MessageStartChars
#include "script/script_error.h"
#include "sync.h"
-#include "validationinterface.h"
#include "versionbits.h"
#include <algorithm>
@@ -28,7 +27,10 @@
#include <utility>
#include <vector>
+#include <atomic>
+
#include <boost/unordered_map.hpp>
+#include <boost/filesystem/path.hpp>
class CBlockIndex;
class CBlockTreeDB;
@@ -40,6 +42,7 @@ class CScriptCheck;
class CTxMemPool;
class CValidationInterface;
class CValidationState;
+struct ChainTxData;
struct PrecomputedTransactionData;
struct LockPoints;
@@ -56,12 +59,6 @@ static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
static const CAmount HIGH_TX_FEE_PER_KB = 0.01 * COIN;
//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis)
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
-/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
-static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
-/** Expiration time for orphan transactions in seconds */
-static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
-/** Minimum time between orphan transactions expire time checks in seconds */
-static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
/** Default for -limitancestorcount, max number of in-mempool ancestors */
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */
@@ -71,7 +68,7 @@ static const unsigned int DEFAULT_DESCENDANT_LIMIT = 25;
/** Default for -limitdescendantsize, maximum kilobytes of in-mempool descendants */
static const unsigned int DEFAULT_DESCENDANT_SIZE_LIMIT = 101;
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
-static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 72;
+static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 336;
/** The maximum size of a blk?????.dat file (since 0.8) */
static const unsigned int MAX_BLOCKFILE_SIZE = 0x8000000; // 128 MiB
/** The pre-allocation chunk size for blk?????.dat files (since 0.8) */
@@ -125,9 +122,11 @@ static const int64_t BLOCK_DOWNLOAD_TIMEOUT_BASE = 1000000;
/** Additional block download timeout per parallel downloading peer (i.e. 5 min) */
static const int64_t BLOCK_DOWNLOAD_TIMEOUT_PER_PEER = 500000;
-static const unsigned int DEFAULT_LIMITFREERELAY = 15;
+static const unsigned int DEFAULT_LIMITFREERELAY = 0;
static const bool DEFAULT_RELAYPRIORITY = true;
static const int64_t DEFAULT_MAX_TIP_AGE = 24 * 60 * 60;
+/** Maximum age of our tip in seconds for us to be considered current for fee estimation */
+static const int64_t MAX_FEE_ESTIMATION_TIP_AGE = 3 * 60 * 60;
/** Default for -permitbaremultisig */
static const bool DEFAULT_PERMIT_BAREMULTISIG = true;
@@ -135,7 +134,6 @@ static const bool DEFAULT_CHECKPOINTS_ENABLED = true;
static const bool DEFAULT_TXINDEX = false;
static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100;
-static const bool DEFAULT_TESTSAFEMODE = false;
/** Default for -mempoolreplacement */
static const bool DEFAULT_ENABLE_REPLACEMENT = true;
/** Default for using fee filter */
@@ -165,7 +163,7 @@ extern uint64_t nLastBlockWeight;
extern const std::string strMessageMagic;
extern CWaitableCriticalSection csBestBlock;
extern CConditionVariable cvBlockChange;
-extern bool fImporting;
+extern std::atomic_bool fImporting;
extern bool fReindex;
extern int nScriptCheckThreads;
extern bool fTxIndex;
@@ -182,6 +180,9 @@ extern CAmount maxTxFee;
extern int64_t nMaxTipAge;
extern bool fEnableReplacement;
+/** Block hash whose ancestors we will assume to have valid scripts without checking them. */
+extern uint256 hashAssumeValid;
+
/** Best header we've seen so far (used for getheaders queries' starting points). */
extern CBlockIndex *pindexBestHeader;
@@ -215,15 +216,35 @@ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024;
* Process an incoming block. This only returns after the best known valid
* block is made active. Note that it does not, however, guarantee that the
* specific block passed to it has been checked for validity!
+ *
+ * If you want to *possibly* get feedback on whether pblock is valid, you must
+ * install a CValidationInterface (see validationinterface.h) - this will have
+ * its BlockChecked method called whenever *any* block completes validation.
+ *
+ * Note that we guarantee that either the proof-of-work is valid on pblock, or
+ * (and possibly also) BlockChecked will have been called.
*
- * @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganization; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation.
- * @param[in] pfrom The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
+ * Call without cs_main held.
+ *
* @param[in] pblock The block we want to process.
* @param[in] fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers.
- * @param[out] dbp The already known disk position of pblock, or NULL if not yet stored.
+ * @param[out] fNewBlock A boolean which is set to indicate if the block was first received via this call
* @return True if state.IsValid()
*/
-bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp);
+bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<const CBlock> pblock, bool fForceProcessing, bool* fNewBlock);
+
+/**
+ * Process incoming block headers.
+ *
+ * Call without cs_main held.
+ *
+ * @param[in] block The block headers themselves
+ * @param[out] state This may be set to an Error state if any error occurred processing them
+ * @param[in] chainparams The params for the chain we want to connect to
+ * @param[out] ppindex If set, the pointer will be set to point to the last new block index object for the given headers
+ */
+bool ProcessNewBlockHeaders(const std::vector<CBlockHeader>& block, CValidationState& state, const CChainParams& chainparams, const CBlockIndex** ppindex=NULL);
+
/** Check whether enough disk space is available for an incoming block */
bool CheckDiskSpace(uint64_t nAdditionalBytes = 0);
/** Open a block file (blk?????.dat) */
@@ -253,11 +274,14 @@ bool IsInitialBlockDownload();
*/
std::string GetWarnings(const std::string& strFor);
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
-bool GetTransaction(const uint256 &hash, CTransaction &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false);
+bool GetTransaction(const uint256 &hash, CTransactionRef &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false);
/** Find the best known block, and make it the tip of the block chain */
-bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, const CBlock* pblock = NULL);
+bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>());
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
+/** Guess verification progress (as a fraction between 0.0=genesis and 1.0=current tip). */
+double GuessVerificationProgress(const ChainTxData& data, CBlockIndex* pindex);
+
/**
* Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.
* The user sets the target (in MB) on the command line or in config file. This will be run on startup and whenever new
@@ -286,14 +310,19 @@ CBlockIndex * InsertBlockIndex(uint256 hash);
void FlushStateToDisk();
/** Prune block files and flush state to disk. */
void PruneAndFlush();
+/** Prune block files up to a given height */
+void PruneBlockFilesManual(int nPruneUpToHeight);
-/** (try to) add transaction to memory pool **/
-bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
+/** (try to) add transaction to memory pool
+ * plTxnReplaced will be appended to with all transactions replaced from mempool **/
+bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
+ bool* pfMissingInputs, std::list<CTransactionRef>* plTxnReplaced = NULL,
+ bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
/** (try to) add transaction to memory pool with a specified acceptance time **/
-bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransaction &tx, bool fLimitFree,
- bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
+bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
+ bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced = NULL,
+ bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
/** Convert CValidationState to a human-readable message for logging */
std::string FormatStateMessage(const CValidationState &state);
@@ -343,7 +372,7 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight);
/** Transaction validation functions */
/** Context-independent validity checks */
-bool CheckTransaction(const CTransaction& tx, CValidationState& state);
+bool CheckTransaction(const CTransaction& tx, CValidationState& state, bool fCheckDuplicateInputs=true);
namespace Consensus {
@@ -539,45 +568,4 @@ void DumpMempool();
/** Load the mempool from disk. */
bool LoadMempool();
-// The following things handle network-processing logic
-// (and should be moved to a separate file)
-
-/** Register with a network node to receive its signals */
-void RegisterNodeSignals(CNodeSignals& nodeSignals);
-/** Unregister a network node */
-void UnregisterNodeSignals(CNodeSignals& nodeSignals);
-
-class PeerLogicValidation : public CValidationInterface {
-private:
- CConnman* connman;
-
-public:
- PeerLogicValidation(CConnman* connmanIn);
-
- virtual void UpdatedBlockTip(const CBlockIndex *pindexNew, const CBlockIndex *pindexFork, bool fInitialDownload);
- virtual void BlockChecked(const CBlock& block, const CValidationState& state);
-};
-
-struct CNodeStateStats {
- int nMisbehavior;
- int nSyncHeight;
- int nCommonHeight;
- std::vector<int> vHeightInFlight;
-};
-
-/** Get statistics from node state */
-bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
-/** Increase a node's misbehavior score. */
-void Misbehaving(NodeId nodeid, int howmuch);
-
-/** Process protocol messages received from a given node */
-bool ProcessMessages(CNode* pfrom, CConnman& connman);
-/**
- * Send queued protocol messages to be sent to a give node.
- *
- * @param[in] pto The node which we are sending messages to.
- * @param[in] connman The connection manager for that node.
- */
-bool SendMessages(CNode* pto, CConnman& connman);
-
-#endif // BITCOIN_MAIN_H
+#endif // BITCOIN_VALIDATION_H
diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
index 085c336ccf..d4121a28bc 100644
--- a/src/validationinterface.cpp
+++ b/src/validationinterface.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -22,6 +22,7 @@ void RegisterValidationInterface(CValidationInterface* pwalletIn) {
g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2));
g_signals.ScriptForMining.connect(boost::bind(&CValidationInterface::GetScriptForMining, pwalletIn, _1));
g_signals.BlockFound.connect(boost::bind(&CValidationInterface::ResetRequestCount, pwalletIn, _1));
+ g_signals.NewPoWValidBlock.connect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
}
void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
@@ -34,6 +35,7 @@ void UnregisterValidationInterface(CValidationInterface* pwalletIn) {
g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1));
g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
+ g_signals.NewPoWValidBlock.disconnect(boost::bind(&CValidationInterface::NewPoWValidBlock, pwalletIn, _1, _2));
}
void UnregisterAllValidationInterfaces() {
@@ -46,4 +48,5 @@ void UnregisterAllValidationInterfaces() {
g_signals.UpdatedTransaction.disconnect_all_slots();
g_signals.SyncTransaction.disconnect_all_slots();
g_signals.UpdatedBlockTip.disconnect_all_slots();
+ g_signals.NewPoWValidBlock.disconnect_all_slots();
}
diff --git a/src/validationinterface.h b/src/validationinterface.h
index a29859999b..594072719c 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,6 +8,7 @@
#include <boost/signals2/signal.hpp>
#include <boost/shared_ptr.hpp>
+#include <memory>
class CBlock;
class CBlockIndex;
@@ -40,6 +41,7 @@ protected:
virtual void BlockChecked(const CBlock&, const CValidationState&) {}
virtual void GetScriptForMining(boost::shared_ptr<CReserveScript>&) {};
virtual void ResetRequestCount(const uint256 &hash) {};
+ virtual void NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& block) {};
friend void ::RegisterValidationInterface(CValidationInterface*);
friend void ::UnregisterValidationInterface(CValidationInterface*);
friend void ::UnregisterAllValidationInterfaces();
@@ -66,6 +68,10 @@ struct CMainSignals {
boost::signals2::signal<void (boost::shared_ptr<CReserveScript>&)> ScriptForMining;
/** Notifies listeners that a block has been successfully mined */
boost::signals2::signal<void (const uint256 &)> BlockFound;
+ /**
+ * Notifies listeners that a block which builds directly on our current tip
+ * has been received and connected to the headers tree, though not validated yet */
+ boost::signals2::signal<void (const CBlockIndex *, const std::shared_ptr<const CBlock>&)> NewPoWValidBlock;
};
CMainSignals& GetMainSignals();
diff --git a/src/version.h b/src/version.h
index 87bd655066..0f69b2f02b 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2014 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,7 +9,7 @@
* network protocol versioning
*/
-static const int PROTOCOL_VERSION = 70014;
+static const int PROTOCOL_VERSION = 70015;
//! initial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
@@ -42,4 +42,7 @@ static const int FEEFILTER_VERSION = 70013;
//! short-id-based block download starts with this version
static const int SHORT_IDS_BLOCKS_VERSION = 70014;
+//! not banning for invalid compact blocks starts with this version
+static const int INVALID_CB_NO_BAN_VERSION = 70015;
+
#endif // BITCOIN_VERSION_H
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h
index 08d23688ff..eaf4ff8062 100644
--- a/src/wallet/coincontrol.h
+++ b/src/wallet/coincontrol.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2015 The Bitcoin Core developers
+// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/wallet/crypter.cpp b/src/wallet/crypter.cpp
index 31ee060677..fc318c1612 100644
--- a/src/wallet/crypter.cpp
+++ b/src/wallet/crypter.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/src/wallet/crypter.h b/src/wallet/crypter.h
index f00f7fa731..275e435f73 100644
--- a/src/wallet/crypter.h
+++ b/src/wallet/crypter.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -47,7 +47,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(vchCryptedKey);
READWRITE(vchSalt);
READWRITE(nDerivationMethod);
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index a809c9ad64..800e1f4e29 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -397,15 +397,15 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
break;
}
if (pszSkip &&
- strncmp(&ssKey[0], pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0)
+ strncmp(ssKey.data(), pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0)
continue;
- if (strncmp(&ssKey[0], "\x07version", 8) == 0) {
+ if (strncmp(ssKey.data(), "\x07version", 8) == 0) {
// Update version:
ssValue.clear();
ssValue << CLIENT_VERSION;
}
- Dbt datKey(&ssKey[0], ssKey.size());
- Dbt datValue(&ssValue[0], ssValue.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
+ Dbt datValue(ssValue.data(), ssValue.size());
int ret2 = pdbCopy->put(NULL, &datKey, &datValue, DB_NOOVERWRITE);
if (ret2 > 0)
fSuccess = false;
diff --git a/src/wallet/db.h b/src/wallet/db.h
index a0f673ecfc..bc15f2147f 100644
--- a/src/wallet/db.h
+++ b/src/wallet/db.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -122,7 +122,7 @@ protected:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
- Dbt datKey(&ssKey[0], ssKey.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
// Read
Dbt datValue;
@@ -158,13 +158,13 @@ protected:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
- Dbt datKey(&ssKey[0], ssKey.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
// Value
CDataStream ssValue(SER_DISK, CLIENT_VERSION);
ssValue.reserve(10000);
ssValue << value;
- Dbt datValue(&ssValue[0], ssValue.size());
+ Dbt datValue(ssValue.data(), ssValue.size());
// Write
int ret = pdb->put(activeTxn, &datKey, &datValue, (fOverwrite ? 0 : DB_NOOVERWRITE));
@@ -187,7 +187,7 @@ protected:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
- Dbt datKey(&ssKey[0], ssKey.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
// Erase
int ret = pdb->del(activeTxn, &datKey, 0);
@@ -207,7 +207,7 @@ protected:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(1000);
ssKey << key;
- Dbt datKey(&ssKey[0], ssKey.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
// Exists
int ret = pdb->exists(activeTxn, &datKey, 0);
@@ -234,7 +234,7 @@ protected:
Dbt datKey;
unsigned int fFlags = DB_NEXT;
if (setRange) {
- datKey.set_data(&ssKey[0]);
+ datKey.set_data(ssKey.data());
datKey.set_size(ssKey.size());
fFlags = DB_SET_RANGE;
}
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index b638810e9d..7d4ed70ed9 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include "chain.h"
#include "rpc/server.h"
#include "init.h"
-#include "main.h"
+#include "validation.h"
#include "script/script.h"
#include "script/standard.h"
#include "sync.h"
@@ -82,7 +82,7 @@ UniValue importprivkey(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
throw runtime_error(
- "importprivkey \"bitcoinprivkey\" ( \"label\" rescan )\n"
+ "importprivkey \"bitcoinprivkey\" ( \"label\" ) ( rescan )\n"
"\nAdds a private key (as returned by dumpprivkey) to your wallet.\n"
"\nArguments:\n"
"1. \"bitcoinprivkey\" (string, required) The private key (see dumpprivkey)\n"
@@ -267,11 +267,11 @@ UniValue importprunedfunds(const JSONRPCRequest& request)
"2. \"txoutproof\" (string, required) The hex output from gettxoutproof that contains the transaction\n"
);
- CTransaction tx;
+ CMutableTransaction tx;
if (!DecodeHexTx(tx, request.params[0].get_str()))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
uint256 hashTx = tx.GetHash();
- CWalletTx wtx(pwalletMain,tx);
+ CWalletTx wtx(pwalletMain, MakeTransactionRef(std::move(tx)));
CDataStream ssMB(ParseHexV(request.params[1], "proof"), SER_NETWORK, PROTOCOL_VERSION);
CMerkleBlock merkleBlock;
@@ -304,7 +304,7 @@ UniValue importprunedfunds(const JSONRPCRequest& request)
LOCK2(cs_main, pwalletMain->cs_wallet);
- if (pwalletMain->IsMine(tx)) {
+ if (pwalletMain->IsMine(wtx)) {
pwalletMain->AddToWallet(wtx, false);
return NullUniValue;
}
@@ -520,11 +520,11 @@ UniValue dumpprivkey(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "dumpprivkey \"bitcoinaddress\"\n"
- "\nReveals the private key corresponding to 'bitcoinaddress'.\n"
+ "dumpprivkey \"address\"\n"
+ "\nReveals the private key corresponding to 'address'.\n"
"Then the importprivkey can be used with this output\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address for the private key\n"
+ "1. \"address\" (string, required) The bitcoin address for the private key\n"
"\nResult:\n"
"\"key\" (string) The private key\n"
"\nExamples:\n"
@@ -798,8 +798,8 @@ UniValue processImport(const UniValue& data) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Pubkey must be a hex string");
}
- std::vector<unsigned char> data(ParseHex(strPubKey));
- CPubKey pubKey(data.begin(), data.end());
+ std::vector<unsigned char> vData(ParseHex(strPubKey));
+ CPubKey pubKey(vData.begin(), vData.end());
if (!pubKey.IsFullyValid()) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Pubkey is not a valid public key");
@@ -963,10 +963,10 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
// clang-format off
if (mainRequest.fHelp || mainRequest.params.size() < 1 || mainRequest.params.size() > 2)
throw runtime_error(
- "importmulti '[<json import requests>]' '<json options>' \n\n"
+ "importmulti \"requests\" \"options\"\n\n"
"Import addresses/scripts (with private or public keys, redeem script (P2SH)), rescanning all addresses in one-shot-only (rescan can be disabled via options).\n\n"
"Arguments:\n"
- "1. request array (array, required) Data to be imported\n"
+ "1. requests (array, required) Data to be imported\n"
" [ (array of json objects)\n"
" {\n"
" \"scriptPubKey\": \"<script>\" | { \"address\":\"<address>\" }, (string / json, required) Type of scriptPubKey (string for script, json for address)\n"
@@ -980,7 +980,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
" }\n"
" ,...\n"
" ]\n"
- "2. json options (json, optional)\n"
+ "2. options (json, optional)\n"
" {\n"
" \"rescan\": <false>, (boolean, optional, default: true) Stating if should rescan the blockchain after all imports\n"
" }\n"
@@ -1017,7 +1017,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
bool fRunScan = false;
const int64_t minimumTimestamp = 1;
- int64_t nLowestTimestamp;
+ int64_t nLowestTimestamp = 0;
if (fRescan && chainActive.Tip()) {
nLowestTimestamp = chainActive.Tip()->GetBlockTime();
@@ -1048,8 +1048,8 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
}
}
- if (fRescan && fRunScan && requests.size() && nLowestTimestamp <= chainActive.Tip()->GetBlockTime()) {
- CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindLatestBefore(nLowestTimestamp) : chainActive.Genesis();
+ if (fRescan && fRunScan && requests.size() && nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()) {
+ CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(nLowestTimestamp) : chainActive.Genesis();
if (pindex) {
pwalletMain->ScanForWalletTransactions(pindex, true);
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 5a22e0278d..2428ef04e2 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -9,7 +9,7 @@
#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
-#include "main.h"
+#include "validation.h"
#include "net.h"
#include "policy/rbf.h"
#include "rpc/server.h"
@@ -116,7 +116,7 @@ UniValue getnewaddress(const JSONRPCRequest& request)
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. The account name for the address to be linked to. If not provided, the default account \"\" is used. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created if there is no account by the given name.\n"
"\nResult:\n"
- "\"bitcoinaddress\" (string) The new bitcoin address\n"
+ "\"address\" (string) The new bitcoin address\n"
"\nExamples:\n"
+ HelpExampleCli("getnewaddress", "")
+ HelpExampleRpc("getnewaddress", "")
@@ -166,7 +166,7 @@ UniValue getaccountaddress(const JSONRPCRequest& request)
"\nArguments:\n"
"1. \"account\" (string, required) The account name for the address. It can also be set to the empty string \"\" to represent the default account. The account does not need to exist, it will be created and a new address created if there is no account by the given name.\n"
"\nResult:\n"
- "\"bitcoinaddress\" (string) The account bitcoin address\n"
+ "\"address\" (string) The account bitcoin address\n"
"\nExamples:\n"
+ HelpExampleCli("getaccountaddress", "")
+ HelpExampleCli("getaccountaddress", "\"\"")
@@ -228,10 +228,10 @@ UniValue setaccount(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "setaccount \"bitcoinaddress\" \"account\"\n"
+ "setaccount \"address\" \"account\"\n"
"\nDEPRECATED. Sets the account associated with the given address.\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address to be associated with an account.\n"
+ "1. \"address\" (string, required) The bitcoin address to be associated with an account.\n"
"2. \"account\" (string, required) The account to assign the address to.\n"
"\nExamples:\n"
+ HelpExampleCli("setaccount", "\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\" \"tabby\"")
@@ -274,10 +274,10 @@ UniValue getaccount(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 1)
throw runtime_error(
- "getaccount \"bitcoinaddress\"\n"
+ "getaccount \"address\"\n"
"\nDEPRECATED. Returns the account associated with the given address.\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address for account lookup.\n"
+ "1. \"address\" (string, required) The bitcoin address for account lookup.\n"
"\nResult:\n"
"\"accountname\" (string) the account address\n"
"\nExamples:\n"
@@ -309,10 +309,10 @@ UniValue getaddressesbyaccount(const JSONRPCRequest& request)
"getaddressesbyaccount \"account\"\n"
"\nDEPRECATED. Returns the list of addresses for the given account.\n"
"\nArguments:\n"
- "1. \"account\" (string, required) The account name.\n"
+ "1. \"account\" (string, required) The account name.\n"
"\nResult:\n"
"[ (json array of string)\n"
- " \"bitcoinaddress\" (string) a bitcoin address associated with the given account\n"
+ " \"address\" (string) a bitcoin address associated with the given account\n"
" ,...\n"
"]\n"
"\nExamples:\n"
@@ -362,7 +362,7 @@ static void SendMoney(const CTxDestination &address, CAmount nValue, bool fSubtr
CRecipient recipient = {scriptPubKey, nValue, fSubtractFeeFromAmount};
vecSend.push_back(recipient);
if (!pwalletMain->CreateTransaction(vecSend, wtxNew, reservekey, nFeeRequired, nChangePosRet, strError)) {
- if (!fSubtractFeeFromAmount && nValue + nFeeRequired > pwalletMain->GetBalance())
+ if (!fSubtractFeeFromAmount && nValue + nFeeRequired > curBalance)
strError = strprintf("Error: This transaction requires a transaction fee of at least %s", FormatMoney(nFeeRequired));
throw JSONRPCError(RPC_WALLET_ERROR, strError);
}
@@ -380,21 +380,21 @@ UniValue sendtoaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 2 || request.params.size() > 5)
throw runtime_error(
- "sendtoaddress \"bitcoinaddress\" amount ( \"comment\" \"comment-to\" subtractfeefromamount )\n"
+ "sendtoaddress \"address\" amount ( \"comment\" \"comment_to\" subtractfeefromamount )\n"
"\nSend an amount to a given address.\n"
+ HelpRequiringPassphrase() +
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address to send to.\n"
- "2. \"amount\" (numeric or string, required) The amount in " + CURRENCY_UNIT + " to send. eg 0.1\n"
- "3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
+ "1. \"address\" (string, required) The bitcoin address to send to.\n"
+ "2. \"amount\" (numeric or string, required) The amount in " + CURRENCY_UNIT + " to send. eg 0.1\n"
+ "3. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
- "4. \"comment-to\" (string, optional) A comment to store the name of the person or organization \n"
+ "4. \"comment_to\" (string, optional) A comment to store the name of the person or organization \n"
" to which you're sending the transaction. This is not part of the \n"
" transaction, just kept in your wallet.\n"
"5. subtractfeefromamount (boolean, optional, default=false) The fee will be deducted from the amount being sent.\n"
" The recipient will receive less bitcoins than you enter in the amount field.\n"
"\nResult:\n"
- "\"transactionid\" (string) The transaction id.\n"
+ "\"txid\" (string) The transaction id.\n"
"\nExamples:\n"
+ HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1")
+ HelpExampleCli("sendtoaddress", "\"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.1 \"donation\" \"seans outpost\"")
@@ -446,9 +446,9 @@ UniValue listaddressgroupings(const JSONRPCRequest& request)
"[\n"
" [\n"
" [\n"
- " \"bitcoinaddress\", (string) The bitcoin address\n"
+ " \"address\", (string) The bitcoin address\n"
" amount, (numeric) The amount in " + CURRENCY_UNIT + "\n"
- " \"account\" (string, optional) The account (DEPRECATED)\n"
+ " \"account\" (string, optional) DEPRECATED. The account\n"
" ]\n"
" ,...\n"
" ]\n"
@@ -489,11 +489,11 @@ UniValue signmessage(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() != 2)
throw runtime_error(
- "signmessage \"bitcoinaddress\" \"message\"\n"
+ "signmessage \"address\" \"message\"\n"
"\nSign a message with the private key of an address"
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address to use for the private key.\n"
+ "1. \"address\" (string, required) The bitcoin address to use for the private key.\n"
"2. \"message\" (string, required) The message to create a signature of.\n"
"\nResult:\n"
"\"signature\" (string) The signature of the message encoded in base 64\n"
@@ -545,10 +545,10 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "getreceivedbyaddress \"bitcoinaddress\" ( minconf )\n"
- "\nReturns the total amount received by the given bitcoinaddress in transactions with at least minconf confirmations.\n"
+ "getreceivedbyaddress \"address\" ( minconf )\n"
+ "\nReturns the total amount received by the given address in transactions with at least minconf confirmations.\n"
"\nArguments:\n"
- "1. \"bitcoinaddress\" (string, required) The bitcoin address for transactions.\n"
+ "1. \"address\" (string, required) The bitcoin address for transactions.\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
"\nResult:\n"
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received at this address.\n"
@@ -583,10 +583,10 @@ UniValue getreceivedbyaddress(const JSONRPCRequest& request)
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
- if (wtx.IsCoinBase() || !CheckFinalTx(wtx))
+ if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx))
continue;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
if (txout.scriptPubKey == scriptPubKey)
if (wtx.GetDepthInMainChain() >= nMinDepth)
nAmount += txout.nValue;
@@ -637,10 +637,10 @@ UniValue getreceivedbyaccount(const JSONRPCRequest& request)
for (map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it)
{
const CWalletTx& wtx = (*it).second;
- if (wtx.IsCoinBase() || !CheckFinalTx(wtx))
+ if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx))
continue;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
CTxDestination address;
if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*pwalletMain, address) && setAddress.count(address))
@@ -660,7 +660,7 @@ UniValue getbalance(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 3)
throw runtime_error(
- "getbalance ( \"account\" minconf includeWatchonly )\n"
+ "getbalance ( \"account\" minconf include_watchonly )\n"
"\nIf account is not specified, returns the server's total available balance.\n"
"If account is specified (DEPRECATED), returns the balance in the account.\n"
"Note that the account \"\" is not the same as leaving the parameter out.\n"
@@ -668,7 +668,7 @@ UniValue getbalance(const JSONRPCRequest& request)
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. The selected account, or \"*\" for entire wallet. It may be the default account using \"\".\n"
"2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n"
- "3. includeWatchonly (bool, optional, default=false) Also include balance in watchonly addresses (see 'importaddress')\n"
+ "3. include_watchonly (bool, optional, default=false) Also include balance in watch-only addresses (see 'importaddress')\n"
"\nResult:\n"
"amount (numeric) The total amount in " + CURRENCY_UNIT + " received for this account.\n"
"\nExamples:\n"
@@ -757,7 +757,7 @@ UniValue movecmd(const JSONRPCRequest& request)
"1. \"fromaccount\" (string, required) The name of the account to move funds from. May be the default account using \"\".\n"
"2. \"toaccount\" (string, required) The name of the account to move funds to. May be the default account using \"\".\n"
"3. amount (numeric) Quantity of " + CURRENCY_UNIT + " to move between accounts.\n"
- "4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
+ "4. (dummy) (numeric, optional) Ignored. Remains for backward compatibility.\n"
"5. \"comment\" (string, optional) An optional comment, stored in the wallet only.\n"
"\nResult:\n"
"true|false (boolean) true if successful.\n"
@@ -798,21 +798,21 @@ UniValue sendfrom(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 3 || request.params.size() > 6)
throw runtime_error(
- "sendfrom \"fromaccount\" \"tobitcoinaddress\" amount ( minconf \"comment\" \"comment-to\" )\n"
+ "sendfrom \"fromaccount\" \"toaddress\" amount ( minconf \"comment\" \"comment_to\" )\n"
"\nDEPRECATED (use sendtoaddress). Sent an amount from an account to a bitcoin address."
+ HelpRequiringPassphrase() + "\n"
"\nArguments:\n"
"1. \"fromaccount\" (string, required) The name of the account to send funds from. May be the default account using \"\".\n"
- "2. \"tobitcoinaddress\" (string, required) The bitcoin address to send funds to.\n"
+ "2. \"toaddress\" (string, required) The bitcoin address to send funds to.\n"
"3. amount (numeric or string, required) The amount in " + CURRENCY_UNIT + " (transaction fee is added on top).\n"
"4. minconf (numeric, optional, default=1) Only use funds with at least this many confirmations.\n"
"5. \"comment\" (string, optional) A comment used to store what the transaction is for. \n"
" This is not part of the transaction, just kept in your wallet.\n"
- "6. \"comment-to\" (string, optional) An optional comment to store the name of the person or organization \n"
+ "6. \"comment_to\" (string, optional) An optional comment to store the name of the person or organization \n"
" to which you're sending the transaction. This is not part of the transaction, \n"
" it is just kept in your wallet.\n"
"\nResult:\n"
- "\"transactionid\" (string) The transaction id.\n"
+ "\"txid\" (string) The transaction id.\n"
"\nExamples:\n"
"\nSend 0.01 " + CURRENCY_UNIT + " from the default account to the address, must have at least 1 confirmation\n"
+ HelpExampleCli("sendfrom", "\"\" \"1M72Sfpbz1BPpXFHz9m3CdqATR44Jvaydd\" 0.01") +
@@ -874,16 +874,16 @@ UniValue sendmany(const JSONRPCRequest& request)
" }\n"
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. \"comment\" (string, optional) A comment\n"
- "5. subtractfeefromamount (string, optional) A json array with addresses.\n"
+ "5. subtractfeefrom (array, optional) A json array with addresses.\n"
" The fee will be equally deducted from the amount of each selected address.\n"
" Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n"
" If no addresses are specified here, the sender pays the fee.\n"
" [\n"
- " \"address\" (string) Subtract fee from this address\n"
+ " \"address\" (string) Subtract fee from this address\n"
" ,...\n"
" ]\n"
"\nResult:\n"
- "\"transactionid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
+ "\"txid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
" the number of addresses.\n"
"\nExamples:\n"
"\nSend two amounts to two different addresses:\n"
@@ -989,7 +989,7 @@ UniValue addmultisigaddress(const JSONRPCRequest& request)
"\nArguments:\n"
"1. nrequired (numeric, required) The number of required signatures out of the n keys or addresses.\n"
- "2. \"keysobject\" (string, required) A json array of bitcoin addresses or hex-encoded public keys\n"
+ "2. \"keys\" (string, required) A json array of bitcoin addresses or hex-encoded public keys\n"
" [\n"
" \"address\" (string) bitcoin address or hex-encoded public key\n"
" ...,\n"
@@ -997,7 +997,7 @@ UniValue addmultisigaddress(const JSONRPCRequest& request)
"3. \"account\" (string, optional) DEPRECATED. An account to assign the addresses to.\n"
"\nResult:\n"
- "\"bitcoinaddress\" (string) A bitcoin address associated with the keys.\n"
+ "\"address\" (string) A bitcoin address associated with the keys.\n"
"\nExamples:\n"
"\nAdd a multisig address from 2 addresses\n"
@@ -1149,14 +1149,14 @@ UniValue ListReceived(const UniValue& params, bool fByAccounts)
{
const CWalletTx& wtx = (*it).second;
- if (wtx.IsCoinBase() || !CheckFinalTx(wtx))
+ if (wtx.IsCoinBase() || !CheckFinalTx(*wtx.tx))
continue;
int nDepth = wtx.GetDepthInMainChain();
if (nDepth < nMinDepth)
continue;
- BOOST_FOREACH(const CTxOut& txout, wtx.vout)
+ BOOST_FOREACH(const CTxOut& txout, wtx.tx->vout)
{
CTxDestination address;
if (!ExtractDestination(txout.scriptPubKey, address))
@@ -1253,12 +1253,12 @@ UniValue listreceivedbyaddress(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 3)
throw runtime_error(
- "listreceivedbyaddress ( minconf includeempty includeWatchonly)\n"
+ "listreceivedbyaddress ( minconf include_empty include_watchonly)\n"
"\nList balances by receiving address.\n"
"\nArguments:\n"
- "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
- "2. includeempty (bool, optional, default=false) Whether to include addresses that haven't received any payments.\n"
- "3. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n"
+ "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
+ "2. include_empty (bool, optional, default=false) Whether to include addresses that haven't received any payments.\n"
+ "3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n"
"\nResult:\n"
"[\n"
@@ -1268,7 +1268,11 @@ UniValue listreceivedbyaddress(const JSONRPCRequest& request)
" \"account\" : \"accountname\", (string) DEPRECATED. The account of the receiving address. The default account is \"\".\n"
" \"amount\" : x.xxx, (numeric) The total amount in " + CURRENCY_UNIT + " received by the address\n"
" \"confirmations\" : n, (numeric) The number of confirmations of the most recent transaction included\n"
- " \"label\" : \"label\" (string) A comment for the address/transaction, if any\n"
+ " \"label\" : \"label\", (string) A comment for the address/transaction, if any\n"
+ " \"txids\": [\n"
+ " n, (numeric) The ids of transactions received with the address \n"
+ " ...\n"
+ " ]\n"
" }\n"
" ,...\n"
"]\n"
@@ -1291,12 +1295,12 @@ UniValue listreceivedbyaccount(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 3)
throw runtime_error(
- "listreceivedbyaccount ( minconf includeempty includeWatchonly)\n"
+ "listreceivedbyaccount ( minconf include_empty include_watchonly)\n"
"\nDEPRECATED. List balances by account.\n"
"\nArguments:\n"
- "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
- "2. includeempty (bool, optional, default=false) Whether to include accounts that haven't received any payments.\n"
- "3. includeWatchonly (bool, optional, default=false) Whether to include watchonly addresses (see 'importaddress').\n"
+ "1. minconf (numeric, optional, default=1) The minimum number of confirmations before payments are included.\n"
+ "2. include_empty (bool, optional, default=false) Whether to include accounts that haven't received any payments.\n"
+ "3. include_watchonly (bool, optional, default=false) Whether to include watch-only addresses (see 'importaddress').\n"
"\nResult:\n"
"[\n"
@@ -1427,19 +1431,19 @@ UniValue listtransactions(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 4)
throw runtime_error(
- "listtransactions ( \"account\" count from includeWatchonly)\n"
+ "listtransactions ( \"account\" count skip include_watchonly)\n"
"\nReturns up to 'count' most recent transactions skipping the first 'from' transactions for account 'account'.\n"
"\nArguments:\n"
"1. \"account\" (string, optional) DEPRECATED. The account name. Should be \"*\".\n"
"2. count (numeric, optional, default=10) The number of transactions to return\n"
- "3. from (numeric, optional, default=0) The number of transactions to skip\n"
- "4. includeWatchonly (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')\n"
+ "3. skip (numeric, optional, default=0) The number of transactions to skip\n"
+ "4. include_watchonly (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')\n"
"\nResult:\n"
"[\n"
" {\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. \n"
" It will be \"\" for the default account.\n"
- " \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for \n"
+ " \"address\":\"address\", (string) The bitcoin address of the transaction. Not present for \n"
" move transactions (category = move).\n"
" \"category\":\"send|receive|move\", (string) The transaction category. 'move' is a local (off blockchain)\n"
" transaction between accounts, and not associated with an address,\n"
@@ -1448,14 +1452,14 @@ UniValue listtransactions(const JSONRPCRequest& request)
" \"amount\": x.xxx, (numeric) The amount in " + CURRENCY_UNIT + ". This is negative for the 'send' category, and for the\n"
" 'move' category for moves outbound. It is positive for the 'receive' category,\n"
" and for the 'move' category for inbound funds.\n"
+ " \"label\": \"label\", (string) A comment for the address/transaction, if any\n"
" \"vout\": n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
" 'send' category of transactions.\n"
- " \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable).\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
" 'receive' category of transactions. Negative confirmations indicate the\n"
" transaction conflicts with the block chain\n"
- " \"trusted\": xxx (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n"
+ " \"trusted\": xxx, (bool) Whether we consider the outputs of this unconfirmed transaction safe to spend.\n"
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive'\n"
" category of transactions.\n"
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive'\n"
@@ -1466,12 +1470,13 @@ UniValue listtransactions(const JSONRPCRequest& request)
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (midnight Jan 1 1970 GMT). Available \n"
" for 'send' and 'receive' category of transactions.\n"
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
- " \"label\": \"label\" (string) A comment for the address/transaction, if any\n"
- " \"otheraccount\": \"accountname\", (string) For the 'move' category of transactions, the account the funds came \n"
+ " \"otheraccount\": \"accountname\", (string) DEPRECATED. For the 'move' category of transactions, the account the funds came \n"
" from (for receiving funds, positive amounts), or went to (for sending funds,\n"
" negative amounts).\n"
- " \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
+ " \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
" may be unknown for unconfirmed transactions not in the mempool\n"
+ " \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
+ " 'send' category of transactions.\n"
" }\n"
"]\n"
@@ -1554,11 +1559,11 @@ UniValue listaccounts(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 2)
throw runtime_error(
- "listaccounts ( minconf includeWatchonly)\n"
+ "listaccounts ( minconf include_watchonly)\n"
"\nDEPRECATED. Returns Object that has account names as keys, account balances as values.\n"
"\nArguments:\n"
- "1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations\n"
- "2. includeWatchonly (bool, optional, default=false) Include balances in watchonly addresses (see 'importaddress')\n"
+ "1. minconf (numeric, optional, default=1) Only include transactions with at least this many confirmations\n"
+ "2. include_watchonly (bool, optional, default=false) Include balances in watch-only addresses (see 'importaddress')\n"
"\nResult:\n"
"{ (json object where keys are account names, and values are numeric balances\n"
" \"account\": x.xxx, (numeric) The property name is the account name, and the value is the total balance for the account.\n"
@@ -1633,29 +1638,33 @@ UniValue listsinceblock(const JSONRPCRequest& request)
if (request.fHelp)
throw runtime_error(
- "listsinceblock ( \"blockhash\" target-confirmations includeWatchonly)\n"
+ "listsinceblock ( \"blockhash\" target_confirmations include_watchonly)\n"
"\nGet all transactions in blocks since block [blockhash], or all transactions if omitted\n"
"\nArguments:\n"
- "1. \"blockhash\" (string, optional) The block hash to list transactions since\n"
- "2. target-confirmations: (numeric, optional) The confirmations required, must be 1 or more\n"
- "3. includeWatchonly: (bool, optional, default=false) Include transactions to watchonly addresses (see 'importaddress')"
+ "1. \"blockhash\" (string, optional) The block hash to list transactions since\n"
+ "2. target_confirmations: (numeric, optional) The confirmations required, must be 1 or more\n"
+ "3. include_watchonly: (bool, optional, default=false) Include transactions to watch-only addresses (see 'importaddress')"
"\nResult:\n"
"{\n"
" \"transactions\": [\n"
" \"account\":\"accountname\", (string) DEPRECATED. The account name associated with the transaction. Will be \"\" for the default account.\n"
- " \"address\":\"bitcoinaddress\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n"
+ " \"address\":\"address\", (string) The bitcoin address of the transaction. Not present for move transactions (category = move).\n"
" \"category\":\"send|receive\", (string) The transaction category. 'send' has negative amounts, 'receive' has positive amounts.\n"
" \"amount\": x.xxx, (numeric) The amount in " + CURRENCY_UNIT + ". This is negative for the 'send' category, and for the 'move' category for moves \n"
" outbound. It is positive for the 'receive' category, and for the 'move' category for inbound funds.\n"
" \"vout\" : n, (numeric) the vout value\n"
" \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the 'send' category of transactions.\n"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and 'receive' category of transactions.\n"
+ " When it's < 0, it means the transaction conflicted that many blocks ago.\n"
" \"blockhash\": \"hashvalue\", (string) The block hash containing the transaction. Available for 'send' and 'receive' category of transactions.\n"
" \"blockindex\": n, (numeric) The index of the transaction in the block that includes it. Available for 'send' and 'receive' category of transactions.\n"
" \"blocktime\": xxx, (numeric) The block time in seconds since epoch (1 Jan 1970 GMT).\n"
" \"txid\": \"transactionid\", (string) The transaction id. Available for 'send' and 'receive' category of transactions.\n"
" \"time\": xxx, (numeric) The transaction time in seconds since epoch (Jan 1 1970 GMT).\n"
" \"timereceived\": xxx, (numeric) The time received in seconds since epoch (Jan 1 1970 GMT). Available for 'send' and 'receive' category of transactions.\n"
+ " \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
+ " may be unknown for unconfirmed transactions not in the mempool\n"
+ " \"abandoned\": xxx, (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions.\n"
" \"comment\": \"...\", (string) If a comment is associated with the transaction.\n"
" \"label\" : \"label\" (string) A comment for the address/transaction, if any\n"
" \"to\": \"...\", (string) If a comment to is associated with the transaction.\n"
@@ -1725,14 +1734,16 @@ UniValue gettransaction(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() < 1 || request.params.size() > 2)
throw runtime_error(
- "gettransaction \"txid\" ( includeWatchonly )\n"
+ "gettransaction \"txid\" ( include_watchonly )\n"
"\nGet detailed information about in-wallet transaction <txid>\n"
"\nArguments:\n"
- "1. \"txid\" (string, required) The transaction id\n"
- "2. \"includeWatchonly\" (bool, optional, default=false) Whether to include watchonly addresses in balance calculation and details[]\n"
+ "1. \"txid\" (string, required) The transaction id\n"
+ "2. \"include_watchonly\" (bool, optional, default=false) Whether to include watch-only addresses in balance calculation and details[]\n"
"\nResult:\n"
"{\n"
" \"amount\" : x.xxx, (numeric) The transaction amount in " + CURRENCY_UNIT + "\n"
+ " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
+ " 'send' category of transactions.\n"
" \"confirmations\" : n, (numeric) The number of confirmations\n"
" \"blockhash\" : \"hash\", (string) The block hash\n"
" \"blockindex\" : xx, (numeric) The index of the transaction in the block that includes it\n"
@@ -1740,16 +1751,20 @@ UniValue gettransaction(const JSONRPCRequest& request)
" \"txid\" : \"transactionid\", (string) The transaction id.\n"
" \"time\" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT)\n"
" \"timereceived\" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT)\n"
- " \"bip125-replaceable\": \"yes|no|unknown\" (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
+ " \"bip125-replaceable\": \"yes|no|unknown\", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee);\n"
" may be unknown for unconfirmed transactions not in the mempool\n"
" \"details\" : [\n"
" {\n"
- " \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
- " \"address\" : \"bitcoinaddress\", (string) The bitcoin address involved in the transaction\n"
+ " \"account\" : \"accountname\", (string) DEPRECATED. The account name involved in the transaction, can be \"\" for the default account.\n"
+ " \"address\" : \"address\", (string) The bitcoin address involved in the transaction\n"
" \"category\" : \"send|receive\", (string) The category, either 'send' or 'receive'\n"
" \"amount\" : x.xxx, (numeric) The amount in " + CURRENCY_UNIT + "\n"
" \"label\" : \"label\", (string) A comment for the address/transaction, if any\n"
" \"vout\" : n, (numeric) the vout value\n"
+ " \"fee\": x.xxx, (numeric) The amount of the fee in " + CURRENCY_UNIT + ". This is negative and only available for the \n"
+ " 'send' category of transactions.\n"
+ " \"abandoned\": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the \n"
+ " 'send' category of transactions.\n"
" }\n"
" ,...\n"
" ],\n"
@@ -1780,7 +1795,7 @@ UniValue gettransaction(const JSONRPCRequest& request)
CAmount nCredit = wtx.GetCredit(filter);
CAmount nDebit = wtx.GetDebit(filter);
CAmount nNet = nCredit - nDebit;
- CAmount nFee = (wtx.IsFromMe(filter) ? wtx.GetValueOut() - nDebit : 0);
+ CAmount nFee = (wtx.IsFromMe(filter) ? wtx.tx->GetValueOut() - nDebit : 0);
entry.push_back(Pair("amount", ValueFromAmount(nNet - nFee)));
if (wtx.IsFromMe(filter))
@@ -1792,7 +1807,7 @@ UniValue gettransaction(const JSONRPCRequest& request)
ListTransactions(wtx, "*", 0, false, details, filter);
entry.push_back(Pair("details", details));
- string strHex = EncodeHexTx(static_cast<CTransaction>(wtx));
+ string strHex = EncodeHexTx(static_cast<CTransaction>(wtx), RPCSerializationFlags());
entry.push_back(Pair("hex", strHex));
return entry;
@@ -2070,7 +2085,7 @@ UniValue encryptwallet(const JSONRPCRequest& request)
"\nNow set the passphrase to use the wallet, such as for signing or sending bitcoin\n"
+ HelpExampleCli("walletpassphrase", "\"my pass phrase\"") +
"\nNow we can so something like sign\n"
- + HelpExampleCli("signmessage", "\"bitcoinaddress\" \"test message\"") +
+ + HelpExampleCli("signmessage", "\"address\" \"test message\"") +
"\nNow lock the wallet again by removing the passphrase\n"
+ HelpExampleCli("walletlock", "") +
"\nAs a json rpc call\n"
@@ -2290,7 +2305,7 @@ UniValue getwalletinfo(const JSONRPCRequest& request)
" \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n"
" \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n"
" \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in " + CURRENCY_UNIT + "/kB\n"
- " \"hdmasterkeyid\": \"<hash160>\", (string) the Hash160 of the HD master pubkey\n"
+ " \"hdmasterkeyid\": \"<hash160>\" (string) the Hash160 of the HD master pubkey\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getwalletinfo", "")
@@ -2351,7 +2366,7 @@ UniValue listunspent(const JSONRPCRequest& request)
if (request.fHelp || request.params.size() > 3)
throw runtime_error(
- "listunspent ( minconf maxconf [\"address\",...] )\n"
+ "listunspent ( minconf maxconf [\"addresses\",...] )\n"
"\nReturns array of unspent transaction outputs\n"
"with between minconf and maxconf (inclusive) confirmations.\n"
"Optionally filter to only include txouts paid to specified addresses.\n"
@@ -2420,7 +2435,7 @@ UniValue listunspent(const JSONRPCRequest& request)
continue;
CTxDestination address;
- const CScript& scriptPubKey = out.tx->vout[out.i].scriptPubKey;
+ const CScript& scriptPubKey = out.tx->tx->vout[out.i].scriptPubKey;
bool fValidAddress = ExtractDestination(scriptPubKey, address);
if (setAddress.size() && (!fValidAddress || !setAddress.count(address)))
@@ -2445,7 +2460,7 @@ UniValue listunspent(const JSONRPCRequest& request)
}
entry.push_back(Pair("scriptPubKey", HexStr(scriptPubKey.begin(), scriptPubKey.end())));
- entry.push_back(Pair("amount", ValueFromAmount(out.tx->vout[out.i].nValue)));
+ entry.push_back(Pair("amount", ValueFromAmount(out.tx->tx->vout[out.i].nValue)));
entry.push_back(Pair("confirmations", out.nDepth));
entry.push_back(Pair("spendable", out.fSpendable));
entry.push_back(Pair("solvable", out.fSolvable));
@@ -2464,7 +2479,8 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
throw runtime_error(
"fundrawtransaction \"hexstring\" ( options )\n"
"\nAdd inputs to a transaction until it has enough in value to meet its out value.\n"
- "This will not modify existing inputs, and will add one change output to the outputs.\n"
+ "This will not modify existing inputs, and will add at most one change output to the outputs.\n"
+ "No existing outputs will be modified unless \"subtractFeeFromOutputs\" is specified.\n"
"Note that inputs which were signed may need to be resigned after completion since in/outputs have been added.\n"
"The inputs added will not be signed, use signrawtransaction for that.\n"
"Note that all existing inputs must have their previous output transaction be in the wallet.\n"
@@ -2474,13 +2490,19 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
"Only pay-to-pubkey, multisig, and P2SH versions thereof are currently supported for watch-only\n"
"\nArguments:\n"
"1. \"hexstring\" (string, required) The hex string of the raw transaction\n"
- "2. options (object, optional)\n"
+ "2. options (object, optional)\n"
" {\n"
- " \"changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change\n"
- " \"changePosition\" (numeric, optional, default random) The index of the change output\n"
- " \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only\n"
- " \"lockUnspents\" (boolean, optional, default false) Lock selected unspent outputs\n"
- " \"feeRate\" (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate (" + CURRENCY_UNIT + " per KB)\n"
+ " \"changeAddress\" (string, optional, default pool address) The bitcoin address to receive the change\n"
+ " \"changePosition\" (numeric, optional, default random) The index of the change output\n"
+ " \"includeWatching\" (boolean, optional, default false) Also select inputs which are watch only\n"
+ " \"lockUnspents\" (boolean, optional, default false) Lock selected unspent outputs\n"
+ " \"feeRate\" (numeric, optional, default not set: makes wallet determine the fee) Set a specific feerate (" + CURRENCY_UNIT + " per KB)\n"
+ " \"subtractFeeFromOutputs\" (array, optional) A json array of integers.\n"
+ " The fee will be equally deducted from the amount of each specified output.\n"
+ " The outputs are specified by their zero-based index, before any change output is added.\n"
+ " Those recipients will receive less bitcoins than you enter in their corresponding amount field.\n"
+ " If no outputs are specified here, the sender pays the fee.\n"
+ " [vout_index,...]\n"
" }\n"
" for backward compatibility: passing in a true instead of an object will result in {\"includeWatching\":true}\n"
"\nResult:\n"
@@ -2489,7 +2511,6 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
" \"fee\": n, (numeric) Fee in " + CURRENCY_UNIT + " the resulting transaction pays\n"
" \"changepos\": n (numeric) The position of the added change output, or -1\n"
"}\n"
- "\"hex\" \n"
"\nExamples:\n"
"\nCreate a transaction with no inputs\n"
+ HelpExampleCli("createrawtransaction", "\"[]\" \"{\\\"myaddress\\\":0.01}\"") +
@@ -2509,6 +2530,8 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
bool lockUnspents = false;
CFeeRate feeRate = CFeeRate(0);
bool overrideEstimatedFeerate = false;
+ UniValue subtractFeeFromOutputs;
+ set<int> setSubtractFeeFromOutputs;
if (request.params.size() > 1) {
if (request.params[1].type() == UniValue::VBOOL) {
@@ -2527,6 +2550,7 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
{"includeWatching", UniValueType(UniValue::VBOOL)},
{"lockUnspents", UniValueType(UniValue::VBOOL)},
{"feeRate", UniValueType()}, // will be checked below
+ {"subtractFeeFromOutputs", UniValueType(UniValue::VARR)},
},
true, true);
@@ -2553,25 +2577,38 @@ UniValue fundrawtransaction(const JSONRPCRequest& request)
feeRate = CFeeRate(AmountFromValue(options["feeRate"]));
overrideEstimatedFeerate = true;
}
+
+ if (options.exists("subtractFeeFromOutputs"))
+ subtractFeeFromOutputs = options["subtractFeeFromOutputs"].get_array();
}
}
// parse hex string from parameter
- CTransaction origTx;
- if (!DecodeHexTx(origTx, request.params[0].get_str(), true))
+ CMutableTransaction tx;
+ if (!DecodeHexTx(tx, request.params[0].get_str(), true))
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
- if (origTx.vout.size() == 0)
+ if (tx.vout.size() == 0)
throw JSONRPCError(RPC_INVALID_PARAMETER, "TX must have at least one output");
- if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > origTx.vout.size()))
+ if (changePosition != -1 && (changePosition < 0 || (unsigned int)changePosition > tx.vout.size()))
throw JSONRPCError(RPC_INVALID_PARAMETER, "changePosition out of bounds");
- CMutableTransaction tx(origTx);
+ for (unsigned int idx = 0; idx < subtractFeeFromOutputs.size(); idx++) {
+ int pos = subtractFeeFromOutputs[idx].get_int();
+ if (setSubtractFeeFromOutputs.count(pos))
+ throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, duplicated position: %d", pos));
+ if (pos < 0)
+ throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, negative position: %d", pos));
+ if (pos >= int(tx.vout.size()))
+ throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid parameter, position too large: %d", pos));
+ setSubtractFeeFromOutputs.insert(pos);
+ }
+
CAmount nFeeOut;
string strFailReason;
- if(!pwalletMain->FundTransaction(tx, nFeeOut, overrideEstimatedFeerate, feeRate, changePosition, strFailReason, includeWatching, lockUnspents, changeAddress))
+ if(!pwalletMain->FundTransaction(tx, nFeeOut, overrideEstimatedFeerate, feeRate, changePosition, strFailReason, includeWatching, lockUnspents, setSubtractFeeFromOutputs, changeAddress))
throw JSONRPCError(RPC_INTERNAL_ERROR, strFailReason);
UniValue result(UniValue::VOBJ);
@@ -2595,53 +2632,53 @@ extern UniValue importmulti(const JSONRPCRequest& request);
static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
- { "rawtransactions", "fundrawtransaction", &fundrawtransaction, false },
- { "hidden", "resendwallettransactions", &resendwallettransactions, true },
- { "wallet", "abandontransaction", &abandontransaction, false },
- { "wallet", "addmultisigaddress", &addmultisigaddress, true },
- { "wallet", "addwitnessaddress", &addwitnessaddress, true },
- { "wallet", "backupwallet", &backupwallet, true },
- { "wallet", "dumpprivkey", &dumpprivkey, true },
- { "wallet", "dumpwallet", &dumpwallet, true },
- { "wallet", "encryptwallet", &encryptwallet, true },
- { "wallet", "getaccountaddress", &getaccountaddress, true },
- { "wallet", "getaccount", &getaccount, true },
- { "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true },
- { "wallet", "getbalance", &getbalance, false },
- { "wallet", "getnewaddress", &getnewaddress, true },
- { "wallet", "getrawchangeaddress", &getrawchangeaddress, true },
- { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false },
- { "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false },
- { "wallet", "gettransaction", &gettransaction, false },
- { "wallet", "getunconfirmedbalance", &getunconfirmedbalance, false },
- { "wallet", "getwalletinfo", &getwalletinfo, false },
- { "wallet", "importmulti", &importmulti, true },
- { "wallet", "importprivkey", &importprivkey, true },
- { "wallet", "importwallet", &importwallet, true },
- { "wallet", "importaddress", &importaddress, true },
- { "wallet", "importprunedfunds", &importprunedfunds, true },
- { "wallet", "importpubkey", &importpubkey, true },
- { "wallet", "keypoolrefill", &keypoolrefill, true },
- { "wallet", "listaccounts", &listaccounts, false },
- { "wallet", "listaddressgroupings", &listaddressgroupings, false },
- { "wallet", "listlockunspent", &listlockunspent, false },
- { "wallet", "listreceivedbyaccount", &listreceivedbyaccount, false },
- { "wallet", "listreceivedbyaddress", &listreceivedbyaddress, false },
- { "wallet", "listsinceblock", &listsinceblock, false },
- { "wallet", "listtransactions", &listtransactions, false },
- { "wallet", "listunspent", &listunspent, false },
- { "wallet", "lockunspent", &lockunspent, true },
- { "wallet", "move", &movecmd, false },
- { "wallet", "sendfrom", &sendfrom, false },
- { "wallet", "sendmany", &sendmany, false },
- { "wallet", "sendtoaddress", &sendtoaddress, false },
- { "wallet", "setaccount", &setaccount, true },
- { "wallet", "settxfee", &settxfee, true },
- { "wallet", "signmessage", &signmessage, true },
- { "wallet", "walletlock", &walletlock, true },
- { "wallet", "walletpassphrasechange", &walletpassphrasechange, true },
- { "wallet", "walletpassphrase", &walletpassphrase, true },
- { "wallet", "removeprunedfunds", &removeprunedfunds, true },
+ { "rawtransactions", "fundrawtransaction", &fundrawtransaction, false, {"hexstring","options"} },
+ { "hidden", "resendwallettransactions", &resendwallettransactions, true, {} },
+ { "wallet", "abandontransaction", &abandontransaction, false, {"txid"} },
+ { "wallet", "addmultisigaddress", &addmultisigaddress, true, {"nrequired","keys","account"} },
+ { "wallet", "addwitnessaddress", &addwitnessaddress, true, {"address"} },
+ { "wallet", "backupwallet", &backupwallet, true, {"destination"} },
+ { "wallet", "dumpprivkey", &dumpprivkey, true, {"address"} },
+ { "wallet", "dumpwallet", &dumpwallet, true, {"filename"} },
+ { "wallet", "encryptwallet", &encryptwallet, true, {"passphrase"} },
+ { "wallet", "getaccountaddress", &getaccountaddress, true, {"account"} },
+ { "wallet", "getaccount", &getaccount, true, {"address"} },
+ { "wallet", "getaddressesbyaccount", &getaddressesbyaccount, true, {"account"} },
+ { "wallet", "getbalance", &getbalance, false, {"account","minconf","include_watchonly"} },
+ { "wallet", "getnewaddress", &getnewaddress, true, {"account"} },
+ { "wallet", "getrawchangeaddress", &getrawchangeaddress, true, {} },
+ { "wallet", "getreceivedbyaccount", &getreceivedbyaccount, false, {"account","minconf"} },
+ { "wallet", "getreceivedbyaddress", &getreceivedbyaddress, false, {"address","minconf"} },
+ { "wallet", "gettransaction", &gettransaction, false, {"txid","include_watchonly"} },
+ { "wallet", "getunconfirmedbalance", &getunconfirmedbalance, false, {} },
+ { "wallet", "getwalletinfo", &getwalletinfo, false, {} },
+ { "wallet", "importmulti", &importmulti, true, {"requests","options"} },
+ { "wallet", "importprivkey", &importprivkey, true, {"privkey","label","rescan"} },
+ { "wallet", "importwallet", &importwallet, true, {"filename"} },
+ { "wallet", "importaddress", &importaddress, true, {"address","label","rescan","p2sh"} },
+ { "wallet", "importprunedfunds", &importprunedfunds, true, {"rawtransaction","txoutproof"} },
+ { "wallet", "importpubkey", &importpubkey, true, {"pubkey","label","rescan"} },
+ { "wallet", "keypoolrefill", &keypoolrefill, true, {"newsize"} },
+ { "wallet", "listaccounts", &listaccounts, false, {"minconf","include_watchonly"} },
+ { "wallet", "listaddressgroupings", &listaddressgroupings, false, {} },
+ { "wallet", "listlockunspent", &listlockunspent, false, {} },
+ { "wallet", "listreceivedbyaccount", &listreceivedbyaccount, false, {"minconf","include_empty","include_watchonly"} },
+ { "wallet", "listreceivedbyaddress", &listreceivedbyaddress, false, {"minconf","include_empty","include_watchonly"} },
+ { "wallet", "listsinceblock", &listsinceblock, false, {"blockhash","target_confirmations","include_watchonly"} },
+ { "wallet", "listtransactions", &listtransactions, false, {"account","count","skip","include_watchonly"} },
+ { "wallet", "listunspent", &listunspent, false, {"minconf","maxconf","addresses"} },
+ { "wallet", "lockunspent", &lockunspent, true, {"unlock","transactions"} },
+ { "wallet", "move", &movecmd, false, {"fromaccount","toaccount","amount","minconf","comment"} },
+ { "wallet", "sendfrom", &sendfrom, false, {"fromaccount","toaddress","amount","minconf","comment","comment_to"} },
+ { "wallet", "sendmany", &sendmany, false, {"fromaccount","amounts","minconf","comment","subtractfeefrom"} },
+ { "wallet", "sendtoaddress", &sendtoaddress, false, {"address","amount","comment","comment_to","subtractfeefromamount"} },
+ { "wallet", "setaccount", &setaccount, true, {"address","account"} },
+ { "wallet", "settxfee", &settxfee, true, {"amount"} },
+ { "wallet", "signmessage", &signmessage, true, {"address","message"} },
+ { "wallet", "walletlock", &walletlock, true, {} },
+ { "wallet", "walletpassphrasechange", &walletpassphrasechange, true, {"oldpassphrase","newpassphrase"} },
+ { "wallet", "walletpassphrase", &walletpassphrase, true, {"passphrase","timeout"} },
+ { "wallet", "removeprunedfunds", &removeprunedfunds, true, {"txid"} },
};
void RegisterWalletRPCCommands(CRPCTable &t)
diff --git a/src/wallet/test/accounting_tests.cpp b/src/wallet/test/accounting_tests.cpp
index a833be13d0..1fe633f2e5 100644
--- a/src/wallet/test/accounting_tests.cpp
+++ b/src/wallet/test/accounting_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -86,7 +86,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
{
CMutableTransaction tx(wtx);
--tx.nLockTime; // Just to change the hash :)
- *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ wtx.SetTx(MakeTransactionRef(std::move(tx)));
}
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
{
CMutableTransaction tx(wtx);
--tx.nLockTime; // Just to change the hash :)
- *static_cast<CTransaction*>(&wtx) = CTransaction(tx);
+ wtx.SetTx(MakeTransactionRef(std::move(tx)));
}
pwalletMain->AddToWallet(wtx);
vpwtx.push_back(&pwalletMain->mapWallet[wtx.GetHash()]);
diff --git a/src/wallet/test/crypto_tests.cpp b/src/wallet/test/crypto_tests.cpp
index ce35c53c48..0d012dacad 100644
--- a/src/wallet/test/crypto_tests.cpp
+++ b/src/wallet/test/crypto_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014 The Bitcoin Core developers
+// Copyright (c) 2014-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -42,15 +42,19 @@ bool OldEncrypt(const CKeyingMaterial& vchPlaintext, std::vector<unsigned char>
int nCLen = nLen + AES_BLOCK_SIZE, nFLen = 0;
vchCiphertext = std::vector<unsigned char> (nCLen);
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
+
+ if (!ctx) return false;
bool fOk = true;
- EVP_CIPHER_CTX_init(&ctx);
- if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
- if (fOk) fOk = EVP_EncryptUpdate(&ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0;
- if (fOk) fOk = EVP_EncryptFinal_ex(&ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
+ if (fOk) fOk = EVP_EncryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+ if (fOk) fOk = EVP_EncryptUpdate(ctx, &vchCiphertext[0], &nCLen, &vchPlaintext[0], nLen) != 0;
+ if (fOk) fOk = EVP_EncryptFinal_ex(ctx, (&vchCiphertext[0]) + nCLen, &nFLen) != 0;
+ EVP_CIPHER_CTX_cleanup(ctx);
+
+ EVP_CIPHER_CTX_free(ctx);
if (!fOk) return false;
@@ -66,15 +70,19 @@ bool OldDecrypt(const std::vector<unsigned char>& vchCiphertext, CKeyingMaterial
vchPlaintext = CKeyingMaterial(nPLen);
- EVP_CIPHER_CTX ctx;
+ EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
+
+ if (!ctx) return false;
bool fOk = true;
- EVP_CIPHER_CTX_init(&ctx);
- if (fOk) fOk = EVP_DecryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
- if (fOk) fOk = EVP_DecryptUpdate(&ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0;
- if (fOk) fOk = EVP_DecryptFinal_ex(&ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0;
- EVP_CIPHER_CTX_cleanup(&ctx);
+ EVP_CIPHER_CTX_init(ctx);
+ if (fOk) fOk = EVP_DecryptInit_ex(ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
+ if (fOk) fOk = EVP_DecryptUpdate(ctx, &vchPlaintext[0], &nPLen, &vchCiphertext[0], nLen) != 0;
+ if (fOk) fOk = EVP_DecryptFinal_ex(ctx, (&vchPlaintext[0]) + nPLen, &nFLen) != 0;
+ EVP_CIPHER_CTX_cleanup(ctx);
+
+ EVP_CIPHER_CTX_free(ctx);
if (!fOk) return false;
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp
index acf980c784..ca086c86a8 100644
--- a/src/wallet/test/wallet_tests.cpp
+++ b/src/wallet/test/wallet_tests.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2015 The Bitcoin Core developers
+// Copyright (c) 2012-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -23,6 +23,8 @@
using namespace std;
+std::vector<std::unique_ptr<CWalletTx>> wtxn;
+
typedef set<pair<const CWalletTx*,unsigned int> > CoinSet;
BOOST_FIXTURE_TEST_SUITE(wallet_tests, WalletTestingSetup)
@@ -42,21 +44,21 @@ static void add_coin(const CAmount& nValue, int nAge = 6*24, bool fIsFromMe = fa
// so stop vin being empty, and cache a non-zero Debit to fake out IsFromMe()
tx.vin.resize(1);
}
- CWalletTx* wtx = new CWalletTx(&wallet, tx);
+ std::unique_ptr<CWalletTx> wtx(new CWalletTx(&wallet, MakeTransactionRef(std::move(tx))));
if (fIsFromMe)
{
wtx->fDebitCached = true;
wtx->nDebitCached = 1;
}
- COutput output(wtx, nInput, nAge, true, true);
+ COutput output(wtx.get(), nInput, nAge, true, true);
vCoins.push_back(output);
+ wtxn.emplace_back(std::move(wtx));
}
static void empty_wallet(void)
{
- BOOST_FOREACH(COutput output, vCoins)
- delete output.tx;
vCoins.clear();
+ wtxn.clear();
}
static bool equal_sets(CoinSet a, CoinSet b)
@@ -78,24 +80,24 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
empty_wallet();
// with an empty wallet we can't even pay one cent
- BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
add_coin(1*CENT, 4); // add a new 1 cent coin
// with a new 1 cent coin, we still can't find a mature 1 cent
- BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf( 1 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
// but we can find a new 1 cent
- BOOST_CHECK( wallet.SelectCoinsMinConf( 1 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf( 1 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1 * CENT);
add_coin(2*CENT); // add a mature 2 cent coin
// we can't make 3 cents of mature coins
- BOOST_CHECK(!wallet.SelectCoinsMinConf( 3 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf( 3 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
// we can make 3 cents of new coins
- BOOST_CHECK( wallet.SelectCoinsMinConf( 3 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf( 3 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 3 * CENT);
add_coin(5*CENT); // add a mature 5 cent coin,
@@ -105,33 +107,33 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
// now we have new: 1+10=11 (of which 10 was self-sent), and mature: 2+5+20=27. total = 38
// we can't make 38 cents only if we disallow new coins:
- BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
// we can't even make 37 cents if we don't allow new coins even if they're from us
- BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 6, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf(38 * CENT, 6, 6, 0, vCoins, setCoinsRet, nValueRet));
// but we can make 37 cents if we accept new coins from ourself
- BOOST_CHECK( wallet.SelectCoinsMinConf(37 * CENT, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(37 * CENT, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 37 * CENT);
// and we can make 38 cents if we accept all new coins
- BOOST_CHECK( wallet.SelectCoinsMinConf(38 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(38 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 38 * CENT);
// try making 34 cents from 1,2,5,10,20 - we can't do it exactly
- BOOST_CHECK( wallet.SelectCoinsMinConf(34 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(34 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 35 * CENT); // but 35 cents is closest
BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U); // the best should be 20+10+5. it's incredibly unlikely the 1 or 2 got included (but possible)
// when we try making 7 cents, the smaller coins (1,2,5) are enough. We should see just 2+5
- BOOST_CHECK( wallet.SelectCoinsMinConf( 7 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf( 7 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 7 * CENT);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U);
// when we try making 8 cents, the smaller coins (1,2,5) are exactly enough.
- BOOST_CHECK( wallet.SelectCoinsMinConf( 8 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf( 8 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK(nValueRet == 8 * CENT);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U);
// when we try making 9 cents, no subset of smaller coins is enough, and we get the next bigger coin (10)
- BOOST_CHECK( wallet.SelectCoinsMinConf( 9 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf( 9 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 10 * CENT);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);
@@ -145,30 +147,30 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin(30*CENT); // now we have 6+7+8+20+30 = 71 cents total
// check that we have 71 and not 72
- BOOST_CHECK( wallet.SelectCoinsMinConf(71 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
- BOOST_CHECK(!wallet.SelectCoinsMinConf(72 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(71 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(!wallet.SelectCoinsMinConf(72 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
// now try making 16 cents. the best smaller coins can do is 6+7+8 = 21; not as good at the next biggest coin, 20
- BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 20 * CENT); // we should get 20 in one coin
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);
add_coin( 5*CENT); // now we have 5+6+7+8+20+30 = 75 cents total
// now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, better than the next biggest coin, 20
- BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 18 * CENT); // we should get 18 in 3 coins
BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U);
add_coin( 18*CENT); // now we have 5+6+7+8+18+20+30
// and now if we try making 16 cents again, the smaller coins can make 5+6+7 = 18 cents, the same as the next biggest coin, 18
- BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(16 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 18 * CENT); // we should get 18 in 1 coin
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U); // because in the event of a tie, the biggest coin wins
// now try making 11 cents. we should get 5+6
- BOOST_CHECK( wallet.SelectCoinsMinConf(11 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(11 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 11 * CENT);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U);
@@ -177,11 +179,11 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin( 2*COIN);
add_coin( 3*COIN);
add_coin( 4*COIN); // now we have 5+6+7+8+18+20+30+100+200+300+400 = 1094 cents
- BOOST_CHECK( wallet.SelectCoinsMinConf(95 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(95 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1 * COIN); // we should get 1 BTC in 1 coin
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);
- BOOST_CHECK( wallet.SelectCoinsMinConf(195 * CENT, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(195 * CENT, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 2 * COIN); // we should get 2 BTC in 1 coin
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);
@@ -196,14 +198,14 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
// try making 1 * MIN_CHANGE from the 1.5 * MIN_CHANGE
// we'll get change smaller than MIN_CHANGE whatever happens, so can expect MIN_CHANGE exactly
- BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE);
// but if we add a bigger coin, small change is avoided
add_coin(1111*MIN_CHANGE);
// try making 1 from 0.1 + 0.2 + 0.3 + 0.4 + 0.5 + 1111 = 1112.5
- BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1 * MIN_CHANGE); // we should get the exact amount
// if we add more small coins:
@@ -211,7 +213,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin(MIN_CHANGE * 7 / 10);
// and try again to make 1.0 * MIN_CHANGE
- BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1 * MIN_CHANGE); // we should get the exact amount
// run the 'mtgox' test (see http://blockexplorer.com/tx/29a3efd3ef04f9153d47a990bd7b048a4b2d213daaa5fb8ed670fb85f13bdbcf)
@@ -220,7 +222,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
for (int j = 0; j < 20; j++)
add_coin(50000 * COIN);
- BOOST_CHECK( wallet.SelectCoinsMinConf(500000 * COIN, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(500000 * COIN, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 500000 * COIN); // we should get the exact amount
BOOST_CHECK_EQUAL(setCoinsRet.size(), 10U); // in ten coins
@@ -233,7 +235,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin(MIN_CHANGE * 6 / 10);
add_coin(MIN_CHANGE * 7 / 10);
add_coin(1111 * MIN_CHANGE);
- BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(1 * MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1111 * MIN_CHANGE); // we get the bigger coin
BOOST_CHECK_EQUAL(setCoinsRet.size(), 1U);
@@ -243,7 +245,7 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin(MIN_CHANGE * 6 / 10);
add_coin(MIN_CHANGE * 8 / 10);
add_coin(1111 * MIN_CHANGE);
- BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK( wallet.SelectCoinsMinConf(MIN_CHANGE, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE); // we should get the exact amount
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U); // in two coins 0.4+0.6
@@ -254,22 +256,22 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
add_coin(MIN_CHANGE * 100);
// trying to make 100.01 from these three coins
- BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 10001 / 100, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 10001 / 100, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, MIN_CHANGE * 10105 / 100); // we should get all coins
BOOST_CHECK_EQUAL(setCoinsRet.size(), 3U);
// but if we try to make 99.9, we should take the bigger of the two small coins to avoid small change
- BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 9990 / 100, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(MIN_CHANGE * 9990 / 100, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 101 * MIN_CHANGE);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U);
// test with many inputs
for (CAmount amt=1500; amt < COIN; amt*=10) {
empty_wallet();
- // Create 676 inputs (= MAX_STANDARD_TX_SIZE / 148 bytes per input)
+ // Create 676 inputs (= (old MAX_STANDARD_TX_SIZE == 100000) / 148 bytes per input)
for (uint16_t j = 0; j < 676; j++)
add_coin(amt);
- BOOST_CHECK(wallet.SelectCoinsMinConf(2000, 1, 1, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(2000, 1, 1, 0, vCoins, setCoinsRet, nValueRet));
if (amt - 2000 < MIN_CHANGE) {
// needs more than one input:
uint16_t returnSize = std::ceil((2000.0 + MIN_CHANGE)/amt);
@@ -291,8 +293,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
// picking 50 from 100 coins doesn't depend on the shuffle,
// but does depend on randomness in the stochastic approximation code
- BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, vCoins, setCoinsRet , nValueRet));
- BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, vCoins, setCoinsRet2, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, 0, vCoins, setCoinsRet , nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(50 * COIN, 1, 6, 0, vCoins, setCoinsRet2, nValueRet));
BOOST_CHECK(!equal_sets(setCoinsRet, setCoinsRet2));
int fails = 0;
@@ -300,8 +302,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
{
// selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time
// run the test RANDOM_REPEATS times and only complain if all of them fail
- BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, vCoins, setCoinsRet , nValueRet));
- BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, vCoins, setCoinsRet2, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, 0, vCoins, setCoinsRet , nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(COIN, 1, 6, 0, vCoins, setCoinsRet2, nValueRet));
if (equal_sets(setCoinsRet, setCoinsRet2))
fails++;
}
@@ -321,8 +323,8 @@ BOOST_AUTO_TEST_CASE(coin_selection_tests)
{
// selecting 1 from 100 identical coins depends on the shuffle; this test will fail 1% of the time
// run the test RANDOM_REPEATS times and only complain if all of them fail
- BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, vCoins, setCoinsRet , nValueRet));
- BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, vCoins, setCoinsRet2, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, 0, vCoins, setCoinsRet , nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(90*CENT, 1, 6, 0, vCoins, setCoinsRet2, nValueRet));
if (equal_sets(setCoinsRet, setCoinsRet2))
fails++;
}
@@ -346,9 +348,11 @@ BOOST_AUTO_TEST_CASE(ApproximateBestSubset)
add_coin(1000 * COIN);
add_coin(3 * COIN);
- BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, vCoins, setCoinsRet, nValueRet));
+ BOOST_CHECK(wallet.SelectCoinsMinConf(1003 * COIN, 1, 6, 0, vCoins, setCoinsRet, nValueRet));
BOOST_CHECK_EQUAL(nValueRet, 1003 * COIN);
BOOST_CHECK_EQUAL(setCoinsRet.size(), 2U);
+
+ empty_wallet();
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index c2bac6e330..0b18be8764 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -13,7 +13,7 @@
#include "consensus/validation.h"
#include "key.h"
#include "keystore.h"
-#include "main.h"
+#include "validation.h"
#include "net.h"
#include "policy/policy.h"
#include "primitives/block.h"
@@ -75,7 +75,7 @@ struct CompareValueOnly
std::string COutput::ToString() const
{
- return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->vout[i].nValue));
+ return strprintf("COutput(%s, %d, %d) [%s]", tx->GetHash().ToString(), i, nDepth, FormatMoney(tx->tx->vout[i].nValue));
}
const CWalletTx* CWallet::GetWalletTx(const uint256& hash) const
@@ -400,7 +400,7 @@ set<uint256> CWallet::GetConflicts(const uint256& txid) const
std::pair<TxSpends::const_iterator, TxSpends::const_iterator> range;
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
if (mapTxSpends.count(txin.prevout) <= 1)
continue; // No conflict if zero or one spends
@@ -552,7 +552,7 @@ void CWallet::AddToSpends(const uint256& wtxid)
if (thisTx.IsCoinBase()) // Coinbases don't spend anything!
return;
- BOOST_FOREACH(const CTxIn& txin, thisTx.vin)
+ BOOST_FOREACH(const CTxIn& txin, thisTx.tx->vin)
AddToSpends(txin.prevout, wtxid);
}
@@ -795,7 +795,7 @@ bool CWallet::GetAccountPubkey(CPubKey &pubKey, std::string strAccount, bool bFo
for (map<uint256, CWalletTx>::iterator it = mapWallet.begin();
it != mapWallet.end() && account.vchPubKey.IsValid();
++it)
- BOOST_FOREACH(const CTxOut& txout, (*it).second.vout)
+ BOOST_FOREACH(const CTxOut& txout, (*it).second.tx->vout)
if (txout.scriptPubKey == scriptPubKey) {
bForceNew = true;
break;
@@ -954,7 +954,7 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
wtx.BindWallet(this);
wtxOrdered.insert(make_pair(wtx.nOrderPos, TxPair(&wtx, (CAccountingEntry*)0)));
AddToSpends(hash);
- BOOST_FOREACH(const CTxIn& txin, wtx.vin) {
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin) {
if (mapWallet.count(txin.prevout.hash)) {
CWalletTx& prevtx = mapWallet[txin.prevout.hash];
if (prevtx.nIndex == -1 && !prevtx.hashUnset()) {
@@ -993,7 +993,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlockIndex
if (fExisted && !fUpdate) return false;
if (fExisted || IsMine(tx) || IsFromMe(tx))
{
- CWalletTx wtx(this,tx);
+ CWalletTx wtx(this, MakeTransactionRef(tx));
// Get merkle branch if transaction was found in a block
if (posInBlock != -1)
@@ -1009,8 +1009,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx)
{
LOCK2(cs_main, cs_wallet);
- // Do not flush the wallet here for performance reasons
- CWalletDB walletdb(strWalletFile, "r+", false);
+ CWalletDB walletdb(strWalletFile, "r+");
std::set<uint256> todo;
std::set<uint256> done;
@@ -1052,7 +1051,7 @@ bool CWallet::AbandonTransaction(const uint256& hashTx)
}
// If a transaction changes 'conflicted' state, that changes the balance
// available of the outputs it spends. So force those to be recomputed
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
if (mapWallet.count(txin.prevout.hash))
mapWallet[txin.prevout.hash].MarkDirty();
@@ -1113,7 +1112,7 @@ void CWallet::MarkConflicted(const uint256& hashBlock, const uint256& hashTx)
}
// If a transaction changes 'conflicted' state, that changes the balance
// available of the outputs it spends. So force those to be recomputed
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
if (mapWallet.count(txin.prevout.hash))
mapWallet[txin.prevout.hash].MarkDirty();
@@ -1148,8 +1147,8 @@ isminetype CWallet::IsMine(const CTxIn &txin) const
if (mi != mapWallet.end())
{
const CWalletTx& prev = (*mi).second;
- if (txin.prevout.n < prev.vout.size())
- return IsMine(prev.vout[txin.prevout.n]);
+ if (txin.prevout.n < prev.tx->vout.size())
+ return IsMine(prev.tx->vout[txin.prevout.n]);
}
}
return ISMINE_NO;
@@ -1163,9 +1162,9 @@ CAmount CWallet::GetDebit(const CTxIn &txin, const isminefilter& filter) const
if (mi != mapWallet.end())
{
const CWalletTx& prev = (*mi).second;
- if (txin.prevout.n < prev.vout.size())
- if (IsMine(prev.vout[txin.prevout.n]) & filter)
- return prev.vout[txin.prevout.n].nValue;
+ if (txin.prevout.n < prev.tx->vout.size())
+ if (IsMine(prev.tx->vout[txin.prevout.n]) & filter)
+ return prev.tx->vout[txin.prevout.n].nValue;
}
}
return 0;
@@ -1380,14 +1379,14 @@ void CWalletTx::GetAmounts(list<COutputEntry>& listReceived,
CAmount nDebit = GetDebit(filter);
if (nDebit > 0) // debit>0 means we signed/sent this transaction
{
- CAmount nValueOut = GetValueOut();
+ CAmount nValueOut = tx->GetValueOut();
nFee = nDebit - nValueOut;
}
// Sent/received.
- for (unsigned int i = 0; i < vout.size(); ++i)
+ for (unsigned int i = 0; i < tx->vout.size(); ++i)
{
- const CTxOut& txout = vout[i];
+ const CTxOut& txout = tx->vout[i];
isminetype fIsMine = pwallet->IsMine(txout);
// Only need to handle txouts if AT LEAST one of these is true:
// 1) they debit from us (sent)
@@ -1480,25 +1479,25 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate)
pindex = chainActive.Next(pindex);
ShowProgress(_("Rescanning..."), 0); // show rescan progress in GUI as dialog or on splashscreen, if -rescan on startup
- double dProgressStart = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false);
- double dProgressTip = Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), chainActive.Tip(), false);
+ double dProgressStart = GuessVerificationProgress(chainParams.TxData(), pindex);
+ double dProgressTip = GuessVerificationProgress(chainParams.TxData(), chainActive.Tip());
while (pindex)
{
if (pindex->nHeight % 100 == 0 && dProgressTip - dProgressStart > 0.0)
- ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex, false) - dProgressStart) / (dProgressTip - dProgressStart) * 100))));
+ ShowProgress(_("Rescanning..."), std::max(1, std::min(99, (int)((GuessVerificationProgress(chainParams.TxData(), pindex) - dProgressStart) / (dProgressTip - dProgressStart) * 100))));
CBlock block;
ReadBlockFromDisk(block, pindex, Params().GetConsensus());
int posInBlock;
for (posInBlock = 0; posInBlock < (int)block.vtx.size(); posInBlock++)
{
- if (AddToWalletIfInvolvingMe(block.vtx[posInBlock], pindex, posInBlock, fUpdate))
+ if (AddToWalletIfInvolvingMe(*block.vtx[posInBlock], pindex, posInBlock, fUpdate))
ret++;
}
pindex = chainActive.Next(pindex);
if (GetTime() >= nNow + 60) {
nNow = GetTime();
- LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->nHeight, Checkpoints::GuessVerificationProgress(chainParams.Checkpoints(), pindex));
+ LogPrintf("Still rescanning. At block %d. Progress=%f\n", pindex->nHeight, GuessVerificationProgress(chainParams.TxData(), pindex));
}
}
ShowProgress(_("Rescanning..."), 100); // hide progress dialog in GUI
@@ -1542,9 +1541,11 @@ void CWallet::ReacceptWalletTransactions()
bool CWalletTx::RelayWalletTransaction(CConnman* connman)
{
assert(pwallet->GetBroadcastTransactions());
- if (!IsCoinBase())
+ if (!IsCoinBase() && !isAbandoned() && GetDepthInMainChain() == 0)
{
- if (GetDepthInMainChain() == 0 && !isAbandoned() && InMempool()) {
+ CValidationState state;
+ /* GetDepthInMainChain already catches known conflicts. */
+ if (InMempool() || AcceptToMemoryPool(maxTxFee, state)) {
LogPrintf("Relaying wtx %s\n", GetHash().ToString());
if (connman) {
CInv inv(MSG_TX, GetHash());
@@ -1573,7 +1574,7 @@ set<uint256> CWalletTx::GetConflicts() const
CAmount CWalletTx::GetDebit(const isminefilter& filter) const
{
- if (vin.empty())
+ if (tx->vin.empty())
return 0;
CAmount debit = 0;
@@ -1608,7 +1609,7 @@ CAmount CWalletTx::GetCredit(const isminefilter& filter) const
if (IsCoinBase() && GetBlocksToMaturity() > 0)
return 0;
- int64_t credit = 0;
+ CAmount credit = 0;
if (filter & ISMINE_SPENDABLE)
{
// GetBalance can assume transactions in mapWallet won't change
@@ -1663,11 +1664,11 @@ CAmount CWalletTx::GetAvailableCredit(bool fUseCache) const
CAmount nCredit = 0;
uint256 hashTx = GetHash();
- for (unsigned int i = 0; i < vout.size(); i++)
+ for (unsigned int i = 0; i < tx->vout.size(); i++)
{
if (!pwallet->IsSpent(hashTx, i))
{
- const CTxOut &txout = vout[i];
+ const CTxOut &txout = tx->vout[i];
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
if (!MoneyRange(nCredit))
throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
@@ -1706,11 +1707,11 @@ CAmount CWalletTx::GetAvailableWatchOnlyCredit(const bool& fUseCache) const
return nAvailableWatchCreditCached;
CAmount nCredit = 0;
- for (unsigned int i = 0; i < vout.size(); i++)
+ for (unsigned int i = 0; i < tx->vout.size(); i++)
{
if (!pwallet->IsSpent(GetHash(), i))
{
- const CTxOut &txout = vout[i];
+ const CTxOut &txout = tx->vout[i];
nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY);
if (!MoneyRange(nCredit))
throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
@@ -1758,23 +1759,23 @@ bool CWalletTx::IsTrusted() const
return false;
// Trusted if all inputs are from us and are in the mempool:
- BOOST_FOREACH(const CTxIn& txin, vin)
+ BOOST_FOREACH(const CTxIn& txin, tx->vin)
{
// Transactions not sent by us: not trusted
const CWalletTx* parent = pwallet->GetWalletTx(txin.prevout.hash);
if (parent == NULL)
return false;
- const CTxOut& parentOut = parent->vout[txin.prevout.n];
+ const CTxOut& parentOut = parent->tx->vout[txin.prevout.n];
if (pwallet->IsMine(parentOut) != ISMINE_SPENDABLE)
return false;
}
return true;
}
-bool CWalletTx::IsEquivalentTo(const CWalletTx& tx) const
+bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
{
- CMutableTransaction tx1 = *this;
- CMutableTransaction tx2 = tx;
+ CMutableTransaction tx1 = *this->tx;
+ CMutableTransaction tx2 = *_tx.tx;
for (unsigned int i = 0; i < tx1.vin.size(); i++) tx1.vin[i].scriptSig = CScript();
for (unsigned int i = 0; i < tx2.vin.size(); i++) tx2.vin[i].scriptSig = CScript();
return CTransaction(tx1) == CTransaction(tx2);
@@ -1957,10 +1958,10 @@ void CWallet::AvailableCoins(vector<COutput>& vCoins, bool fOnlyConfirmed, const
if (nDepth == 0 && !pcoin->InMempool())
continue;
- for (unsigned int i = 0; i < pcoin->vout.size(); i++) {
- isminetype mine = IsMine(pcoin->vout[i]);
+ for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++) {
+ isminetype mine = IsMine(pcoin->tx->vout[i]);
if (!(IsSpent(wtxid, i)) && mine != ISMINE_NO &&
- !IsLockedCoin((*it).first, i) && (pcoin->vout[i].nValue > 0 || fIncludeZeroValue) &&
+ !IsLockedCoin((*it).first, i) && (pcoin->tx->vout[i].nValue > 0 || fIncludeZeroValue) &&
(!coinControl || !coinControl->HasSelected() || coinControl->fAllowOtherInputs || coinControl->IsSelected(COutPoint((*it).first, i))))
vCoins.push_back(COutput(pcoin, i, nDepth,
((mine & ISMINE_SPENDABLE) != ISMINE_NO) ||
@@ -2017,7 +2018,7 @@ static void ApproximateBestSubset(vector<pair<CAmount, pair<const CWalletTx*,uns
}
}
-bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, vector<COutput> vCoins,
+bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, const int nConfMine, const int nConfTheirs, const uint64_t nMaxAncestors, vector<COutput> vCoins,
set<pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const
{
setCoinsRet.clear();
@@ -2042,8 +2043,11 @@ bool CWallet::SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int
if (output.nDepth < (pcoin->IsFromMe(ISMINE_ALL) ? nConfMine : nConfTheirs))
continue;
+ if (!mempool.TransactionWithinChainLimit(pcoin->GetHash(), nMaxAncestors))
+ continue;
+
int i = output.i;
- CAmount n = pcoin->vout[i].nValue;
+ CAmount n = pcoin->tx->vout[i].nValue;
pair<CAmount,pair<const CWalletTx*,unsigned int> > coin = make_pair(n,make_pair(pcoin, i));
@@ -2130,7 +2134,7 @@ bool CWallet::SelectCoins(const vector<COutput>& vAvailableCoins, const CAmount&
{
if (!out.fSpendable)
continue;
- nValueRet += out.tx->vout[out.i].nValue;
+ nValueRet += out.tx->tx->vout[out.i].nValue;
setCoinsRet.insert(make_pair(out.tx, out.i));
}
return (nValueRet >= nTargetValue);
@@ -2150,9 +2154,9 @@ bool CWallet::SelectCoins(const vector<COutput>& vAvailableCoins, const CAmount&
{
const CWalletTx* pcoin = &it->second;
// Clearly invalid input, fail
- if (pcoin->vout.size() <= outpoint.n)
+ if (pcoin->tx->vout.size() <= outpoint.n)
return false;
- nValueFromPresetInputs += pcoin->vout[outpoint.n].nValue;
+ nValueFromPresetInputs += pcoin->tx->vout[outpoint.n].nValue;
setPresetCoins.insert(make_pair(pcoin, outpoint.n));
} else
return false; // TODO: Allow non-wallet inputs
@@ -2167,10 +2171,17 @@ bool CWallet::SelectCoins(const vector<COutput>& vAvailableCoins, const CAmount&
++it;
}
+ size_t nMaxChainLength = std::min(GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT), GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT));
+ bool fRejectLongChains = GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS);
+
bool res = nTargetValue <= nValueFromPresetInputs ||
- SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 6, vCoins, setCoinsRet, nValueRet) ||
- SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 1, vCoins, setCoinsRet, nValueRet) ||
- (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, vCoins, setCoinsRet, nValueRet));
+ SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 6, 0, vCoins, setCoinsRet, nValueRet) ||
+ SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 1, 1, 0, vCoins, setCoinsRet, nValueRet) ||
+ (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, 2, vCoins, setCoinsRet, nValueRet)) ||
+ (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, std::min((size_t)4, nMaxChainLength/3), vCoins, setCoinsRet, nValueRet)) ||
+ (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, nMaxChainLength/2, vCoins, setCoinsRet, nValueRet)) ||
+ (bSpendZeroConfChange && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, nMaxChainLength, vCoins, setCoinsRet, nValueRet)) ||
+ (bSpendZeroConfChange && !fRejectLongChains && SelectCoinsMinConf(nTargetValue - nValueFromPresetInputs, 0, 1, std::numeric_limits<uint64_t>::max(), vCoins, setCoinsRet, nValueRet));
// because SelectCoinsMinConf clears the setCoinsRet, we now add the possible inputs to the coinset
setCoinsRet.insert(setPresetCoins.begin(), setPresetCoins.end());
@@ -2181,14 +2192,15 @@ bool CWallet::SelectCoins(const vector<COutput>& vAvailableCoins, const CAmount&
return res;
}
-bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const CTxDestination& destChange)
+bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const std::set<int>& setSubtractFeeFromOutputs, const CTxDestination& destChange)
{
vector<CRecipient> vecSend;
// Turn the txout set into a CRecipient vector
- BOOST_FOREACH(const CTxOut& txOut, tx.vout)
+ for (size_t idx = 0; idx < tx.vout.size(); idx++)
{
- CRecipient recipient = {txOut.scriptPubKey, txOut.nValue, false};
+ const CTxOut& txOut = tx.vout[idx];
+ CRecipient recipient = {txOut.scriptPubKey, txOut.nValue, setSubtractFeeFromOutputs.count(idx) == 1};
vecSend.push_back(recipient);
}
@@ -2208,10 +2220,14 @@ bool CWallet::FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool ov
return false;
if (nChangePosInOut != -1)
- tx.vout.insert(tx.vout.begin() + nChangePosInOut, wtx.vout[nChangePosInOut]);
+ tx.vout.insert(tx.vout.begin() + nChangePosInOut, wtx.tx->vout[nChangePosInOut]);
+
+ // Copy output sizes from new transaction; they may have had the fee subtracted from them
+ for (unsigned int idx = 0; idx < tx.vout.size(); idx++)
+ tx.vout[idx].nValue = wtx.tx->vout[idx].nValue;
// Add new txins (keeping original txin scriptSig/order)
- BOOST_FOREACH(const CTxIn& txin, wtx.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtx.tx->vin)
{
if (!coinControl.IsSelected(txin.prevout))
{
@@ -2234,11 +2250,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
CAmount nValue = 0;
int nChangePosRequest = nChangePosInOut;
unsigned int nSubtractFeeFromAmount = 0;
- BOOST_FOREACH (const CRecipient& recipient, vecSend)
+ for (const auto& recipient : vecSend)
{
if (nValue < 0 || recipient.nAmount < 0)
{
- strFailReason = _("Transaction amounts must be positive");
+ strFailReason = _("Transaction amounts must not be negative");
return false;
}
nValue += recipient.nAmount;
@@ -2246,9 +2262,9 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
if (recipient.fSubtractFeeFromAmount)
nSubtractFeeFromAmount++;
}
- if (vecSend.empty() || nValue < 0)
+ if (vecSend.empty())
{
- strFailReason = _("Transaction amounts must be positive");
+ strFailReason = _("Transaction must have at least one recipient");
return false;
}
@@ -2289,6 +2305,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
assert(txNew.nLockTime < LOCKTIME_THRESHOLD);
{
+ set<pair<const CWalletTx*,unsigned int> > setCoins;
LOCK2(cs_main, cs_wallet);
{
std::vector<COutput> vAvailableCoins;
@@ -2301,7 +2318,6 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
nChangePosInOut = nChangePosRequest;
txNew.vin.clear();
txNew.vout.clear();
- txNew.wit.SetNull();
wtxNew.fFromMe = true;
bool fFirst = true;
@@ -2310,7 +2326,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
nValueToSelect += nFeeRet;
double dPriority = 0;
// vouts to the payees
- BOOST_FOREACH (const CRecipient& recipient, vecSend)
+ for (const auto& recipient : vecSend)
{
CTxOut txout(recipient.nAmount, recipient.scriptPubKey);
@@ -2325,7 +2341,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
}
}
- if (txout.IsDust(::minRelayTxFee))
+ if (txout.IsDust(dustRelayFee))
{
if (recipient.fSubtractFeeFromAmount && nFeeRet > 0)
{
@@ -2342,16 +2358,16 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
}
// Choose coins to use
- set<pair<const CWalletTx*,unsigned int> > setCoins;
CAmount nValueIn = 0;
+ setCoins.clear();
if (!SelectCoins(vAvailableCoins, nValueToSelect, setCoins, nValueIn, coinControl))
{
strFailReason = _("Insufficient funds");
return false;
}
- BOOST_FOREACH(PAIRTYPE(const CWalletTx*, unsigned int) pcoin, setCoins)
+ for (const auto& pcoin : setCoins)
{
- CAmount nCredit = pcoin.first->vout[pcoin.second].nValue;
+ CAmount nCredit = pcoin.first->tx->vout[pcoin.second].nValue;
//The coin age after the next block (depth+1) is used instead of the current,
//reflecting an assumption the user would accept a bit more delay for
//a chance at a free transaction.
@@ -2389,7 +2405,11 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
CPubKey vchPubKey;
bool ret;
ret = reservekey.GetReservedKey(vchPubKey);
- assert(ret); // should never fail, as we just unlocked
+ if (!ret)
+ {
+ strFailReason = _("Keypool ran out, please call keypoolrefill first");
+ return false;
+ }
scriptChange = GetScriptForDestination(vchPubKey.GetID());
}
@@ -2399,16 +2419,16 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
// We do not move dust-change to fees, because the sender would end up paying more than requested.
// This would be against the purpose of the all-inclusive feature.
// So instead we raise the change and deduct from the recipient.
- if (nSubtractFeeFromAmount > 0 && newTxOut.IsDust(::minRelayTxFee))
+ if (nSubtractFeeFromAmount > 0 && newTxOut.IsDust(dustRelayFee))
{
- CAmount nDust = newTxOut.GetDustThreshold(::minRelayTxFee) - newTxOut.nValue;
+ CAmount nDust = newTxOut.GetDustThreshold(dustRelayFee) - newTxOut.nValue;
newTxOut.nValue += nDust; // raise change until no more dust
for (unsigned int i = 0; i < vecSend.size(); i++) // subtract from first recipient
{
if (vecSend[i].fSubtractFeeFromAmount)
{
txNew.vout[i].nValue -= nDust;
- if (txNew.vout[i].IsDust(::minRelayTxFee))
+ if (txNew.vout[i].IsDust(dustRelayFee))
{
strFailReason = _("The transaction amount is too small to send after the fee has been deducted");
return false;
@@ -2420,7 +2440,7 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
// Never create dust outputs; if we would, just
// add the dust to the fee.
- if (newTxOut.IsDust(::minRelayTxFee))
+ if (newTxOut.IsDust(dustRelayFee))
{
nChangePosInOut = -1;
nFeeRet += nChange;
@@ -2456,24 +2476,18 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
// to avoid conflicting with other possible uses of nSequence,
// and in the spirit of "smallest posible change from prior
// behavior."
- BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
+ for (const auto& coin : setCoins)
txNew.vin.push_back(CTxIn(coin.first->GetHash(),coin.second,CScript(),
std::numeric_limits<unsigned int>::max() - (fWalletRbf ? 2 : 1)));
- // Sign
+ // Fill in dummy signatures for fee calculation.
int nIn = 0;
- CTransaction txNewConst(txNew);
- BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
+ for (const auto& coin : setCoins)
{
- bool signSuccess;
- const CScript& scriptPubKey = coin.first->vout[coin.second].scriptPubKey;
+ const CScript& scriptPubKey = coin.first->tx->vout[coin.second].scriptPubKey;
SignatureData sigdata;
- if (sign)
- signSuccess = ProduceSignature(TransactionSignatureCreator(this, &txNewConst, nIn, coin.first->vout[coin.second].nValue, SIGHASH_ALL), scriptPubKey, sigdata);
- else
- signSuccess = ProduceSignature(DummySignatureCreator(this), scriptPubKey, sigdata);
- if (!signSuccess)
+ if (!ProduceSignature(DummySignatureCreator(this), scriptPubKey, sigdata))
{
strFailReason = _("Signing transaction failed");
return false;
@@ -2486,25 +2500,15 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
unsigned int nBytes = GetVirtualTransactionSize(txNew);
- // Remove scriptSigs if we used dummy signatures for fee calculation
- if (!sign) {
- BOOST_FOREACH (CTxIn& vin, txNew.vin)
- vin.scriptSig = CScript();
- txNew.wit.SetNull();
- }
-
- // Embed the constructed transaction data in wtxNew.
- *static_cast<CTransaction*>(&wtxNew) = CTransaction(txNew);
+ CTransaction txNewConst(txNew);
+ dPriority = txNewConst.ComputePriority(dPriority, nBytes);
- // Limit size
- if (GetTransactionWeight(txNew) >= MAX_STANDARD_TX_WEIGHT)
- {
- strFailReason = _("Transaction too large");
- return false;
+ // Remove scriptSigs to eliminate the fee calculation dummy signatures
+ for (auto& vin : txNew.vin) {
+ vin.scriptSig = CScript();
+ vin.scriptWitness.SetNull();
}
- dPriority = wtxNew.ComputePriority(dPriority, nBytes);
-
// Allow to override the default confirmation target over the CoinControl instance
int currentConfirmationTarget = nTxConfirmTarget;
if (coinControl && coinControl->nConfirmTarget > 0)
@@ -2535,16 +2539,91 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
return false;
}
- if (nFeeRet >= nFeeNeeded)
+ if (nFeeRet >= nFeeNeeded) {
+ // Reduce fee to only the needed amount if we have change
+ // output to increase. This prevents potential overpayment
+ // in fees if the coins selected to meet nFeeNeeded result
+ // in a transaction that requires less fee than the prior
+ // iteration.
+ // TODO: The case where nSubtractFeeFromAmount > 0 remains
+ // to be addressed because it requires returning the fee to
+ // the payees and not the change output.
+ // TODO: The case where there is no change output remains
+ // to be addressed so we avoid creating too small an output.
+ if (nFeeRet > nFeeNeeded && nChangePosInOut != -1 && nSubtractFeeFromAmount == 0) {
+ CAmount extraFeePaid = nFeeRet - nFeeNeeded;
+ vector<CTxOut>::iterator change_position = txNew.vout.begin()+nChangePosInOut;
+ change_position->nValue += extraFeePaid;
+ nFeeRet -= extraFeePaid;
+ }
break; // Done, enough fee included.
+ }
+
+ // Try to reduce change to include necessary fee
+ if (nChangePosInOut != -1 && nSubtractFeeFromAmount == 0) {
+ CAmount additionalFeeNeeded = nFeeNeeded - nFeeRet;
+ vector<CTxOut>::iterator change_position = txNew.vout.begin()+nChangePosInOut;
+ // Only reduce change if remaining amount is still a large enough output.
+ if (change_position->nValue >= MIN_FINAL_CHANGE + additionalFeeNeeded) {
+ change_position->nValue -= additionalFeeNeeded;
+ nFeeRet += additionalFeeNeeded;
+ break; // Done, able to increase fee from change
+ }
+ }
// Include more fee and try again.
nFeeRet = nFeeNeeded;
continue;
}
}
+
+ if (sign)
+ {
+ CTransaction txNewConst(txNew);
+ int nIn = 0;
+ for (const auto& coin : setCoins)
+ {
+ const CScript& scriptPubKey = coin.first->tx->vout[coin.second].scriptPubKey;
+ SignatureData sigdata;
+
+ if (!ProduceSignature(TransactionSignatureCreator(this, &txNewConst, nIn, coin.first->tx->vout[coin.second].nValue, SIGHASH_ALL), scriptPubKey, sigdata))
+ {
+ strFailReason = _("Signing transaction failed");
+ return false;
+ } else {
+ UpdateTransaction(txNew, nIn, sigdata);
+ }
+
+ nIn++;
+ }
+ }
+
+ // Embed the constructed transaction data in wtxNew.
+ wtxNew.SetTx(MakeTransactionRef(std::move(txNew)));
+
+ // Limit size
+ if (GetTransactionWeight(wtxNew) >= MAX_STANDARD_TX_WEIGHT)
+ {
+ strFailReason = _("Transaction too large");
+ return false;
+ }
}
+ if (GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS)) {
+ // Lastly, ensure this tx will pass the mempool's chain limits
+ LockPoints lp;
+ CTxMemPoolEntry entry(wtxNew.tx, 0, 0, 0, 0, 0, false, 0, lp);
+ CTxMemPool::setEntries setAncestors;
+ size_t nLimitAncestors = GetArg("-limitancestorcount", DEFAULT_ANCESTOR_LIMIT);
+ size_t nLimitAncestorSize = GetArg("-limitancestorsize", DEFAULT_ANCESTOR_SIZE_LIMIT)*1000;
+ size_t nLimitDescendants = GetArg("-limitdescendantcount", DEFAULT_DESCENDANT_LIMIT);
+ size_t nLimitDescendantSize = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT)*1000;
+ std::string errString;
+ if (!mempool.CalculateMemPoolAncestors(entry, setAncestors, nLimitAncestors, nLimitAncestorSize, nLimitDescendants, nLimitDescendantSize, errString)) {
+ strFailReason = _("Transaction has too long of a mempool chain");
+ return false;
+ }
+ }
return true;
}
@@ -2555,7 +2634,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
{
{
LOCK2(cs_main, cs_wallet);
- LogPrintf("CommitTransaction:\n%s", wtxNew.ToString());
+ LogPrintf("CommitTransaction:\n%s", wtxNew.tx->ToString());
{
// Take key pair from key pool so it won't be used again
reservekey.KeepKey();
@@ -2565,7 +2644,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
AddToWallet(wtxNew);
// Notify that old coins are spent
- BOOST_FOREACH(const CTxIn& txin, wtxNew.vin)
+ BOOST_FOREACH(const CTxIn& txin, wtxNew.tx->vin)
{
CWalletTx &coin = mapWallet[txin.prevout.hash];
coin.BindWallet(this);
@@ -2580,11 +2659,11 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, CCon
{
// Broadcast
if (!wtxNew.AcceptToMemoryPool(maxTxFee, state)) {
- // This must not fail. The transaction has already been signed and recorded.
- LogPrintf("CommitTransaction(): Error: Transaction not valid, %s\n", state.GetRejectReason());
- return false;
+ LogPrintf("CommitTransaction(): Transaction cannot be broadcast immediately, %s\n", state.GetRejectReason());
+ // TODO: if we expect the failure to be long term or permanent, instead delete wtx from the wallet and return failure.
+ } else {
+ wtxNew.RelayWalletTransaction(connman);
}
- wtxNew.RelayWalletTransaction(connman);
}
}
return true;
@@ -2929,7 +3008,7 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
{
CWalletTx *pcoin = &walletEntry.second;
- if (!CheckFinalTx(*pcoin) || !pcoin->IsTrusted())
+ if (!pcoin->IsTrusted())
continue;
if (pcoin->IsCoinBase() && pcoin->GetBlocksToMaturity() > 0)
@@ -2939,15 +3018,15 @@ std::map<CTxDestination, CAmount> CWallet::GetAddressBalances()
if (nDepth < (pcoin->IsFromMe(ISMINE_ALL) ? 0 : 1))
continue;
- for (unsigned int i = 0; i < pcoin->vout.size(); i++)
+ for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++)
{
CTxDestination addr;
- if (!IsMine(pcoin->vout[i]))
+ if (!IsMine(pcoin->tx->vout[i]))
continue;
- if(!ExtractDestination(pcoin->vout[i].scriptPubKey, addr))
+ if(!ExtractDestination(pcoin->tx->vout[i].scriptPubKey, addr))
continue;
- CAmount n = IsSpent(walletEntry.first, i) ? 0 : pcoin->vout[i].nValue;
+ CAmount n = IsSpent(walletEntry.first, i) ? 0 : pcoin->tx->vout[i].nValue;
if (!balances.count(addr))
balances[addr] = 0;
@@ -2969,16 +3048,16 @@ set< set<CTxDestination> > CWallet::GetAddressGroupings()
{
CWalletTx *pcoin = &walletEntry.second;
- if (pcoin->vin.size() > 0)
+ if (pcoin->tx->vin.size() > 0)
{
bool any_mine = false;
// group all input addresses with each other
- BOOST_FOREACH(CTxIn txin, pcoin->vin)
+ BOOST_FOREACH(CTxIn txin, pcoin->tx->vin)
{
CTxDestination address;
if(!IsMine(txin)) /* If this input isn't mine, ignore it */
continue;
- if(!ExtractDestination(mapWallet[txin.prevout.hash].vout[txin.prevout.n].scriptPubKey, address))
+ if(!ExtractDestination(mapWallet[txin.prevout.hash].tx->vout[txin.prevout.n].scriptPubKey, address))
continue;
grouping.insert(address);
any_mine = true;
@@ -2987,7 +3066,7 @@ set< set<CTxDestination> > CWallet::GetAddressGroupings()
// group change with input addresses
if (any_mine)
{
- BOOST_FOREACH(CTxOut txout, pcoin->vout)
+ BOOST_FOREACH(CTxOut txout, pcoin->tx->vout)
if (IsChange(txout))
{
CTxDestination txoutAddr;
@@ -3004,11 +3083,11 @@ set< set<CTxDestination> > CWallet::GetAddressGroupings()
}
// group lone addrs by themselves
- for (unsigned int i = 0; i < pcoin->vout.size(); i++)
- if (IsMine(pcoin->vout[i]))
+ for (unsigned int i = 0; i < pcoin->tx->vout.size(); i++)
+ if (IsMine(pcoin->tx->vout[i]))
{
CTxDestination address;
- if(!ExtractDestination(pcoin->vout[i].scriptPubKey, address))
+ if(!ExtractDestination(pcoin->tx->vout[i].scriptPubKey, address))
continue;
grouping.insert(address);
groupings.insert(grouping);
@@ -3275,7 +3354,7 @@ void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t> &mapKeyBirth) const {
if (blit != mapBlockIndex.end() && chainActive.Contains(blit->second)) {
// ... which are already in a block
int nHeight = blit->second->nHeight;
- BOOST_FOREACH(const CTxOut &txout, wtx.vout) {
+ BOOST_FOREACH(const CTxOut &txout, wtx.tx->vout) {
// iterate over all their outputs
CAffectedKeysVisitor(*this, vAffected).Process(txout.scriptPubKey);
BOOST_FOREACH(const CKeyID &keyid, vAffected) {
@@ -3369,21 +3448,14 @@ std::string CWallet::GetWalletHelpString(bool showDebug)
strUsage += HelpMessageOpt("-dblogsize=<n>", strprintf("Flush wallet database activity from memory to disk log every <n> megabytes (default: %u)", DEFAULT_WALLET_DBLOGSIZE));
strUsage += HelpMessageOpt("-flushwallet", strprintf("Run a thread to flush wallet periodically (default: %u)", DEFAULT_FLUSHWALLET));
strUsage += HelpMessageOpt("-privdb", strprintf("Sets the DB_PRIVATE flag in the wallet db environment (default: %u)", DEFAULT_WALLET_PRIVDB));
+ strUsage += HelpMessageOpt("-walletrejectlongchains", strprintf(_("Wallet will not create transactions that violate mempool chain limits (default: %u)"), DEFAULT_WALLET_REJECT_LONG_CHAINS));
}
return strUsage;
}
-bool CWallet::InitLoadWallet()
+CWallet* CWallet::CreateWalletFromFile(const std::string walletFile)
{
- if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
- pwalletMain = NULL;
- LogPrintf("Wallet disabled!\n");
- return true;
- }
-
- std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
-
// needed to restore wallet transaction meta data after -zapwallettxes
std::vector<CWalletTx> vWtx;
@@ -3393,7 +3465,8 @@ bool CWallet::InitLoadWallet()
CWallet *tempWallet = new CWallet(walletFile);
DBErrors nZapWalletRet = tempWallet->ZapWalletTx(vWtx);
if (nZapWalletRet != DB_LOAD_OK) {
- return InitError(strprintf(_("Error loading %s: Wallet corrupted"), walletFile));
+ InitError(strprintf(_("Error loading %s: Wallet corrupted"), walletFile));
+ return NULL;
}
delete tempWallet;
@@ -3408,23 +3481,29 @@ bool CWallet::InitLoadWallet()
DBErrors nLoadWalletRet = walletInstance->LoadWallet(fFirstRun);
if (nLoadWalletRet != DB_LOAD_OK)
{
- if (nLoadWalletRet == DB_CORRUPT)
- return InitError(strprintf(_("Error loading %s: Wallet corrupted"), walletFile));
+ if (nLoadWalletRet == DB_CORRUPT) {
+ InitError(strprintf(_("Error loading %s: Wallet corrupted"), walletFile));
+ return NULL;
+ }
else if (nLoadWalletRet == DB_NONCRITICAL_ERROR)
{
InitWarning(strprintf(_("Error reading %s! All keys read correctly, but transaction data"
" or address book entries might be missing or incorrect."),
walletFile));
}
- else if (nLoadWalletRet == DB_TOO_NEW)
- return InitError(strprintf(_("Error loading %s: Wallet requires newer version of %s"),
- walletFile, _(PACKAGE_NAME)));
+ else if (nLoadWalletRet == DB_TOO_NEW) {
+ InitError(strprintf(_("Error loading %s: Wallet requires newer version of %s"), walletFile, _(PACKAGE_NAME)));
+ return NULL;
+ }
else if (nLoadWalletRet == DB_NEED_REWRITE)
{
- return InitError(strprintf(_("Wallet needed to be rewritten: restart %s to complete"), _(PACKAGE_NAME)));
+ InitError(strprintf(_("Wallet needed to be rewritten: restart %s to complete"), _(PACKAGE_NAME)));
+ return NULL;
+ }
+ else {
+ InitError(strprintf(_("Error loading %s"), walletFile));
+ return NULL;
}
- else
- return InitError(strprintf(_("Error loading %s"), walletFile));
}
if (GetBoolArg("-upgradewallet", fFirstRun))
@@ -3440,7 +3519,8 @@ bool CWallet::InitLoadWallet()
LogPrintf("Allowing wallet upgrade up to %i\n", nMaxVersion);
if (nMaxVersion < walletInstance->GetVersion())
{
- return InitError(_("Cannot downgrade wallet"));
+ InitError(_("Cannot downgrade wallet"));
+ return NULL;
}
walletInstance->SetMaxVersion(nMaxVersion);
}
@@ -3457,18 +3537,24 @@ bool CWallet::InitLoadWallet()
CPubKey newDefaultKey;
if (walletInstance->GetKeyFromPool(newDefaultKey)) {
walletInstance->SetDefaultKey(newDefaultKey);
- if (!walletInstance->SetAddressBook(walletInstance->vchDefaultKey.GetID(), "", "receive"))
- return InitError(_("Cannot write default address") += "\n");
+ if (!walletInstance->SetAddressBook(walletInstance->vchDefaultKey.GetID(), "", "receive")) {
+ InitError(_("Cannot write default address") += "\n");
+ return NULL;
+ }
}
walletInstance->SetBestChain(chainActive.GetLocator());
}
- else if (mapArgs.count("-usehd")) {
+ else if (IsArgSet("-usehd")) {
bool useHD = GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET);
- if (walletInstance->IsHDEnabled() && !useHD)
- return InitError(strprintf(_("Error loading %s: You can't disable HD on a already existing HD wallet"), walletFile));
- if (!walletInstance->IsHDEnabled() && useHD)
- return InitError(strprintf(_("Error loading %s: You can't enable HD on a already existing non-HD wallet"), walletFile));
+ if (walletInstance->IsHDEnabled() && !useHD) {
+ InitError(strprintf(_("Error loading %s: You can't disable HD on a already existing HD wallet"), walletFile));
+ return NULL;
+ }
+ if (!walletInstance->IsHDEnabled() && useHD) {
+ InitError(strprintf(_("Error loading %s: You can't enable HD on a already existing non-HD wallet"), walletFile));
+ return NULL;
+ }
}
LogPrintf(" wallet %15dms\n", GetTimeMillis() - nStart);
@@ -3498,8 +3584,10 @@ bool CWallet::InitLoadWallet()
while (block && block->pprev && (block->pprev->nStatus & BLOCK_HAVE_DATA) && block->pprev->nTx > 0 && pindexRescan != block)
block = block->pprev;
- if (pindexRescan != block)
- return InitError(_("Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)"));
+ if (pindexRescan != block) {
+ InitError(_("Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)"));
+ return NULL;
+ }
}
uiInterface.InitMessage(_("Rescanning..."));
@@ -3544,11 +3632,30 @@ bool CWallet::InitLoadWallet()
LogPrintf("mapAddressBook.size() = %u\n", walletInstance->mapAddressBook.size());
}
- pwalletMain = walletInstance;
+ return walletInstance;
+}
+
+bool CWallet::InitLoadWallet()
+{
+ if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
+ pwalletMain = NULL;
+ LogPrintf("Wallet disabled!\n");
+ return true;
+ }
+
+ std::string walletFile = GetArg("-wallet", DEFAULT_WALLET_DAT);
+
+ CWallet * const pwallet = CreateWalletFromFile(walletFile);
+ if (!pwallet) {
+ return false;
+ }
+ pwalletMain = pwallet;
return true;
}
+std::atomic<bool> CWallet::fFlushThreadRunning(false);
+
void CWallet::postInitProcess(boost::thread_group& threadGroup)
{
// Add wallet transactions that aren't already in a block to mempool
@@ -3556,7 +3663,9 @@ void CWallet::postInitProcess(boost::thread_group& threadGroup)
ReacceptWalletTransactions();
// Run a thread to flush wallet periodically
- threadGroup.create_thread(boost::bind(&ThreadFlushWalletDB, boost::ref(this->strWalletFile)));
+ if (!CWallet::fFlushThreadRunning.exchange(true)) {
+ threadGroup.create_thread(ThreadFlushWalletDB);
+ }
}
bool CWallet::ParameterInteraction()
@@ -3568,6 +3677,16 @@ bool CWallet::ParameterInteraction()
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
}
+ if (GetBoolArg("-salvagewallet", false) && SoftSetBoolArg("-rescan", true)) {
+ // Rewrite just private keys: rescan to find transactions
+ LogPrintf("%s: parameter interaction: -salvagewallet=1 -> setting -rescan=1\n", __func__);
+ }
+
+ // -zapwallettx implies a rescan
+ if (GetBoolArg("-zapwallettxes", false) && SoftSetBoolArg("-rescan", true)) {
+ LogPrintf("%s: parameter interaction: -zapwallettxes=<mode> -> setting -rescan=1\n", __func__);
+ }
+
if (GetBoolArg("-sysperms", false))
return InitError("-sysperms is not allowed in combination with enabled wallet functionality");
if (GetArg("-prune", 0) && GetBoolArg("-rescan", false))
@@ -3577,31 +3696,31 @@ bool CWallet::ParameterInteraction()
InitWarning(AmountHighWarn("-minrelaytxfee") + " " +
_("The wallet will avoid paying less than the minimum relay fee."));
- if (mapArgs.count("-mintxfee"))
+ if (IsArgSet("-mintxfee"))
{
CAmount n = 0;
- if (!ParseMoney(mapArgs["-mintxfee"], n) || 0 == n)
- return InitError(AmountErrMsg("mintxfee", mapArgs["-mintxfee"]));
+ if (!ParseMoney(GetArg("-mintxfee", ""), n) || 0 == n)
+ return InitError(AmountErrMsg("mintxfee", GetArg("-mintxfee", "")));
if (n > HIGH_TX_FEE_PER_KB)
InitWarning(AmountHighWarn("-mintxfee") + " " +
_("This is the minimum transaction fee you pay on every transaction."));
CWallet::minTxFee = CFeeRate(n);
}
- if (mapArgs.count("-fallbackfee"))
+ if (IsArgSet("-fallbackfee"))
{
CAmount nFeePerK = 0;
- if (!ParseMoney(mapArgs["-fallbackfee"], nFeePerK))
- return InitError(strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), mapArgs["-fallbackfee"]));
+ if (!ParseMoney(GetArg("-fallbackfee", ""), nFeePerK))
+ return InitError(strprintf(_("Invalid amount for -fallbackfee=<amount>: '%s'"), GetArg("-fallbackfee", "")));
if (nFeePerK > HIGH_TX_FEE_PER_KB)
InitWarning(AmountHighWarn("-fallbackfee") + " " +
_("This is the transaction fee you may pay when fee estimates are not available."));
CWallet::fallbackFee = CFeeRate(nFeePerK);
}
- if (mapArgs.count("-paytxfee"))
+ if (IsArgSet("-paytxfee"))
{
CAmount nFeePerK = 0;
- if (!ParseMoney(mapArgs["-paytxfee"], nFeePerK))
- return InitError(AmountErrMsg("paytxfee", mapArgs["-paytxfee"]));
+ if (!ParseMoney(GetArg("-paytxfee", ""), nFeePerK))
+ return InitError(AmountErrMsg("paytxfee", GetArg("-paytxfee", "")));
if (nFeePerK > HIGH_TX_FEE_PER_KB)
InitWarning(AmountHighWarn("-paytxfee") + " " +
_("This is the transaction fee you will pay if you send a transaction."));
@@ -3610,21 +3729,21 @@ bool CWallet::ParameterInteraction()
if (payTxFee < ::minRelayTxFee)
{
return InitError(strprintf(_("Invalid amount for -paytxfee=<amount>: '%s' (must be at least %s)"),
- mapArgs["-paytxfee"], ::minRelayTxFee.ToString()));
+ GetArg("-paytxfee", ""), ::minRelayTxFee.ToString()));
}
}
- if (mapArgs.count("-maxtxfee"))
+ if (IsArgSet("-maxtxfee"))
{
CAmount nMaxFee = 0;
- if (!ParseMoney(mapArgs["-maxtxfee"], nMaxFee))
- return InitError(AmountErrMsg("maxtxfee", mapArgs["-maxtxfee"]));
+ if (!ParseMoney(GetArg("-maxtxfee", ""), nMaxFee))
+ return InitError(AmountErrMsg("maxtxfee", GetArg("-maxtxfee", "")));
if (nMaxFee > HIGH_MAX_TX_FEE)
InitWarning(_("-maxtxfee is set very high! Fees this large could be paid on a single transaction."));
maxTxFee = nMaxFee;
if (CFeeRate(maxTxFee, 1000) < ::minRelayTxFee)
{
return InitError(strprintf(_("Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay fee of %s to prevent stuck transactions)"),
- mapArgs["-maxtxfee"], ::minRelayTxFee.ToString()));
+ GetArg("-maxtxfee", ""), ::minRelayTxFee.ToString()));
}
}
nTxConfirmTarget = GetArg("-txconfirmtarget", DEFAULT_TX_CONFIRM_TARGET);
@@ -3632,6 +3751,9 @@ bool CWallet::ParameterInteraction()
fSendFreeTransactions = GetBoolArg("-sendfreetransactions", DEFAULT_SEND_FREE_TRANSACTIONS);
fWalletRbf = GetBoolArg("-walletrbf", DEFAULT_WALLET_RBF);
+ if (fSendFreeTransactions && GetArg("-limitfreerelay", DEFAULT_LIMITFREERELAY) <= 0)
+ return InitError("Creation of free transactions with their relay disabled is not supported.");
+
return true;
}
@@ -3692,21 +3814,13 @@ CWalletKey::CWalletKey(int64_t nExpires)
nTimeExpires = nExpires;
}
-int CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock)
+void CMerkleTx::SetMerkleBranch(const CBlockIndex* pindex, int posInBlock)
{
- AssertLockHeld(cs_main);
-
// Update the tx's hashBlock
hashBlock = pindex->GetBlockHash();
// set the position of the transaction in the block
nIndex = posInBlock;
-
- // Is the tx in a block that's in the main chain
- if (!chainActive.Contains(pindex))
- return 0;
-
- return chainActive.Height() - pindex->nHeight + 1;
}
int CMerkleTx::GetDepthInMainChain(const CBlockIndex* &pindexRet) const
@@ -3738,5 +3852,5 @@ int CMerkleTx::GetBlocksToMaturity() const
bool CMerkleTx::AcceptToMemoryPool(const CAmount& nAbsurdFee, CValidationState& state)
{
- return ::AcceptToMemoryPool(mempool, state, *this, true, NULL, false, nAbsurdFee);
+ return ::AcceptToMemoryPool(mempool, state, tx, true, NULL, NULL, false, nAbsurdFee);
}
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 57b17d87ad..92ad098486 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -18,6 +18,7 @@
#include "wallet/rpcwallet.h"
#include <algorithm>
+#include <atomic>
#include <map>
#include <set>
#include <stdexcept>
@@ -47,12 +48,16 @@ static const CAmount DEFAULT_TRANSACTION_FEE = 0;
static const CAmount DEFAULT_FALLBACK_FEE = 20000;
//! -mintxfee default
static const CAmount DEFAULT_TRANSACTION_MINFEE = 1000;
-//! minimum change amount
+//! target minimum change amount
static const CAmount MIN_CHANGE = CENT;
+//! final minimum change amount after paying for fees
+static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
//! Default for -spendzeroconfchange
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
//! Default for -sendfreetransactions
static const bool DEFAULT_SEND_FREE_TRANSACTIONS = false;
+//! Default for -walletrejectlongchains
+static const bool DEFAULT_WALLET_REJECT_LONG_CHAINS = false;
//! -txconfirmtarget default
static const unsigned int DEFAULT_TX_CONFIRM_TARGET = 6;
//! -walletrbf default
@@ -100,8 +105,9 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(nVersion);
READWRITE(nTime);
READWRITE(vchPubKey);
@@ -160,13 +166,14 @@ struct COutputEntry
};
/** A transaction with a merkle branch linking it to the block chain. */
-class CMerkleTx : public CTransaction
+class CMerkleTx
{
private:
/** Constant used in hashBlock to indicate tx has been abandoned */
static const uint256 ABANDON_HASH;
public:
+ CTransactionRef tx;
uint256 hashBlock;
/* An nIndex == -1 means that hashBlock (in nonzero) refers to the earliest
@@ -178,32 +185,43 @@ public:
CMerkleTx()
{
+ SetTx(MakeTransactionRef());
Init();
}
- CMerkleTx(const CTransaction& txIn) : CTransaction(txIn)
+ CMerkleTx(CTransactionRef arg)
{
+ SetTx(std::move(arg));
Init();
}
+ /** Helper conversion operator to allow passing CMerkleTx where CTransaction is expected.
+ * TODO: adapt callers and remove this operator. */
+ operator const CTransaction&() const { return *tx; }
+
void Init()
{
hashBlock = uint256();
nIndex = -1;
}
+ void SetTx(CTransactionRef arg)
+ {
+ tx = std::move(arg);
+ }
+
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
std::vector<uint256> vMerkleBranch; // For compatibility with older versions.
- READWRITE(*(CTransaction*)this);
+ READWRITE(tx);
READWRITE(hashBlock);
READWRITE(vMerkleBranch);
READWRITE(nIndex);
}
- int SetMerkleBranch(const CBlockIndex* pIndex, int posInBlock);
+ void SetMerkleBranch(const CBlockIndex* pIndex, int posInBlock);
/**
* Return depth of transaction in blockchain:
@@ -220,6 +238,9 @@ public:
bool hashUnset() const { return (hashBlock.IsNull() || hashBlock == ABANDON_HASH); }
bool isAbandoned() const { return (hashBlock == ABANDON_HASH); }
void setAbandoned() { hashBlock = ABANDON_HASH; }
+
+ const uint256& GetHash() const { return tx->GetHash(); }
+ bool IsCoinBase() const { return tx->IsCoinBase(); }
};
/**
@@ -266,17 +287,7 @@ public:
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)
+ CWalletTx(const CWallet* pwalletIn, CTransactionRef arg) : CMerkleTx(std::move(arg))
{
Init(pwalletIn);
}
@@ -315,7 +326,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
if (ser_action.ForRead())
Init(NULL);
char fSpent = false;
@@ -361,6 +372,7 @@ public:
{
fCreditCached = false;
fAvailableCreditCached = false;
+ fImmatureCreditCached = false;
fWatchDebitCached = false;
fWatchCreditCached = false;
fAvailableWatchCreditCached = false;
@@ -448,8 +460,9 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(nVersion);
READWRITE(vchPrivKey);
READWRITE(nTimeCreated);
@@ -493,8 +506,9 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(nVersion);
//! Note: strAccount is serialized as part of the key, not here.
READWRITE(nCreditDebit);
@@ -507,7 +521,7 @@ public:
if (!(mapValue.empty() && _ssExtra.empty()))
{
- CDataStream ss(nType, nVersion);
+ CDataStream ss(s.GetType(), s.GetVersion());
ss.insert(ss.begin(), '\0');
ss << mapValue;
ss.insert(ss.end(), _ssExtra.begin(), _ssExtra.end());
@@ -523,7 +537,7 @@ public:
mapValue.clear();
if (std::string::npos != nSepPos)
{
- CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), nType, nVersion);
+ CDataStream ss(std::vector<char>(strComment.begin() + nSepPos + 1, strComment.end()), s.GetType(), s.GetVersion());
ss >> mapValue;
_ssExtra = std::vector<char>(ss.begin(), ss.end());
}
@@ -547,6 +561,8 @@ private:
class CWallet : public CCryptoKeyStore, public CValidationInterface
{
private:
+ static std::atomic<bool> fFlushThreadRunning;
+
/**
* Select a set of coins such that nValueRet >= nTargetValue and at least
* all coins from coinControl are selected; Never select unconfirmed coins
@@ -597,7 +613,7 @@ public:
*/
mutable CCriticalSection cs_wallet;
- std::string strWalletFile;
+ const std::string strWalletFile;
void LoadKeyPool(int nIndex, const CKeyPool &keypool)
{
@@ -622,11 +638,9 @@ public:
SetNull();
}
- CWallet(const std::string& strWalletFileIn)
+ CWallet(const std::string& strWalletFileIn) : strWalletFile(strWalletFileIn)
{
SetNull();
-
- strWalletFile = strWalletFileIn;
fFileBacked = true;
}
@@ -684,7 +698,7 @@ public:
* completion the coin set and corresponding actual target value is
* assembled
*/
- bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const;
+ bool SelectCoinsMinConf(const CAmount& nTargetValue, int nConfMine, int nConfTheirs, uint64_t nMaxAncestors, std::vector<COutput> vCoins, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, CAmount& nValueRet) const;
bool IsSpent(const uint256& hash, unsigned int n) const;
@@ -766,7 +780,7 @@ public:
* Insert additional inputs into the transaction by
* calling CreateTransaction();
*/
- bool FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const CTxDestination& destChange = CNoDestination());
+ bool FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, bool overrideEstimatedFeeRate, const CFeeRate& specificFeeRate, int& nChangePosInOut, std::string& strFailReason, bool includeWatching, bool lockUnspents, const std::set<int>& setSubtractFeeFromOutputs, const CTxDestination& destChange = CNoDestination());
/**
* Create a new transaction paying the recipients with a set of coins
@@ -911,6 +925,7 @@ public:
static std::string GetWalletHelpString(bool showDebug);
/* Initializes the wallet, returns a new CWallet instance or a null pointer in case of an error */
+ static CWallet* CreateWalletFromFile(const std::string walletFile);
static bool InitLoadWallet();
/**
@@ -986,8 +1001,9 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
- if (!(nType & SER_GETHASH))
+ inline void SerializationOp(Stream& s, Operation ser_action) {
+ int nVersion = s.GetVersion();
+ if (!(s.GetType() & SER_GETHASH))
READWRITE(nVersion);
READWRITE(vchPubKey);
}
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 43fd6a20ad..9cd19ab619 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -7,7 +7,7 @@
#include "base58.h"
#include "consensus/validation.h"
-#include "main.h" // For CheckTransaction
+#include "validation.h" // For CheckTransaction
#include "protocol.h"
#include "serialize.h"
#include "sync.h"
@@ -768,7 +768,7 @@ DBErrors CWalletDB::ZapWalletTx(CWallet* pwallet, vector<CWalletTx>& vWtx)
return DB_LOAD_OK;
}
-void ThreadFlushWalletDB(const string& strFile)
+void ThreadFlushWalletDB()
{
// Make this thread recognisable as the wallet flushing thread
RenameThread("bitcoin-wallet");
@@ -810,6 +810,7 @@ void ThreadFlushWalletDB(const string& strFile)
if (nRefCount == 0)
{
boost::this_thread::interruption_point();
+ const std::string& strFile = pwalletMain->strWalletFile;
map<string, int>::iterator _mi = bitdb.mapFileUseCount.find(strFile);
if (_mi != bitdb.mapFileUseCount.end())
{
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index a0525bd9a7..b9db55baa4 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2015 The Bitcoin Core developers
+// Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -54,7 +54,7 @@ public:
CHDChain() { SetNull(); }
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion)
+ inline void SerializationOp(Stream& s, Operation ser_action)
{
READWRITE(this->nVersion);
READWRITE(nExternalChainCounter);
@@ -93,7 +93,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(this->nVersion);
READWRITE(nCreateTime);
if (this->nVersion >= VERSION_WITH_HDDATA)
@@ -182,6 +182,6 @@ private:
};
-void ThreadFlushWalletDB(const std::string& strFile);
+void ThreadFlushWalletDB();
#endif // BITCOIN_WALLET_WALLETDB_H
diff --git a/src/warnings.cpp b/src/warnings.cpp
new file mode 100644
index 0000000000..2c1b1b0e12
--- /dev/null
+++ b/src/warnings.cpp
@@ -0,0 +1,89 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include "sync.h"
+#include "clientversion.h"
+#include "util.h"
+#include "warnings.h"
+
+CCriticalSection cs_warnings;
+std::string strMiscWarning;
+bool fLargeWorkForkFound = false;
+bool fLargeWorkInvalidChainFound = false;
+
+void SetMiscWarning(const std::string& strWarning)
+{
+ LOCK(cs_warnings);
+ strMiscWarning = strWarning;
+}
+
+void SetfLargeWorkForkFound(bool flag)
+{
+ LOCK(cs_warnings);
+ fLargeWorkForkFound = flag;
+}
+
+bool GetfLargeWorkForkFound()
+{
+ LOCK(cs_warnings);
+ return fLargeWorkForkFound;
+}
+
+void SetfLargeWorkInvalidChainFound(bool flag)
+{
+ LOCK(cs_warnings);
+ fLargeWorkInvalidChainFound = flag;
+}
+
+bool GetfLargeWorkInvalidChainFound()
+{
+ LOCK(cs_warnings);
+ return fLargeWorkInvalidChainFound;
+}
+
+std::string GetWarnings(const std::string& strFor)
+{
+ std::string strStatusBar;
+ std::string strRPC;
+ std::string strGUI;
+ const std::string uiAlertSeperator = "<hr />";
+
+ LOCK(cs_warnings);
+
+ if (!CLIENT_VERSION_IS_RELEASE) {
+ strStatusBar = "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications";
+ strGUI = _("This is a pre-release test build - use at your own risk - do not use for mining or merchant applications");
+ }
+
+ if (GetBoolArg("-testsafemode", DEFAULT_TESTSAFEMODE))
+ strStatusBar = strRPC = strGUI = "testsafemode enabled";
+
+ // Misc warnings like out of disk space and clock is wrong
+ if (strMiscWarning != "")
+ {
+ strStatusBar = strMiscWarning;
+ strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + strMiscWarning;
+ }
+
+ if (fLargeWorkForkFound)
+ {
+ strStatusBar = strRPC = "Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.";
+ strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.");
+ }
+ else if (fLargeWorkInvalidChainFound)
+ {
+ strStatusBar = strRPC = "Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.";
+ strGUI += (strGUI.empty() ? "" : uiAlertSeperator) + _("Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.");
+ }
+
+ if (strFor == "gui")
+ return strGUI;
+ else if (strFor == "statusbar")
+ return strStatusBar;
+ else if (strFor == "rpc")
+ return strRPC;
+ assert(!"GetWarnings(): invalid parameter");
+ return "error";
+}
diff --git a/src/warnings.h b/src/warnings.h
new file mode 100644
index 0000000000..a7aa657426
--- /dev/null
+++ b/src/warnings.h
@@ -0,0 +1,21 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2016 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_WARNINGS_H
+#define BITCOIN_WARNINGS_H
+
+#include <stdlib.h>
+#include <string>
+
+void SetMiscWarning(const std::string& strWarning);
+void SetfLargeWorkForkFound(bool flag);
+bool GetfLargeWorkForkFound();
+void SetfLargeWorkInvalidChainFound(bool flag);
+bool GetfLargeWorkInvalidChainFound();
+std::string GetWarnings(const std::string& strFor);
+
+static const bool DEFAULT_TESTSAFEMODE = false;
+
+#endif // BITCOIN_WARNINGS_H
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index a0196fe184..431d8c9ac9 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -6,7 +6,7 @@
#include "zmqpublishnotifier.h"
#include "version.h"
-#include "main.h"
+#include "validation.h"
#include "streams.h"
#include "util.h"
@@ -29,7 +29,7 @@ CZMQNotificationInterface::~CZMQNotificationInterface()
}
}
-CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const std::map<std::string, std::string> &args)
+CZMQNotificationInterface* CZMQNotificationInterface::Create()
{
CZMQNotificationInterface* notificationInterface = NULL;
std::map<std::string, CZMQNotifierFactory> factories;
@@ -42,11 +42,11 @@ CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const
for (std::map<std::string, CZMQNotifierFactory>::const_iterator i=factories.begin(); i!=factories.end(); ++i)
{
- std::map<std::string, std::string>::const_iterator j = args.find("-zmq" + i->first);
- if (j!=args.end())
+ std::string arg("-zmq" + i->first);
+ if (IsArgSet(arg))
{
CZMQNotifierFactory factory = i->second;
- std::string address = j->second;
+ std::string address = GetArg(arg, "");
CZMQAbstractNotifier *notifier = factory();
notifier->SetType(i->first);
notifier->SetAddress(address);
diff --git a/src/zmq/zmqnotificationinterface.h b/src/zmq/zmqnotificationinterface.h
index 037470ec17..beabb78da6 100644
--- a/src/zmq/zmqnotificationinterface.h
+++ b/src/zmq/zmqnotificationinterface.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -17,7 +17,7 @@ class CZMQNotificationInterface : public CValidationInterface
public:
virtual ~CZMQNotificationInterface();
- static CZMQNotificationInterface* CreateWithArguments(const std::map<std::string, std::string> &args);
+ static CZMQNotificationInterface* Create();
protected:
bool Initialize();
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp
index b6c907980f..caca1248a1 100644
--- a/src/zmq/zmqpublishnotifier.cpp
+++ b/src/zmq/zmqpublishnotifier.cpp
@@ -1,11 +1,13 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "chainparams.h"
+#include "streams.h"
#include "zmqpublishnotifier.h"
-#include "main.h"
+#include "validation.h"
#include "util.h"
+#include "rpc/server.h"
static std::multimap<std::string, CZMQAbstractPublishNotifier*> mapPublishNotifiers;
@@ -165,7 +167,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());
const Consensus::Params& consensusParams = Params().GetConsensus();
- CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
{
LOCK(cs_main);
CBlock block;
@@ -185,7 +187,7 @@ bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &tr
{
uint256 hash = transaction.GetHash();
LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex());
- CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
+ CDataStream ss(SER_NETWORK, PROTOCOL_VERSION | RPCSerializationFlags());
ss << transaction;
return SendMessage(MSG_RAWTX, &(*ss.begin()), ss.size());
}
diff --git a/src/zmq/zmqpublishnotifier.h b/src/zmq/zmqpublishnotifier.h
index 751ded3957..bcbecf1bde 100644
--- a/src/zmq/zmqpublishnotifier.h
+++ b/src/zmq/zmqpublishnotifier.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2015 The Bitcoin Core developers
+// Copyright (c) 2015-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.