aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--README.md5
-rw-r--r--contrib/debian/control36
-rw-r--r--contrib/debian/watch2
-rwxr-xr-xcontrib/devtools/symbol-check.py19
-rw-r--r--contrib/gitian-descriptors/README.md2
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml17
-rw-r--r--contrib/gitian-descriptors/gitian-osx-signer.yml4
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml8
-rw-r--r--contrib/gitian-descriptors/gitian-win-signer.yml2
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml32
-rw-r--r--contrib/test-patches/README.md7
-rw-r--r--contrib/test-patches/temp-revert-2.patch20
-rw-r--r--depends/packages/openssl.mk1
-rw-r--r--depends/packages/qt.mk6
-rw-r--r--depends/patches/qt/pidlist_absolute.patch37
-rw-r--r--doc/README.md2
-rw-r--r--doc/build-unix.md8
-rw-r--r--doc/gitian-building.md2
-rw-r--r--qa/README.md57
-rwxr-xr-xqa/pull-tester/rpc-tests.py4
-rw-r--r--qa/replace-by-fee/.gitignore1
-rw-r--r--qa/replace-by-fee/README.md13
-rwxr-xr-xqa/replace-by-fee/rbf-tests.py360
-rw-r--r--qa/rpc-tests/README.md49
-rwxr-xr-xqa/rpc-tests/replace-by-fee.py512
-rwxr-xr-xqa/rpc-tests/script_test.py259
-rwxr-xr-xqa/rpc-tests/smartfees.py52
-rw-r--r--src/coins.cpp28
-rw-r--r--src/coins.h11
-rw-r--r--src/httpserver.cpp4
-rw-r--r--src/init.cpp22
-rw-r--r--src/main.cpp278
-rw-r--r--src/main.h2
-rw-r--r--src/net.cpp1
-rw-r--r--src/net.h1
-rw-r--r--src/policy/fees.cpp52
-rw-r--r--src/policy/fees.h17
-rw-r--r--src/policy/policy.h2
-rw-r--r--src/qt/bitcoin.cpp8
-rw-r--r--src/qt/bitcoinstrings.cpp5
-rw-r--r--src/qt/clientmodel.cpp12
-rw-r--r--src/qt/clientmodel.h6
-rw-r--r--src/qt/coincontroldialog.cpp15
-rw-r--r--src/qt/forms/debugwindow.ui148
-rw-r--r--src/qt/guiutil.cpp5
-rw-r--r--src/qt/locale/bitcoin_ar.ts4
-rw-r--r--src/qt/locale/bitcoin_be_BY.ts12
-rw-r--r--src/qt/locale/bitcoin_bg.ts72
-rw-r--r--src/qt/locale/bitcoin_ca.ts32
-rw-r--r--src/qt/locale/bitcoin_ca@valencia.ts32
-rw-r--r--src/qt/locale/bitcoin_ca_ES.ts32
-rw-r--r--src/qt/locale/bitcoin_cs.ts32
-rw-r--r--src/qt/locale/bitcoin_da.ts74
-rw-r--r--src/qt/locale/bitcoin_de.ts40
-rw-r--r--src/qt/locale/bitcoin_el_GR.ts28
-rw-r--r--src/qt/locale/bitcoin_en.ts102
-rw-r--r--src/qt/locale/bitcoin_eo.ts20
-rw-r--r--src/qt/locale/bitcoin_es.ts122
-rw-r--r--src/qt/locale/bitcoin_es_CL.ts29
-rw-r--r--src/qt/locale/bitcoin_es_DO.ts20
-rw-r--r--src/qt/locale/bitcoin_et.ts20
-rw-r--r--src/qt/locale/bitcoin_fa.ts16
-rw-r--r--src/qt/locale/bitcoin_fa_IR.ts8
-rw-r--r--src/qt/locale/bitcoin_fi.ts32
-rw-r--r--src/qt/locale/bitcoin_fr.ts36
-rw-r--r--src/qt/locale/bitcoin_gl.ts16
-rw-r--r--src/qt/locale/bitcoin_he.ts28
-rw-r--r--src/qt/locale/bitcoin_hr.ts20
-rw-r--r--src/qt/locale/bitcoin_hu.ts17
-rw-r--r--src/qt/locale/bitcoin_id_ID.ts174
-rw-r--r--src/qt/locale/bitcoin_it.ts32
-rw-r--r--src/qt/locale/bitcoin_ja.ts68
-rw-r--r--src/qt/locale/bitcoin_ka.ts16
-rw-r--r--src/qt/locale/bitcoin_ko_KR.ts20
-rw-r--r--src/qt/locale/bitcoin_la.ts16
-rw-r--r--src/qt/locale/bitcoin_lt.ts16
-rw-r--r--src/qt/locale/bitcoin_lv_LV.ts20
-rw-r--r--src/qt/locale/bitcoin_mn.ts4
-rw-r--r--src/qt/locale/bitcoin_nb.ts68
-rw-r--r--src/qt/locale/bitcoin_nl.ts32
-rw-r--r--src/qt/locale/bitcoin_pam.ts8
-rw-r--r--src/qt/locale/bitcoin_pl.ts36
-rw-r--r--src/qt/locale/bitcoin_pt_BR.ts212
-rw-r--r--src/qt/locale/bitcoin_pt_PT.ts28
-rw-r--r--src/qt/locale/bitcoin_ro_RO.ts32
-rw-r--r--src/qt/locale/bitcoin_ru.ts36
-rw-r--r--src/qt/locale/bitcoin_sk.ts32
-rw-r--r--src/qt/locale/bitcoin_sl_SI.ts32
-rw-r--r--src/qt/locale/bitcoin_sr.ts4
-rw-r--r--src/qt/locale/bitcoin_sv.ts40
-rw-r--r--src/qt/locale/bitcoin_tr.ts32
-rw-r--r--src/qt/locale/bitcoin_uk.ts40
-rw-r--r--src/qt/locale/bitcoin_uz@Cyrl.ts8
-rw-r--r--src/qt/locale/bitcoin_vi_VN.ts4
-rw-r--r--src/qt/locale/bitcoin_zh_CN.ts36
-rw-r--r--src/qt/locale/bitcoin_zh_TW.ts64
-rw-r--r--src/qt/optionsmodel.cpp9
-rw-r--r--src/qt/optionsmodel.h4
-rw-r--r--src/qt/rpcconsole.cpp12
-rw-r--r--src/qt/rpcconsole.h2
-rw-r--r--src/qt/sendcoinsdialog.cpp7
-rw-r--r--src/qt/transactiontablemodel.cpp15
-rw-r--r--src/qt/transactiontablemodel.h2
-rw-r--r--src/qt/transactionview.cpp8
-rw-r--r--src/qt/transactionview.h1
-rw-r--r--src/qt/walletmodel.cpp6
-rw-r--r--src/rpcblockchain.cpp7
-rw-r--r--src/rpcclient.cpp2
-rw-r--r--src/rpcmining.cpp72
-rw-r--r--src/rpcnet.cpp2
-rw-r--r--src/rpcserver.cpp2
-rw-r--r--src/rpcserver.h2
-rw-r--r--src/secp256k1/Makefile.am2
-rw-r--r--src/test/accounting_tests.cpp8
-rw-r--r--src/test/coins_tests.cpp162
-rw-r--r--src/test/mempool_tests.cpp69
-rw-r--r--src/test/miner_tests.cpp28
-rw-r--r--src/test/policyestimator_tests.cpp64
-rw-r--r--src/test/test_bitcoin.cpp7
-rw-r--r--src/test/test_bitcoin.h25
-rw-r--r--src/timedata.cpp14
-rw-r--r--src/txmempool.cpp10
-rw-r--r--src/txmempool.h21
-rw-r--r--src/wallet/rpcwallet.cpp17
-rw-r--r--src/wallet/wallet.cpp71
-rw-r--r--src/wallet/wallet.h17
-rw-r--r--src/wallet/walletdb.cpp8
-rw-r--r--src/wallet/walletdb.h4
-rw-r--r--src/zmq/zmqnotificationinterface.cpp6
-rw-r--r--src/zmq/zmqpublishnotifier.cpp10
131 files changed, 2815 insertions, 1971 deletions
diff --git a/Makefile.am b/Makefile.am
index 303ad3b06f..b2b7811729 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -111,7 +111,7 @@ $(APP_DIST_DIR)/Applications:
$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
$(OSX_DMG): $(APP_DIST_EXTRAS)
- $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
+ $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -dir-mode 0755 -apple -o $@ dist
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
$(MKDIR_P) $(@D)
diff --git a/README.md b/README.md
index c08b2fb0bc..b40ad0e396 100644
--- a/README.md
+++ b/README.md
@@ -49,9 +49,10 @@ lots of money.
### Automated Testing
Developers are strongly encouraged to write unit tests for new code, and to
-submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: `make check`
+submit new unit tests for old code. Unit tests can be compiled and run
+(assuming they weren't disabled in configure) with: `make check`
-There are also regression and integration tests of the RPC interface, written
+There are also [regression and integration tests](/qa) of the RPC interface, written
in Python, that are run automatically on the build server.
These tests can be run with: `qa/pull-tester/rpc-tests.py`
diff --git a/contrib/debian/control b/contrib/debian/control
index 2fd68583ce..490b2571c3 100644
--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -31,14 +31,11 @@ Package: bitcoind
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: peer-to-peer network based digital currency - daemon
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- Full transaction history is stored locally at each client. This
- requires 20+ GB of space, slowly growing.
+ Bitcoin is an experimental new digital currency that enables instant
+ payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer
+ technology to operate with no central authority: managing transactions
+ and issuing money are carried out collectively by the network. Bitcoin Core
+ is the name of the open source software which enables the use of this currency.
.
This package provides the daemon, bitcoind, and the CLI tool
bitcoin-cli to interact with the daemon.
@@ -47,14 +44,11 @@ Package: bitcoin-qt
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: peer-to-peer network based digital currency - Qt GUI
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
- .
- Full transaction history is stored locally at each client. This
- requires 20+ GB of space, slowly growing.
+ Bitcoin is an experimental new digital currency that enables instant
+ payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer
+ technology to operate with no central authority: managing transactions
+ and issuing money are carried out collectively by the network. Bitcoin Core
+ is the name of the open source software which enables the use of this currency.
.
This package provides Bitcoin-Qt, a GUI for Bitcoin based on Qt.
@@ -62,11 +56,11 @@ Package: bitcoin-tx
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: peer-to-peer digital currency - standalone transaction tool
- Bitcoin is a free open source peer-to-peer electronic cash system that
- is completely decentralized, without the need for a central server or
- trusted parties. Users hold the crypto keys to their own money and
- transact directly with each other, with the help of a P2P network to
- check for double-spending.
+ Bitcoin is an experimental new digital currency that enables instant
+ payments to anyone, anywhere in the world. Bitcoin uses peer-to-peer
+ technology to operate with no central authority: managing transactions
+ and issuing money are carried out collectively by the network. Bitcoin Core
+ is the name of the open source software which enables the use of this currency.
.
This package provides bitcoin-tx, a command-line transaction creation
tool which can be used without a bitcoin daemon. Some means of
diff --git a/contrib/debian/watch b/contrib/debian/watch
index c96d2f8e75..4d9e0cfa57 100644
--- a/contrib/debian/watch
+++ b/contrib/debian/watch
@@ -1,7 +1,5 @@
# Run the "uscan" command to check for upstream updates and more.
version=3
# use qa.debian.org redirector; see man uscan
-opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/;s/\-src//,dversionmangle=s/~dfsg\d*// \
- http://sf.net/bitcoin/bitcoin-(\d.*)-linux\.tar\.gz debian
opts=uversionmangle=s/(\d)(alpha|beta|rc)/$1~$2/,dversionmangle=s/~dfsg\d*// \
http://githubredir.debian.net/github/bitcoin/bitcoin v(.*).tar.gz
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index 34f1ed2d17..93acfcdda4 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -49,7 +49,24 @@ IGNORE_EXPORTS = {
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
# Allowed NEEDED libraries
-ALLOWED_LIBRARIES = {'librt.so.1','libpthread.so.0','libanl.so.1','libm.so.6','libgcc_s.so.1','libc.so.6','ld-linux-x86-64.so.2'}
+ALLOWED_LIBRARIES = {
+# bitcoind and bitcoin-qt
+'libgcc_s.so.1', # GCC base support
+'libc.so.6', # C library
+'libpthread.so.0', # threading
+'libanl.so.1', # DNS resolve
+'libm.so.6', # math library
+'librt.so.1', # real-time (clock)
+'ld-linux-x86-64.so.2', # 64-bit dynamic linker
+'ld-linux.so.2', # 32-bit dynamic linker
+# bitcoin-qt only
+'libX11-xcb.so.1', # part of X11
+'libX11.so.6', # part of X11
+'libxcb.so.1', # part of X11
+'libfontconfig.so.1', # font support
+'libfreetype.so.6', # font parsing
+'libdl.so.2' # programming interface to dynamic linker
+}
class CPPFilt(object):
'''
diff --git a/contrib/gitian-descriptors/README.md b/contrib/gitian-descriptors/README.md
index 061b897d2a..07c2ba98b1 100644
--- a/contrib/gitian-descriptors/README.md
+++ b/contrib/gitian-descriptors/README.md
@@ -27,7 +27,7 @@ Once you've got the right hardware and software:
# Create base images
cd gitian-builder
- bin/make-base-vm --suite precise --arch amd64
+ bin/make-base-vm --suite trusty --arch amd64
cd ..
# Get inputs (see doc/release-process.md for exact inputs needed and where to get them)
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index a98a71e2f9..0c3c439dd9 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -2,20 +2,19 @@
name: "bitcoin-linux-0.12"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
- "g++-multilib"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
- "libtool"
- "automake"
- "faketime"
- "bsdmainutils"
- "binutils-gold"
-- "libstdc++6-4.6-pic"
reference_datetime: "2015-06-01 00:00:00"
remotes:
- "url": "https://github.com/bitcoin/bitcoin.git"
@@ -44,7 +43,7 @@ script: |
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
@@ -55,7 +54,7 @@ script: |
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
@@ -70,14 +69,6 @@ script: |
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
done
- # Ubuntu precise hack: Not an issue in later versions.
- # Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
- # package which provides libstdc++_pic.a, but the linker can't find it.
- # Symlink it to a path that will be included in our link-line so that the
- # linker picks it up before the default libstdc++.a.
- # This is only necessary for 64bit.
- ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
-
# Create the release tarball using (arbitrarily) the first host
./autogen.sh
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index 36d7b01264..aa9494b7ed 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -1,7 +1,7 @@
---
name: "bitcoin-dmg-signer"
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
@@ -23,7 +23,7 @@ script: |
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index eeeb408ded..9ac774c8a0 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -2,14 +2,14 @@
name: "bitcoin-osx-0.12"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
- "g++"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
- "libtool"
- "automake"
- "faketime"
@@ -49,7 +49,7 @@ script: |
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
@@ -60,7 +60,7 @@ script: |
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index 2a73050e0e..a29d7ab472 100644
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -1,7 +1,7 @@
---
name: "bitcoin-win-signer"
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 5fa0db6784..6bb482d45f 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -2,14 +2,14 @@
name: "bitcoin-win-0.12"
enable_cache: true
suites:
-- "precise"
+- "trusty"
architectures:
- "amd64"
packages:
- "g++"
- "git-core"
- "pkg-config"
-- "autoconf2.13"
+- "autoconf"
- "libtool"
- "automake"
- "faketime"
@@ -46,7 +46,7 @@ script: |
for prog in ${FAKETIME_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${prog}
echo "REAL=\`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1\`" >> ${WRAP_DIR}/${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${prog}
chmod +x ${WRAP_DIR}/${prog}
@@ -57,12 +57,36 @@ script: |
for prog in ${FAKETIME_HOST_PROGS}; do
echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
chmod +x ${WRAP_DIR}/${i}-${prog}
done
done
+
+ # Create per-host linker wrapper
+ # This is only needed for trusty, as the mingw linker leaks a few bytes of
+ # heap, causing non-determinism. See discussion in https://github.com/bitcoin/bitcoin/pull/6900
+ for i in $HOSTS; do
+ mkdir -p ${WRAP_DIR}/${i}
+ for prog in collect2; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${i}/${prog}
+ REAL=$(${i}-gcc -print-prog-name=${prog})
+ echo "export MALLOC_PERTURB_=255" >> ${WRAP_DIR}/${i}/${prog}
+ echo "${REAL} \$@" >> $WRAP_DIR/${i}/${prog}
+ chmod +x ${WRAP_DIR}/${i}/${prog}
+ done
+ for prog in gcc g++; do
+ echo '#!/bin/bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"${REFERENCE_DATETIME}\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo "export COMPILER_PATH=${WRAP_DIR}/${i}" >> ${WRAP_DIR}/${i}-${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+ chmod +x ${WRAP_DIR}/${i}-${prog}
+ done
+ done
+
export PATH=${WRAP_DIR}:${PATH}
cd bitcoin
diff --git a/contrib/test-patches/README.md b/contrib/test-patches/README.md
deleted file mode 100644
index def40b0d6c..0000000000
--- a/contrib/test-patches/README.md
+++ /dev/null
@@ -1,7 +0,0 @@
-### Test Patches ###
-
-These patches are applied when the automated pull-tester
-tests each pull and when master is tested using jenkins.
-You can find more information about the tests run at
-[http://jenkins.bluematt.me/pull-tester/files/
-](http://jenkins.bluematt.me/pull-tester/files/) \ No newline at end of file
diff --git a/contrib/test-patches/temp-revert-2.patch b/contrib/test-patches/temp-revert-2.patch
deleted file mode 100644
index 1cd043d0d7..0000000000
--- a/contrib/test-patches/temp-revert-2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-commit cfae26916dba311f6f75d444301c1f9362267c3e
-Author: Matt Corallo <git@bluematt.me>
-Date: Sun Mar 24 20:45:50 2013 -0400
-
- Revert "Checkpoint at first block in 11 March chain fork"
-
- This reverts commit f817c496a1482d05b22c8e539de67f07db1c09d9.
-
-diff --git a/src/checkpoints.cpp b/src/checkpoints.cpp
-index 62234b9..9b11f0b 100644
---- a/src/checkpoints.cpp
-+++ b/src/checkpoints.cpp
-@@ -44,7 +44,6 @@ namespace Checkpoints
- (193000, uint256("0x000000000000059f452a5f7340de6682a977387c17010ff6e6c3bd83ca8b1317"))
- (210000, uint256("0x000000000000048b95347e83192f69cf0366076336c639f9b7228e9ba171342e"))
- (216116, uint256("0x00000000000001b4f4b433e81ee46494af945cf96014816a4e2370f11b23df4e"))
-- (225430, uint256("0x00000000000001c108384350f74090433e7fcf79a606b8e797f065b130575932"))
- ;
- static const CCheckpointData data = {
- &mapCheckpoints,
diff --git a/depends/packages/openssl.mk b/depends/packages/openssl.mk
index 687aae6682..c6452820a2 100644
--- a/depends/packages/openssl.mk
+++ b/depends/packages/openssl.mk
@@ -17,6 +17,7 @@ $(package)_config_opts_arm_linux=linux-generic32
$(package)_config_opts_aarch64_linux=linux-generic64
$(package)_config_opts_mipsel_linux=linux-generic32
$(package)_config_opts_mips_linux=linux-generic32
+$(package)_config_opts_powerpc_linux=linux-generic32
$(package)_config_opts_x86_64_darwin=darwin64-x86_64-cc
$(package)_config_opts_x86_64_mingw32=mingw64
$(package)_config_opts_i686_mingw32=mingw
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index cba2fbd151..901b761fde 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -8,7 +8,7 @@ $(package)_dependencies=openssl
$(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
-$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch mingw-uuidof.patch
+$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch mingw-uuidof.patch pidlist_absolute.patch
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
$(package)_qttranslations_sha256_hash=c4bd6db6e426965c6f8824c54e81f68bbd61e2bae1bcadc328c6e81c45902a0d
@@ -122,9 +122,6 @@ 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 "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/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\
- sed -i.old "s/PIDLIST_ABSOLUTE/ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowsdialoghelpers.cpp &&\
- sed -i.old "s/PCIDLIST_ABSOLUTE/const ITEMIDLIST */" qtbase/src/plugins/platforms/windows/qwindowscontext.h &&\
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 && \
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
@@ -134,6 +131,7 @@ define $(package)_preprocess_cmds
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
patch -p1 < $($(package)_patch_dir)/mingw-uuidof.patch && \
+ patch -p1 < $($(package)_patch_dir)/pidlist_absolute.patch && \
echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
diff --git a/depends/patches/qt/pidlist_absolute.patch b/depends/patches/qt/pidlist_absolute.patch
new file mode 100644
index 0000000000..0b49c050dc
--- /dev/null
+++ b/depends/patches/qt/pidlist_absolute.patch
@@ -0,0 +1,37 @@
+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 @@
+ inline void init();
+
+ typedef HRESULT (WINAPI *SHCreateItemFromParsingName)(PCWSTR, IBindCtx *, const GUID&, void **);
++#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
++ typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, ITEMIDLIST **);
++#else
+ typedef HRESULT (WINAPI *SHGetKnownFolderIDList)(const GUID &, DWORD, HANDLE, PIDLIST_ABSOLUTE *);
++#endif
+ typedef HRESULT (WINAPI *SHGetStockIconInfo)(int , int , _SHSTOCKICONINFO *);
+ typedef HRESULT (WINAPI *SHGetImageList)(int, REFIID , void **);
++#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
++ typedef HRESULT (WINAPI *SHCreateItemFromIDList)(const ITEMIDLIST *, REFIID, void **);
++#else
+ typedef HRESULT (WINAPI *SHCreateItemFromIDList)(PCIDLIST_ABSOLUTE, REFIID, void **);
++#endif
+
+ 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 @@
+ qWarning() << __FUNCTION__ << ": Invalid CLSID: " << url.path();
+ return Q_NULLPTR;
+ }
++#if defined(Q_CC_MINGW) && (!defined(__MINGW64_VERSION_MAJOR) || __MINGW64_VERSION_MAJOR < 3)
++ ITEMIDLIST *idList;
++#else
+ PIDLIST_ABSOLUTE idList;
++#endif
+ HRESULT hr = QWindowsContext::shell32dll.sHGetKnownFolderIDList(uuid, 0, 0, &idList);
+ if (FAILED(hr)) {
+ qErrnoWarning("%s: SHGetKnownFolderIDList(%s)) failed", __FUNCTION__, qPrintable(url.toString()));
diff --git a/doc/README.md b/doc/README.md
index 0594d20dd4..f6df28a89b 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -28,7 +28,7 @@ Unpack the files into a directory, and then run bitcoin-qt.exe.
### OS X
-Drag Bitcoin-Qt to your applications folder, and then run Bitcoin-Qt.
+Drag Bitcoin-Core to your applications folder, and then run Bitcoin-Core.
### Need Help?
diff --git a/doc/build-unix.md b/doc/build-unix.md
index e1f2ce54d3..159a140608 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -135,14 +135,6 @@ turned off by default. See the configure options for upnp behavior desired:
--disable-upnp-default (the default) UPnP support turned off by default at runtime
--enable-upnp-default UPnP support turned on by default at runtime
-To build:
-
- tar -xzvf miniupnpc-1.6.tar.gz
- cd miniupnpc-1.6
- make
- sudo su
- make install
-
Berkeley DB
-----------
diff --git a/doc/gitian-building.md b/doc/gitian-building.md
index 43de87d4ba..019e851696 100644
--- a/doc/gitian-building.md
+++ b/doc/gitian-building.md
@@ -320,7 +320,7 @@ Execute the following as user `debian`:
```bash
cd gitian-builder
-bin/make-base-vm --lxc --arch amd64 --suite precise
+bin/make-base-vm --lxc --arch amd64 --suite trusty
```
There will be a lot of warnings printed during the build of the image. These can be ignored.
diff --git a/qa/README.md b/qa/README.md
new file mode 100644
index 0000000000..758d1f47e5
--- /dev/null
+++ b/qa/README.md
@@ -0,0 +1,57 @@
+The [pull-tester](/qa/pull-tester/) folder contains a script to call
+multiple tests from the [rpc-tests](/qa/rpc-tests/) folder.
+
+Every pull request to the bitcoin repository is built and run through
+the regression test suite. You can also run all or only individual
+tests locally.
+
+Running tests
+=============
+
+You can run any single test by calling `qa/pull-tester/rpc-tests.py <testname>`.
+
+Or you can run any combination of tests by calling `qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...`
+
+Run the regression test suite with `qa/pull-tester/rpc-tests.py`
+
+Run all possible tests with `qa/pull-tester/rpc-tests.py -extended`
+
+Possible options:
+
+```
+ -h, --help show this help message and exit
+ --nocleanup Leave bitcoinds and test.* datadir on exit or error
+ --noshutdown Don't stop bitcoinds after the test execution
+ --srcdir=SRCDIR Source directory containing bitcoind/bitcoin-cli
+ (default: ../../src)
+ --tmpdir=TMPDIR Root directory for datadirs
+ --tracerpc Print out all RPC calls as they are made
+ --coveragedir=COVERAGEDIR
+ Write tested RPC commands into this directory
+```
+
+If you set the environment variable `PYTHON_DEBUG=1` you will get some debug
+output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
+
+A 200-block -regtest blockchain and wallets for four nodes
+is created the first time a regression test is run and
+is stored in the cache/ directory. Each node has 25 mature
+blocks (25*50=1250 BTC) in its wallet.
+
+After the first run, the cache/ blockchain and wallets are
+copied into a temporary directory and used as the initial
+test state.
+
+If you get into a bad state, you should be able
+to recover with:
+
+```bash
+rm -rf cache
+killall bitcoind
+```
+
+Writing tests
+=============
+You are encouraged to write tests for new or existing features.
+Further information about the test framework and individual rpc
+tests is found in [qa/rpc-tests](/qa/rpc-tests).
diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py
index 83fc9b8f96..3d156a2e7b 100755
--- a/qa/pull-tester/rpc-tests.py
+++ b/qa/pull-tester/rpc-tests.py
@@ -69,6 +69,7 @@ if EXEEXT == ".exe" and "-win" not in opts:
testScripts = [
'wallet.py',
'listtransactions.py',
+ 'receivedby.py',
'mempool_resurrect_test.py',
'txn_doublespend.py --mineblock',
'txn_clone.py',
@@ -104,15 +105,14 @@ testScriptsExt = [
'forknotify.py',
'invalidateblock.py',
'keypool.py',
- 'receivedby.py',
# 'rpcbind_test.py', #temporary, bug in libevent, see #6655
-# 'script_test.py', #used for manual comparison of 2 binaries
'smartfees.py',
'maxblocksinflight.py',
'invalidblockrequest.py',
'p2p-acceptblock.py',
'mempool_packages.py',
'maxuploadtarget.py',
+ 'replace-by-fee.py',
]
#Enable ZMQ tests
diff --git a/qa/replace-by-fee/.gitignore b/qa/replace-by-fee/.gitignore
new file mode 100644
index 0000000000..b2c4f4657a
--- /dev/null
+++ b/qa/replace-by-fee/.gitignore
@@ -0,0 +1 @@
+python-bitcoinlib
diff --git a/qa/replace-by-fee/README.md b/qa/replace-by-fee/README.md
new file mode 100644
index 0000000000..baad86de9a
--- /dev/null
+++ b/qa/replace-by-fee/README.md
@@ -0,0 +1,13 @@
+Replace-by-fee regression tests
+===============================
+
+First get version v0.5.0 of the python-bitcoinlib library. In this directory
+run:
+
+ git clone -n https://github.com/petertodd/python-bitcoinlib
+ (cd python-bitcoinlib && git checkout 8270bfd9c6ac37907d75db3d8b9152d61c7255cd)
+
+Then run the tests themselves with a bitcoind available running in regtest
+mode:
+
+ ./rbf-tests.py
diff --git a/qa/replace-by-fee/rbf-tests.py b/qa/replace-by-fee/rbf-tests.py
new file mode 100755
index 0000000000..1ee6c83875
--- /dev/null
+++ b/qa/replace-by-fee/rbf-tests.py
@@ -0,0 +1,360 @@
+#!/usr/bin/env python3
+# Copyright (c) 2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#
+# Test replace-by-fee
+#
+
+import os
+import sys
+
+# Add python-bitcoinlib to module search path, prior to any system-wide
+# python-bitcoinlib.
+sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinlib"))
+
+import unittest
+
+import bitcoin
+bitcoin.SelectParams('regtest')
+
+import bitcoin.rpc
+
+from bitcoin.core import *
+from bitcoin.core.script import *
+from bitcoin.wallet import *
+
+MAX_REPLACEMENT_LIMIT = 100
+
+class Test_ReplaceByFee(unittest.TestCase):
+ proxy = None
+
+ @classmethod
+ def setUpClass(cls):
+ if cls.proxy is None:
+ cls.proxy = bitcoin.rpc.Proxy()
+
+ @classmethod
+ def mine_mempool(cls):
+ """Mine until mempool is empty"""
+ mempool_size = 1
+ while mempool_size:
+ cls.proxy.call('generate', 1)
+ new_mempool_size = len(cls.proxy.getrawmempool())
+
+ # It's possible to get stuck in a loop here if the mempool has
+ # transactions that can't be mined.
+ assert(new_mempool_size != mempool_size)
+ mempool_size = new_mempool_size
+
+ @classmethod
+ def tearDownClass(cls):
+ # Make sure mining works
+ cls.mine_mempool()
+
+ def make_txout(self, amount, confirmed=True, scriptPubKey=CScript([1])):
+ """Create a txout with a given amount and scriptPubKey
+
+ Mines coins as needed.
+
+ confirmed - txouts created will be confirmed in the blockchain;
+ unconfirmed otherwise.
+ """
+ fee = 1*COIN
+ while self.proxy.getbalance() < amount + fee:
+ self.proxy.call('generate', 100)
+
+ addr = P2SHBitcoinAddress.from_redeemScript(CScript([]))
+ txid = self.proxy.sendtoaddress(addr, amount + fee)
+
+ tx1 = self.proxy.getrawtransaction(txid)
+
+ i = None
+ for i, txout in enumerate(tx1.vout):
+ if txout.scriptPubKey == addr.to_scriptPubKey():
+ break
+ assert i is not None
+
+ tx2 = CTransaction([CTxIn(COutPoint(txid, i), CScript([1, CScript([])]), nSequence=0)],
+ [CTxOut(amount, scriptPubKey)])
+
+ tx2_txid = self.proxy.sendrawtransaction(tx2, True)
+
+ # If requested, ensure txouts are confirmed.
+ if confirmed:
+ self.mine_mempool()
+
+ return COutPoint(tx2_txid, 0)
+
+ def test_simple_doublespend(self):
+ """Simple doublespend"""
+ tx0_outpoint = self.make_txout(1.1*COIN)
+
+ tx1a = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(1*COIN, CScript([b'a']))])
+ tx1a_txid = self.proxy.sendrawtransaction(tx1a, True)
+
+ # Should fail because we haven't changed the fee
+ tx1b = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(1*COIN, CScript([b'b']))])
+
+ try:
+ tx1b_txid = self.proxy.sendrawtransaction(tx1b, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26) # insufficient fee
+ else:
+ self.fail()
+
+ # Extra 0.1 BTC fee
+ tx1b = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(0.9*COIN, CScript([b'b']))])
+ tx1b_txid = self.proxy.sendrawtransaction(tx1b, True)
+
+ # tx1a is in fact replaced
+ with self.assertRaises(IndexError):
+ self.proxy.getrawtransaction(tx1a_txid)
+
+ self.assertEqual(tx1b, self.proxy.getrawtransaction(tx1b_txid))
+
+ def test_doublespend_chain(self):
+ """Doublespend of a long chain"""
+
+ initial_nValue = 50*COIN
+ tx0_outpoint = self.make_txout(initial_nValue)
+
+ prevout = tx0_outpoint
+ remaining_value = initial_nValue
+ chain_txids = []
+ while remaining_value > 10*COIN:
+ remaining_value -= 1*COIN
+ tx = CTransaction([CTxIn(prevout, nSequence=0)],
+ [CTxOut(remaining_value, CScript([1]))])
+ txid = self.proxy.sendrawtransaction(tx, True)
+ chain_txids.append(txid)
+ prevout = COutPoint(txid, 0)
+
+ # Whether the double-spend is allowed is evaluated by including all
+ # child fees - 40 BTC - so this attempt is rejected.
+ dbl_tx = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(initial_nValue - 30*COIN, CScript([1]))])
+
+ try:
+ self.proxy.sendrawtransaction(dbl_tx, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26) # insufficient fee
+ else:
+ self.fail()
+
+ # Accepted with sufficient fee
+ dbl_tx = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(1*COIN, CScript([1]))])
+ self.proxy.sendrawtransaction(dbl_tx, True)
+
+ for doublespent_txid in chain_txids:
+ with self.assertRaises(IndexError):
+ self.proxy.getrawtransaction(doublespent_txid)
+
+ def test_doublespend_tree(self):
+ """Doublespend of a big tree of transactions"""
+
+ initial_nValue = 50*COIN
+ tx0_outpoint = self.make_txout(initial_nValue)
+
+ def branch(prevout, initial_value, max_txs, *, tree_width=5, fee=0.0001*COIN, _total_txs=None):
+ if _total_txs is None:
+ _total_txs = [0]
+ if _total_txs[0] >= max_txs:
+ return
+
+ txout_value = (initial_value - fee) // tree_width
+ if txout_value < fee:
+ return
+
+ vout = [CTxOut(txout_value, CScript([i+1]))
+ for i in range(tree_width)]
+ tx = CTransaction([CTxIn(prevout, nSequence=0)],
+ vout)
+
+ self.assertTrue(len(tx.serialize()) < 100000)
+ txid = self.proxy.sendrawtransaction(tx, True)
+ yield tx
+ _total_txs[0] += 1
+
+ for i, txout in enumerate(tx.vout):
+ yield from branch(COutPoint(txid, i), txout_value,
+ max_txs,
+ tree_width=tree_width, fee=fee,
+ _total_txs=_total_txs)
+
+ fee = 0.0001*COIN
+ n = MAX_REPLACEMENT_LIMIT
+ tree_txs = list(branch(tx0_outpoint, initial_nValue, n, fee=fee))
+ self.assertEqual(len(tree_txs), n)
+
+ # Attempt double-spend, will fail because too little fee paid
+ dbl_tx = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(initial_nValue - fee*n, CScript([1]))])
+ try:
+ self.proxy.sendrawtransaction(dbl_tx, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26) # insufficient fee
+ else:
+ self.fail()
+
+ # 1 BTC fee is enough
+ dbl_tx = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(initial_nValue - fee*n - 1*COIN, CScript([1]))])
+ self.proxy.sendrawtransaction(dbl_tx, True)
+
+ for tx in tree_txs:
+ with self.assertRaises(IndexError):
+ self.proxy.getrawtransaction(tx.GetHash())
+
+ # Try again, but with more total transactions than the "max txs
+ # double-spent at once" anti-DoS limit.
+ for n in (MAX_REPLACEMENT_LIMIT, MAX_REPLACEMENT_LIMIT*2):
+ fee = 0.0001*COIN
+ tx0_outpoint = self.make_txout(initial_nValue)
+ tree_txs = list(branch(tx0_outpoint, initial_nValue, n, fee=fee))
+ self.assertEqual(len(tree_txs), n)
+
+ dbl_tx = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(initial_nValue - fee*n, CScript([1]))])
+ try:
+ self.proxy.sendrawtransaction(dbl_tx, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26)
+ else:
+ self.fail()
+
+ for tx in tree_txs:
+ self.proxy.getrawtransaction(tx.GetHash())
+
+ def test_replacement_feeperkb(self):
+ """Replacement requires fee-per-KB to be higher"""
+ tx0_outpoint = self.make_txout(1.1*COIN)
+
+ tx1a = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(1*COIN, CScript([b'a']))])
+ tx1a_txid = self.proxy.sendrawtransaction(tx1a, True)
+
+ # Higher fee, but the fee per KB is much lower, so the replacement is
+ # rejected.
+ tx1b = CTransaction([CTxIn(tx0_outpoint, nSequence=0)],
+ [CTxOut(0.001*COIN,
+ CScript([b'a'*999000]))])
+
+ try:
+ tx1b_txid = self.proxy.sendrawtransaction(tx1b, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26) # insufficient fee
+ else:
+ self.fail()
+
+ def test_spends_of_conflicting_outputs(self):
+ """Replacements that spend conflicting tx outputs are rejected"""
+ utxo1 = self.make_txout(1.2*COIN)
+ utxo2 = self.make_txout(3.0*COIN)
+
+ tx1a = CTransaction([CTxIn(utxo1, nSequence=0)],
+ [CTxOut(1.1*COIN, CScript([b'a']))])
+ tx1a_txid = self.proxy.sendrawtransaction(tx1a, True)
+
+ # Direct spend an output of the transaction we're replacing.
+ tx2 = CTransaction([CTxIn(utxo1, nSequence=0), CTxIn(utxo2, nSequence=0),
+ CTxIn(COutPoint(tx1a_txid, 0), nSequence=0)],
+ tx1a.vout)
+
+ try:
+ tx2_txid = self.proxy.sendrawtransaction(tx2, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26)
+ else:
+ self.fail()
+
+ # Spend tx1a's output to test the indirect case.
+ tx1b = CTransaction([CTxIn(COutPoint(tx1a_txid, 0), nSequence=0)],
+ [CTxOut(1.0*COIN, CScript([b'a']))])
+ tx1b_txid = self.proxy.sendrawtransaction(tx1b, True)
+
+ tx2 = CTransaction([CTxIn(utxo1, nSequence=0), CTxIn(utxo2, nSequence=0),
+ CTxIn(COutPoint(tx1b_txid, 0))],
+ tx1a.vout)
+
+ try:
+ tx2_txid = self.proxy.sendrawtransaction(tx2, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26)
+ else:
+ self.fail()
+
+ def test_new_unconfirmed_inputs(self):
+ """Replacements that add new unconfirmed inputs are rejected"""
+ confirmed_utxo = self.make_txout(1.1*COIN)
+ unconfirmed_utxo = self.make_txout(0.1*COIN, False)
+
+ tx1 = CTransaction([CTxIn(confirmed_utxo)],
+ [CTxOut(1.0*COIN, CScript([b'a']))])
+ tx1_txid = self.proxy.sendrawtransaction(tx1, True)
+
+ tx2 = CTransaction([CTxIn(confirmed_utxo), CTxIn(unconfirmed_utxo)],
+ tx1.vout)
+
+ try:
+ tx2_txid = self.proxy.sendrawtransaction(tx2, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26)
+ else:
+ self.fail()
+
+ def test_too_many_replacements(self):
+ """Replacements that evict too many transactions are rejected"""
+ # Try directly replacing more than MAX_REPLACEMENT_LIMIT
+ # transactions
+
+ # Start by creating a single transaction with many outputs
+ initial_nValue = 10*COIN
+ utxo = self.make_txout(initial_nValue)
+ fee = 0.0001*COIN
+ split_value = int((initial_nValue-fee)/(MAX_REPLACEMENT_LIMIT+1))
+ actual_fee = initial_nValue - split_value*(MAX_REPLACEMENT_LIMIT+1)
+
+ outputs = []
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ outputs.append(CTxOut(split_value, CScript([1])))
+
+ splitting_tx = CTransaction([CTxIn(utxo, nSequence=0)], outputs)
+ txid = self.proxy.sendrawtransaction(splitting_tx, True)
+
+ # Now spend each of those outputs individually
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ tx_i = CTransaction([CTxIn(COutPoint(txid, i), nSequence=0)],
+ [CTxOut(split_value-fee, CScript([b'a']))])
+ self.proxy.sendrawtransaction(tx_i, True)
+
+ # Now create doublespend of the whole lot, should fail
+ # Need a big enough fee to cover all spending transactions and have
+ # a higher fee rate
+ double_spend_value = (split_value-100*fee)*(MAX_REPLACEMENT_LIMIT+1)
+ inputs = []
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ inputs.append(CTxIn(COutPoint(txid, i), nSequence=0))
+ double_tx = CTransaction(inputs, [CTxOut(double_spend_value, CScript([b'a']))])
+
+ try:
+ self.proxy.sendrawtransaction(double_tx, True)
+ except bitcoin.rpc.JSONRPCException as exp:
+ self.assertEqual(exp.error['code'], -26)
+ self.assertEqual("too many potential replacements" in exp.error['message'], True)
+ else:
+ self.fail()
+
+ # If we remove an input, it should pass
+ double_tx = CTransaction(inputs[0:-1],
+ [CTxOut(double_spend_value, CScript([b'a']))])
+
+ self.proxy.sendrawtransaction(double_tx, True)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/qa/rpc-tests/README.md b/qa/rpc-tests/README.md
index d2db00362f..898931936b 100644
--- a/qa/rpc-tests/README.md
+++ b/qa/rpc-tests/README.md
@@ -1,10 +1,8 @@
Regression tests
================
-### [python-bitcoinrpc](https://github.com/jgarzik/python-bitcoinrpc)
-Git subtree of [https://github.com/jgarzik/python-bitcoinrpc](https://github.com/jgarzik/python-bitcoinrpc).
-Changes to python-bitcoinrpc should be made upstream, and then
-pulled here using git subtree.
+### [test_framework/authproxy.py](test_framework/authproxy.py)
+Taken from the [python-bitcoinrpc repository](https://github.com/jgarzik/python-bitcoinrpc).
### [test_framework/test_framework.py](test_framework/test_framework.py)
Base class for new regression tests.
@@ -33,49 +31,6 @@ Helpers for script.py
### [test_framework/blocktools.py](test_framework/blocktools.py)
Helper functions for creating blocks and transactions.
-
-Notes
-=====
-
-You can run any single test by calling `qa/pull-tester/rpc-tests.py <testname>`.
-
-Or you can run any combination of tests by calling `qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...`
-
-Run the regression test suite with `qa/pull-tester/rpc-tests.py`
-
-Run all possible tests with `qa/pull-tester/rpc-tests.py -extended`
-
-Possible options:
-
-```
--h, --help show this help message and exit
- --nocleanup Leave bitcoinds and test.* datadir on exit or error
- --noshutdown Don't stop bitcoinds after the test execution
- --srcdir=SRCDIR Source directory containing bitcoind/bitcoin-cli (default:
- ../../src)
- --tmpdir=TMPDIR Root directory for datadirs
- --tracerpc Print out all RPC calls as they are made
-```
-
-If you set the environment variable `PYTHON_DEBUG=1` you will get some debug output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
-
-A 200-block -regtest blockchain and wallets for four nodes
-is created the first time a regression test is run and
-is stored in the cache/ directory. Each node has 25 mature
-blocks (25*50=1250 BTC) in its wallet.
-
-After the first run, the cache/ blockchain and wallets are
-copied into a temporary directory and used as the initial
-test state.
-
-If you get into a bad state, you should be able
-to recover with:
-
-```bash
-rm -rf cache
-killall bitcoind
-```
-
P2P test design notes
---------------------
diff --git a/qa/rpc-tests/replace-by-fee.py b/qa/rpc-tests/replace-by-fee.py
new file mode 100755
index 0000000000..537a1ed8d9
--- /dev/null
+++ b/qa/rpc-tests/replace-by-fee.py
@@ -0,0 +1,512 @@
+#!/usr/bin/env python2
+# Copyright (c) 2014-2015 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#
+# Test replace by fee code
+#
+
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
+from test_framework.script import *
+from test_framework.mininode import *
+import binascii
+
+COIN = 100000000
+MAX_REPLACEMENT_LIMIT = 100
+
+def satoshi_round(amount):
+ return Decimal(amount).quantize(Decimal('0.00000001'), rounding=ROUND_DOWN)
+
+def txToHex(tx):
+ return binascii.hexlify(tx.serialize()).decode('utf-8')
+
+def make_utxo(node, amount, confirmed=True, scriptPubKey=CScript([1])):
+ """Create a txout with a given amount and scriptPubKey
+
+ Mines coins as needed.
+
+ confirmed - txouts created will be confirmed in the blockchain;
+ unconfirmed otherwise.
+ """
+ fee = 1*COIN
+ while node.getbalance() < satoshi_round((amount + fee)/COIN):
+ node.generate(100)
+ #print (node.getbalance(), amount, fee)
+
+ new_addr = node.getnewaddress()
+ #print new_addr
+ txid = node.sendtoaddress(new_addr, satoshi_round((amount+fee)/COIN))
+ tx1 = node.getrawtransaction(txid, 1)
+ txid = int(txid, 16)
+ i = None
+
+ for i, txout in enumerate(tx1['vout']):
+ #print i, txout['scriptPubKey']['addresses']
+ if txout['scriptPubKey']['addresses'] == [new_addr]:
+ #print i
+ break
+ assert i is not None
+
+ tx2 = CTransaction()
+ tx2.vin = [CTxIn(COutPoint(txid, i))]
+ tx2.vout = [CTxOut(amount, scriptPubKey)]
+ tx2.rehash()
+
+ tx2_hex = binascii.hexlify(tx2.serialize()).decode('utf-8')
+ #print tx2_hex
+
+ signed_tx = node.signrawtransaction(binascii.hexlify(tx2.serialize()).decode('utf-8'))
+
+ txid = node.sendrawtransaction(signed_tx['hex'], True)
+
+ # If requested, ensure txouts are confirmed.
+ if confirmed:
+ while len(node.getrawmempool()):
+ node.generate(1)
+
+ return COutPoint(int(txid, 16), 0)
+
+class ReplaceByFeeTest(BitcoinTestFramework):
+
+ def setup_network(self):
+ self.nodes = []
+ self.nodes.append(start_node(0, self.options.tmpdir, ["-maxorphantx=1000",
+ "-relaypriority=0", "-whitelist=127.0.0.1"]))
+ self.is_network_split = False
+
+ def run_test(self):
+ make_utxo(self.nodes[0], 1*COIN)
+
+ print "Running test simple doublespend..."
+ self.test_simple_doublespend()
+
+ print "Running test doublespend chain..."
+ self.test_doublespend_chain()
+
+ print "Running test doublespend tree..."
+ self.test_doublespend_tree()
+
+ print "Running test replacement feeperkb..."
+ self.test_replacement_feeperkb()
+
+ print "Running test spends of conflicting outputs..."
+ self.test_spends_of_conflicting_outputs()
+
+ print "Running test new unconfirmed inputs..."
+ self.test_new_unconfirmed_inputs()
+
+ print "Running test too many replacements..."
+ self.test_too_many_replacements()
+
+ print "Running test opt-in..."
+ self.test_opt_in()
+
+ print "Passed\n"
+
+ def test_simple_doublespend(self):
+ """Simple doublespend"""
+ tx0_outpoint = make_utxo(self.nodes[0], 1.1*COIN)
+
+ tx1a = CTransaction()
+ tx1a.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1a.vout = [CTxOut(1*COIN, CScript([b'a']))]
+ tx1a_hex = txToHex(tx1a)
+ tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)
+
+ # Should fail because we haven't changed the fee
+ tx1b = CTransaction()
+ tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1b.vout = [CTxOut(1*COIN, CScript([b'b']))]
+ tx1b_hex = txToHex(tx1b)
+
+ try:
+ tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26) # insufficient fee
+ else:
+ assert(False)
+
+ # Extra 0.1 BTC fee
+ tx1b = CTransaction()
+ tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1b.vout = [CTxOut(0.9*COIN, CScript([b'b']))]
+ tx1b_hex = txToHex(tx1b)
+ tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, True)
+
+ mempool = self.nodes[0].getrawmempool()
+
+ assert (tx1a_txid not in mempool)
+ assert (tx1b_txid in mempool)
+
+ assert_equal(tx1b_hex, self.nodes[0].getrawtransaction(tx1b_txid))
+
+ def test_doublespend_chain(self):
+ """Doublespend of a long chain"""
+
+ initial_nValue = 50*COIN
+ tx0_outpoint = make_utxo(self.nodes[0], initial_nValue)
+
+ prevout = tx0_outpoint
+ remaining_value = initial_nValue
+ chain_txids = []
+ while remaining_value > 10*COIN:
+ remaining_value -= 1*COIN
+ tx = CTransaction()
+ tx.vin = [CTxIn(prevout, nSequence=0)]
+ tx.vout = [CTxOut(remaining_value, CScript([1]))]
+ tx_hex = txToHex(tx)
+ txid = self.nodes[0].sendrawtransaction(tx_hex, True)
+ chain_txids.append(txid)
+ prevout = COutPoint(int(txid, 16), 0)
+
+ # Whether the double-spend is allowed is evaluated by including all
+ # child fees - 40 BTC - so this attempt is rejected.
+ dbl_tx = CTransaction()
+ dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ dbl_tx.vout = [CTxOut(initial_nValue - 30*COIN, CScript([1]))]
+ dbl_tx_hex = txToHex(dbl_tx)
+
+ try:
+ self.nodes[0].sendrawtransaction(dbl_tx_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26) # insufficient fee
+ else:
+ assert(False) # transaction mistakenly accepted!
+
+ # Accepted with sufficient fee
+ dbl_tx = CTransaction()
+ dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ dbl_tx.vout = [CTxOut(1*COIN, CScript([1]))]
+ dbl_tx_hex = txToHex(dbl_tx)
+ self.nodes[0].sendrawtransaction(dbl_tx_hex, True)
+
+ mempool = self.nodes[0].getrawmempool()
+ for doublespent_txid in chain_txids:
+ assert(doublespent_txid not in mempool)
+
+ def test_doublespend_tree(self):
+ """Doublespend of a big tree of transactions"""
+
+ initial_nValue = 50*COIN
+ tx0_outpoint = make_utxo(self.nodes[0], initial_nValue)
+
+ def branch(prevout, initial_value, max_txs, tree_width=5, fee=0.0001*COIN, _total_txs=None):
+ if _total_txs is None:
+ _total_txs = [0]
+ if _total_txs[0] >= max_txs:
+ return
+
+ txout_value = (initial_value - fee) // tree_width
+ if txout_value < fee:
+ return
+
+ vout = [CTxOut(txout_value, CScript([i+1]))
+ for i in range(tree_width)]
+ tx = CTransaction()
+ tx.vin = [CTxIn(prevout, nSequence=0)]
+ tx.vout = vout
+ tx_hex = txToHex(tx)
+
+ assert(len(tx.serialize()) < 100000)
+ txid = self.nodes[0].sendrawtransaction(tx_hex, True)
+ yield tx
+ _total_txs[0] += 1
+
+ txid = int(txid, 16)
+
+ for i, txout in enumerate(tx.vout):
+ for x in branch(COutPoint(txid, i), txout_value,
+ max_txs,
+ tree_width=tree_width, fee=fee,
+ _total_txs=_total_txs):
+ yield x
+
+ fee = 0.0001*COIN
+ n = MAX_REPLACEMENT_LIMIT
+ tree_txs = list(branch(tx0_outpoint, initial_nValue, n, fee=fee))
+ assert_equal(len(tree_txs), n)
+
+ # Attempt double-spend, will fail because too little fee paid
+ dbl_tx = CTransaction()
+ dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ dbl_tx.vout = [CTxOut(initial_nValue - fee*n, CScript([1]))]
+ dbl_tx_hex = txToHex(dbl_tx)
+ try:
+ self.nodes[0].sendrawtransaction(dbl_tx_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26) # insufficient fee
+ else:
+ assert(False)
+
+ # 1 BTC fee is enough
+ dbl_tx = CTransaction()
+ dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ dbl_tx.vout = [CTxOut(initial_nValue - fee*n - 1*COIN, CScript([1]))]
+ dbl_tx_hex = txToHex(dbl_tx)
+ self.nodes[0].sendrawtransaction(dbl_tx_hex, True)
+
+ mempool = self.nodes[0].getrawmempool()
+
+ for tx in tree_txs:
+ tx.rehash()
+ assert (tx.hash not in mempool)
+
+ # Try again, but with more total transactions than the "max txs
+ # double-spent at once" anti-DoS limit.
+ for n in (MAX_REPLACEMENT_LIMIT+1, MAX_REPLACEMENT_LIMIT*2):
+ fee = 0.0001*COIN
+ tx0_outpoint = make_utxo(self.nodes[0], initial_nValue)
+ tree_txs = list(branch(tx0_outpoint, initial_nValue, n, fee=fee))
+ assert_equal(len(tree_txs), n)
+
+ dbl_tx = CTransaction()
+ dbl_tx.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ dbl_tx.vout = [CTxOut(initial_nValue - 2*fee*n, CScript([1]))]
+ dbl_tx_hex = txToHex(dbl_tx)
+ try:
+ self.nodes[0].sendrawtransaction(dbl_tx_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ assert_equal("too many potential replacements" in exp.error['message'], True)
+ else:
+ assert(False)
+
+ for tx in tree_txs:
+ tx.rehash()
+ self.nodes[0].getrawtransaction(tx.hash)
+
+ def test_replacement_feeperkb(self):
+ """Replacement requires fee-per-KB to be higher"""
+ tx0_outpoint = make_utxo(self.nodes[0], 1.1*COIN)
+
+ tx1a = CTransaction()
+ tx1a.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1a.vout = [CTxOut(1*COIN, CScript([b'a']))]
+ tx1a_hex = txToHex(tx1a)
+ tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)
+
+ # Higher fee, but the fee per KB is much lower, so the replacement is
+ # rejected.
+ tx1b = CTransaction()
+ tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1b.vout = [CTxOut(0.001*COIN, CScript([b'a'*999000]))]
+ tx1b_hex = txToHex(tx1b)
+
+ try:
+ tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26) # insufficient fee
+ else:
+ assert(False)
+
+ def test_spends_of_conflicting_outputs(self):
+ """Replacements that spend conflicting tx outputs are rejected"""
+ utxo1 = make_utxo(self.nodes[0], 1.2*COIN)
+ utxo2 = make_utxo(self.nodes[0], 3.0*COIN)
+
+ tx1a = CTransaction()
+ tx1a.vin = [CTxIn(utxo1, nSequence=0)]
+ tx1a.vout = [CTxOut(1.1*COIN, CScript([b'a']))]
+ tx1a_hex = txToHex(tx1a)
+ tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)
+
+ tx1a_txid = int(tx1a_txid, 16)
+
+ # Direct spend an output of the transaction we're replacing.
+ tx2 = CTransaction()
+ tx2.vin = [CTxIn(utxo1, nSequence=0), CTxIn(utxo2, nSequence=0)]
+ tx2.vin.append(CTxIn(COutPoint(tx1a_txid, 0), nSequence=0))
+ tx2.vout = tx1a.vout
+ tx2_hex = txToHex(tx2)
+
+ try:
+ tx2_txid = self.nodes[0].sendrawtransaction(tx2_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ else:
+ assert(False)
+
+ # Spend tx1a's output to test the indirect case.
+ tx1b = CTransaction()
+ tx1b.vin = [CTxIn(COutPoint(tx1a_txid, 0), nSequence=0)]
+ tx1b.vout = [CTxOut(1.0*COIN, CScript([b'a']))]
+ tx1b_hex = txToHex(tx1b)
+ tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, True)
+ tx1b_txid = int(tx1b_txid, 16)
+
+ tx2 = CTransaction()
+ tx2.vin = [CTxIn(utxo1, nSequence=0), CTxIn(utxo2, nSequence=0),
+ CTxIn(COutPoint(tx1b_txid, 0))]
+ tx2.vout = tx1a.vout
+ tx2_hex = txToHex(tx2)
+
+ try:
+ tx2_txid = self.nodes[0].sendrawtransaction(tx2_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ else:
+ assert(False)
+
+ def test_new_unconfirmed_inputs(self):
+ """Replacements that add new unconfirmed inputs are rejected"""
+ confirmed_utxo = make_utxo(self.nodes[0], 1.1*COIN)
+ unconfirmed_utxo = make_utxo(self.nodes[0], 0.1*COIN, False)
+
+ tx1 = CTransaction()
+ tx1.vin = [CTxIn(confirmed_utxo)]
+ tx1.vout = [CTxOut(1.0*COIN, CScript([b'a']))]
+ tx1_hex = txToHex(tx1)
+ tx1_txid = self.nodes[0].sendrawtransaction(tx1_hex, True)
+
+ tx2 = CTransaction()
+ tx2.vin = [CTxIn(confirmed_utxo), CTxIn(unconfirmed_utxo)]
+ tx2.vout = tx1.vout
+ tx2_hex = txToHex(tx2)
+
+ try:
+ tx2_txid = self.nodes[0].sendrawtransaction(tx2_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ else:
+ assert(False)
+
+ def test_too_many_replacements(self):
+ """Replacements that evict too many transactions are rejected"""
+ # Try directly replacing more than MAX_REPLACEMENT_LIMIT
+ # transactions
+
+ # Start by creating a single transaction with many outputs
+ initial_nValue = 10*COIN
+ utxo = make_utxo(self.nodes[0], initial_nValue)
+ fee = 0.0001*COIN
+ split_value = int((initial_nValue-fee)/(MAX_REPLACEMENT_LIMIT+1))
+ actual_fee = initial_nValue - split_value*(MAX_REPLACEMENT_LIMIT+1)
+
+ outputs = []
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ outputs.append(CTxOut(split_value, CScript([1])))
+
+ splitting_tx = CTransaction()
+ splitting_tx.vin = [CTxIn(utxo, nSequence=0)]
+ splitting_tx.vout = outputs
+ splitting_tx_hex = txToHex(splitting_tx)
+
+ txid = self.nodes[0].sendrawtransaction(splitting_tx_hex, True)
+ txid = int(txid, 16)
+
+ # Now spend each of those outputs individually
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ tx_i = CTransaction()
+ tx_i.vin = [CTxIn(COutPoint(txid, i), nSequence=0)]
+ tx_i.vout = [CTxOut(split_value-fee, CScript([b'a']))]
+ tx_i_hex = txToHex(tx_i)
+ self.nodes[0].sendrawtransaction(tx_i_hex, True)
+
+ # Now create doublespend of the whole lot; should fail.
+ # Need a big enough fee to cover all spending transactions and have
+ # a higher fee rate
+ double_spend_value = (split_value-100*fee)*(MAX_REPLACEMENT_LIMIT+1)
+ inputs = []
+ for i in range(MAX_REPLACEMENT_LIMIT+1):
+ inputs.append(CTxIn(COutPoint(txid, i), nSequence=0))
+ double_tx = CTransaction()
+ double_tx.vin = inputs
+ double_tx.vout = [CTxOut(double_spend_value, CScript([b'a']))]
+ double_tx_hex = txToHex(double_tx)
+
+ try:
+ self.nodes[0].sendrawtransaction(double_tx_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ assert_equal("too many potential replacements" in exp.error['message'], True)
+ else:
+ assert(False)
+
+ # If we remove an input, it should pass
+ double_tx = CTransaction()
+ double_tx.vin = inputs[0:-1]
+ double_tx.vout = [CTxOut(double_spend_value, CScript([b'a']))]
+ double_tx_hex = txToHex(double_tx)
+ self.nodes[0].sendrawtransaction(double_tx_hex, True)
+
+ def test_opt_in(self):
+ """ Replacing should only work if orig tx opted in """
+ tx0_outpoint = make_utxo(self.nodes[0], 1.1*COIN)
+
+ # Create a non-opting in transaction
+ tx1a = CTransaction()
+ tx1a.vin = [CTxIn(tx0_outpoint, nSequence=0xffffffff)]
+ tx1a.vout = [CTxOut(1*COIN, CScript([b'a']))]
+ tx1a_hex = txToHex(tx1a)
+ tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)
+
+ # Shouldn't be able to double-spend
+ tx1b = CTransaction()
+ tx1b.vin = [CTxIn(tx0_outpoint, nSequence=0)]
+ tx1b.vout = [CTxOut(0.9*COIN, CScript([b'b']))]
+ tx1b_hex = txToHex(tx1b)
+
+ try:
+ tx1b_txid = self.nodes[0].sendrawtransaction(tx1b_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ else:
+ print tx1b_txid
+ assert(False)
+
+ tx1_outpoint = make_utxo(self.nodes[0], 1.1*COIN)
+
+ # Create a different non-opting in transaction
+ tx2a = CTransaction()
+ tx2a.vin = [CTxIn(tx1_outpoint, nSequence=0xfffffffe)]
+ tx2a.vout = [CTxOut(1*COIN, CScript([b'a']))]
+ tx2a_hex = txToHex(tx2a)
+ tx2a_txid = self.nodes[0].sendrawtransaction(tx2a_hex, True)
+
+ # Still shouldn't be able to double-spend
+ tx2b = CTransaction()
+ tx2b.vin = [CTxIn(tx1_outpoint, nSequence=0)]
+ tx2b.vout = [CTxOut(0.9*COIN, CScript([b'b']))]
+ tx2b_hex = txToHex(tx2b)
+
+ try:
+ tx2b_txid = self.nodes[0].sendrawtransaction(tx2b_hex, True)
+ except JSONRPCException as exp:
+ assert_equal(exp.error['code'], -26)
+ else:
+ assert(False)
+
+ # Now create a new transaction that spends from tx1a and tx2a
+ # opt-in on one of the inputs
+ # Transaction should be replaceable on either input
+
+ tx1a_txid = int(tx1a_txid, 16)
+ tx2a_txid = int(tx2a_txid, 16)
+
+ tx3a = CTransaction()
+ tx3a.vin = [CTxIn(COutPoint(tx1a_txid, 0), nSequence=0xffffffff),
+ CTxIn(COutPoint(tx2a_txid, 0), nSequence=0xfffffffd)]
+ tx3a.vout = [CTxOut(0.9*COIN, CScript([b'c'])), CTxOut(0.9*COIN, CScript([b'd']))]
+ tx3a_hex = txToHex(tx3a)
+
+ self.nodes[0].sendrawtransaction(tx3a_hex, True)
+
+ tx3b = CTransaction()
+ tx3b.vin = [CTxIn(COutPoint(tx1a_txid, 0), nSequence=0)]
+ tx3b.vout = [CTxOut(0.5*COIN, CScript([b'e']))]
+ tx3b_hex = txToHex(tx3b)
+
+ tx3c = CTransaction()
+ tx3c.vin = [CTxIn(COutPoint(tx2a_txid, 0), nSequence=0)]
+ tx3c.vout = [CTxOut(0.5*COIN, CScript([b'f']))]
+ tx3c_hex = txToHex(tx3c)
+
+ self.nodes[0].sendrawtransaction(tx3b_hex, True)
+ # If tx3b was accepted, tx3c won't look like a replacement,
+ # but make sure it is accepted anyway
+ self.nodes[0].sendrawtransaction(tx3c_hex, True)
+
+if __name__ == '__main__':
+ ReplaceByFeeTest().main()
diff --git a/qa/rpc-tests/script_test.py b/qa/rpc-tests/script_test.py
deleted file mode 100755
index afc44b51b5..0000000000
--- a/qa/rpc-tests/script_test.py
+++ /dev/null
@@ -1,259 +0,0 @@
-#!/usr/bin/env python2
-#
-# Distributed under the MIT/X11 software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#
-
-'''
-Test notes:
-This test uses the script_valid and script_invalid tests from the unittest
-framework to do end-to-end testing where we compare that two nodes agree on
-whether blocks containing a given test script are valid.
-
-We generally ignore the script flags associated with each test (since we lack
-the precision to test each script using those flags in this framework), but
-for tests with SCRIPT_VERIFY_P2SH, we can use a block time after the BIP16
-switchover date to try to test with that flag enabled (and for tests without
-that flag, we use a block time before the switchover date).
-
-NOTE: This test is very slow and may take more than 40 minutes to run.
-'''
-
-from test_framework.test_framework import ComparisonTestFramework
-from test_framework.util import *
-from test_framework.comptool import TestInstance, TestManager
-from test_framework.mininode import *
-from test_framework.blocktools import *
-from test_framework.script import *
-import logging
-import copy
-import json
-
-script_valid_file = "../../src/test/data/script_valid.json"
-script_invalid_file = "../../src/test/data/script_invalid.json"
-
-# Pass in a set of json files to open.
-class ScriptTestFile(object):
-
- def __init__(self, files):
- self.files = files
- self.index = -1
- self.data = []
-
- def load_files(self):
- for f in self.files:
- self.data.extend(json.loads(open(os.path.dirname(os.path.abspath(__file__))+"/"+f).read()))
-
- # Skip over records that are not long enough to be tests
- def get_records(self):
- while (self.index < len(self.data)):
- if len(self.data[self.index]) >= 3:
- yield self.data[self.index]
- self.index += 1
-
-
-# Helper for parsing the flags specified in the .json files
-SCRIPT_VERIFY_NONE = 0
-SCRIPT_VERIFY_P2SH = 1
-SCRIPT_VERIFY_STRICTENC = 1 << 1
-SCRIPT_VERIFY_DERSIG = 1 << 2
-SCRIPT_VERIFY_LOW_S = 1 << 3
-SCRIPT_VERIFY_NULLDUMMY = 1 << 4
-SCRIPT_VERIFY_SIGPUSHONLY = 1 << 5
-SCRIPT_VERIFY_MINIMALDATA = 1 << 6
-SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = 1 << 7
-SCRIPT_VERIFY_CLEANSTACK = 1 << 8
-
-flag_map = {
- "": SCRIPT_VERIFY_NONE,
- "NONE": SCRIPT_VERIFY_NONE,
- "P2SH": SCRIPT_VERIFY_P2SH,
- "STRICTENC": SCRIPT_VERIFY_STRICTENC,
- "DERSIG": SCRIPT_VERIFY_DERSIG,
- "LOW_S": SCRIPT_VERIFY_LOW_S,
- "NULLDUMMY": SCRIPT_VERIFY_NULLDUMMY,
- "SIGPUSHONLY": SCRIPT_VERIFY_SIGPUSHONLY,
- "MINIMALDATA": SCRIPT_VERIFY_MINIMALDATA,
- "DISCOURAGE_UPGRADABLE_NOPS": SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS,
- "CLEANSTACK": SCRIPT_VERIFY_CLEANSTACK,
-}
-
-def ParseScriptFlags(flag_string):
- flags = 0
- for x in flag_string.split(","):
- if x in flag_map:
- flags |= flag_map[x]
- else:
- print "Error: unrecognized script flag: ", x
- return flags
-
-'''
-Given a string that is a scriptsig or scriptpubkey from the .json files above,
-convert it to a CScript()
-'''
-# Replicates behavior from core_read.cpp
-def ParseScript(json_script):
- script = json_script.split(" ")
- parsed_script = CScript()
- for x in script:
- if len(x) == 0:
- # Empty string, ignore.
- pass
- elif x.isdigit() or (len(x) >= 1 and x[0] == "-" and x[1:].isdigit()):
- # Number
- n = int(x, 0)
- if (n == -1) or (n >= 1 and n <= 16):
- parsed_script = CScript(bytes(parsed_script) + bytes(CScript([n])))
- else:
- parsed_script += CScriptNum(int(x, 0))
- elif x.startswith("0x"):
- # Raw hex data, inserted NOT pushed onto stack:
- for i in xrange(2, len(x), 2):
- parsed_script = CScript(bytes(parsed_script) + bytes(chr(int(x[i:i+2],16))))
- elif x.startswith("'") and x.endswith("'") and len(x) >= 2:
- # Single-quoted string, pushed as data.
- parsed_script += CScript([x[1:-1]])
- else:
- # opcode, e.g. OP_ADD or ADD:
- tryopname = "OP_" + x
- if tryopname in OPCODES_BY_NAME:
- parsed_script += CScriptOp(OPCODES_BY_NAME["OP_" + x])
- else:
- print "ParseScript: error parsing '%s'" % x
- return ""
- return parsed_script
-
-class TestBuilder(object):
- def create_credit_tx(self, scriptPubKey, height):
- # self.tx1 is a coinbase transaction, modeled after the one created by script_tests.cpp
- # This allows us to reuse signatures created in the unit test framework.
- self.tx1 = create_coinbase(height) # this has a bip34 scriptsig,
- self.tx1.vin[0].scriptSig = CScript([0, 0]) # but this matches the unit tests
- self.tx1.vout[0].nValue = 0
- self.tx1.vout[0].scriptPubKey = scriptPubKey
- self.tx1.rehash()
- def create_spend_tx(self, scriptSig):
- self.tx2 = create_transaction(self.tx1, 0, CScript(), 0)
- self.tx2.vin[0].scriptSig = scriptSig
- self.tx2.vout[0].scriptPubKey = CScript()
- self.tx2.rehash()
- def rehash(self):
- self.tx1.rehash()
- self.tx2.rehash()
-
-# This test uses the (default) two nodes provided by ComparisonTestFramework,
-# specified on the command line with --testbinary and --refbinary.
-# See comptool.py
-class ScriptTest(ComparisonTestFramework):
-
- def run_test(self):
- # Set up the comparison tool TestManager
- test = TestManager(self, self.options.tmpdir)
- test.add_all_connections(self.nodes)
-
- # Load scripts
- self.scripts = ScriptTestFile([script_valid_file, script_invalid_file])
- self.scripts.load_files()
-
- # Some variables we re-use between test instances (to build blocks)
- self.tip = None
- self.block_time = None
-
- NetworkThread().start() # Start up network handling in another thread
- test.run()
-
- def generate_test_instance(self, pubkeystring, scriptsigstring):
- scriptpubkey = ParseScript(pubkeystring)
- scriptsig = ParseScript(scriptsigstring)
-
- test = TestInstance(sync_every_block=False)
- test_build = TestBuilder()
- test_build.create_credit_tx(scriptpubkey, self.height)
- test_build.create_spend_tx(scriptsig)
- test_build.rehash()
-
- block = create_block(self.tip, test_build.tx1, self.block_time)
- self.block_time += 1
- block.solve()
- self.tip = block.sha256
- self.height += 1
- test.blocks_and_transactions = [[block, True]]
-
- for i in xrange(100):
- block = create_block(self.tip, create_coinbase(self.height), self.block_time)
- self.block_time += 1
- block.solve()
- self.tip = block.sha256
- self.height += 1
- test.blocks_and_transactions.append([block, True])
-
- block = create_block(self.tip, create_coinbase(self.height), self.block_time)
- self.block_time += 1
- block.vtx.append(test_build.tx2)
- block.hashMerkleRoot = block.calc_merkle_root()
- block.rehash()
- block.solve()
- test.blocks_and_transactions.append([block, None])
- return test
-
- # This generates the tests for TestManager.
- def get_tests(self):
- self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0)
- self.block_time = 1333230000 # before the BIP16 switchover
- self.height = 1
-
- '''
- Create a new block with an anyone-can-spend coinbase
- '''
- block = create_block(self.tip, create_coinbase(self.height), self.block_time)
- self.block_time += 1
- block.solve()
- self.tip = block.sha256
- self.height += 1
- yield TestInstance(objects=[[block, True]])
-
- '''
- Build out to 100 blocks total, maturing the coinbase.
- '''
- test = TestInstance(objects=[], sync_every_block=False, sync_every_tx=False)
- for i in xrange(100):
- b = create_block(self.tip, create_coinbase(self.height), self.block_time)
- b.solve()
- test.blocks_and_transactions.append([b, True])
- self.tip = b.sha256
- self.block_time += 1
- self.height += 1
- yield test
-
- ''' Iterate through script tests. '''
- counter = 0
- for script_test in self.scripts.get_records():
- ''' Reset the blockchain to genesis block + 100 blocks. '''
- if self.nodes[0].getblockcount() > 101:
- self.nodes[0].invalidateblock(self.nodes[0].getblockhash(102))
- self.nodes[1].invalidateblock(self.nodes[1].getblockhash(102))
-
- self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0)
- self.height = 102
-
- [scriptsig, scriptpubkey, flags] = script_test[0:3]
- flags = ParseScriptFlags(flags)
-
- # We can use block time to determine whether the nodes should be
- # enforcing BIP16.
- #
- # We intentionally let the block time grow by 1 each time.
- # This forces the block hashes to differ between tests, so that
- # a call to invalidateblock doesn't interfere with a later test.
- if (flags & SCRIPT_VERIFY_P2SH):
- self.block_time = 1333238400 + counter # Advance to enforcing BIP16
- else:
- self.block_time = 1333230000 + counter # Before the BIP16 switchover
-
- print "Script test: [%s]" % script_test
-
- yield self.generate_test_instance(scriptpubkey, scriptsig)
- counter += 1
-
-if __name__ == '__main__':
- ScriptTest().main()
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index c15c5fda09..ecfffc1b45 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -120,15 +120,26 @@ def check_estimates(node, fees_seen, max_invalid, print_estimates = True):
last_e = e
valid_estimate = False
invalid_estimates = 0
- for e in all_estimates:
+ for i,e in enumerate(all_estimates): # estimate is for i+1
if e >= 0:
valid_estimate = True
+ # estimatesmartfee should return the same result
+ assert_equal(node.estimatesmartfee(i+1)["feerate"], e)
+
else:
invalid_estimates += 1
- # Once we're at a high enough confirmation count that we can give an estimate
- # We should have estimates for all higher confirmation counts
- if valid_estimate and e < 0:
- raise AssertionError("Invalid estimate appears at higher confirm count than valid estimate")
+
+ # estimatesmartfee should still be valid
+ approx_estimate = node.estimatesmartfee(i+1)["feerate"]
+ answer_found = node.estimatesmartfee(i+1)["blocks"]
+ assert(approx_estimate > 0)
+ assert(answer_found > i+1)
+
+ # Once we're at a high enough confirmation count that we can give an estimate
+ # We should have estimates for all higher confirmation counts
+ if valid_estimate:
+ raise AssertionError("Invalid estimate appears at higher confirm count than valid estimate")
+
# Check on the expected number of different confirmation counts
# that we might not have valid estimates for
if invalid_estimates > max_invalid:
@@ -184,13 +195,13 @@ class EstimateFeeTest(BitcoinTestFramework):
# NOTE: the CreateNewBlock code starts counting block size at 1,000 bytes,
# (17k is room enough for 110 or so transactions)
self.nodes.append(start_node(1, self.options.tmpdir,
- ["-blockprioritysize=1500", "-blockmaxsize=18000",
+ ["-blockprioritysize=1500", "-blockmaxsize=17000",
"-maxorphantx=1000", "-relaypriority=0", "-debug=estimatefee"]))
connect_nodes(self.nodes[1], 0)
# Node2 is a stingy miner, that
- # produces too small blocks (room for only 70 or so transactions)
- node2args = ["-blockprioritysize=0", "-blockmaxsize=12000", "-maxorphantx=1000", "-relaypriority=0"]
+ # produces too small blocks (room for only 55 or so transactions)
+ node2args = ["-blockprioritysize=0", "-blockmaxsize=8000", "-maxorphantx=1000", "-relaypriority=0"]
self.nodes.append(start_node(2, self.options.tmpdir, node2args))
connect_nodes(self.nodes[0], 2)
@@ -229,22 +240,19 @@ class EstimateFeeTest(BitcoinTestFramework):
self.fees_per_kb = []
self.memutxo = []
self.confutxo = self.txouts # Start with the set of confirmed txouts after splitting
- print("Checking estimates for 1/2/3/6/15/25 blocks")
- print("Creating transactions and mining them with a huge block size")
- # Create transactions and mine 20 big blocks with node 0 such that the mempool is always emptied
- self.transact_and_mine(30, self.nodes[0])
- check_estimates(self.nodes[1], self.fees_per_kb, 1)
+ print("Will output estimates for 1/2/3/6/15/25 blocks")
- print("Creating transactions and mining them with a block size that can't keep up")
- # Create transactions and mine 30 small blocks with node 2, but create txs faster than we can mine
- self.transact_and_mine(20, self.nodes[2])
- check_estimates(self.nodes[1], self.fees_per_kb, 3)
+ for i in xrange(2):
+ print("Creating transactions and mining them with a block size that can't keep up")
+ # Create transactions and mine 10 small blocks with node 2, but create txs faster than we can mine
+ self.transact_and_mine(10, self.nodes[2])
+ check_estimates(self.nodes[1], self.fees_per_kb, 14)
- print("Creating transactions and mining them at a block size that is just big enough")
- # Generate transactions while mining 40 more blocks, this time with node1
- # which mines blocks with capacity just above the rate that transactions are being created
- self.transact_and_mine(40, self.nodes[1])
- check_estimates(self.nodes[1], self.fees_per_kb, 2)
+ print("Creating transactions and mining them at a block size that is just big enough")
+ # Generate transactions while mining 10 more blocks, this time with node1
+ # which mines blocks with capacity just above the rate that transactions are being created
+ self.transact_and_mine(10, self.nodes[1])
+ check_estimates(self.nodes[1], self.fees_per_kb, 2)
# Finish by mining a normal-sized block:
while len(self.nodes[1].getrawmempool()) > 0:
diff --git a/src/coins.cpp b/src/coins.cpp
index f02949de53..f0ea5c0459 100644
--- a/src/coins.cpp
+++ b/src/coins.cpp
@@ -117,6 +117,15 @@ CCoinsModifier CCoinsViewCache::ModifyCoins(const uint256 &txid) {
return CCoinsModifier(*this, ret.first, cachedCoinUsage);
}
+CCoinsModifier CCoinsViewCache::ModifyNewCoins(const uint256 &txid) {
+ assert(!hasModifier);
+ std::pair<CCoinsMap::iterator, bool> ret = cacheCoins.insert(std::make_pair(txid, CCoinsCacheEntry()));
+ ret.first->second.coins.Clear();
+ ret.first->second.flags = CCoinsCacheEntry::FRESH;
+ ret.first->second.flags |= CCoinsCacheEntry::DIRTY;
+ return CCoinsModifier(*this, ret.first, 0);
+}
+
const CCoins* CCoinsViewCache::AccessCoins(const uint256 &txid) const {
CCoinsMap::const_iterator it = FetchCoins(txid);
if (it == cacheCoins.end()) {
@@ -151,18 +160,23 @@ bool CCoinsViewCache::BatchWrite(CCoinsMap &mapCoins, const uint256 &hashBlockIn
if (it->second.flags & CCoinsCacheEntry::DIRTY) { // Ignore non-dirty entries (optimization).
CCoinsMap::iterator itUs = cacheCoins.find(it->first);
if (itUs == cacheCoins.end()) {
- if (!it->second.coins.IsPruned()) {
- // The parent cache does not have an entry, while the child
- // cache does have (a non-pruned) one. Move the data up, and
- // mark it as fresh (if the grandparent did have it, we
- // would have pulled it in at first GetCoins).
- assert(it->second.flags & CCoinsCacheEntry::FRESH);
+ // The parent cache does not have an entry, while the child does
+ // We can ignore it if it's both FRESH and pruned in the child
+ if (!(it->second.flags & CCoinsCacheEntry::FRESH && it->second.coins.IsPruned())) {
+ // Otherwise we will need to create it in the parent
+ // and move the data up and mark it as dirty
CCoinsCacheEntry& entry = cacheCoins[it->first];
entry.coins.swap(it->second.coins);
cachedCoinsUsage += entry.coins.DynamicMemoryUsage();
- entry.flags = CCoinsCacheEntry::DIRTY | CCoinsCacheEntry::FRESH;
+ entry.flags = CCoinsCacheEntry::DIRTY;
+ // We can mark it FRESH in the parent if it was FRESH in the child
+ // Otherwise it might have just been flushed from the parent's cache
+ // and already exist in the grandparent
+ if (it->second.flags & CCoinsCacheEntry::FRESH)
+ entry.flags |= CCoinsCacheEntry::FRESH;
}
} else {
+ // 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
// modified and being pruned. This means we can just delete
diff --git a/src/coins.h b/src/coins.h
index bf4a777b8a..3b45cb0a34 100644
--- a/src/coins.h
+++ b/src/coins.h
@@ -420,6 +420,17 @@ public:
CCoinsModifier ModifyCoins(const uint256 &txid);
/**
+ * Return a modifiable reference to a CCoins. Assumes that no entry with the given
+ * txid exists and creates a new one. This saves a database access in the case where
+ * the coins were to be wiped out by FromTx anyway. This should not be called with
+ * the 2 historical coinbase duplicate pairs because the new coins are marked fresh, and
+ * in the event the duplicate coinbase was spent before a flush, the now pruned coins
+ * would not properly overwrite the first coinbase of the pair. Simultaneous modifications
+ * are not allowed.
+ */
+ CCoinsModifier ModifyNewCoins(const uint256 &txid);
+
+ /**
* Push the modifications applied to this cache to its base.
* Failure to call this method before destruction will cause the changes to be forgotten.
* If false is returned, the state of this cache (and its backing view) will be undefined.
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 52f5675e85..91518d7c5f 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -487,7 +487,11 @@ void StopHTTPServer()
// master that appears to be solved, so in the future that solution
// could be used again (if desirable).
// (see discussion in https://github.com/bitcoin/bitcoin/pull/6990)
+#if BOOST_VERSION >= 105000
if (!threadHTTP.try_join_for(boost::chrono::milliseconds(2000))) {
+#else
+ if (!threadHTTP.timed_join(boost::posix_time::milliseconds(2000))) {
+#endif
LogPrintf("HTTP event loop did not exit within allotted time, sending loopbreak\n");
event_base_loopbreak(eventBase);
threadHTTP.join();
diff --git a/src/init.cpp b/src/init.cpp
index 3b82dfdc7c..3ae3e44406 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -362,6 +362,9 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-onion=<ip:port>", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy"));
strUsage += HelpMessageOpt("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1));
+ strUsage += HelpMessageOpt("-peerbloomfilters", strprintf(_("Support filtering of blocks and transaction with bloom filters (default: %u)"), 1));
+ if (showDebug)
+ strUsage += HelpMessageOpt("-enforcenodebloom", strprintf("Enforce minimum protocol version to limit use of bloom filters (default: %u)", 0));
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 8333, 18333));
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)"), 1));
@@ -409,9 +412,9 @@ std::string HelpMessage(HelpMessageMode mode)
#if ENABLE_ZMQ
strUsage += HelpMessageGroup(_("ZeroMQ notification options:"));
strUsage += HelpMessageOpt("-zmqpubhashblock=<address>", _("Enable publish hash block in <address>"));
- strUsage += HelpMessageOpt("-zmqpubhashtransaction=<address>", _("Enable publish hash transaction in <address>"));
+ strUsage += HelpMessageOpt("-zmqpubhashtx=<address>", _("Enable publish hash transaction in <address>"));
strUsage += HelpMessageOpt("-zmqpubrawblock=<address>", _("Enable publish raw block in <address>"));
- strUsage += HelpMessageOpt("-zmqpubrawtransaction=<address>", _("Enable publish raw transaction in <address>"));
+ strUsage += HelpMessageOpt("-zmqpubrawtx=<address>", _("Enable publish raw transaction in <address>"));
#endif
strUsage += HelpMessageGroup(_("Debugging/Testing options:"));
@@ -434,7 +437,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT));
strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT));
}
- string debugCategories = "addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, mempoolrej, net, proxy, prune, http, libevent"; // Don't translate these and qt below
+ string debugCategories = "addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, mempoolrej, net, proxy, prune, http, libevent, zmq"; // Don't translate these and qt below
if (mode == HMM_BITCOIN_QT)
debugCategories += ", qt";
strUsage += HelpMessageOpt("-debug=<category>", strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + ". " +
@@ -501,6 +504,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-min", _("Start minimized"));
strUsage += HelpMessageOpt("-rootcertificates=<file>", _("Set SSL root certificates for payment request (default: -system-)"));
strUsage += HelpMessageOpt("-splash", _("Show splash screen on startup (default: 1)"));
+ strUsage += HelpMessageOpt("-resetguisettings", _("Reset all settings changes made over the GUI"));
if (showDebug) {
strUsage += HelpMessageOpt("-uiplatform", "Select platform to customize UI for (one of windows, macosx, other; default: platform compiled on)");
}
@@ -831,7 +835,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__);
#endif
}
-
+
// 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);
@@ -876,11 +880,11 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
fCheckBlockIndex = GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
fCheckpointsEnabled = GetBoolArg("-checkpoints", true);
- // -mempoollimit limits
- int64_t nMempoolSizeLimit = GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000;
- int64_t nMempoolDescendantSizeLimit = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000;
- if (nMempoolSizeLimit < 0 || nMempoolSizeLimit < nMempoolDescendantSizeLimit * 40)
- return InitError(strprintf(_("-maxmempool must be at least %d MB"), GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) / 25));
+ // 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 / 1000.0)));
// -par=0 means autodetect, but nScriptCheckThreads==0 means no concurrency
nScriptCheckThreads = GetArg("-par", DEFAULT_SCRIPTCHECK_THREADS);
diff --git a/src/main.cpp b/src/main.cpp
index 4d88078f41..ceb5cb66f3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -670,10 +670,11 @@ bool CheckFinalTx(const CTransaction &tx, int flags)
// IsFinalTx() with one more than chainActive.Height().
const int nBlockHeight = chainActive.Height() + 1;
- // Timestamps on the other hand don't get any special treatment,
- // because we can't know what timestamp the next block will have,
- // and there aren't timestamp applications where it matters.
- // However this changes once median past time-locks are enforced:
+ // BIP113 will require that time-locked transactions have nLockTime set to
+ // less than the median time of the previous block they're contained in.
+ // When the next block is created its previous block will be the current
+ // chain tip, so we use that to calculate the median time passed to
+ // IsFinalTx() if LOCKTIME_MEDIAN_TIME_PAST is set.
const int64_t nBlockTime = (flags & LOCKTIME_MEDIAN_TIME_PAST)
? chainActive.Tip()->GetMedianTimePast()
: GetAdjustedTime();
@@ -831,15 +832,42 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return state.Invalid(false, REJECT_ALREADY_KNOWN, "txn-already-in-mempool");
// Check for conflicts with in-memory transactions
+ set<uint256> setConflicts;
{
LOCK(pool.cs); // protect pool.mapNextTx
- for (unsigned int i = 0; i < tx.vin.size(); i++)
+ BOOST_FOREACH(const CTxIn &txin, tx.vin)
{
- COutPoint outpoint = tx.vin[i].prevout;
- if (pool.mapNextTx.count(outpoint))
+ if (pool.mapNextTx.count(txin.prevout))
{
- // Disable replacement feature for now
- return state.Invalid(false, REJECT_CONFLICT, "txn-mempool-conflict");
+ const CTransaction *ptxConflicting = pool.mapNextTx[txin.prevout].ptx;
+ if (!setConflicts.count(ptxConflicting->GetHash()))
+ {
+ // Allow opt-out of transaction replacement by setting
+ // nSequence >= maxint-1 on all inputs.
+ //
+ // maxint-1 is picked to still allow use of nLockTime by
+ // non-replacable transactions. All inputs rather than just one
+ // is for the sake of multi-party protocols, where we don't
+ // want a single party to be able to disable replacement.
+ //
+ // The opt-out ignores descendants as anyone relying on
+ // first-seen mempool behavior should be checking all
+ // unconfirmed ancestors anyway; doing otherwise is hopelessly
+ // insecure.
+ bool fReplacementOptOut = true;
+ BOOST_FOREACH(const CTxIn &txin, ptxConflicting->vin)
+ {
+ if (txin.nSequence < std::numeric_limits<unsigned int>::max()-1)
+ {
+ fReplacementOptOut = false;
+ break;
+ }
+ }
+ if (fReplacementOptOut)
+ return state.Invalid(false, REJECT_CONFLICT, "txn-mempool-conflict");
+
+ setConflicts.insert(ptxConflicting->GetHash());
+ }
}
}
}
@@ -957,6 +985,160 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
return state.DoS(0, false, REJECT_NONSTANDARD, "too-long-mempool-chain", false, errString);
}
+ // A transaction that spends outputs that would be replaced by it is invalid. Now
+ // that we have the set of all ancestors we can detect this
+ // pathological case by making sure setConflicts and setAncestors don't
+ // intersect.
+ BOOST_FOREACH(CTxMemPool::txiter ancestorIt, setAncestors)
+ {
+ const uint256 &hashAncestor = ancestorIt->GetTx().GetHash();
+ if (setConflicts.count(hashAncestor))
+ {
+ return state.DoS(10, error("AcceptToMemoryPool: %s spends conflicting transaction %s",
+ hash.ToString(),
+ hashAncestor.ToString()),
+ REJECT_INVALID, "bad-txns-spends-conflicting-tx");
+ }
+ }
+
+ // Check if it's economically rational to mine this transaction rather
+ // than the ones it replaces.
+ CAmount nConflictingFees = 0;
+ size_t nConflictingSize = 0;
+ uint64_t nConflictingCount = 0;
+ CTxMemPool::setEntries allConflicting;
+
+ // If we don't hold the lock allConflicting might be incomplete; the
+ // subsequent RemoveStaged() and addUnchecked() calls don't guarantee
+ // mempool consistency for us.
+ LOCK(pool.cs);
+ if (setConflicts.size())
+ {
+ CFeeRate newFeeRate(nFees, nSize);
+ set<uint256> setConflictsParents;
+ const int maxDescendantsToVisit = 100;
+ CTxMemPool::setEntries setIterConflicting;
+ BOOST_FOREACH(const uint256 &hashConflicting, setConflicts)
+ {
+ CTxMemPool::txiter mi = pool.mapTx.find(hashConflicting);
+ if (mi == pool.mapTx.end())
+ continue;
+
+ // Save these to avoid repeated lookups
+ setIterConflicting.insert(mi);
+
+ // If this entry is "dirty", then we don't have descendant
+ // state for this transaction, which means we probably have
+ // lots of in-mempool descendants.
+ // Don't allow replacements of dirty transactions, to ensure
+ // that we don't spend too much time walking descendants.
+ // This should be rare.
+ if (mi->IsDirty()) {
+ return state.DoS(0,
+ error("AcceptToMemoryPool: rejecting replacement %s; cannot replace tx %s with untracked descendants",
+ hash.ToString(),
+ mi->GetTx().GetHash().ToString()),
+ REJECT_NONSTANDARD, "too many potential replacements");
+ }
+
+ // Don't allow the replacement to reduce the feerate of the
+ // mempool.
+ //
+ // We usually don't want to accept replacements with lower
+ // feerates than what they replaced as that would lower the
+ // feerate of the next block. Requiring that the feerate always
+ // be increased is also an easy-to-reason about way to prevent
+ // DoS attacks via replacements.
+ //
+ // The mining code doesn't (currently) take children into
+ // account (CPFP) so we only consider the feerates of
+ // transactions being directly replaced, not their indirect
+ // descendants. While that does mean high feerate children are
+ // ignored when deciding whether or not to replace, we do
+ // require the replacement to pay more overall fees too,
+ // mitigating most cases.
+ CFeeRate oldFeeRate(mi->GetFee(), mi->GetTxSize());
+ if (newFeeRate <= oldFeeRate)
+ {
+ return state.DoS(0,
+ error("AcceptToMemoryPool: rejecting replacement %s; new feerate %s <= old feerate %s",
+ hash.ToString(),
+ newFeeRate.ToString(),
+ oldFeeRate.ToString()),
+ REJECT_INSUFFICIENTFEE, "insufficient fee");
+ }
+
+ BOOST_FOREACH(const CTxIn &txin, mi->GetTx().vin)
+ {
+ setConflictsParents.insert(txin.prevout.hash);
+ }
+
+ nConflictingCount += mi->GetCountWithDescendants();
+ }
+ // This potentially overestimates the number of actual descendants
+ // but we just want to be conservative to avoid doing too much
+ // work.
+ if (nConflictingCount <= maxDescendantsToVisit) {
+ // If not too many to replace, then calculate the set of
+ // transactions that would have to be evicted
+ BOOST_FOREACH(CTxMemPool::txiter it, setIterConflicting) {
+ pool.CalculateDescendants(it, allConflicting);
+ }
+ BOOST_FOREACH(CTxMemPool::txiter it, allConflicting) {
+ nConflictingFees += it->GetFee();
+ nConflictingSize += it->GetTxSize();
+ }
+ } else {
+ return state.DoS(0,
+ error("AcceptToMemoryPool: rejecting replacement %s; too many potential replacements (%d > %d)\n",
+ hash.ToString(),
+ nConflictingCount,
+ maxDescendantsToVisit),
+ REJECT_NONSTANDARD, "too many potential replacements");
+ }
+
+ for (unsigned int j = 0; j < tx.vin.size(); j++)
+ {
+ // We don't want to accept replacements that require low
+ // feerate junk to be mined first. Ideally we'd keep track of
+ // the ancestor feerates and make the decision based on that,
+ // but for now requiring all new inputs to be confirmed works.
+ if (!setConflictsParents.count(tx.vin[j].prevout.hash))
+ {
+ // Rather than check the UTXO set - potentially expensive -
+ // it's cheaper to just check if the new input refers to a
+ // tx that's in the mempool.
+ if (pool.mapTx.find(tx.vin[j].prevout.hash) != pool.mapTx.end())
+ return state.DoS(0, error("AcceptToMemoryPool: replacement %s adds unconfirmed input, idx %d",
+ hash.ToString(), j),
+ REJECT_NONSTANDARD, "replacement-adds-unconfirmed");
+ }
+ }
+
+ // The replacement must pay greater fees than the transactions it
+ // replaces - if we did the bandwidth used by those conflicting
+ // transactions would not be paid for.
+ if (nFees < nConflictingFees)
+ {
+ return state.DoS(0, error("AcceptToMemoryPool: rejecting replacement %s, less fees than conflicting txs; %s < %s",
+ hash.ToString(), FormatMoney(nFees), FormatMoney(nConflictingFees)),
+ REJECT_INSUFFICIENTFEE, "insufficient fee");
+ }
+
+ // Finally in addition to paying more fees than the conflicts the
+ // new transaction must pay for its own bandwidth.
+ CAmount nDeltaFees = nFees - nConflictingFees;
+ if (nDeltaFees < ::minRelayTxFee.GetFee(nSize))
+ {
+ return state.DoS(0,
+ error("AcceptToMemoryPool: rejecting replacement %s, not enough additional fees to relay; %s < %s",
+ hash.ToString(),
+ FormatMoney(nDeltaFees),
+ FormatMoney(::minRelayTxFee.GetFee(nSize))),
+ REJECT_INSUFFICIENTFEE, "insufficient fee");
+ }
+ }
+
// Check against previous transactions
// This is done last to help prevent CPU exhaustion denial-of-service attacks.
if (!CheckInputs(tx, state, view, true, STANDARD_SCRIPT_VERIFY_FLAGS, true))
@@ -977,6 +1159,17 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
__func__, hash.ToString(), FormatStateMessage(state));
}
+ // Remove conflicting transactions from the mempool
+ BOOST_FOREACH(const CTxMemPool::txiter it, allConflicting)
+ {
+ LogPrint("mempool", "replacing tx %s with %s for %s BTC additional fees, %d delta bytes\n",
+ it->GetTx().GetHash().ToString(),
+ hash.ToString(),
+ FormatMoney(nFees - nConflictingFees),
+ (int)nSize - (int)nConflictingSize);
+ }
+ pool.RemoveStaged(allConflicting);
+
// Store transaction in memory
pool.addUnchecked(hash, entry, setAncestors, !IsInitialBlockDownload());
@@ -1310,10 +1503,17 @@ void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCach
undo.nVersion = coins->nVersion;
}
}
+ // add outputs
+ inputs.ModifyNewCoins(tx.GetHash())->FromTx(tx, nHeight);
+ }
+ else {
+ // add outputs for coinbase tx
+ // In this case call the full ModifyCoins which will do a database
+ // lookup to be sure the coins do not already exist otherwise we do not
+ // know whether to mark them fresh or not. We want the duplicate coinbases
+ // before BIP30 to still be properly overwritten.
+ inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight);
}
-
- // add outputs
- inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight);
}
void UpdateCoins(const CTransaction& tx, CValidationState &state, CCoinsViewCache &inputs, int nHeight)
@@ -2580,7 +2780,7 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd
if ((int)nFile != nLastBlockFile) {
if (!fKnown) {
- LogPrintf("Leaving block file %i: %s\n", nFile, vinfoBlockFile[nFile].ToString());
+ LogPrintf("Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString());
}
FlushBlockFile(!fKnown);
nLastBlockFile = nFile;
@@ -3977,6 +4177,19 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
+ if (!(nLocalServices & NODE_BLOOM) &&
+ (strCommand == "filterload" ||
+ strCommand == "filteradd" ||
+ strCommand == "filterclear"))
+ {
+ if (pfrom->nVersion >= NO_BLOOM_VERSION) {
+ Misbehaving(pfrom->GetId(), 100);
+ return false;
+ } else if (GetBoolArg("-enforcenodebloom", false)) {
+ pfrom->fDisconnect = true;
+ return false;
+ }
+ }
if (strCommand == "version")
@@ -4199,6 +4412,12 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
return error("message inv size() = %u", vInv.size());
}
+ bool fBlocksOnly = GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY);
+
+ // Allow whitelisted peers to send data other than blocks in blocks only mode if whitelistalwaysrelay is true
+ if (pfrom->fWhitelisted && GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY))
+ fBlocksOnly = false;
+
LOCK(cs_main);
std::vector<CInv> vToFetch;
@@ -4213,9 +4432,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
bool fAlreadyHave = AlreadyHave(inv);
LogPrint("net", "got inv: %s %s peer=%d\n", inv.ToString(), fAlreadyHave ? "have" : "new", pfrom->id);
- if (!fAlreadyHave && !fImporting && !fReindex && inv.type != MSG_BLOCK && !GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY))
- pfrom->AskFor(inv);
-
if (inv.type == MSG_BLOCK) {
UpdateBlockAvailability(pfrom->GetId(), inv.hash);
if (!fAlreadyHave && !fImporting && !fReindex && !mapBlocksInFlight.count(inv.hash)) {
@@ -4239,6 +4455,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
}
}
+ else
+ {
+ 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)
+ pfrom->AskFor(inv);
+ }
// Track requests for our stuff
GetMainSignals().Inventory(inv.hash);
@@ -4363,6 +4586,14 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
else if (strCommand == "tx")
{
+ // Stop processing the transaction early if
+ // We are in blocks only mode and peer is either not whitelisted or whitelistalwaysrelay is off
+ if (GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && (!pfrom->fWhitelisted || !GetBoolArg("-whitelistalwaysrelay", DEFAULT_WHITELISTALWAYSRELAY)))
+ {
+ LogPrint("net", "transaction sent in violation of protocol peer=%d\n", pfrom->id);
+ return true;
+ }
+
vector<uint256> vWorkQueue;
vector<uint256> vEraseQueue;
CTransaction tx;
@@ -4720,21 +4951,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
}
- else if (!(nLocalServices & NODE_BLOOM) &&
- (strCommand == "filterload" ||
- strCommand == "filteradd" ||
- strCommand == "filterclear") &&
- //TODO: Remove this line after reasonable network upgrade
- pfrom->nVersion >= NO_BLOOM_VERSION)
- {
- if (pfrom->nVersion >= NO_BLOOM_VERSION)
- Misbehaving(pfrom->GetId(), 100);
- //TODO: Enable this after reasonable network upgrade
- //else
- // pfrom->fDisconnect = true;
- }
-
-
else if (strCommand == "filterload")
{
CBloomFilter filter;
diff --git a/src/main.h b/src/main.h
index 35774f3e25..f738e3eb57 100644
--- a/src/main.h
+++ b/src/main.h
@@ -56,8 +56,6 @@ static const unsigned int DEFAULT_ANCESTOR_SIZE_LIMIT = 101;
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 -maxmempool, maximum megabytes of mempool memory usage */
-static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
/** Default for -mempoolexpiry, expiration time for mempool transactions in hours */
static const unsigned int DEFAULT_MEMPOOL_EXPIRY = 72;
/** The maximum size of a blk?????.dat file (since 0.8) */
diff --git a/src/net.cpp b/src/net.cpp
index 000eefc858..cff4c54505 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -617,6 +617,7 @@ void CNode::copyStats(CNodeStats &stats)
{
stats.nodeid = this->GetId();
X(nServices);
+ X(fRelayTxes);
X(nLastSend);
X(nLastRecv);
X(nTimeConnected);
diff --git a/src/net.h b/src/net.h
index ebdbe77565..559cdf0878 100644
--- a/src/net.h
+++ b/src/net.h
@@ -180,6 +180,7 @@ class CNodeStats
public:
NodeId nodeid;
uint64_t nServices;
+ bool fRelayTxes;
int64_t nLastSend;
int64_t nLastRecv;
int64_t nTimeConnected;
diff --git a/src/policy/fees.cpp b/src/policy/fees.cpp
index ffe31d1942..980ecf10df 100644
--- a/src/policy/fees.cpp
+++ b/src/policy/fees.cpp
@@ -4,6 +4,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "policy/fees.h"
+#include "policy/policy.h"
#include "amount.h"
#include "primitives/transaction.h"
@@ -504,6 +505,33 @@ CFeeRate CBlockPolicyEstimator::estimateFee(int confTarget)
return CFeeRate(median);
}
+CFeeRate CBlockPolicyEstimator::estimateSmartFee(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 > feeStats.GetMaxConfirms())
+ return CFeeRate(0);
+
+ double median = -1;
+ while (median < 0 && (unsigned int)confTarget <= feeStats.GetMaxConfirms()) {
+ median = feeStats.EstimateMedianVal(confTarget++, SUFFICIENT_FEETXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
+ }
+
+ if (answerFoundAtTarget)
+ *answerFoundAtTarget = confTarget - 1;
+
+ // If mempool is limiting txs , return at least the min fee from the mempool
+ CAmount minPoolFee = pool.GetMinFee(GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000).GetFeePerK();
+ if (minPoolFee > 0 && minPoolFee > median)
+ return CFeeRate(minPoolFee);
+
+ if (median < 0)
+ return CFeeRate(0);
+
+ return CFeeRate(median);
+}
+
double CBlockPolicyEstimator::estimatePriority(int confTarget)
{
// Return failure if trying to analyze a target we're not tracking
@@ -513,6 +541,30 @@ double CBlockPolicyEstimator::estimatePriority(int confTarget)
return priStats.EstimateMedianVal(confTarget, SUFFICIENT_PRITXS, MIN_SUCCESS_PCT, true, nBestSeenHeight);
}
+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;
+}
+
void CBlockPolicyEstimator::Write(CAutoFile& fileout)
{
fileout << nBestSeenHeight;
diff --git a/src/policy/fees.h b/src/policy/fees.h
index 15577d128a..7a293267d4 100644
--- a/src/policy/fees.h
+++ b/src/policy/fees.h
@@ -15,6 +15,7 @@
class CAutoFile;
class CFeeRate;
class CTxMemPoolEntry;
+class CTxMemPool;
/** \class CBlockPolicyEstimator
* The BlockPolicyEstimator is used for estimating the fee or priority needed
@@ -182,8 +183,8 @@ 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 85% of X fee transactions to be confirmed within Y blocks for X to be big enough */
-static const double MIN_SUCCESS_PCT = .85;
+/** Require greater than 95% of X fee 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 */
@@ -242,9 +243,21 @@ public:
/** Return a fee estimate */
CFeeRate estimateFee(int confTarget);
+ /** Estimate fee rate 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 */
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.
+ */
+ double estimateSmartPriority(int confTarget, int *answerFoundAtTarget, const CTxMemPool& pool);
+
/** Write estimation data to a file */
void Write(CAutoFile& fileout);
diff --git a/src/policy/policy.h b/src/policy/policy.h
index f269e8d476..c8d2c1a924 100644
--- a/src/policy/policy.h
+++ b/src/policy/policy.h
@@ -25,6 +25,8 @@ static const unsigned int MAX_STANDARD_TX_SIZE = 100000;
static const unsigned int MAX_P2SH_SIGOPS = 15;
/** The maximum number of sigops we're willing to relay/mine in a single tx */
static const unsigned int MAX_STANDARD_TX_SIGOPS = MAX_BLOCK_SIGOPS/5;
+/** Default for -maxmempool, maximum megabytes of mempool memory usage */
+static const unsigned int DEFAULT_MAX_MEMPOOL_SIZE = 300;
/**
* Standard script verification flags that standard transactions will comply
* with. However scripts violating these flags may still be present in valid
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index bda8acff15..06a6c239ef 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -202,7 +202,7 @@ public:
void createPaymentServer();
#endif
/// Create options model
- void createOptionsModel();
+ void createOptionsModel(bool resetSettings);
/// Create main window
void createWindow(const NetworkStyle *networkStyle);
/// Create splash screen
@@ -352,9 +352,9 @@ void BitcoinApplication::createPaymentServer()
}
#endif
-void BitcoinApplication::createOptionsModel()
+void BitcoinApplication::createOptionsModel(bool resetSettings)
{
- optionsModel = new OptionsModel();
+ optionsModel = new OptionsModel(NULL, resetSettings);
}
void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
@@ -645,7 +645,7 @@ int main(int argc, char *argv[])
qInstallMessageHandler(DebugMessageHandler);
#endif
// Load GUI settings from QSettings
- app.createOptionsModel();
+ app.createOptionsModel(mapArgs.count("-resetguisettings") != 0);
// Subscribe to global signals from core
uiInterface.InitMessage.connect(InitMessage);
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 01e93d786a..2449046538 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -188,7 +188,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Activating best chain..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Add a node to connect to and attempt to keep the connection open"),
QT_TRANSLATE_NOOP("bitcoin-core", "Allow DNS lookups for -addnode, -seednode and -connect"),
QT_TRANSLATE_NOOP("bitcoin-core", "Always query for peer addresses via DNS lookup (default: %u)"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Always relay transactions received from whitelisted peers (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Attempt to recover private keys from a corrupt wallet.dat on startup"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Automatically create Tor hidden service (default: %d)"),
QT_TRANSLATE_NOOP("bitcoin-core", "Block creation options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -bind address: '%s'"),
@@ -295,6 +297,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "The transaction amount is too small to pay th
QT_TRANSLATE_NOOP("bitcoin-core", "This help message"),
QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
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 too large for fee policy"),
@@ -317,6 +321,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Wallet needed to be rewritten: restart Bitcoi
QT_TRANSLATE_NOOP("bitcoin-core", "Wallet options:"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning"),
QT_TRANSLATE_NOOP("bitcoin-core", "Warning: This version is obsolete; upgrade required!"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Whether to operate in a blocks only mode (default: %u)"),
QT_TRANSLATE_NOOP("bitcoin-core", "You need to rebuild the database using -reindex to change -txindex"),
QT_TRANSLATE_NOOP("bitcoin-core", "Zapping all transactions from wallet..."),
QT_TRANSLATE_NOOP("bitcoin-core", "ZeroMQ notification options:"),
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index 0900a35cc4..566e8fa62d 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -13,6 +13,7 @@
#include "checkpoints.h"
#include "clientversion.h"
#include "net.h"
+#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
@@ -88,6 +89,16 @@ QDateTime ClientModel::getLastBlockDate() const
return QDateTime::fromTime_t(Params().GenesisBlock().GetBlockTime()); // Genesis block's time of current network
}
+long ClientModel::getMempoolSize() const
+{
+ return mempool.size();
+}
+
+size_t ClientModel::getMempoolDynamicUsage() const
+{
+ return mempool.DynamicMemoryUsage();
+}
+
double ClientModel::getVerificationProgress() const
{
LOCK(cs_main);
@@ -122,6 +133,7 @@ void ClientModel::updateTimer()
Q_EMIT numBlocksChanged(newNumBlocks, newBlockDate);
}
+ Q_EMIT mempoolSizeChanged(getMempoolSize(), getMempoolDynamicUsage());
Q_EMIT bytesChanged(getTotalBytesRecv(), getTotalBytesSent());
}
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 627bdf862d..493a759331 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -51,6 +51,11 @@ public:
int getNumConnections(unsigned int flags = CONNECTIONS_ALL) const;
int getNumBlocks() const;
+ //! Return number of transactions in the mempool
+ long getMempoolSize() const;
+ //! Return the dynamic memory usage of the mempool
+ size_t getMempoolDynamicUsage() const;
+
quint64 getTotalBytesRecv() const;
quint64 getTotalBytesSent() const;
@@ -89,6 +94,7 @@ private:
Q_SIGNALS:
void numConnectionsChanged(int count);
void numBlocksChanged(int count, const QDateTime& blockDate);
+ void mempoolSizeChanged(long count, size_t mempoolSizeInBytes);
void alertsChanged(const QString &warnings);
void bytesChanged(quint64 totalBytesIn, quint64 totalBytesOut);
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index 81b2597c3b..cbc41f3416 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -538,7 +538,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
nBytes = nBytesInputs + ((CoinControlDialog::payAmounts.size() > 0 ? CoinControlDialog::payAmounts.size() + 1 : 2) * 34) + 10; // always assume +1 output for change here
// Priority
- double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
+ double mempoolEstimatePriority = mempool.estimateSmartPriority(nTxConfirmTarget);
dPriority = dPriorityInputs / (nBytes - nBytesInputs + (nQuantityUncompressed * 29)); // 29 = 180 - 151 (uncompressed public keys are over the limit. max 151 bytes of the input are ignored for priority)
sPriorityLabel = CoinControlDialog::getPriorityLabel(dPriority, mempoolEstimatePriority);
@@ -550,10 +550,8 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
// Fee
nPayFee = CWallet::GetMinimumFee(nBytes, nTxConfirmTarget, mempool);
- // Allow free?
- double dPriorityNeeded = mempoolEstimatePriority;
- if (dPriorityNeeded <= 0)
- dPriorityNeeded = AllowFreeThreshold(); // not enough data, back to hard-coded
+ // Allow free? (require at least hard-coded threshold and default to that if no estimate)
+ double dPriorityNeeded = std::max(mempoolEstimatePriority, AllowFreeThreshold());
fAllowFree = (dPriority >= dPriorityNeeded);
if (fSendFreeTransactions)
@@ -649,8 +647,9 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
double dFeeVary;
if (payTxFee.GetFeePerK() > 0)
dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), payTxFee.GetFeePerK()) / 1000;
- else
- dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), mempool.estimateFee(nTxConfirmTarget).GetFeePerK()) / 1000;
+ else {
+ dFeeVary = (double)std::max(CWallet::GetRequiredFee(1000), mempool.estimateSmartFee(nTxConfirmTarget).GetFeePerK()) / 1000;
+ }
QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
l3->setToolTip(toolTip4);
@@ -686,7 +685,7 @@ void CoinControlDialog::updateView()
QFlags<Qt::ItemFlag> flgTristate = Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
- double mempoolEstimatePriority = mempool.estimatePriority(nTxConfirmTarget);
+ double mempoolEstimatePriority = mempool.estimateSmartPriority(nTxConfirmTarget);
std::map<QString, std::vector<COutput> > mapCoins;
model->listCoins(mapCoins);
diff --git a/src/qt/forms/debugwindow.ui b/src/qt/forms/debugwindow.ui
index eb02dd80ff..2471470363 100644
--- a/src/qt/forms/debugwindow.ui
+++ b/src/qt/forms/debugwindow.ui
@@ -23,7 +23,7 @@
<attribute name="title">
<string>&amp;Information</string>
</attribute>
- <layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
+ <layout class="QGridLayout" name="gridLayout" columnstretch="0,1,0">
<property name="horizontalSpacing">
<number>12</number>
</property>
@@ -47,7 +47,7 @@
</property>
</widget>
</item>
- <item row="1" column="1">
+ <item row="1" column="1" colspan="2">
<widget class="QLabel" name="clientName">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -70,7 +70,7 @@
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="2" column="1" colspan="2">
<widget class="QLabel" name="clientVersion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -96,7 +96,7 @@
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="3" column="1" colspan="2">
<widget class="QLabel" name="clientUserAgent">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -122,7 +122,7 @@
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="4" column="1" colspan="2">
<widget class="QLabel" name="openSSLVersion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -148,7 +148,7 @@
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="5" column="1" colspan="2">
<widget class="QLabel" name="berkeleyDBVersion">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -171,7 +171,7 @@
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="6" column="1" colspan="2">
<widget class="QLabel" name="buildDate">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -194,7 +194,7 @@
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="7" column="1" colspan="2">
<widget class="QLabel" name="startupTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -210,19 +210,6 @@
</property>
</widget>
</item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_11">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Network</string>
- </property>
- </widget>
- </item>
<item row="9" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
@@ -230,7 +217,7 @@
</property>
</widget>
</item>
- <item row="9" column="1">
+ <item row="9" column="1" colspan="2">
<widget class="QLabel" name="networkName">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -253,7 +240,7 @@
</property>
</widget>
</item>
- <item row="10" column="1">
+ <item row="10" column="1" colspan="2">
<widget class="QLabel" name="numberOfConnections">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -289,7 +276,7 @@
</property>
</widget>
</item>
- <item row="12" column="1">
+ <item row="12" column="1" colspan="2">
<widget class="QLabel" name="numberOfBlocks">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -306,13 +293,13 @@
</widget>
</item>
<item row="13" column="0">
- <widget class="QLabel" name="label_2">
+ <widget class="QLabel" name="labelLastBlockTime">
<property name="text">
<string>Last block time</string>
</property>
</widget>
</item>
- <item row="13" column="1">
+ <item row="13" column="1" colspan="2">
<widget class="QLabel" name="lastBlockTime">
<property name="cursor">
<cursorShape>IBeamCursor</cursorShape>
@@ -329,20 +316,43 @@
</widget>
</item>
<item row="14" column="0">
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <widget class="QLabel" name="labelMempoolTitle">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
</property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
+ <property name="text">
+ <string>Memory Pool</string>
</property>
- </spacer>
+ </widget>
</item>
<item row="15" column="0">
- <widget class="QLabel" name="labelDebugLogfile">
+ <widget class="QLabel" name="labelNumberOfTransactions">
+ <property name="text">
+ <string>Current number of transactions</string>
+ </property>
+ </widget>
+ </item>
+ <item row="15" column="1">
+ <widget class="QLabel" name="mempoolNumberTxs">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>N/A</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="labelNetwork">
<property name="font">
<font>
<weight>75</weight>
@@ -350,24 +360,74 @@
</font>
</property>
<property name="text">
- <string>Debug log file</string>
+ <string>Network</string>
</property>
</widget>
</item>
<item row="16" column="0">
- <widget class="QPushButton" name="openDebugLogfileButton">
- <property name="toolTip">
- <string>Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files.</string>
+ <widget class="QLabel" name="labelMemoryUsage">
+ <property name="text">
+ <string>Memory usage</string>
+ </property>
+ </widget>
+ </item>
+ <item row="16" column="1">
+ <widget class="QLabel" name="mempoolSize">
+ <property name="cursor">
+ <cursorShape>IBeamCursor</cursorShape>
</property>
<property name="text">
- <string>&amp;Open</string>
+ <string>N/A</string>
</property>
- <property name="autoDefault">
- <bool>false</bool>
+ <property name="textFormat">
+ <enum>Qt::PlainText</enum>
+ </property>
+ <property name="textInteractionFlags">
+ <set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
- <item row="17" column="0">
+ <item row="14" column="2" rowspan="3">
+ <layout class="QVBoxLayout" name="verticalLayoutDebugButton">
+ <property name="spacing">
+ <number>3</number>
+ </property>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>10</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="labelDebugLogfile">
+ <property name="text">
+ <string>Debug log file</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="openDebugLogfileButton">
+ <property name="toolTip">
+ <string>Open the Bitcoin Core debug log file from the current data directory. This can take a few seconds for large log files.</string>
+ </property>
+ <property name="text">
+ <string>&amp;Open</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item row="18" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index 845459b76a..6dce9370d7 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -681,7 +681,10 @@ boost::filesystem::path static GetAutostartDir()
boost::filesystem::path static GetAutostartFilePath()
{
- return GetAutostartDir() / "bitcoin.desktop";
+ std::string chain = ChainNameFromCommandLine();
+ if (chain == CBaseChainParams::MAIN)
+ return GetAutostartDir() / "bitcoin.desktop";
+ return GetAutostartDir() / strprintf("bitcoin-%s.lnk", chain);
}
bool GetStartOnSystemStartup()
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index f70196140c..8a54f15791 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -1690,10 +1690,6 @@
<translation>تحذير</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>تحديث المحفظة للنسخة الاخيرة</translation>
- </message>
- <message>
<source>This help message</source>
<translation>رسالة المساعدة هذه</translation>
</message>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 57dd9c3611..c1efc822ec 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -1424,10 +1424,6 @@
<translation>Опцыі гаманца:</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Імпартаванне блокаў з вонкавага blk000??.dat файла</translation>
- </message>
- <message>
<source>Activating best chain...</source>
<translation>Актывацыя лепшага ланцуга...</translation>
</message>
@@ -1480,14 +1476,6 @@
<translation>Выканаць каманду калі лепшы блок зменіцца (%s замяняецца на хэш блока)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Абнавіць гаманец на новы фармат</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Перасканаваць ланцуг блокаў дзеля пошуку адсутных транзакцый</translation>
- </message>
- <message>
<source>Loading addresses...</source>
<translation>Загружаем адрасы...</translation>
</message>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index d2db8a196c..8496a33481 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -168,6 +168,10 @@
<translation>Наистина ли желаете да шифрирате портфейла си?</translation>
</message>
<message>
+ <source>Bitcoin Core 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>Биткоин сега ще се затоври за да завърши процеса на криптиране. Запомнете, че криптирането на вашия портефейл не може напълно да предпази вашите монети от кражба чрез зловреден софтуер, инфектирал вашия компютър</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>
@@ -414,6 +418,10 @@
<translation>%1 зад</translation>
</message>
<message>
+ <source>Last received block was generated %1 ago.</source>
+ <translation>Последния получен блок е генериран преди %1.</translation>
+ </message>
+ <message>
<source>Transactions after this will not yet be visible.</source>
<translation>Транзакции след това няма все още да бъдат видими.</translation>
</message>
@@ -636,6 +644,10 @@
<translation>нищо</translation>
</message>
<message>
+ <source>This label turns red if the transaction size is greater than 1000 bytes.</source>
+ <translation>Този етикет става червен, когато размера на транзакцията е по-голяма от 1000 бита.</translation>
+ </message>
+ <message>
<source>yes</source>
<translation>да</translation>
</message>
@@ -850,6 +862,10 @@
<translation>&amp;Мрежа</translation>
</message>
<message>
+ <source>Automatically start Bitcoin Core after logging in to the system.</source>
+ <translation>Автоматично стартиране на Bitcoin Core след влизане в системата.</translation>
+ </message>
+ <message>
<source>W&amp;allet</source>
<translation>По&amp;ртфейл</translation>
</message>
@@ -1048,10 +1064,22 @@
<translation>Файл за справяне със заявки</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <translation>Заявката за плащане е изтекла.</translation>
+ </message>
+ <message>
+ <source>Invalid payment request.</source>
+ <translation>Невалидна заявка за плащане.</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>
@@ -1236,14 +1264,6 @@
<translation>Получени за последно</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Изпратени байтове</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Получени байтове</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Време за отговор</translation>
</message>
@@ -1332,6 +1352,14 @@
<translation>Изходящи</translation>
</message>
<message>
+ <source>Yes</source>
+ <translation>Да</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Не</translation>
+ </message>
+ <message>
<source>Unknown</source>
<translation>Неизвестен</translation>
</message>
@@ -1536,6 +1564,10 @@
<translation>за килобайт</translation>
</message>
<message>
+ <source>Hide</source>
+ <translation>Скрий</translation>
+ </message>
+ <message>
<source>total at least</source>
<translation>Крайна сума поне</translation>
</message>
@@ -1644,8 +1676,8 @@
<translation>Грешка при създаването на транзакция!</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Платете минималната такса от %1</translation>
+ <source>Payment request expired.</source>
+ <translation>Заявката за плащане е изтекла.</translation>
</message>
<message>
<source>Warning: Invalid Bitcoin address</source>
@@ -1926,6 +1958,10 @@
<translation>собствен адрес</translation>
</message>
<message>
+ <source>watch-only</source>
+ <translation>само гледане</translation>
+ </message>
+ <message>
<source>label</source>
<translation>име</translation>
</message>
@@ -2088,6 +2124,10 @@
<translation>Емитирани</translation>
</message>
<message>
+ <source>watch-only</source>
+ <translation>само гледане</translation>
+ </message>
+ <message>
<source>(n/a)</source>
<translation>(n/a)</translation>
</message>
@@ -2430,22 +2470,10 @@
<translation>Предупреждение</translation>
</message>
<message>
- <source>on startup</source>
- <translation>по време на стартирането</translation>
- </message>
- <message>
<source>Password for JSON-RPC connections</source>
<translation>Парола за JSON-RPC връзките</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Обновяване на портфейла до най-новия формат</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Повторно сканиране на блок-връзка за липсващи портфейлни транзакции</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Това помощно съобщение</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index b9aa40a7e3..dcbe4dc4cb 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1494,14 +1494,6 @@
<translation>Darrera recepció</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes enviats</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes rebuts</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Temps de ping</translation>
</message>
@@ -2010,10 +2002,6 @@
<translation><numerusform>Estimat per començar la confirmació en %n bloc.</numerusform><numerusform>Estimat per començar la confirmació en %n blocs.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Paga només la comissió mínima de %1</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>
@@ -2860,10 +2848,6 @@
<translation>&lt;category&gt; pot ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opcions de la creació de blocs:</translation>
</message>
@@ -2984,10 +2968,6 @@
<translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa blocs de un fitxer blk000??.dat extern</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>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar aquesta opció moltes vegades</translation>
</message>
@@ -3236,10 +3216,6 @@
<translation>Se suprimeixen totes les transaccions del moneder...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>a l'inici de l'aplicació</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
</message>
@@ -3252,14 +3228,6 @@
<translation>Executa l'ordre quan el millor bloc canviï (%s en cmd es reemplaça per un resum de bloc)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualitza el moneder a l'últim format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Aquest misatge d'ajuda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index edb14dedba..e717f53d47 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1490,14 +1490,6 @@
<translation>Darrera recepció</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes enviats</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes rebuts</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Temps de ping</translation>
</message>
@@ -2006,10 +1998,6 @@
<translation><numerusform>Estimat per començar la confirmació en %n bloc.</numerusform><numerusform>Estimat per començar la confirmació en %n blocs.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Paga només la comissió mínima de %1</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>
@@ -2856,10 +2844,6 @@
<translation>&lt;category&gt; pot ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opcions de la creació de blocs:</translation>
</message>
@@ -2980,10 +2964,6 @@
<translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa blocs d'un fitxer blk000??.dat extern</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>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar esta opció moltes vegades</translation>
</message>
@@ -3232,10 +3212,6 @@
<translation>Se suprimeixen totes les transaccions del moneder...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>a l'inici de l'aplicació</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
</message>
@@ -3248,14 +3224,6 @@
<translation>Executa l'orde quan el millor bloc canvie (%s en cmd es reemplaça per un resum de bloc)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualitza el moneder a l'últim format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Este misatge d'ajuda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index f10a41163e..331ad835f6 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1494,14 +1494,6 @@
<translation>Darrera recepció</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes enviats</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes rebuts</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Temps de ping</translation>
</message>
@@ -2010,10 +2002,6 @@
<translation><numerusform>Estimat per començar la confirmació en %n bloc.</numerusform><numerusform>Estimat per començar la confirmació en %n blocs.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Paga només la comissió mínima de %1</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>
@@ -2860,10 +2848,6 @@
<translation>&lt;category&gt; pot ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Intenta recuperar les claus privades d'un fitxer wallet.dat corrupte</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opcions de la creació de blocs:</translation>
</message>
@@ -2984,10 +2968,6 @@
<translation>Cal que reconstruïu la base de dades fent servir -reindex per canviar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa blocs de un fitxer blk000??.dat extern</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>Permet les connexions JSON-RPC d'una font específica. Vàlid per a &lt;ip&gt; són una IP individual (p. ex., 1.2.3.4), una xarxa / màscara de xarxa (p. ex., 1.2.3.4/255.255.255.0) o una xarxa/CIDR (p. ex., 1.2.3.4/24). Es pot especificar aquesta opció moltes vegades</translation>
</message>
@@ -3236,10 +3216,6 @@
<translation>Se suprimeixen totes les transaccions del moneder...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>a l'inici de l'aplicació</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>El fitxer wallet.data és corrupte. El rescat de les dades ha fallat</translation>
</message>
@@ -3252,14 +3228,6 @@
<translation>Executa l'ordre quan el millor bloc canviï (%s en cmd es reemplaça per un resum de bloc)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualitza el moneder a l'últim format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Reescaneja la cadena de blocs en les transaccions de moneder perdudes</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Aquest misatge d'ajuda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index c8c3368543..a2232dbe8e 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1494,14 +1494,6 @@
<translation>Poslední příjem</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bajtů odesláno</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bajtů přijato</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Odezva</translation>
</message>
@@ -2010,10 +2002,6 @@
<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>Pay only the minimum fee of %1</source>
- <translation>Zaplatit pouze minimální poplatek %1</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>
@@ -2860,10 +2848,6 @@
<translation>&lt;category&gt; může být:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Pokusit se zachránit soukromé klíče z poškozeného souboru wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Možnosti vytváření bloku:</translation>
</message>
@@ -2984,10 +2968,6 @@
<translation>Je třeba přestavět databázi použitím -reindex, aby bylo možné změnit -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importovat bloky z externího souboru blk000??.dat</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>Povolit JSON-RPC spojení ze specifikovaného zdroje. Platnou hodnotou &lt;ip&gt; je jednotlivá IP adresa (např. 1.2.3.4), síť/maska (např. 1.2.3.4/255.255.255.0) nebo síť/CIDR (např. 1.2.3.4/24). Tuto volbu lze použít i vícekrát</translation>
</message>
@@ -3236,10 +3216,6 @@
<translation>Vymazat všechny transakce z peněženky...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>při startu</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>Soubor wallet.dat je poškozen, jeho záchrana se nezdařila</translation>
</message>
@@ -3252,14 +3228,6 @@
<translation>Spustit příkaz, když se změní nejlepší blok (%s se v příkazu nahradí hashem bloku)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Převést peněženku na nejnovější formát</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Přeskenovat řetězec bloků na chybějící transakce tvé pěněženky</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Tato nápověda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 46d9826045..93594dcb05 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1129,7 +1129,7 @@
</message>
<message>
<source>&amp;Unit to show amounts in:</source>
- <translation>&amp;Enhed at vise beløb i:</translation>
+ <translation>&amp;Enhed, som beløb vises i:</translation>
</message>
<message>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
@@ -1141,7 +1141,7 @@
</message>
<message>
<source>&amp;OK</source>
- <translation>&amp;O.k.</translation>
+ <translation>&amp;Ok</translation>
</message>
<message>
<source>&amp;Cancel</source>
@@ -1200,7 +1200,7 @@
</message>
<message>
<source>Pending:</source>
- <translation>Uafgjort:</translation>
+ <translation>Afventende:</translation>
</message>
<message>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
@@ -1546,14 +1546,6 @@
<translation>Seneste modtagelse</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Byte sendt</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Byte modtaget</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping-tid</translation>
</message>
@@ -2066,6 +2058,10 @@
<translation>Kopiér byttepenge</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>Totalbeløb %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>eller</translation>
</message>
@@ -2097,19 +2093,15 @@
<source>Payment request expired.</source>
<translation>Betalingsanmodning er udløbet.</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 estimeres til at begynde inden for %n blok.</numerusform><numerusform>Bekræftelse estimeres til at begynde inden for %n blokke.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Betal kun det minimale gebyr på %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Totalbeløb %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Modtageradressen er ikke gyldig. Tjek venligst igen.</translation>
</message>
@@ -2888,10 +2880,6 @@
<translation>Acceptér kommandolinje- og JSON-RPC-kommandoer</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>Gebyrer (i %s/kB) mindre end dette opfattes som nul-gebyr under videresendelse (standard: %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>
@@ -3016,10 +3004,6 @@
<translation>&lt;kategori&gt; kan være:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Forsøg at genskabe private nøgler fra ødelagt wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blokoprettelsestilvalg:</translation>
</message>
@@ -3176,10 +3160,6 @@
<translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex for at ændre -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importerer blokke fra ekstern blk000??.dat fil</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>Tillad JSON-RPC-forbindelser fra angivet kilde. Gyldig for &lt;ip&gt; er en enkelt IP (fx 1.2.3.4), et netværk/netmaske (fx 1.2.3.4/255.255.255.0) eller et netværk/CIDR (fx 1.2.3.4/24). Dette tilvalg kan angives flere gange</translation>
</message>
@@ -3212,6 +3192,10 @@
<translation>Udfør kommando, når en relevant alarm modtages eller vi ser en virkelig lang udsplitning (%s i cmd erstattes af besked)</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>Gebyrer (i %s/kB) mindre end dette opfattes som intet gebyr for videresendelse, mining og oprettelse af transaktioner (standard: %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>Hvis paytxfee ikke er sat, inkluderes nok gebyr til at transaktioner begynder at blive bekræftet ingen for gennemsnitligt n blokke (standard: %u)</translation>
</message>
@@ -3268,6 +3252,10 @@
<translation>Aktiverer bedste kæde…</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
+ <translation>Forsøg at genskabe private nøgler fra en ødelagt wallet.dat under opstart</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>Kan ikke løse -whitebind adresse: "%s"</translation>
</message>
@@ -3292,6 +3280,10 @@
<translation>Fejl under læsning fra database; lukker ned.</translation>
</message>
<message>
+ <source>Imports blocks from external blk000??.dat file on startup</source>
+ <translation>Importerer blokeringer fra ekstern blk000??.dat-fil under opstart</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>Information</translation>
</message>
@@ -3348,6 +3340,10 @@
<translation>Reducerer -maxconnections fra %d til %d på grund af systembegrænsninger.</translation>
</message>
<message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>Genindlæs blokkæden efter manglende tegnebogstransaktioner under opstart</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Send sporings-/fejlsøgningsinformation til konsollen i stedet for debug.log filen</translation>
</message>
@@ -3416,6 +3412,10 @@
<translation>Ikke i stand til at tildele til %s på denne computer (bind returnerede fejl %s)</translation>
</message>
<message>
+ <source>Upgrade wallet to latest format on startup</source>
+ <translation>Opgradér tegnebog til seneste format under opstart</translation>
+ </message>
+ <message>
<source>Username for JSON-RPC connections</source>
<translation>Brugernavn til JSON-RPC-forbindelser</translation>
</message>
@@ -3436,10 +3436,6 @@
<translation>ZeroMQ-notifikationsindstillinger:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>under opstart</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat ødelagt, redning af data mislykkedes</translation>
</message>
@@ -3452,14 +3448,6 @@
<translation>Udfør kommando, når den bedste blok ændres (%s i kommandoen erstattes med blokhash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Opgrader tegnebog til seneste format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Gennemsøg blokkæden for manglende tegnebogstransaktioner</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Denne hjælpebesked</translation>
</message>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index a25fb7458d..42776f2c8b 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1518,14 +1518,6 @@
<translation>Letzter Empfang</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Übertragene Byte</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Empfangene Byte</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Pingzeit</translation>
</message>
@@ -2022,6 +2014,10 @@
<translation>Wechselgeld kopieren</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>Gesamtbetrag %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>oder</translation>
</message>
@@ -2058,14 +2054,6 @@
<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>Pay only the minimum fee of %1</source>
- <translation>Nur die minimale Gebühr in Höhe von %1 zahlen</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Gesamtbetrag %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</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>
@@ -2924,10 +2912,6 @@
<translation>&lt;category&gt; kann sein:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Versuchen, private Schlüssel aus einer beschädigten wallet.dat wiederherzustellen</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blockerzeugungsoptionen:</translation>
</message>
@@ -3048,10 +3032,6 @@
<translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um -txindex zu verändern</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Blöcke aus externer Datei blk000??.dat importieren</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-Verbindungen von der angegeben Quelle erlauben. Gültig für &lt;ip&gt; ist eine einzelne IP-Adresse (z.B. 1.2.3.4), ein Netzwerk bzw. eine Netzmaske (z.B. 1.2.3.4/255.255.255.0), oder die CIDR-Notation (z.B. 1.2.3.4/24). Kann mehrmals angegeben werden.</translation>
</message>
@@ -3304,10 +3284,6 @@
<translation>ZeroMQ-Benachrichtigungsoptionen:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>beim Starten</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat beschädigt, Datenrettung fehlgeschlagen</translation>
</message>
@@ -3320,14 +3296,6 @@
<translation>Befehl ausführen wenn der beste Block wechselt (%s im Befehl wird durch den Hash des Blocks ersetzt)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Wallet auf das neueste Format aktualisieren</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Blockkette erneut nach fehlenden Wallet-Transaktionen durchsuchen</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Dieser Hilfetext</translation>
</message>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 1f33a497ee..d9f8dee5ef 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -1389,14 +1389,6 @@
<translation>Τελευταία λήψη</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Σταλθέντα bytes</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Ληφθέντα bytes</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Χρόνος καθυστέρησης</translation>
</message>
@@ -2555,10 +2547,6 @@
<translation>(προεπιλογή: 1)</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Προσπάθεια για ανακτησει ιδιωτικων κλειδιων από ενα διεφθαρμένο αρχειο wallet.dat </translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Αποκλεισμός επιλογων δημιουργίας: </translation>
</message>
@@ -2639,10 +2627,6 @@
<translation>Επιλογές πορτοφολιού:</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Εισαγωγή μπλοκ από εξωτερικό αρχείο blk000?.dat</translation>
- </message>
- <message>
<source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
<translation>Αδυναμία κλειδώματος του φακέλου δεδομένων %s. Πιθανώς το Bitcoin να είναι ήδη ενεργό.</translation>
</message>
@@ -2747,10 +2731,6 @@
<translation>Μεταφορά όλων των συναλλαγών απο το πορτοφόλι</translation>
</message>
<message>
- <source>on startup</source>
- <translation>κατά την εκκίνηση</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>Το αρχειο wallet.dat ειναι διεφθαρμένο, η διάσωση απέτυχε</translation>
</message>
@@ -2763,14 +2743,6 @@
<translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Αναβάθμισε το πορτοφόλι στην τελευταία έκδοση</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Επανέλεγχος της αλυσίδας μπλοκ για απούσες συναλλαγές</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Αυτό το κείμενο βοήθειας</translation>
</message>
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index 1a607a2233..21df732520 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -299,17 +299,17 @@
<context>
<name>BitcoinGUI</name>
<message>
- <location filename="../bitcoingui.cpp" line="+324"/>
+ <location filename="../bitcoingui.cpp" line="+325"/>
<source>Sign &amp;message...</source>
<translation>Sign &amp;message...</translation>
</message>
<message>
- <location line="+353"/>
+ <location line="+362"/>
<source>Synchronizing with network...</source>
<translation>Synchronizing with network...</translation>
</message>
<message>
- <location line="-429"/>
+ <location line="-438"/>
<source>&amp;Overview</source>
<translation>&amp;Overview</translation>
</message>
@@ -389,12 +389,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+180"/>
+ <location line="+183"/>
<source>Bitcoin Core client</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+163"/>
+ <location line="+169"/>
<source>Importing blocks from disk...</source>
<translation>Importing blocks from disk...</translation>
</message>
@@ -404,7 +404,7 @@
<translation>Reindexing blocks on disk...</translation>
</message>
<message>
- <location line="-427"/>
+ <location line="-436"/>
<source>Send coins to a Bitcoin address</source>
<translation>Send coins to a Bitcoin address</translation>
</message>
@@ -434,12 +434,12 @@
<translation>&amp;Verify message...</translation>
</message>
<message>
- <location line="+450"/>
+ <location line="+459"/>
<source>Bitcoin</source>
<translation>Bitcoin</translation>
</message>
<message>
- <location line="-660"/>
+ <location line="-669"/>
<source>Wallet</source>
<translation>Wallet</translation>
</message>
@@ -484,7 +484,7 @@
<translation>Verify messages to ensure they were signed with specified Bitcoin addresses</translation>
</message>
<message>
- <location line="+53"/>
+ <location line="+56"/>
<source>&amp;File</source>
<translation>&amp;File</translation>
</message>
@@ -504,7 +504,7 @@
<translation>Tabs toolbar</translation>
</message>
<message>
- <location line="-311"/>
+ <location line="-314"/>
<source>Bitcoin Core</source>
<translation type="unfinished">Bitcoin Core</translation>
</message>
@@ -549,7 +549,7 @@
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+320"/>
+ <location line="+329"/>
<source>%n active connection(s) to Bitcoin network</source>
<translation>
<numerusform>%n active connection to Bitcoin network</numerusform>
@@ -3316,7 +3316,7 @@
<context>
<name>TransactionTableModel</name>
<message>
- <location filename="../transactiontablemodel.cpp" line="+233"/>
+ <location filename="../transactiontablemodel.cpp" line="+246"/>
<source>Date</source>
<translation>Date</translation>
</message>
@@ -3419,7 +3419,7 @@
<translation>(n/a)</translation>
</message>
<message>
- <location line="+215"/>
+ <location line="+217"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transaction status. Hover over this field to show number of confirmations.</translation>
</message>
@@ -3544,6 +3544,11 @@
</message>
<message>
<location line="+1"/>
+ <source>Copy raw transaction</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Edit label</source>
<translation>Edit label</translation>
</message>
@@ -3553,7 +3558,7 @@
<translation>Show transaction details</translation>
</message>
<message>
- <location line="+179"/>
+ <location line="+181"/>
<source>Export Transaction History</source>
<translation type="unfinished"></translation>
</message>
@@ -3618,7 +3623,7 @@
<translation>ID</translation>
</message>
<message>
- <location line="+116"/>
+ <location line="+121"/>
<source>Range:</source>
<translation>Range:</translation>
</message>
@@ -3698,7 +3703,7 @@
<context>
<name>bitcoin-core</name>
<message>
- <location filename="../bitcoinstrings.cpp" line="+258"/>
+ <location filename="../bitcoinstrings.cpp" line="+260"/>
<source>Options:</source>
<translation>Options:</translation>
</message>
@@ -3718,7 +3723,7 @@
<translation>Specify your own public address</translation>
</message>
<message>
- <location line="-107"/>
+ <location line="-109"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Accept command line and JSON-RPC commands</translation>
</message>
@@ -3758,7 +3763,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+110"/>
+ <location line="+112"/>
<source>Error: A fatal internal error occurred, see debug.log for details</source>
<translation type="unfinished"></translation>
</message>
@@ -3778,12 +3783,12 @@
<translation>Run in the background as a daemon and accept commands</translation>
</message>
<message>
- <location line="+32"/>
+ <location line="+34"/>
<source>Unable to start HTTP server. See debug log for details.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-119"/>
+ <location line="-123"/>
<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>
@@ -3878,7 +3883,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+11"/>
<source>Block creation options:</source>
<translation>Block creation options:</translation>
</message>
@@ -4018,7 +4023,7 @@
<translation>Specify wallet file (within data directory)</translation>
</message>
<message>
- <location line="+16"/>
+ <location line="+18"/>
<source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
<translation type="unfinished"></translation>
</message>
@@ -4068,12 +4073,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>You need to rebuild the database using -reindex to change -txindex</source>
<translation>You need to rebuild the database using -reindex to change -txindex</translation>
</message>
<message>
- <location line="-299"/>
+ <location line="-304"/>
<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>
@@ -4189,10 +4194,20 @@
</message>
<message>
<location line="+4"/>
+ <source>Always relay transactions received from whitelisted peers (default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+1"/>
+ <source>Automatically create Tor hidden service (default: %d)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+5"/>
<source>Cannot resolve -whitebind address: &apos;%s&apos;</source>
<translation type="unfinished"></translation>
@@ -4359,6 +4374,16 @@
</message>
<message>
<location line="+2"/>
+ <source>Tor control port password (default: empty)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Tor control port to use if onion listening enabled (default: %s)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Transaction amount too small</source>
<translation>Transaction amount too small</translation>
</message>
@@ -4408,7 +4433,12 @@
<translation>Warning</translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+2"/>
+ <source>Whether to operate in a blocks only mode (default: %u)</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
<source>Zapping all transactions from wallet...</source>
<translation type="unfinished"></translation>
</message>
@@ -4423,27 +4453,27 @@
<translation>wallet.dat corrupt, salvage failed</translation>
</message>
<message>
- <location line="-64"/>
+ <location line="-67"/>
<source>Password for JSON-RPC connections</source>
<translation>Password for JSON-RPC connections</translation>
</message>
<message>
- <location line="-196"/>
+ <location line="-198"/>
<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="+232"/>
+ <location line="+234"/>
<source>This help message</source>
<translation>This help message</translation>
</message>
<message>
- <location line="-106"/>
+ <location line="-108"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Allow DNS lookups for -addnode, -seednode and -connect</translation>
</message>
<message>
- <location line="+58"/>
+ <location line="+60"/>
<source>Loading addresses...</source>
<translation>Loading addresses...</translation>
</message>
@@ -4453,7 +4483,7 @@
<translation>Error loading wallet.dat: Wallet corrupted</translation>
</message>
<message>
- <location line="-205"/>
+ <location line="-207"/>
<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>
@@ -4528,7 +4558,7 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+26"/>
+ <location line="+28"/>
<source>Error loading wallet.dat</source>
<translation>Error loading wallet.dat</translation>
</message>
@@ -4638,12 +4668,12 @@
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+10"/>
<source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
<translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
</message>
<message>
- <location line="-111"/>
+ <location line="-113"/>
<source>Cannot resolve -bind address: &apos;%s&apos;</source>
<translation>Cannot resolve -bind address: &apos;%s&apos;</translation>
</message>
@@ -4668,12 +4698,12 @@
<translation>Loading block index...</translation>
</message>
<message>
- <location line="-60"/>
+ <location line="-62"/>
<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="+63"/>
<source>Loading wallet...</source>
<translation>Loading wallet...</translation>
</message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index b969075e0a..4bd64f68d1 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -1124,10 +1124,6 @@
<translation>Aktuala nombro de blokoj</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bajtoj Senditaj:</translation>
- </message>
- <message>
<source>Last block time</source>
<translation>Horo de la lasta bloko</translation>
</message>
@@ -2134,10 +2130,6 @@
<translation>&lt;category&gt; povas esti:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Provo ripari privatajn ŝlosilojn el difektita wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blok-kreaj agordaĵoj:</translation>
</message>
@@ -2214,10 +2206,6 @@
<translation>Vi devas rekontrui la datumbazon kun -reindex por ŝanĝi -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importas blokojn el ekstera dosiero blk000??.dat</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>Plenumi komandon kiam rilata alerto riceviĝas, aŭ kiam ni vidas tre longan forkon (%s en cms anstataŭiĝas per mesaĝo)</translation>
</message>
@@ -2298,14 +2286,6 @@
<translation>Plenumi komandon kiam plej bona bloko ŝanĝiĝas (%s en cmd anstataŭiĝas per bloka haketaĵo)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Ĝisdatigi monujon al plej lasta formato</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Reskani la blokĉenon por mankantaj monujaj transakcioj</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Tiu ĉi helpmesaĝo</translation>
</message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 91b0d79e30..ec8261173b 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -218,7 +218,15 @@
</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>
@@ -1068,6 +1076,18 @@
<translation>Puerto del servidor proxy (ej. 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;Ventana</translation>
</message>
@@ -1454,6 +1474,10 @@
<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>
@@ -1466,6 +1490,18 @@
<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>
@@ -1490,14 +1526,6 @@
<translation>Ultima recepción</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes enviados</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes recibidos</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping</translation>
</message>
@@ -1550,6 +1578,26 @@
<translation>Borrar consola</translation>
</message>
<message>
+ <source>&amp;Disconnect Node</source>
+ <translation>Nodo &amp;Desconectado</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 Bitcoin Core RPC console.</source>
<translation>Bienvenido a la consola RPC de Bitcoin Core.</translation>
</message>
@@ -1578,6 +1626,10 @@
<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>
@@ -1997,17 +2049,13 @@
<source>Payment request expired.</source>
<translation>Solicitud de pago caducada.</translation>
</message>
- <message numerus="yes">
- <source>Estimated to begin confirmation within %n block(s).</source>
- <translation><numerusform>Estimado para empezar la confirmación dentro de %n bloque.</numerusform><numerusform>Estimado para empezar la confirmación dentro de %n bloques.</numerusform></translation>
- </message>
<message>
- <source>Pay only the minimum fee of %1</source>
+ <source>Pay only the required fee of %1</source>
<translation>Paga sólo la cuota mínima de %1</translation>
</message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Monto Total %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
+ <message numerus="yes">
+ <source>Estimated to begin confirmation within %n block(s).</source>
+ <translation><numerusform>Estimado para empezar la confirmación dentro de %n bloque.</numerusform><numerusform>Estimado para empezar la confirmación dentro de %n bloques.</numerusform></translation>
</message>
<message>
<source>The recipient address is not valid. Please recheck.</source>
@@ -2794,6 +2842,10 @@
<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>
@@ -2867,10 +2919,6 @@
<translation>&lt;category&gt; puede ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opciones de creación de bloques:</translation>
</message>
@@ -2991,10 +3039,6 @@
<translation>Usted necesita reconstruir la base de datos utilizando -reindex para cambiar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa los bloques desde un archivo blk000??.dat externo</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>
@@ -3079,6 +3123,10 @@
<translation>Activando la mejor cadena...</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
+ <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>No se puede resolver -whitebind address: '%s'</translation>
</message>
@@ -3103,6 +3151,10 @@
<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>
@@ -3155,6 +3207,10 @@
<translation>Recibir y mostrar alertas de red P2P (default: %u)</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>
@@ -3223,6 +3279,10 @@
<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</translation>
+ </message>
+ <message>
<source>Username for JSON-RPC connections</source>
<translation>Nombre de usuario para las conexiones JSON-RPC
</translation>
@@ -3240,10 +3300,6 @@
<translation>Eliminando todas las transacciones del monedero...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>al iniciar</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
</message>
@@ -3257,14 +3313,6 @@
<translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualizar el monedero al último formato</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Este mensaje de ayuda
</translation>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index e388b5a0cf..df17411ab5 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -1305,10 +1305,6 @@
<translation>Atención: Poco espacio en el disco duro</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importar bloques desde el archivo externo blk000??.dat </translation>
- </message>
- <message>
<source>Information</source>
<translation>Información</translation>
</message>
@@ -1340,15 +1336,6 @@
</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualizar billetera al formato actual</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Rescanea la cadena de bloques para transacciones perdidas de la cartera
-</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Este mensaje de ayuda
</translation>
@@ -1375,6 +1362,14 @@
<translation>Dirección -proxy invalida: '%s'</translation>
</message>
<message>
+ <source>Cannot resolve -bind address: '%s'</source>
+ <translation>No se pudo resolver la dirección fija: '%s'</translation>
+ </message>
+ <message>
+ <source>Cannot resolve -externalip address: '%s'</source>
+ <translation>No se pudo resolver la dirección ip: '%s'</translation>
+ </message>
+ <message>
<source>Invalid amount for -paytxfee=&lt;amount&gt;: '%s'</source>
<translation>Cantidad inválida para -paytxfee=&lt;amount&gt;: '%s'</translation>
</message>
@@ -1395,6 +1390,14 @@
<translation>Cargando cartera...</translation>
</message>
<message>
+ <source>Cannot downgrade wallet</source>
+ <translation>No es posible desactualizar la billetera</translation>
+ </message>
+ <message>
+ <source>Cannot write default address</source>
+ <translation>No se pudo escribir la dirección por defecto</translation>
+ </message>
+ <message>
<source>Rescanning...</source>
<translation>Rescaneando...</translation>
</message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index 7a7a6e33f5..c67d642de7 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -2137,10 +2137,6 @@
<translation>&lt;category&gt; puede ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Intento de recuperar claves privadas de un wallet.dat corrupto</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opciones de creación de bloques:</translation>
</message>
@@ -2217,10 +2213,6 @@
<translation>Usted necesita reconstruir la base de datos utilizando -reindex para cambiar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa los bloques desde un archivo blk000??.dat externo</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>
@@ -2298,10 +2290,6 @@
<translation>Aviso</translation>
</message>
<message>
- <source>on startup</source>
- <translation>al iniciar</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrupto. Ha fallado la recuperación.</translation>
</message>
@@ -2315,14 +2303,6 @@
<translation>Ejecutar un comando cuando cambia el mejor bloque (%s en cmd se sustituye por el hash de bloque)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualizar el monedero al último formato</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Volver a examinar la cadena de bloques en busca de transacciones del monedero perdidas</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Este mensaje de ayuda
</translation>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index d2f98a9876..9279834af3 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -1680,10 +1680,6 @@
<translation>Hoiatus: toimus wallet.dat faili andmete päästmine! Originaal wallet.dat nimetati kaustas %s ümber wallet.{ajatempel}.bak'iks, jäägi või tehingute ebakõlade puhul tuleks teha backup'ist taastamine.</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Püüa vigasest wallet.dat failist taastada turvavõtmed</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blokeeri loomise valikud:</translation>
</message>
@@ -1736,10 +1732,6 @@
<translation>Rahakoti valikud:</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Impordi blokid välisest blk000??.dat failist</translation>
- </message>
- <message>
<source>Information</source>
<translation>Informatsioon</translation>
</message>
@@ -1796,10 +1788,6 @@
<translation>Hoiatus</translation>
</message>
<message>
- <source>on startup</source>
- <translation>käivitamisel</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat fail on katki, päästmine ebaõnnestus</translation>
</message>
@@ -1812,14 +1800,6 @@
<translation>Käivita käsklus, kui parim plokk muutub (käskluse %s asendatakse ploki hash'iga)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Uuenda rahakott uusimasse vormingusse</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Otsi ploki jadast rahakoti kadunud tehinguid</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Käesolev abitekst</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 05f8fc6251..fb4e25dfb8 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -1616,10 +1616,18 @@
<translation>تولید شده ولی قبول نشده</translation>
</message>
<message>
+ <source>Offline</source>
+ <translation>آفلاین</translation>
+ </message>
+ <message>
<source>Label</source>
<translation>برچسب</translation>
</message>
<message>
+ <source>Unconfirmed</source>
+ <translation>تایید نشده</translation>
+ </message>
+ <message>
<source>Received with</source>
<translation>دریافت‌شده با</translation>
</message>
@@ -1966,14 +1974,6 @@
<translation>زمانی که بهترین بلاک تغییر کرد، دستور را اجرا کن (%s در cmd با block hash جایگزین شده است)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>wallet را به جدیدترین فرمت روزآمد کنید</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>اسکان مجدد زنجیر بلوکها برای گم والت معامله</translation>
- </message>
- <message>
<source>This help message</source>
<translation>پیام کمکی</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 6c16fc6f1f..fd9de2e049 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -1024,14 +1024,6 @@
<translation>دستور را وقتی بهترین بلاک تغییر کرد اجرا کن (%s در دستور توسط block hash جایگزین شده است)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>wallet را به جدیدترین نسخه روزآمد کنید</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>زنجیره بلاک را برای تراکنش جا افتاده در WALLET دوباره اسکن کنید</translation>
- </message>
- <message>
<source>This help message</source>
<translation>این پیام راهنما</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 8cf6d01653..7026fff1f5 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1482,14 +1482,6 @@
<translation>Viimeisin vastaanotettu</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Tavua lähetetty</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Tavua vastaanotettu</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Vasteaika</translation>
</message>
@@ -1982,10 +1974,6 @@
<translation>Maksupyyntö on vanhentunut.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Maksa vain vähimmäiskulu %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Vastaanottajan osoite ei ole kelvollinen. Tarkistathan uudelleen.</translation>
</message>
@@ -2792,10 +2780,6 @@
<translation>&lt;category&gt; voi olla:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Yritetään palauttaa privaattiavaimia korruptoituneesta wallet.dat -lompakkotiedostosta</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Lohkon luonnin asetukset:</translation>
</message>
@@ -2912,10 +2896,6 @@
<translation>Sinun tulee uudelleenrakentaa tietokanta käyttäen -reindex vaihtaen -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Tuodaan lohkoja ulkoisesta blk000??.dat tiedostosta</translation>
- </message>
- <message>
<source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
<translation>Ei voida lukita data-hakemistoa %s. Bitcoin Core on luultavasti jo käynnissä.</translation>
</message>
@@ -3060,10 +3040,6 @@
<translation>Tyhjennetään kaikki rahansiirrot lompakosta....</translation>
</message>
<message>
- <source>on startup</source>
- <translation>käynnistyksessä</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat -lompakkotiedosto korruptoitunut, korjaaminen epäonnistui</translation>
</message>
@@ -3076,14 +3052,6 @@
<translation>Suorita käsky kun paras lohko muuttuu (%s cmd on vaihdettu block hashin kanssa)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Päivitä lompakko uusimpaan formaattiin</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Skannaa uudelleen lohkoketju lompakon puuttuvien rahasiirtojen vuoksi</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Tämä ohjeviesti</translation>
</message>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index a2799f99fc..97dccdac06 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1486,14 +1486,6 @@
<translation>Dernière réception</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Octets envoyés</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Octets reçus</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Temps de ping</translation>
</message>
@@ -2002,14 +1994,6 @@
<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>Pay only the minimum fee of %1</source>
- <translation>Payer seulement les frais minimum de %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Montant total %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>L'adresse du destinataire est invalide. Veuillez la vérifier.</translation>
</message>
@@ -2860,10 +2844,6 @@
<translation>&lt;category&gt; peut être :</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Tenter de récupérer les clefs privées d'un wallet.dat corrompu</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Options de création de bloc :</translation>
</message>
@@ -2984,10 +2964,6 @@
<translation>Vous devez reconstruire la base de données en utilisant -reindex afin de modifier -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importe des blocs depuis un fichier blk000??.dat externe</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>Permettre les connexions JSON-RPC de sources spécifiques. Valide pour &lt;ip&gt; qui sont une IP simple (p. ex. 1.2.3.4), un réseau/masque réseau (p. ex. 1.2.3.4/255.255.255.0) ou un réseau/CIDR (p. ex. 1.2.3.4/24). Cette option peut être être spécifiée plusieurs fois</translation>
</message>
@@ -3236,10 +3212,6 @@
<translation>Supprimer toutes les transactions du portefeuille...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>au démarrage</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrompu, la récupération a échoué</translation>
</message>
@@ -3252,14 +3224,6 @@
<translation>Exécuter la commande lorsque le meilleur bloc change (%s dans cmd est remplacé par le hachage du bloc)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Mettre à niveau le portefeuille vers le format le plus récent</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Réanalyser la chaîne de blocs pour les transactions de portefeuille manquantes</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ce message d'aide</translation>
</message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 3edaef7e16..79f0d46d3f 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -1966,10 +1966,6 @@
<translation>&lt;categoría&gt; pode ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Tentar recuperar claves privadas dende un wallet.dat corrupto</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opcións de creación de bloque:</translation>
</message>
@@ -2042,10 +2038,6 @@
<translation>Precisas reconstruír a base de datos empregando -reindex para cambiar -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa bloques dende arquivos blk000??.dat externos</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>Executar comando cando se recibe unha alerta relevante ou vemos un fork realmente longo (%s no cmd é substituído pola mensaxe)</translation>
</message>
@@ -2122,14 +2114,6 @@
<translation>Executar comando cando o mellor bloque cambie (%s no comando é sustituído polo hash do bloque)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualizar moedeiro ao formato máis recente</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Rescanear transaccións ausentes na cadea de bloques</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Esta mensaxe de axuda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 8e985e9f16..048b268200 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1332,14 +1332,6 @@
<translation>קבלה אחרונה</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>בתים שנשלחו</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>בתים שהתקבלו</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>זמן המענה</translation>
</message>
@@ -2534,10 +2526,6 @@
<translation>&lt;קטגוריה&gt; יכולה להיות:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>נסה לשחזר מפתחות פרטיים מקובץ wallet.dat מושחת.</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>אפשרויות יצירת מקטע:</translation>
</message>
@@ -2642,10 +2630,6 @@
<translation>עליך לבנות מחדש את מסד הנתונים תוך שימוש ב־‎-reindex על מנת לשנות את ‎-txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>מיובאים מקטעים מקובצי blk000??.dat חיצוניים</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>הרץ פקודה כאשר ההתראה הרלוונטית מתקבלת או כשאנחנו עדים לפיצול ארוך מאוד (%s בשורת הפקודה יוחלף ע"י ההודעה)</translation>
</message>
@@ -2770,10 +2754,6 @@
<translation>אזהרה</translation>
</message>
<message>
- <source>on startup</source>
- <translation>עם ההפעלה</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>קובץ wallet.dat מושחת, החילוץ נכשל</translation>
</message>
@@ -2786,14 +2766,6 @@
<translation>יש לבצע פקודה זו כשהמקטע הטוב ביותר משתנה (%s בפקודה יוחלף בגיבוב המקטע)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>שדרוג הארנק למבנה העדכני</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>יש לסרוק מחדש את שרשרת המקטעים למציאת העברות חסרות בארנק</translation>
- </message>
- <message>
<source>This help message</source>
<translation>הודעת העזרה הזו</translation>
</message>
diff --git a/src/qt/locale/bitcoin_hr.ts b/src/qt/locale/bitcoin_hr.ts
index 80371dfaf7..aa28ecf24f 100644
--- a/src/qt/locale/bitcoin_hr.ts
+++ b/src/qt/locale/bitcoin_hr.ts
@@ -1058,14 +1058,6 @@
<translation>Trajanje veze</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bajtova poslano</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bajtova primljeno</translation>
- </message>
- <message>
<source>Last block time</source>
<translation>Posljednje vrijeme bloka</translation>
</message>
@@ -1784,10 +1776,6 @@
<translation>Pogreška: Nema dovoljno prostora na disku!</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Uvozi blokove sa vanjske blk000??.dat datoteke</translation>
- </message>
- <message>
<source>Information</source>
<translation>Informacija</translation>
</message>
@@ -1816,14 +1804,6 @@
<translation>Izvršite naredbu kada se najbolji blok promjeni (%s u cmd je zamjenjen sa block hash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Nadogradite novčanik u posljednji format.</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Ponovno pretraži lanac blokova za transakcije koje nedostaju</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ova poruka za pomoć</translation>
</message>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 6722854589..27cfedc728 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1318,14 +1318,6 @@
<translation>Legutóbbi fogadás</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Küldött bájtok</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Fogadott bájtok</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping idő</translation>
</message>
@@ -2468,15 +2460,6 @@
<translation>Parancs, amit akkor hajt végre, amikor a legjobb blokk megváltozik (%s a cmd-ban lecserélődik a blokk hash-re)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>A Tárca frissítése a legfrissebb formátumra</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Blokklánc újraszkennelése hiányzó tárca-tranzakciók után
-</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ez a súgó-üzenet
</translation>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index e2caa6d867..22ce3efecb 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -2,6 +2,10 @@
<context>
<name>AddressBookPage</name>
<message>
+ <source>Right-click to edit address or label</source>
+ <translation>Klik-kanan untuk mengubah alamat atau label</translation>
+ </message>
+ <message>
<source>Create a new address</source>
<translation>Buat alamat baru</translation>
</message>
@@ -454,6 +458,36 @@
<translation>Menyusul...</translation>
</message>
<message>
+ <source>Date: %1
+</source>
+ <translation>Tanggal: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Jumlah: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tipe: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Label: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Alamat: %1
+</translation>
+ </message>
+ <message>
<source>Sent transaction</source>
<translation>Transaksi terkirim</translation>
</message>
@@ -480,6 +514,10 @@
<context>
<name>CoinControlDialog</name>
<message>
+ <source>Coin Selection</source>
+ <translation>Pemilihan Koin</translation>
+ </message>
+ <message>
<source>Quantity:</source>
<translation>Kuantitas:</translation>
</message>
@@ -898,6 +936,18 @@
<translation>Port proxy (cth. 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;Jendela</translation>
</message>
@@ -958,6 +1008,10 @@
<translation>Restart klien diperlukan untuk mengaktifkan perubahan.</translation>
</message>
<message>
+ <source>Client will be shut down. Do you want to proceed?</source>
+ <translation>Klien akan dimatikan, apakah anda hendak melanjutkan?</translation>
+ </message>
+ <message>
<source>This change would require a client restart.</source>
<translation>Perubahan ini akan memerlukan restart klien</translation>
</message>
@@ -1001,6 +1055,10 @@
<translation>Saldo ditambang yang masih terlalu muda</translation>
</message>
<message>
+ <source>Balances</source>
+ <translation>Saldo:</translation>
+ </message>
+ <message>
<source>Total:</source>
<translation>Jumlah:</translation>
</message>
@@ -1020,6 +1078,10 @@
<translation>Alamat pembayaran salah %1</translation>
</message>
<message>
+ <source>Payment request rejected</source>
+ <translation>Permintaan pembayaran ditolak</translation>
+ </message>
+ <message>
<source>Requested payment amount of %1 is too small (considered dust).</source>
<translation>Nilai pembayaran %1 yang diminta oleh Anda terlalu sedikit (dianggap debu).</translation>
</message>
@@ -1028,6 +1090,10 @@
<translation>Gagalan permintaan pembayaran</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <translation>Permintaan pembayaran telah kadaluarsa</translation>
+ </message>
+ <message>
<source>Refund from %1</source>
<translation>Pembayaran kembali dari %1</translation>
</message>
@@ -1050,6 +1116,10 @@
</context>
<context>
<name>PeerTableModel</name>
+ <message>
+ <source>User Agent</source>
+ <translation>Agen Pengguna</translation>
+ </message>
</context>
<context>
<name>QObject</name>
@@ -1058,6 +1128,10 @@
<translation>Nilai</translation>
</message>
<message>
+ <source>Enter a Bitcoin address (e.g. %1)</source>
+ <translation>Masukkan alamat Bitcoin (contoh %1)</translation>
+ </message>
+ <message>
<source>%1 h</source>
<translation>%1 Jam</translation>
</message>
@@ -1144,6 +1218,24 @@
<translation>Jumlah blok terkini</translation>
</message>
<message>
+ <source>Sent</source>
+ <translation>Terkirim</translation>
+ </message>
+ <message>
+ <source>Version</source>
+ <translation>Versi</translation>
+ </message>
+ <message>
+ <source>User Agent</source>
+ <translation>Agen Pengguna
+
+</translation>
+ </message>
+ <message>
+ <source>Services</source>
+ <translation>Layanan</translation>
+ </message>
+ <message>
<source>Last block time</source>
<translation>Waktu blok terakhir</translation>
</message>
@@ -1188,6 +1280,26 @@
<translation>Bersihkan konsol</translation>
</message>
<message>
+ <source>1 &amp;hour</source>
+ <translation>1 &amp;jam</translation>
+ </message>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1 &amp;hari</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1 &amp;minggu</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1 &amp;tahun</translation>
+ </message>
+ <message>
+ <source>Welcome to the Bitcoin Core RPC console.</source>
+ <translation>Selamat datang di konsol RPC Bitcoin.</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>Gunakan panah keatas dan kebawah untuk menampilkan sejarah, dan &lt;b&gt;Ctrl-L&lt;/b&gt; untuk bersihkan layar.</translation>
</message>
@@ -1211,7 +1323,19 @@
<source>%1 GB</source>
<translation>%1 GB</translation>
</message>
- </context>
+ <message>
+ <source>Yes</source>
+ <translation>Ya</translation>
+ </message>
+ <message>
+ <source>No</source>
+ <translation>Tidak</translation>
+ </message>
+ <message>
+ <source>Unknown</source>
+ <translation>Tidak diketahui</translation>
+ </message>
+</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
@@ -1432,6 +1556,22 @@
<translation>Alamat uang kembali yang kustom</translation>
</message>
<message>
+ <source>Recommended:</source>
+ <translation>Disarankan</translation>
+ </message>
+ <message>
+ <source>Confirmation time:</source>
+ <translation>Waktu konfirmasi:</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>normal</translation>
+ </message>
+ <message>
+ <source>fast</source>
+ <translation>cepat</translation>
+ </message>
+ <message>
<source>Send to multiple recipients at once</source>
<translation>Kirim ke beberapa penerima sekaligus</translation>
</message>
@@ -1492,6 +1632,10 @@
<translation>Salin uang kembali</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>Jumlah Total %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>atau</translation>
</message>
@@ -1516,6 +1660,14 @@
<translation>Gagal: Transaksi ditolak. Ini mungkin terjadi jika beberapa dari koin dalam dompet Anda telah digunakan, seperti ketika Anda menggunakan salinan wallet.dat dan beberapa koin telah dibelanjakan dalam salinan tersebut tetapi disini tidak tertandai sebagai terpakai.</translation>
</message>
<message>
+ <source>A fee higher than %1 is considered an absurdly high fee.</source>
+ <translation>Biaya yang lebih tinggi dari %1 dianggap biaya tak masuk akal.</translation>
+ </message>
+ <message>
+ <source>Payment request expired.</source>
+ <translation>Permintaan pembayaran telah kadaluarsa</translation>
+ </message>
+ <message>
<source>Warning: Invalid Bitcoin address</source>
<translation>Awas: Alamat Bitcoin tidak sah</translation>
</message>
@@ -2214,10 +2366,6 @@
<translation>(pengaturan awal: 1)</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Coba memulihkan kunci-kunci pribadi dari wallet.dat yang rusak</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Pilihan pembuatan blok:</translation>
</message>
@@ -2306,14 +2454,14 @@
<translation>Harus membangun ulang database menggunakan -reindex supaya mengubah -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Impor blok dari eksternal berkas blk000???.dat</translation>
- </message>
- <message>
<source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
<translation>Tidak bisa mengunci data directory %s. Kemungkinan Bitcoin Core sudah mulai.</translation>
</message>
<message>
+ <source>Connect through SOCKS5 proxy</source>
+ <translation>Hubungkan melalui proxy SOCKS5</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>Informasi</translation>
</message>
@@ -2390,14 +2538,6 @@
<translation>Menjalankan perintah ketika perubahan blok terbaik (%s dalam cmd digantikan oleh hash blok)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Perbarui dompet ke format terbaru</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Pindai ulang rantai-blok untuk transaksi dompet yang hilang</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Pesan bantuan ini</translation>
</message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index b613bc888e..7a2b7bd843 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1487,14 +1487,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Ultima Ricezione</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Byte Inviati</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Byte Ricevuti</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Tempo di Ping</translation>
</message>
@@ -1999,10 +1991,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Richiesta di pagamento scaduta.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Paga solamente la commissione minima di %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>L'indirizzo del beneficiario non è valido. Si prega di ricontrollare.</translation>
</message>
@@ -2853,10 +2841,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Valori possibili per &lt;category&gt;:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Tenta di recuperare le chiavi private da un wallet.dat corrotto</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opzioni creazione blocco:</translation>
</message>
@@ -2977,10 +2961,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>È necessario ricostruire il database usando -reindex per cambiare -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importa blocchi da un file blk000??.dat esterno</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>Permette connessioni JSON-RPC dall'origine specificata. I valori validi per &lt;ip&gt; sono un singolo IP (ad es. 1.2.3.4), una network/netmask (ad es. 1.2.3.4/255.255.255.0) oppure una network/CIDR (ad es. 1.2.3.4/24). Questa opzione può essere specificata più volte.</translation>
</message>
@@ -3229,10 +3209,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Eliminazione dal portamonete di tutte le transazioni...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>all'avvio</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrotto, recupero fallito</translation>
</message>
@@ -3245,14 +3221,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<translation>Esegue un comando quando il miglior blocco cambia (%s nel cmd è sostituito dall'hash del blocco)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Aggiorna il wallet all'ultimo formato</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Ripete la scansione della block chain per individuare le transazioni che mancano dal portamonete</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Questo messaggio di aiuto</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index 5770fe9a02..140ed2445b 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1550,14 +1550,6 @@
<translation>最終受信</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>送信済バイト数</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>受信済バイト数</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping時間</translation>
</message>
@@ -2070,6 +2062,10 @@
<translation>釣り銭をコピー</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>合計: %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>または</translation>
</message>
@@ -2101,19 +2097,15 @@
<source>Payment request expired.</source>
<translation>支払いリクエストの期限が切れました。</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>Pay only the minimum fee of %1</source>
- <translation>最小手数料 %1 のみを支払う</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>総額 %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>受取アドレスが不正です。再チェックしてください。</translation>
</message>
@@ -2892,10 +2884,6 @@
<translation>コマンドラインと JSON-RPC コマンドを許可</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>中継の際、この値未満の手数料 (%s/kB単位) はゼロであるとみなす (デフォルト: %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>
@@ -3020,10 +3008,6 @@
<translation>&lt;category&gt;は以下の値を指定できます:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>壊れた wallet.dat から秘密鍵を復旧することを試す</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>ブロック作成オプション:</translation>
</message>
@@ -3181,10 +3165,6 @@
<translation>-txindex を変更するには -reindex を使用してデータベースを再構築する必要があります</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>外部の blk000??.dat ファイルからブロックをインポート</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接続を許可する。有効な&lt;ip&gt;は、単一のIP (例 1.2.3.4)、ネットワーク/ネットマスク (1.2.3.4/255.255.255.0)、またはネットワーク/CIDR (1.2.3.4/24)です。このオプションは複数回指定できます。</translation>
</message>
@@ -3217,6 +3197,10 @@
<translation>関連のアラートをもらってもすごく長いのフォークを見てもコマンドを実行 (コマンドの中にあるの%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>
@@ -3273,6 +3257,10 @@
<translation>最優良のチェインを有効化しています...</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
+ <translation>起動時に壊れた wallet.dat から秘密鍵を復旧することを試す</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>-whitebind アドレス '%s' を解決できません</translation>
</message>
@@ -3297,6 +3285,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>
@@ -3353,6 +3345,10 @@
<translation>システム上の制約から、-maxconnections を %d から %d に削減しました。</translation>
</message>
<message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>起動時に失ったウォレットの取引のブロック チェーンを再スキャン</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
</message>
@@ -3421,6 +3417,10 @@
<translation>このコンピュータの %s にバインドすることができません (バインドが返したエラーは %s)</translation>
</message>
<message>
+ <source>Upgrade wallet to latest format on startup</source>
+ <translation>起動時にウォレットを最新のフォーマットにアップグレード</translation>
+ </message>
+ <message>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC 接続のユーザー名</translation>
</message>
@@ -3441,10 +3441,6 @@
<translation>ZeroMQ通知オプション:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>起動時</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat が壊れ、復旧に失敗しました</translation>
</message>
@@ -3457,14 +3453,6 @@
<translation>最良のブロックに変更する際にコマンドを実行 (cmd の %s はブロック ハッシュに置換される)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>ウォレットを最新のフォーマットにアップグレード</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>失ったウォレットの取引のブロック チェーンを再スキャン</translation>
- </message>
- <message>
<source>This help message</source>
<translation>このヘルプ メッセージ</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 6e5db78589..e8f5286697 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -2234,10 +2234,6 @@
<translation>&lt;category&gt; შეიძლება იყოს:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>პირადი გასაღებების აღდგენის მცდელობა wallet.dat-იდან</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>ბლოკის შექმნის ოპციები:</translation>
</message>
@@ -2322,10 +2318,6 @@
<translation>საჭიროა ბაზის ხელახალი აგება, გამოიყენეთ -reindex რათა შეცვალოთ -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>ბლოკების იმპორტი გარე blk000??.dat ფაილიდან</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>
@@ -2410,14 +2402,6 @@
<translation>კომანდის შესრულება უკეთესი ბლოკის გამოჩენისას (%s კომანდაში ჩანაცვლდება ბლოკის ჰეშით)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>საფულის ფორმატის განახლება</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>ბლოკების ჯაჭვის გადამოწმება საფულეში გამორჩენილ ტრანსაქციებზე</translation>
- </message>
- <message>
<source>This help message</source>
<translation>ეს ტექსტი</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index 653ea40882..8243618f11 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -2304,10 +2304,6 @@
<translation>(기본값: 1)</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>손상된 wallet.dat에서 개인키 복원을 시도합니다</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>블록 생성 옵션:</translation>
</message>
@@ -2404,10 +2400,6 @@
<translation>-txindex를 바꾸기 위해서는 -reindex를 사용해서 데이터베이스를 재구성해야 합니다. </translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>외부 blk000??.dat 파일에서 블록을 가져옵니다.</translation>
- </message>
- <message>
<source>Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.</source>
<translation>데이터 디렉토리 %s에 락을 걸 수 없었습니다. 비트코인 코어가 이미 실행 중인 것으로 보입니다.</translation>
</message>
@@ -2496,10 +2488,6 @@
<translation>지갑의 모든거래내역 건너뛰기...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>구동 중</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat 파일이 손상되었고 복구가 실패하였습니다.</translation>
</message>
@@ -2512,14 +2500,6 @@
<translation>최고의 블럭이 변하면 명령을 실행(cmd 에 있는 %s 는 블럭 해시에 의해 대체되어 짐)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>지갑을 최근 형식으로 개선하시오</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>누락된 지갑 송금에 대한 블록 체인 다시 검색</translation>
- </message>
- <message>
<source>This help message</source>
<translation>도움말 메시지입니다</translation>
</message>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index b1e14fb859..b297a35d4b 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -1410,10 +1410,6 @@
<translation>Monitio: wallet.data corrupta, data salvata! Originalis wallet.dat salvata ut wallet.{timestamp}.bak in %s; si pendendum tuum vel transactiones pravae sunt, oportet ab conservato restituere.</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Conare recipere claves privatas de corrupto wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Optiones creandi frustorum:</translation>
</message>
@@ -1466,10 +1462,6 @@
<translation>Verificante cassidilem...</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importat frusta ab externa plica blk000??.dat</translation>
- </message>
- <message>
<source>Information</source>
<translation>Informatio</translation>
</message>
@@ -1538,14 +1530,6 @@
<translation>Pelle mandatum quando optissimum frustum mutat (%s in mandato substituitur ab hash frusti)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Progredere cassidile ad formam recentissimam</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Iterum perlege catenam frustorum propter absentes cassidilis transactiones</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Hic nuntius auxilii</translation>
</message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index d91c183884..7820977375 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -872,14 +872,6 @@
<translation>Versija</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Nusiųsti baitai</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Gauti baitai</translation>
- </message>
- <message>
<source>Last block time</source>
<translation>Paskutinio bloko laikas</translation>
</message>
@@ -1662,14 +1654,6 @@
<translation>Slaptažodis JSON-RPC sujungimams</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Atnaujinti piniginę į naujausią formatą</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Ieškoti prarastų piniginės sandorių blokų grandinėje</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Pagelbos žinutė</translation>
</message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index db2eabaf78..fa7abdf2ab 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -2122,10 +2122,6 @@
<translation>&lt;category&gt; var būt:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Mēģināt atgūt privātās atslēgas no bojāta wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Bloka izveidošanas iestatījumi:</translation>
</message>
@@ -2166,10 +2162,6 @@
<translation>Maciņa iespējas:</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importēt blokus no ārējās blk000??.dat datnes</translation>
- </message>
- <message>
<source>Information</source>
<translation>Informācija</translation>
</message>
@@ -2218,10 +2210,6 @@
<translation>Brīdinājums</translation>
</message>
<message>
- <source>on startup</source>
- <translation>startēšanas laikā</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat ir bojāts, glābšana neizdevās</translation>
</message>
@@ -2234,14 +2222,6 @@
<translation>Izpildīt komandu, kad labāk atbilstošais bloks izmainās (%s cmd aizvieto ar bloka hešu)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Atjaunot maciņa formātu uz jaunāko</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Atkārtoti skanēt bloku virkni, meklējot trūkstošās maciņa transakcijas</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Šis palīdzības paziņojums</translation>
</message>
diff --git a/src/qt/locale/bitcoin_mn.ts b/src/qt/locale/bitcoin_mn.ts
index a44d3b6fb3..d1a5976224 100644
--- a/src/qt/locale/bitcoin_mn.ts
+++ b/src/qt/locale/bitcoin_mn.ts
@@ -1034,10 +1034,6 @@
<translation>Түрүйвчийн сонголтууд:</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Түрүйвчийг хамгийн сүүлийн үеийн форматруу шинэчлэх</translation>
- </message>
- <message>
<source>Loading addresses...</source>
<translation>Хаягуудыг ачааллаж байна...</translation>
</message>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index 9f5344ecab..6cded5e135 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1550,14 +1550,6 @@
<translation>Siste Mottatte</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Byte Sendt</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Byte Mottatt</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping-tid</translation>
</message>
@@ -2070,6 +2062,10 @@
<translation>Kopier veksel</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>Totalt Beløp %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>eller</translation>
</message>
@@ -2101,19 +2097,15 @@
<source>Payment request expired.</source>
<translation>Betalingsetterspørringen har utløpt.</translation>
</message>
+ <message>
+ <source>Pay only the required fee of %1</source>
+ <translation>Betal kun påkrevd gebyr på %1</translation>
+ </message>
<message numerus="yes">
<source>Estimated to begin confirmation within %n block(s).</source>
<translation><numerusform>Anslått til å begynne bekreftelse innen %n blokk.</numerusform><numerusform>Anslått til å begynne bekreftelse innen %n blokker.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Betal kun minimumsgebyret på %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Totalt Beløp %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Mottakeradressen er ikke gyldig. Vennligst kontroller på nytt.</translation>
</message>
@@ -2892,10 +2884,6 @@
<translation>Ta imot kommandolinje- og JSON-RPC-kommandoer</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>Gebyrer (i %s/kB) mindre enn dette vil anses som gebyrfrie (for videresending) (standard: %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 er oppgitt eller hvis &lt;category&gt; = 1, ta ut all informasjon for feilsøking.</translation>
</message>
@@ -3016,10 +3004,6 @@
<translation>&lt;category&gt; kan være:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Forsøk å berge private nøkler fra en korrupt wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Valg for opprettelse av blokker:</translation>
</message>
@@ -3176,10 +3160,6 @@
<translation>Du må gjenoppbygge databasen med å bruke -reindex for å endre -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importerer blokker fra ekstern fil blk000??.dat</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>Tillat JSON-RPC-tilkoblinger fra angitt kilde. Gyldig for &lt;ip&gt; er en enkelt IP (f. eks. 1.2.3.4), et nettverk/nettmaske (f. eks. 1.2.3.4/255.255.255.0) eller et nettverk/CIDR (f. eks. 1.2.3.4/24). Dette alternativet kan angis flere ganger</translation>
</message>
@@ -3212,6 +3192,10 @@
<translation>Utfør kommando når et relevant varsel er mottatt eller vi ser en veldig lang gaffel (%s i kommando er erstattet med melding)</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>Gebyrer (i %s/kB) mindre enn dette anses som null gebyr for videresending, graving og laging av transaksjoner (standardverdi: %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>Hvis paytxfee ikke er angitt, inkluderer da nok i gebyr til at transaksjoner gjennomsnittligt bekreftes innen n blokker (standardverdi: %u)</translation>
</message>
@@ -3268,6 +3252,10 @@
<translation>Aktiverer beste kjede...</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
+ <translation>Forsøk å berge private nøkler fra en korrupt wallet.dat ved oppstart</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>Kan ikke løse -whitebind-adresse: '%s'</translation>
</message>
@@ -3292,6 +3280,10 @@
<translation>Feil ved lesing fra database, stenger ned.</translation>
</message>
<message>
+ <source>Imports blocks from external blk000??.dat file on startup</source>
+ <translation>Importerer blokker fra ekstern fil blk000??.dat ved oppstart</translation>
+ </message>
+ <message>
<source>Information</source>
<translation>Informasjon</translation>
</message>
@@ -3348,6 +3340,10 @@
<translation>Reduserer -maxconnections fra %d til %d, pga. systembegrensninger.</translation>
</message>
<message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>Se gjennom blokkjeden etter manglende lommeboktransaksjoner ved oppstart</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Send spor-/feilsøkingsinformasjon til konsollen istedenfor filen debug.log</translation>
</message>
@@ -3416,6 +3412,10 @@
<translation>Kan ikke binde til %s på denne datamaskinen (binding returnerte feilen %s)</translation>
</message>
<message>
+ <source>Upgrade wallet to latest format on startup</source>
+ <translation>Oppgrader lommebok til nyeste format ved oppstart</translation>
+ </message>
+ <message>
<source>Username for JSON-RPC connections</source>
<translation>Brukernavn for JSON-RPC forbindelser</translation>
</message>
@@ -3436,10 +3436,6 @@
<translation>Valg for ZeroMQ-meldinger:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>ved oppstart</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat korrupt, bergning feilet</translation>
</message>
@@ -3452,14 +3448,6 @@
<translation>Utfør kommando når beste blokk endrer seg (%s i kommandoen erstattes med blokkens hash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Oppgrader lommebok til nyeste format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Se gjennom blokkjeden etter manglende lommeboktransaksjoner</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Denne hjelpemeldingen</translation>
</message>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index cbb1dc0fe3..c307f0ab6a 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1490,14 +1490,6 @@
<translation>Laatst ontvangen</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes Verzonden</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes Ontvangen</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping Tijd</translation>
</message>
@@ -1994,10 +1986,6 @@
<translation>Betalingsverzoek verlopen.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Betaal alleen de minimale transactiekosten van %1</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>
@@ -2840,10 +2828,6 @@
<translation>&lt;category&gt; kan zijn:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Poog de geheime sleutels uit een corrupt wallet.dat bestand terug te halen</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blokcreatie-opties:</translation>
</message>
@@ -2956,10 +2940,6 @@
<translation>Om -txindex te kunnen veranderen dient u de database opnieuw te bouwen met gebruik van -reindex.</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importeert blokken van extern blk000??.dat bestand</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>Sta JSON-RPC verbindingen toe vanuit een gespecificeerde bron. Geldig voor &lt;ip&gt; zijn een enkel IP (bijv. 1.2.3.4), een netwerk/netmask (bijv. 1.2.3.4/255.255.255.0) of een netwerk/CIDR (bijv. 1.2.3.4/24). Deze optie kan meerdere keren gespecificeerd worden.</translation>
</message>
@@ -3189,10 +3169,6 @@
<translation>Bezig met het zappen van alle transacties van de portemonnee...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>bij opstarten</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrupt, veiligstellen mislukt</translation>
</message>
@@ -3205,14 +3181,6 @@
<translation>Voer commando uit zodra het beste blok verandert (%s in cmd wordt vervangen door blockhash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Vernieuw portemonnee naar nieuwste versie</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Doorzoek de blokketen op ontbrekende portemonnee-transacties</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Dit helpbericht</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index f5e74261f0..893ae43c55 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -1406,14 +1406,6 @@
<translation>I-execute ing command istung mialilan ya ing best block (%s in cmd is replaced by block hash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>I-upgrade ing wallet king pekabayung porma</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>I-scan pasibayu ing block chain para kareng mauaualang transaksion</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ining saup a mensayi</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index ed828539ee..228e02a5ee 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1490,14 +1490,6 @@
<translation>Ostatnio odebrano</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bajtów wysłano</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bajtów pobrano</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Czas odpowiedzi</translation>
</message>
@@ -1994,14 +1986,6 @@
<translation><numerusform>Przybliżony czas zatwierdzenia: %n bloków.</numerusform><numerusform>Przybliżony czas zatwierdzenia: %n bloków.</numerusform><numerusform>Przybliżony czas zatwierdzenia: %n bloków.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Płac tylko minimalna opłatę %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Całkowita kwota %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Adres odbiorcy jest nieprawidłowy, proszę sprawić ponownie.</translation>
</message>
@@ -2852,10 +2836,6 @@
<translation>&lt;category&gt; mogą być:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Próbuj odzyskać klucze prywatne z uszkodzonego wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opcje tworzenia bloku:</translation>
</message>
@@ -2976,10 +2956,6 @@
<translation>Musisz przebudować bazę używając parametru -reindex aby zmienić -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importuj bloki z zewnętrznego pliku blk000??.dat</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>Pozwól na połączenia JSON-RPC z podanego źródła. Jako &lt;ip&gt; prawidłowe jest pojedyncze IP (np. 1.2.3.4), podsieć/maska (np. 1.2.3.4/255.255.255.0) lub sieć/CIDR (np. 1.2.3.4/24). Opcja ta może być użyta wiele razy.</translation>
</message>
@@ -3216,10 +3192,6 @@
<translation>Usuwam wszystkie transakcje z portfela...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>podczas uruchamiania</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat uszkodzony, odtworzenie się nie powiodło</translation>
</message>
@@ -3232,14 +3204,6 @@
<translation>Wykonaj polecenie kiedy najlepszy blok ulegnie zmianie (%s w komendzie zastanie zastąpione przez hash bloku)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Zaktualizuj portfel do najnowszego formatu.</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Przeskanuj łańcuch bloków w poszukiwaniu zaginionych transakcji portfela</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ta wiadomość pomocy</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index da28365de0..4863591ac4 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -222,7 +222,15 @@
</context>
<context>
<name>BanTableModel</name>
- </context>
+ <message>
+ <source>IP/Netmask</source>
+ <translation>IP/Máscara</translation>
+ </message>
+ <message>
+ <source>Banned Until</source>
+ <translation>Banido até</translation>
+ </message>
+</context>
<context>
<name>BitcoinGUI</name>
<message>
@@ -379,7 +387,7 @@
</message>
<message>
<source>&amp;Settings</source>
- <translation>&amp;Configurações</translation>
+ <translation>&amp;definições</translation>
</message>
<message>
<source>&amp;Help</source>
@@ -1068,6 +1076,30 @@
<translation>Porta do serviço de proxy (ex. 9050)</translation>
</message>
<message>
+ <source>Used for reaching peers via:</source>
+ <translation>Usado para alcançar participantes via:</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>Conecte-se à rede Bitcoin através de um proxy SOCKS5 separado para utilizar serviços ocultos Tor.</translation>
+ </message>
+ <message>
+ <source>Use separate SOCKS5 proxy to reach peers via Tor hidden services:</source>
+ <translation>Use um proxy SOCKS5 separado para alcançar participantes da rede via serviços ocultos Tor:</translation>
+ </message>
+ <message>
<source>&amp;Window</source>
<translation>&amp;Janela</translation>
</message>
@@ -1454,10 +1486,18 @@
<translation>&amp;Pares</translation>
</message>
<message>
+ <source>Banned peers</source>
+ <translation>Nós banidos</translation>
+ </message>
+ <message>
<source>Select a peer to view detailed information.</source>
<translation>Selecione um cliente para ver informações detalhadas.</translation>
</message>
<message>
+ <source>Whitelisted</source>
+ <translation>Lista branca</translation>
+ </message>
+ <message>
<source>Direction</source>
<translation>Direção</translation>
</message>
@@ -1466,6 +1506,18 @@
<translation>Versão</translation>
</message>
<message>
+ <source>Starting Block</source>
+ <translation>Bloco inicial</translation>
+ </message>
+ <message>
+ <source>Synced Headers</source>
+ <translation>Cabeçalhos Sincronizados</translation>
+ </message>
+ <message>
+ <source>Synced Blocks</source>
+ <translation>Blocos Sincronizados</translation>
+ </message>
+ <message>
<source>User Agent</source>
<translation>User Agent</translation>
</message>
@@ -1490,18 +1542,14 @@
<translation>Ultimo Recebido</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes Enviados</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes recebidos</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping</translation>
</message>
<message>
+ <source>The duration of a currently outstanding ping.</source>
+ <translation>A duração de um ping excepcional no momento.</translation>
+ </message>
+ <message>
<source>Last block time</source>
<translation>Horário do último bloco</translation>
</message>
@@ -1546,6 +1594,34 @@
<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>
+ <message>
+ <source>1 &amp;day</source>
+ <translation>1 &amp;dia</translation>
+ </message>
+ <message>
+ <source>1 &amp;week</source>
+ <translation>1 &amp;semana</translation>
+ </message>
+ <message>
+ <source>1 &amp;year</source>
+ <translation>1 &amp;ano</translation>
+ </message>
+ <message>
+ <source>&amp;Unban Node</source>
+ <translation>&amp;Desbanir nó</translation>
+ </message>
+ <message>
<source>Welcome to the Bitcoin Core RPC console.</source>
<translation>Bem vindo ao console de RPC do Bitcoin.</translation>
</message>
@@ -1574,6 +1650,10 @@
<translation>%1 GB</translation>
</message>
<message>
+ <source>(node id: %1)</source>
+ <translation>(id do nó: %1)</translation>
+ </message>
+ <message>
<source>via %1</source>
<translation>por %1</translation>
</message>
@@ -1966,6 +2046,10 @@
<translation>Copia alteração</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>Quantia Total %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>ou</translation>
</message>
@@ -1997,15 +2081,15 @@
<source>Payment request expired.</source>
<translation>Pedido de pagamento expirado.</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 estimada em %n bloco.</numerusform><numerusform>Confirmação estimada em %n blocos.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Pagar somente a taxa mínima de %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>O endereço do destinatário é inválido. Favor confirmar.</translation>
</message>
@@ -2780,6 +2864,18 @@
<translation>Aceitar linha de comando e comandos 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>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>Error: A fatal internal error occurred, see debug.log for details</source>
+ <translation>Erro: Um erro interno fatal ocorreu, veja debug.log para detalhes</translation>
+ </message>
+ <message>
+ <source>Fee (in %s/kB) to add to transactions you send (default: %s)</source>
+ <translation>Taxa (em %s/kB) a ser adicionada às transações que você mandar (padrão: %s)</translation>
+ </message>
+ <message>
<source>Pruning blockstore...</source>
<translation>Prunando os blocos existentes...</translation>
</message>
@@ -2788,6 +2884,10 @@
<translation>Rodar em segundo plano como serviço e aceitar comandos</translation>
</message>
<message>
+ <source>Unable to start HTTP server. See debug log for details.</source>
+ <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>
@@ -2812,6 +2912,10 @@
<translation>Define o número de threads de verificação de script (%u a %d, 0 = automático, &lt;0 = número de cores deixados livres, padrão: %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>O banco de dados de blocos contém um bloco que parece ser do futuro. Isso pode ser devido à data e hora do seu computador estarem configuradas incorretamente. Apenas reconstrua o banco de dados de blocos se você estiver certo de que a data e hora de seu computador estão corretas.</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>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>
</message>
@@ -2820,6 +2924,14 @@
<translation>Impossível ouvir em %s neste computador. Provavelmente o Bitcoin já está sendo executado.</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>WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)</source>
+ <translation>AVISO: números estranhamente altos de blocos gerados, %d blocos recebidos nas últimas %d horas (%d esperados)</translation>
+ </message>
+ <message>
<source>WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)</source>
<translation>ATENÇÃO: verifique sua conexão %d blocos recebidos nas últimas %d horas (%d tempo estimado)</translation>
</message>
@@ -2844,12 +2956,12 @@
<translation>(padrão: 1)</translation>
</message>
<message>
- <source>&lt;category&gt; can be:</source>
- <translation>&lt;category&gt; pode ser:</translation>
+ <source>-maxmempool must be at least %d MB</source>
+ <translation>-maxmempool deve ser pelo menos %d MB</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Tentar recuperar chaves privadas de um arquivo wallet.dat corrompido</translation>
+ <source>&lt;category&gt; can be:</source>
+ <translation>&lt;category&gt; pode ser:</translation>
</message>
<message>
<source>Block creation options:</source>
@@ -2916,6 +3028,10 @@
<translation>Endereço -onion inválido: '%s'</translation>
</message>
<message>
+ <source>Keep the transaction memory pool below &lt;n&gt; megabytes (default: %u)</source>
+ <translation>Mantenha a mempool de transações abaixo de &lt;n&gt; megabytes (padrão: %u)</translation>
+ </message>
+ <message>
<source>Not enough file descriptors available.</source>
<translation>Decriptadores de arquivos disponíveis insuficientes.</translation>
</message>
@@ -2944,10 +3060,26 @@
<translation>Especifique o arquivo da carteira (dentro do diretório de dados)</translation>
</message>
<message>
+ <source>Unsupported argument -benchmark ignored, use -debug=bench.</source>
+ <translation>Argumento não suportado -benchmark ignorado, use -debug=bench.</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -debugnet ignored, use -debug=net.</source>
+ <translation>Argumento não suportado -debugnet ignorado, use -debug=net</translation>
+ </message>
+ <message>
+ <source>Unsupported argument -tor found, use -onion.</source>
+ <translation>Argumento não suportador encontrado: -tor. Use -onion.</translation>
+ </message>
+ <message>
<source>Use UPnP to map the listening port (default: %u)</source>
<translation>Use UPnP para mapear a porta de entrada (padrão: %u)</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>
+ <message>
<source>Verifying blocks...</source>
<translation>Verificando blocos...</translation>
</message>
@@ -2972,10 +3104,6 @@
<translation>Você precisa reconstruir o banco de dados utilizando -reindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importar blocos de um arquivo externo blk000??.dat</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 conexões JSON-RPC de uma fonte específica. Válido para um único ip (ex. 1.2.3.4), até uma rede/máscara (ex. 1.2.3.4/255.255.255.0) ou uma rede/CIDR (ex. 1.2.3.4/24). Esta opção pode ser usada múltiplas vezes</translation>
</message>
@@ -2988,6 +3116,10 @@
<translation>Não foi possível obter acesso exclusivo ao diretório de dados %s. Provavelmente Bitcoin já está sendo executado.</translation>
</message>
<message>
+ <source>Create new files with system default permissions, instead of umask 077 (only effective with disabled wallet functionality)</source>
+ <translation>Criar novos arquivos com permissões padrão do sistema, em vez de umask 077 (apenas efetivo com funcionalidade de carteira desabilitada)</translation>
+ </message>
+ <message>
<source>Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)</source>
<translation>Descobrir o próprio IP (padrão: 1 enquanto aguardando conexões e sem -externalip ou -proxy)</translation>
</message>
@@ -3000,6 +3132,10 @@
<translation>Executa um comando quando um alerta relevante é recebido ou vemos uma longa segregação (%s em cmd é substituído pela mensagem)</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>Set maximum size of high-priority/low-fee transactions in bytes (default: %d)</source>
<translation>Define o tamanho máximo de alta-prioridade por taxa baixa nas transações em bytes (padrão: %d)</translation>
</message>
@@ -3168,10 +3304,6 @@
<translation>Aniquilando todas as transações da carteira...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>ao iniciar</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corrompido, recuperação falhou</translation>
</message>
@@ -3184,14 +3316,6 @@
<translation>Executa um comando quando o melhor bloco mudar (%s no comando será substituído pelo hash do bloco)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Atualizar carteira para o formato mais recente</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Re-escanear blocos procurando por transações perdidas da carteira</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Exibe esta mensagem de ajuda</translation>
</message>
@@ -3212,6 +3336,10 @@
<translation>(padrão: %s)</translation>
</message>
<message>
+ <source>Always query for peer addresses via DNS lookup (default: %u)</source>
+ <translation>Sempre pergunte pelo endereço de peer via pesquisa DNS (padrão: %u)</translation>
+ </message>
+ <message>
<source>Error loading wallet.dat</source>
<translation>Erro ao carregar wallet.dat</translation>
</message>
@@ -3232,10 +3360,22 @@
<translation>Endereço -proxy inválido: '%s'</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>
+ <message>
<source>Listen for connections on &lt;port&gt; (default: %u or testnet: %u)</source>
<translation>Aguardar por conexões na porta &lt;port&gt; (padrão: %u ou testnet: %u)</translation>
</message>
<message>
+ <source>Maintain at most &lt;n&gt; connections to peers (default: %u)</source>
+ <translation>Manter, no máximo, &lt;n&gt; conexões com peers (padrão: %u)</translation>
+ </message>
+ <message>
+ <source>Make the wallet broadcast transactions</source>
+ <translation>Fazer a carteira transmitir transações</translation>
+ </message>
+ <message>
<source>Prepend debug output with timestamp (default: %u)</source>
<translation>Adiciona timestamp como prefixo no debug (default: %u)</translation>
</message>
@@ -3264,6 +3404,10 @@
<translation>Especificar aqrquivo pid (default: %s)</translation>
</message>
<message>
+ <source>Spend unconfirmed change when sending transactions (default: %u)</source>
+ <translation>Gastar troco não confirmado quando enviar transações (padrão: %u)</translation>
+ </message>
+ <message>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Rede desconhecida especificada em -onlynet: '%s'</translation>
</message>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 8d1d364935..4549066363 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1491,14 +1491,6 @@
<translation>Ultimo Recebimento</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes Enviados</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes Recebidos</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Tempo de Latência</translation>
</message>
@@ -1987,10 +1979,6 @@
<translation>Pedido de pagamento expirou.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Pagar somente a taxa minima de %1</translation>
- </message>
- <message>
<source>Warning: Invalid Bitcoin address</source>
<translation>Aviso: Endereço Bitcoin inválido</translation>
</message>
@@ -2793,10 +2781,6 @@
<translation>&lt;categoria&gt; pode ser:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Tentar recuperar chaves privadas de um wallet.dat corrupto</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opções de criação de bloco:</translation>
</message>
@@ -2909,10 +2893,6 @@
<translation>É necessário reconstruir as bases de dados usando -reindex para mudar o -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importar blocos de um ficheiro blk000??.dat externo</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 conexções JSON-RPC de fontes especificas. Valido para &lt;ip&gt; um unico IP (ex. 1.2.3.4), uma rede/netmask (ex. 1.2.3.4/255.255.255.0) ou uma rede/CIDR (ex. 1.2.3.4/24). Esta opção pode ser especificada varias vezes</translation>
</message>
@@ -3033,14 +3013,6 @@
<translation>Executar comando quando o melhor bloco mudar (no comando, %s é substituído pela hash do bloco)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Atualize a carteira para o formato mais recente</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Procurar transações em falta na cadeia de blocos</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Esta mensagem de ajuda</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 7617150829..72ab2c5bdb 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -1466,14 +1466,6 @@
<translation>Ultima primire</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Octeţi trimişi</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Octeţi primiţi</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Timp ping</translation>
</message>
@@ -1942,10 +1934,6 @@
<translation>Cererea de plată a expirat.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Plăteşte doar taxa minimă de %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Adresa destinatarului nu este validă, vă rugăm să o verificaţi.</translation>
</message>
@@ -2736,10 +2724,6 @@
<translation>&lt;category&gt; poate fi:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Încercare de recuperare a cheilor private dintr-un wallet.dat corupt</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Opţiuni creare bloc:</translation>
</message>
@@ -2848,10 +2832,6 @@
<translation>Trebuie să reconstruiţi baza de date folosind -reindex pentru a schimba -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importă blocuri dintr-un fişier extern blk000??.dat</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>Permite conexiunile JSON-RPC din sursa specificată. Valid pentru &lt;ip&gt; sînt IP singulare (ex. 1.2.3.4), o reţea/mască-reţea (ex. 1.2.3.4/255.255.255.0) sau o reţea/CIDR (ex. 1.2.3.4/24). Această opţiune poate fi specificată de mai multe ori</translation>
</message>
@@ -3004,10 +2984,6 @@
<translation>Şterge toate tranzacţiile din portofel...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>la pornire</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat corupt, salvare nereuşită</translation>
</message>
@@ -3020,14 +2996,6 @@
<translation>Execută comanda cînd cel mai bun bloc se modifică (%s în cmd este înlocuit cu hash-ul blocului)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Actualizează portofelul la ultimul format</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Rescanează lanţul de bloc pentru tranzacţiile portofel lipsă</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Acest mesaj de ajutor</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index d4f37479ee..b69a3bda54 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1044,6 +1044,10 @@
<translation>Порт прокси-сервера (например, 9050)</translation>
</message>
<message>
+ <source>Tor</source>
+ <translation>Tor</translation>
+ </message>
+ <message>
<source>&amp;Window</source>
<translation>&amp;Окно</translation>
</message>
@@ -1466,14 +1470,6 @@
<translation>Последний раз получено</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Байт передано</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Байт получено</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Время задержки</translation>
</message>
@@ -1978,10 +1974,6 @@
<translation>Запрос платежа просрочен.</translation>
</message>
<message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Всего %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Адрес получателя неверный. Пожалуйста, перепроверьте.</translation>
</message>
@@ -2816,10 +2808,6 @@
<translation>&lt;category&gt; может быть:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Попытаться восстановить приватные ключи из повреждённого wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Параметры создания блоков:</translation>
</message>
@@ -2940,10 +2928,6 @@
<translation>Вам необходимо пересобрать базы данных с помощью -reindex, чтобы изменить -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Импортировать блоки из внешнего файла blk000??.dat</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 с указанного источника. Разрешённые значения для &lt;ip&gt; — отдельный IP (например, 1.2.3.4), сеть/маска сети (например, 1.2.3.4/255.255.255.0) или сеть/CIDR (например, 1.2.3.4/24). Эту опцию можно использовать многократно</translation>
</message>
@@ -3192,10 +3176,6 @@
<translation>Стираем все транзакции из кошелька...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>при запуске</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat повреждён, спасение данных не удалось</translation>
</message>
@@ -3208,14 +3188,6 @@
<translation>Выполнить команду, когда появляется новый блок (%s в команде заменяется на хэш блока)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Обновить бумажник до последнего формата</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Перепроверить цепь блоков на предмет отсутствующих в бумажнике транзакций</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Эта справка</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index f8ae906128..83f5f2c8e7 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1494,14 +1494,6 @@
<translation>Posledné prijatie</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Odoslaných bajtov</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Prijatých bajtov</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Čas odozvy</translation>
</message>
@@ -1998,10 +1990,6 @@
<translation>Vypršala platnosť požiadavky na platbu.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Zaplatiť minimálny poplatok %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Adresa príjemcu je neplatná. Prosím, overte ju.</translation>
</message>
@@ -2818,10 +2806,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>&lt;category&gt; môže byť:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Pokus zachrániť súkromné kľúče z poškodeného wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Voľby vytvorenia bloku:</translation>
</message>
@@ -2930,10 +2914,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Potrebujete prebudovať databázu použitím -reindex zmeniť -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importuje bloky z externého súboru blk000??.dat</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>Povoliť JSON-RPC pripojenia zo zadaného zdroja. Pre &lt;ip&gt; sú platné jednoduché IP (napr. 1.2.3.4), sieť/netmask (napr. 1.2.3.4/255.255.255.0) alebo sieť/CIDR (napr. 1.2.3.4/24). Táto možnosť môže byť zadaná niekoľko krát</translation>
</message>
@@ -3146,10 +3126,6 @@ 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>on startup</source>
- <translation>pri štarte</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat je poškodený, záchrana zlyhala</translation>
</message>
@@ -3162,14 +3138,6 @@ The network does not appear to fully agree! Some miners appear to be experiencin
<translation>Vykonaj príkaz, ak zmeny v najlepšom bloku (%s v príkaze nahradí blok hash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Aktualizuj peňaženku na najnovší formát.</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Znovu skenovať reťaz blokov pre chýbajúce transakcie</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Táto pomocná správa</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 4378c74cd8..ca65810396 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -1490,14 +1490,6 @@
<translation>Nazadnje prejeto</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Oddanih bajtov</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Prejetih bajtov</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Odzivni čas</translation>
</message>
@@ -2006,10 +1998,6 @@
<translation><numerusform>Predviden začetek potrditev po %n najdenem bloku.</numerusform><numerusform>Predviden začetek potrditev po %n najdenih blokih.</numerusform><numerusform>Predviden začetek potrditev po %n najdenih blokih.</numerusform><numerusform>Predviden začetek potrditev po %n najdenih blokih.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Plačilo samo minimalne provizije v znesku %1</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Naslov prejemnika je neveljaven. Prosimo, preverite.</translation>
</message>
@@ -2852,10 +2840,6 @@
<translation>&lt;category&gt; je lahko:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Skušaj obnoviti zasebne ključe iz okvarjene datoteke wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Možnosti ustvarjanja blokov:</translation>
</message>
@@ -2976,10 +2960,6 @@
<translation>Ob spremembi vrednosti opcije -txindex boste morali obnoviti bazo podatkov z uporabo opcije -reindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Uvozi bloke iz zunanje datoteke blk000??.dat</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>Iz navedenega vira dovoli povezave na JSON-RPC. Veljavne oblike vrednosti parametra &lt;ip&gt; so: edinstven naslov IP (npr.: 1.2.3.4), kombinacija omrežje/netmask (npr.: 1.2.3.4/255.255.255.0), ali pa kombinacija omrežje/CIDR (1.2.3.4/24). To opcijo lahko navedete večkrat.</translation>
</message>
@@ -3116,10 +3096,6 @@
<translation>Brišem vse transakcije iz denarnice ...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>ob zagonu</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>Datoteka wallet.dat je poškodovana in je ni bilo mogoče obnoviti.</translation>
</message>
@@ -3132,14 +3108,6 @@
<translation>Izvedi ukaz, ko je najden najboljši blok (niz %s v ukazu bo zamenjan s hash vrednostjo bloka)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Nadgradi denarnico na najnovejšo različico</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>S ponovnim pregledom verige blokov poišči manjkajoče transakcije iz denarnice</translation>
- </message>
- <message>
<source>This help message</source>
<translation>To sporočilo pomoči</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sr.ts b/src/qt/locale/bitcoin_sr.ts
index bb8583fc09..425c077b2b 100644
--- a/src/qt/locale/bitcoin_sr.ts
+++ b/src/qt/locale/bitcoin_sr.ts
@@ -762,10 +762,6 @@
<translation>Lozinka za JSON-RPC konekcije</translation>
</message>
<message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Ponovo skeniraj lanac blokova za nedostajuće transakcije iz novčanika</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Ova poruka Pomoći</translation>
</message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 4691d7d204..69c175645b 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1547,14 +1547,6 @@ Var vänlig och försök igen.</translation>
<translation>Senast mottagen</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Bytes sänt</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Bytes mottaget</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Pingtid</translation>
</message>
@@ -2099,14 +2091,6 @@ Var vänlig och försök igen.</translation>
<translation><numerusform>Uppskattas till att påbörja bekräftelse inom %n block.</numerusform><numerusform>Uppskattas till att påbörja bekräftelse inom %n block.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Betala endast den minimala avgiften på %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Total summa %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Mottagarens adress är ogiltig. Kontrollera igen.</translation>
</message>
@@ -2881,10 +2865,6 @@ Var vänlig och försök igen.</translation>
<translation>Tillåt kommandon från kommandotolken och JSON-RPC-kommandon</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>Avgift (i %s/kB) mindre än detta betraktas som nollavgift för vidarebefordran(standard: %s)</translation>
- </message>
- <message>
<source>If &lt;category&gt; is not supplied or if &lt;category&gt; = 1, output all debugging information.</source>
<translation>Om &lt;kategori&gt; inte anges eller om &lt;category&gt; = 1, visa all avlusningsinformation.</translation>
</message>
@@ -3009,10 +2989,6 @@ Var vänlig och försök igen.</translation>
<translation>&lt;category&gt; Kan vara:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Försök att rädda de privata nycklarna från en korrupt wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Block skapande inställningar:</translation>
</message>
@@ -3169,10 +3145,6 @@ Var vänlig och försök igen.</translation>
<translation>Du måste återskapa databasen med -reindex för att ändra -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Importerar block från extern blk000??.dat fil</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>Tillåt JSON-RPC-anslutningar från specifik källa. Tillåtna &lt;ip&gt; är enkel IP (t.ex 1.2.3.4), en nätverk/nätmask (t.ex. 1.2.3.4/255.255.255.0) eller ett nätverk/CIDR (t.ex. 1.2.3.4/24). Detta alternativ anges flera gånger</translation>
</message>
@@ -3425,10 +3397,6 @@ Var vänlig och försök igen.</translation>
<translation>ZeroMQ-alternativ för notiser:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>under uppstarten</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat korrupt, räddning misslyckades</translation>
</message>
@@ -3441,14 +3409,6 @@ Var vänlig och försök igen.</translation>
<translation>Exekvera kommando när det bästa blocket ändras (%s i cmd är utbytt av blockhash)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Uppgradera plånboken till senaste formatet</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Sök i blockkedjan efter saknade plånboks transaktioner</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Det här hjälp medelandet</translation>
</message>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index 8d2945fba7..fa8392b3df 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1494,14 +1494,6 @@
<translation>Son Alma</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Yollanan Baytlar</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Alınan Baytlar</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping Süresi</translation>
</message>
@@ -2006,10 +1998,6 @@
<translation>Ödeme talebinin ömrü doldu.</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Sadece asgari ücret olan %1 tutarını öde</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Alıcı adresi geçerli değildir. Lütfen denetleyiniz.</translation>
</message>
@@ -2856,10 +2844,6 @@
<translation>&lt;kategori&gt; şunlar olabilir:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Bozuk bir wallet.dat dosyasından özel anahtarları geri kazanmayı dene</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Blok oluşturma seçenekleri:</translation>
</message>
@@ -2980,10 +2964,6 @@
<translation>-txindex'i değiştirmek için veritabanını -reindex kullanarak tekrar inşa etmeniz gerekmektedir</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Harici blk000??.dat dosyasından blokları içe aktarır</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>Belirtilen kaynaktan JSON-RPC bağlantılarını kabul et. Bir &lt;ip&gt; için geçerli olanlar şunlardır: salt IP adresi (mesela 1.2.3.4), bir şebeke/ağ maskesi (örneğin 1.2.3.4/255.255.255.0) ya da bir şebeke/CIDR (mesela 1.2.3.4/24). Bu seçenek birden fazla kez belirtilebilir</translation>
</message>
@@ -3232,10 +3212,6 @@
<translation>Cüzdandaki tüm muameleler kaldırılıyor...</translation>
</message>
<message>
- <source>on startup</source>
- <translation>başlangıçta</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat bozuk, geri kazanım başarısız oldu</translation>
</message>
@@ -3248,14 +3224,6 @@
<translation>En iyi blok değiştiğinde komutu çalıştır (komut için %s parametresi blok hash değeri ile değiştirilecektir)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Cüzdanı en yeni biçime güncelle</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Blok zincirini eksik cüzdan muameleleri için tekrar tara</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Bu yardım mesajı</translation>
</message>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index 4ab318425c..e0afa8eff8 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -1546,14 +1546,6 @@
<translation>Востаннє отримано</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Байтів відправлено</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Байтів отримано</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Затримка</translation>
</message>
@@ -2102,14 +2094,6 @@
<translation><numerusform>Перше підтвердження очікується протягом %n блоку.</numerusform><numerusform>Перше підтвердження очікується протягом %n блоків.</numerusform><numerusform>Перше підтвердження очікується протягом %n блоків.</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>Платити тільки мінімальну комісію у розмірі %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>Всього %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>Адреса отримувача неправильна. Будь ласка, перевірте її.</translation>
</message>
@@ -2888,10 +2872,6 @@
<translation>Приймати команди із командного рядка та команди JSON-RPC</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>Комісії (в %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>
@@ -3012,10 +2992,6 @@
<translation>&lt;category&gt; може бути:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>Спроба відновити закриті ключі з пошкодженого wallet.dat</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>Опції створення блоку:</translation>
</message>
@@ -3156,10 +3132,6 @@
<translation>Вам необхідно перебудувати базу даних з використанням -reindex для того, щоб змінити -txindex</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>Імпорт блоків з зовнішнього файлу blk000??.dat</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 зі вказаного джерела. Правильною для &lt;ip&gt; є окрема IP-адреса (наприклад, 1.2.3.4), IP-адреса та маска підмережі (наприклад, 1.2.3.4/255.255.255.0) або CIDR-адреса (наприклад, 1.2.3.4/24). Цей параметр можна вказувати декілька разів.</translation>
</message>
@@ -3416,10 +3388,6 @@
<translation>Параметри сповіщень ZeroMQ:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>під час запуску</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat пошкоджено, відновлення не вдалося</translation>
</message>
@@ -3432,14 +3400,6 @@
<translation>Виконати команду, коли з'явиться новий блок (%s в команді змінюється на хеш блоку)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>Модернізувати гаманець до найновішого формату</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>Пересканувати ланцюжок блоків, в пошуку втрачених транзакцій</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Дана довідка</translation>
</message>
diff --git a/src/qt/locale/bitcoin_uz@Cyrl.ts b/src/qt/locale/bitcoin_uz@Cyrl.ts
index 0b382ac6c0..004857cf01 100644
--- a/src/qt/locale/bitcoin_uz@Cyrl.ts
+++ b/src/qt/locale/bitcoin_uz@Cyrl.ts
@@ -1220,14 +1220,6 @@
<translation>Сўнгги қабул қилинган</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>Жўнатилган байтлар</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>Қабул қилинган байтлар</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping вақти</translation>
</message>
diff --git a/src/qt/locale/bitcoin_vi_VN.ts b/src/qt/locale/bitcoin_vi_VN.ts
index 1695f26ae7..c55aecd82d 100644
--- a/src/qt/locale/bitcoin_vi_VN.ts
+++ b/src/qt/locale/bitcoin_vi_VN.ts
@@ -686,10 +686,6 @@
<translation>Chú ý</translation>
</message>
<message>
- <source>on startup</source>
- <translation>khi khởi động</translation>
- </message>
- <message>
<source>This help message</source>
<translation>Thông điệp trợ giúp này</translation>
</message>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index ecb35b0c4f..1cd7eed503 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1522,14 +1522,6 @@
<translation>最后接收</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>发送字节</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>接收字节</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping 时间</translation>
</message>
@@ -2058,14 +2050,6 @@
<translation><numerusform>预计 %n 个数据块后被确认。</numerusform></translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>只支付最小费用 %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>总金额 %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
- </message>
- <message>
<source>The recipient address is not valid. Please recheck.</source>
<translation>接收人地址无效。请重新检查。</translation>
</message>
@@ -2925,10 +2909,6 @@
<translation>&lt;category&gt; 可能是:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>尝试从损坏的钱包文件wallet.dat中恢复私钥</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>数据块创建选项:</translation>
</message>
@@ -3049,10 +3029,6 @@
<translation>您需要将 -reindex 改为 -txindex 以重建数据库</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>从blk000??.dat文件导入数据块</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 连接。 &lt;ip&gt;为单一IP (如: 1.2.3.4), 网络/掩码 (如: 1.2.3.4/255.255.255.0), 网络/CIDR (如: 1.2.3.4/24)。该选项可多次指定。</translation>
</message>
@@ -3302,10 +3278,6 @@
<translation>ZeroMQ 通知选项:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>启动中</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>钱包文件wallet.dat损坏,抢救备份失败</translation>
</message>
@@ -3319,14 +3291,6 @@
<translation>当最佳数据块变化时执行命令 (命令行中的 %s 会被替换成数据块哈希值)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>将钱包升级到最新的格式</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>重新扫描区块链以查找遗漏的钱包交易</translation>
- </message>
- <message>
<source>This help message</source>
<translation>本帮助信息
</translation>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 8a92be31b5..b4dbf85a33 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1550,14 +1550,6 @@
<translation>最近收到</translation>
</message>
<message>
- <source>Bytes Sent</source>
- <translation>送出位元組</translation>
- </message>
- <message>
- <source>Bytes Received</source>
- <translation>收到位元組</translation>
- </message>
- <message>
<source>Ping Time</source>
<translation>Ping 時間</translation>
</message>
@@ -2070,6 +2062,10 @@
<translation>複製找零金額</translation>
</message>
<message>
+ <source>Total Amount %1</source>
+ <translation>總金額 %1</translation>
+ </message>
+ <message>
<source>or</source>
<translation>或</translation>
</message>
@@ -2102,12 +2098,8 @@
<translation>付款的要求過期了。</translation>
</message>
<message>
- <source>Pay only the minimum fee of %1</source>
- <translation>只付最低手續費 %1</translation>
- </message>
- <message>
- <source>Total Amount %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</source>
- <translation>總金額 %1&lt;span style='font-size:10pt;font-weight:normal;'&gt;&lt;br /&gt;(=%2)&lt;/span&gt;</translation>
+ <source>Pay only the required fee of %1</source>
+ <translation>只付必要的手續費 %1</translation>
</message>
<message>
<source>The recipient address is not valid. Please recheck.</source>
@@ -2889,10 +2881,6 @@
</translation>
</message>
<message>
- <source>Fees (in %s/kB) smaller than this are considered zero fee for relaying (default: %s)</source>
- <translation>當處理轉發的交易時,如果每千位元組(kB)的手續費比這個值(單位是 %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>
@@ -3017,10 +3005,6 @@
<translation>&lt;category&gt; 可以是:</translation>
</message>
<message>
- <source>Attempt to recover private keys from a corrupt wallet.dat</source>
- <translation>嘗試從壞掉的錢包檔 wallet.dat 復原密鑰</translation>
- </message>
- <message>
<source>Block creation options:</source>
<translation>區塊製造選項:</translation>
</message>
@@ -3173,10 +3157,6 @@
<translation>改變 -txindex 參數後,必須要用 -reindex 參數來重建資料庫</translation>
</message>
<message>
- <source>Imports blocks from external blk000??.dat file</source>
- <translation>從其它來源的 blk000??.dat 檔匯入區塊</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 連線。&lt;ip&gt; 的有效值可以是一個單獨位址(像是 1.2.3.4),一個網段/網段罩遮值(像是 1.2.3.4/255.255.255.0),或是網段/CIDR值(像是 1.2.3.4/24)。這個選項可以設定多次。</translation>
</message>
@@ -3209,6 +3189,10 @@
<translation>當收到相關警示,或發現相當長的分支時,所要執行的指令(指令中的 %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>當處理轉發的交易、挖礦、或製造交易時,如果每千位元組(kB)的手續費比這個值(單位是 %s)低,就視為沒付手續費(預設值: %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>
@@ -3265,6 +3249,10 @@
<translation>啟用最佳鏈結...</translation>
</message>
<message>
+ <source>Attempt to recover private keys from a corrupt wallet.dat on startup</source>
+ <translation>啟動時嘗試從壞掉的錢包檔 wallet.dat 復原密鑰</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>沒辦法解析 -whitebind 指定的位址: '%s'</translation>
</message>
@@ -3289,6 +3277,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>
@@ -3345,6 +3337,10 @@
<translation>因為系統的限制,將 -maxconnections 參數從 %d 降到了 %d</translation>
</message>
<message>
+ <source>Rescan the block chain for missing wallet transactions on startup</source>
+ <translation>啟動時重新掃描區塊鏈,來尋找錢包可能漏掉的交易。</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>在終端機顯示追蹤或除錯資訊,而不是寫到檔案 debug.log 中</translation>
</message>
@@ -3413,6 +3409,10 @@
<translation>無法和這台電腦上的 %s 繫結(回傳錯誤 %s)</translation>
</message>
<message>
+ <source>Upgrade wallet to latest format on startup</source>
+ <translation>啟動時把錢包檔案升級成最新的格式</translation>
+ </message>
+ <message>
<source>Username for JSON-RPC connections</source>
<translation>JSON-RPC 連線使用者名稱</translation>
</message>
@@ -3433,10 +3433,6 @@
<translation>ZeroMQ 通知選項:</translation>
</message>
<message>
- <source>on startup</source>
- <translation>當啟動時</translation>
- </message>
- <message>
<source>wallet.dat corrupt, salvage failed</source>
<translation>錢包檔 weallet.dat 壞掉了,拯救失敗</translation>
</message>
@@ -3449,14 +3445,6 @@
<translation>當最新區塊改變時要執行的指令(指令中的 %s 會被取代成區塊雜湊值)</translation>
</message>
<message>
- <source>Upgrade wallet to latest format</source>
- <translation>把錢包檔案升級成最新的格式</translation>
- </message>
- <message>
- <source>Rescan the block chain for missing wallet transactions</source>
- <translation>重新掃描區塊鏈,來尋找錢包可能漏掉的交易。</translation>
- </message>
- <message>
<source>This help message</source>
<translation>這些說明訊息</translation>
</message>
diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp
index 65e490570e..3e5c6c72b1 100644
--- a/src/qt/optionsmodel.cpp
+++ b/src/qt/optionsmodel.cpp
@@ -26,10 +26,10 @@
#include <QSettings>
#include <QStringList>
-OptionsModel::OptionsModel(QObject *parent) :
+OptionsModel::OptionsModel(QObject *parent, bool resetSettings) :
QAbstractListModel(parent)
{
- Init();
+ Init(resetSettings);
}
void OptionsModel::addOverriddenOption(const std::string &option)
@@ -38,8 +38,11 @@ void OptionsModel::addOverriddenOption(const std::string &option)
}
// Writes all missing QSettings with their default values
-void OptionsModel::Init()
+void OptionsModel::Init(bool resetSettings)
{
+ if (resetSettings)
+ Reset();
+
QSettings settings;
// Ensure restart flag is unset on client startup
diff --git a/src/qt/optionsmodel.h b/src/qt/optionsmodel.h
index 8448cad8de..d5bddb1a94 100644
--- a/src/qt/optionsmodel.h
+++ b/src/qt/optionsmodel.h
@@ -24,7 +24,7 @@ class OptionsModel : public QAbstractListModel
Q_OBJECT
public:
- explicit OptionsModel(QObject *parent = 0);
+ explicit OptionsModel(QObject *parent = 0, bool resetSettings = false);
enum OptionID {
StartAtStartup, // bool
@@ -48,7 +48,7 @@ public:
OptionIDRowCount,
};
- void Init();
+ void Init(bool resetSettings = false);
void Reset();
int rowCount(const QModelIndex & parent = QModelIndex()) const;
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 4554281e0f..619c8631ae 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -343,6 +343,8 @@ void RPCConsole::setClientModel(ClientModel *model)
updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent());
connect(model, SIGNAL(bytesChanged(quint64,quint64)), this, SLOT(updateTrafficStats(quint64, quint64)));
+ connect(model, SIGNAL(mempoolSizeChanged(long,size_t)), this, SLOT(setMempoolSize(long,size_t)));
+
// set up peer table
ui->peerWidget->setModel(model->getPeerTableModel());
ui->peerWidget->verticalHeader()->hide();
@@ -523,6 +525,16 @@ void RPCConsole::setNumBlocks(int count, const QDateTime& blockDate)
ui->lastBlockTime->setText(blockDate.toString());
}
+void RPCConsole::setMempoolSize(long numberOfTxs, size_t dynUsage)
+{
+ ui->mempoolNumberTxs->setText(QString::number(numberOfTxs));
+
+ if (dynUsage < 1000000)
+ ui->mempoolSize->setText(QString::number(dynUsage/1000.0, 'f', 2) + " KB");
+ else
+ ui->mempoolSize->setText(QString::number(dynUsage/1000000.0, 'f', 2) + " MB");
+}
+
void RPCConsole::on_lineEdit_returnPressed()
{
QString cmd = ui->lineEdit->text();
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index 0914612c3e..4b242affcd 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -84,6 +84,8 @@ public Q_SLOTS:
void setNumConnections(int count);
/** Set number of blocks and last block date shown in the UI */
void setNumBlocks(int count, const QDateTime& blockDate);
+ /** Set size (number of transactions and memory usage) of the mempool in the UI */
+ void setMempoolSize(long numberOfTxs, size_t dynUsage);
/** Go forward or back in history */
void browseHistory(int offset);
/** Scroll console view to end */
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 0ee08a1b0c..7b714be5b1 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -531,7 +531,7 @@ void SendCoinsDialog::processSendCoinsReturn(const WalletModel::SendCoinsReturn
msgParams.second = CClientUIInterface::MSG_ERROR;
break;
case WalletModel::AbsurdFee:
- msgParams.first = tr("A fee higher than %1 is considered an absurdly high fee.").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), 10000000));
+ msgParams.first = tr("A fee higher than %1 is considered an absurdly high fee.").arg(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), maxTxFee));
break;
case WalletModel::PaymentRequestExpired:
msgParams.first = tr("Payment request expired.");
@@ -633,7 +633,8 @@ void SendCoinsDialog::updateSmartFeeLabel()
return;
int nBlocksToConfirm = defaultConfirmTarget - ui->sliderSmartFee->value();
- CFeeRate feeRate = mempool.estimateFee(nBlocksToConfirm);
+ int estimateFoundAtBlocks = nBlocksToConfirm;
+ CFeeRate feeRate = mempool.estimateSmartFee(nBlocksToConfirm, &estimateFoundAtBlocks);
if (feeRate <= CFeeRate(0)) // not enough data => minfee
{
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), CWallet::GetRequiredFee(1000)) + "/kB");
@@ -644,7 +645,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
{
ui->labelSmartFee->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), feeRate.GetFeePerK()) + "/kB");
ui->labelSmartFee2->hide();
- ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", nBlocksToConfirm));
+ ui->labelFeeEstimation->setText(tr("Estimated to begin confirmation within %n block(s).", "", estimateFoundAtBlocks));
}
updateFeeMinimizedLabel();
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 98ad1a44b6..e8ada9f762 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -13,6 +13,7 @@
#include "transactionrecord.h"
#include "walletmodel.h"
+#include "core_io.h"
#include "main.h"
#include "sync.h"
#include "uint256.h"
@@ -220,6 +221,18 @@ public:
}
return QString();
}
+
+ QString getTxHex(TransactionRecord *rec)
+ {
+ LOCK2(cs_main, wallet->cs_wallet);
+ std::map<uint256, CWalletTx>::iterator mi = wallet->mapWallet.find(rec->hash);
+ if(mi != wallet->mapWallet.end())
+ {
+ std::string strHex = EncodeHexTx(static_cast<CTransaction>(mi->second));
+ return QString::fromStdString(strHex);
+ }
+ return QString();
+ }
};
TransactionTableModel::TransactionTableModel(const PlatformStyle *platformStyle, CWallet* wallet, WalletModel *parent):
@@ -594,6 +607,8 @@ QVariant TransactionTableModel::data(const QModelIndex &index, int role) const
return rec->getTxID();
case TxHashRole:
return QString::fromStdString(rec->hash.ToString());
+ case TxHexRole:
+ return priv->getTxHex(rec);
case ConfirmedRole:
return rec->status.countsForBalance;
case FormattedAmountRole:
diff --git a/src/qt/transactiontablemodel.h b/src/qt/transactiontablemodel.h
index 2089f703a6..601f893d47 100644
--- a/src/qt/transactiontablemodel.h
+++ b/src/qt/transactiontablemodel.h
@@ -60,6 +60,8 @@ public:
TxIDRole,
/** Transaction hash */
TxHashRole,
+ /** Transaction data, hex-encoded */
+ TxHexRole,
/** Is transaction confirmed? */
ConfirmedRole,
/** Formatted amount, without brackets when unconfirmed */
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 54e5a82720..11e6d750ac 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -141,6 +141,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
QAction *copyLabelAction = new QAction(tr("Copy label"), this);
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
+ QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
QAction *editLabelAction = new QAction(tr("Edit label"), this);
QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
@@ -149,6 +150,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
contextMenu->addAction(copyLabelAction);
contextMenu->addAction(copyAmountAction);
contextMenu->addAction(copyTxIDAction);
+ contextMenu->addAction(copyTxHexAction);
contextMenu->addAction(editLabelAction);
contextMenu->addAction(showDetailsAction);
@@ -170,6 +172,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
+ connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
}
@@ -380,6 +383,11 @@ void TransactionView::copyTxID()
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxIDRole);
}
+void TransactionView::copyTxHex()
+{
+ GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::TxHexRole);
+}
+
void TransactionView::editLabel()
{
if(!transactionView->selectionModel() ||!model)
diff --git a/src/qt/transactionview.h b/src/qt/transactionview.h
index ac157fb98d..dde700c4d1 100644
--- a/src/qt/transactionview.h
+++ b/src/qt/transactionview.h
@@ -93,6 +93,7 @@ private Q_SLOTS:
void copyLabel();
void copyAmount();
void copyTxID();
+ void copyTxHex();
void openThirdPartyTxUrl(QString url);
void updateWatchOnlyColumn(bool fHaveWatchOnly);
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp
index 5c21db8bdf..690ea0811e 100644
--- a/src/qt/walletmodel.cpp
+++ b/src/qt/walletmodel.cpp
@@ -290,8 +290,10 @@ WalletModel::SendCoinsReturn WalletModel::prepareTransaction(WalletModelTransact
return TransactionCreationFailed;
}
- // reject absurdly high fee > 0.1 bitcoin
- if (nFeeRequired > 10000000)
+ // reject absurdly high fee. (This can never happen because the
+ // wallet caps the fee at maxTxFee. This merely serves as a
+ // belt-and-suspenders check)
+ if (nFeeRequired > maxTxFee)
return AbsurdFee;
}
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 5fa707f94e..c872822759 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -10,6 +10,7 @@
#include "coins.h"
#include "consensus/validation.h"
#include "main.h"
+#include "policy/policy.h"
#include "primitives/transaction.h"
#include "rpcserver.h"
#include "streams.h"
@@ -71,6 +72,7 @@ UniValue blockheaderToJSON(const CBlockIndex* blockindex)
result.push_back(Pair("version", blockindex->nVersion));
result.push_back(Pair("merkleroot", blockindex->hashMerkleRoot.GetHex()));
result.push_back(Pair("time", (int64_t)blockindex->nTime));
+ result.push_back(Pair("mediantime", (int64_t)blockindex->GetMedianTimePast()));
result.push_back(Pair("nonce", (uint64_t)blockindex->nNonce));
result.push_back(Pair("bits", strprintf("%08x", blockindex->nBits)));
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
@@ -111,6 +113,7 @@ UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool tx
}
result.push_back(Pair("tx", txs));
result.push_back(Pair("time", block.GetBlockTime()));
+ result.push_back(Pair("mediantime", (int64_t)blockindex->GetMedianTimePast()));
result.push_back(Pair("nonce", (uint64_t)block.nNonce));
result.push_back(Pair("bits", strprintf("%08x", block.nBits)));
result.push_back(Pair("difficulty", GetDifficulty(blockindex)));
@@ -313,6 +316,7 @@ UniValue getblockheader(const UniValue& params, bool fHelp)
" \"version\" : n, (numeric) The block version\n"
" \"merkleroot\" : \"xxxx\", (string) The merkle root\n"
" \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
+ " \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"nonce\" : n, (numeric) The nonce\n"
" \"bits\" : \"1d00ffff\", (string) The bits\n"
" \"difficulty\" : x.xxx, (numeric) The difficulty\n"
@@ -374,6 +378,7 @@ UniValue getblock(const UniValue& params, bool fHelp)
" ,...\n"
" ],\n"
" \"time\" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT)\n"
+ " \"mediantime\" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT)\n"
" \"nonce\" : n, (numeric) The nonce\n"
" \"bits\" : \"1d00ffff\", (string) The bits\n"
" \"difficulty\" : x.xxx, (numeric) The difficulty\n"
@@ -608,6 +613,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
" \"headers\": xxxxxx, (numeric) the current number of headers we have validated\n"
" \"bestblockhash\": \"...\", (string) the hash of the currently best block\n"
" \"difficulty\": xxxxxx, (numeric) the current difficulty\n"
+ " \"mediantime\": xxxxxx, (numeric) median time for the current best block\n"
" \"verificationprogress\": xxxx, (numeric) estimate of verification progress [0..1]\n"
" \"chainwork\": \"xxxx\" (string) total amount of work in active chain, in hexadecimal\n"
" \"pruned\": xx, (boolean) if the blocks are subject to pruning\n"
@@ -639,6 +645,7 @@ UniValue getblockchaininfo(const UniValue& params, bool fHelp)
obj.push_back(Pair("headers", pindexBestHeader ? pindexBestHeader->nHeight : -1));
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("chainwork", chainActive.Tip()->nChainWork.GetHex()));
obj.push_back(Pair("pruned", fPruneMode));
diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp
index 343b6234d4..cab5819017 100644
--- a/src/rpcclient.cpp
+++ b/src/rpcclient.cpp
@@ -96,6 +96,8 @@ static const CRPCConvertParam vRPCConvertParams[] =
{ "getrawmempool", 0 },
{ "estimatefee", 0 },
{ "estimatepriority", 0 },
+ { "estimatesmartfee", 0 },
+ { "estimatesmartpriority", 0 },
{ "prioritisetransaction", 1 },
{ "prioritisetransaction", 2 },
{ "setban", 2 },
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 3fd07fc374..19b031b860 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -726,3 +726,75 @@ UniValue estimatepriority(const UniValue& params, bool fHelp)
return mempool.estimatePriority(nBlocks);
}
+
+UniValue estimatesmartfee(const UniValue& params, bool fHelp)
+{
+ if (fHelp || params.size() != 1)
+ throw runtime_error(
+ "estimatesmartfee nblocks\n"
+ "\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"
+ "\nArguments:\n"
+ "1. nblocks (numeric)\n"
+ "\nResult:\n"
+ "{\n"
+ " \"feerate\" : x.x, (numeric) estimate fee-per-kilobyte (in BTC)\n"
+ " \"blocks\" : n (numeric) block number where estimate was found\n"
+ "}\n"
+ "\n"
+ "A negative value is returned if not enough transactions and blocks\n"
+ "have been observed to make an estimate for any number of blocks.\n"
+ "However it will not return a value below the mempool reject fee.\n"
+ "\nExample:\n"
+ + HelpExampleCli("estimatesmartfee", "6")
+ );
+
+ RPCTypeCheck(params, boost::assign::list_of(UniValue::VNUM));
+
+ int nBlocks = params[0].get_int();
+
+ UniValue result(UniValue::VOBJ);
+ int answerFound;
+ CFeeRate feeRate = mempool.estimateSmartFee(nBlocks, &answerFound);
+ result.push_back(Pair("feerate", feeRate == CFeeRate(0) ? -1.0 : ValueFromAmount(feeRate.GetFeePerK())));
+ result.push_back(Pair("blocks", answerFound));
+ return result;
+}
+
+UniValue estimatesmartpriority(const UniValue& params, bool fHelp)
+{
+ if (fHelp || params.size() != 1)
+ throw runtime_error(
+ "estimatesmartpriority nblocks\n"
+ "\nWARNING: 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"
+ "\nResult:\n"
+ "{\n"
+ " \"priority\" : x.x, (numeric) estimated priority\n"
+ " \"blocks\" : n (numeric) block number where estimate was found\n"
+ "}\n"
+ "\n"
+ "A negative value is returned if not enough transactions and blocks\n"
+ "have been observed to make an estimate for any number of blocks.\n"
+ "However if the mempool reject fee is set it will return 1e9 * MAX_MONEY.\n"
+ "\nExample:\n"
+ + HelpExampleCli("estimatesmartpriority", "6")
+ );
+
+ RPCTypeCheck(params, boost::assign::list_of(UniValue::VNUM));
+
+ int nBlocks = params[0].get_int();
+
+ UniValue result(UniValue::VOBJ);
+ int answerFound;
+ double priority = mempool.estimateSmartPriority(nBlocks, &answerFound);
+ result.push_back(Pair("priority", priority));
+ result.push_back(Pair("blocks", answerFound));
+ return result;
+}
diff --git a/src/rpcnet.cpp b/src/rpcnet.cpp
index 8915010649..2578848891 100644
--- a/src/rpcnet.cpp
+++ b/src/rpcnet.cpp
@@ -90,6 +90,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
" \"addr\":\"host:port\", (string) The ip address and port of the peer\n"
" \"addrlocal\":\"ip:port\", (string) local address\n"
" \"services\":\"xxxxxxxxxxxxxxxx\", (string) The services offered\n"
+ " \"relaytxes\":true|false, (boolean) Whether peer has asked us to relay transactions to it\n"
" \"lastsend\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send\n"
" \"lastrecv\": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive\n"
" \"bytessent\": n, (numeric) The total bytes sent\n"
@@ -134,6 +135,7 @@ UniValue getpeerinfo(const UniValue& params, bool fHelp)
if (!(stats.addrLocal.empty()))
obj.push_back(Pair("addrlocal", stats.addrLocal));
obj.push_back(Pair("services", strprintf("%016x", stats.nServices)));
+ obj.push_back(Pair("relaytxes", stats.fRelayTxes));
obj.push_back(Pair("lastsend", stats.nLastSend));
obj.push_back(Pair("lastrecv", stats.nLastRecv));
obj.push_back(Pair("bytessent", stats.nSendBytes));
diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp
index 8bda5a0373..83d2c2d503 100644
--- a/src/rpcserver.cpp
+++ b/src/rpcserver.cpp
@@ -319,6 +319,8 @@ static const CRPCCommand vRPCCommands[] =
{ "util", "verifymessage", &verifymessage, true },
{ "util", "estimatefee", &estimatefee, true },
{ "util", "estimatepriority", &estimatepriority, true },
+ { "util", "estimatesmartfee", &estimatesmartfee, true },
+ { "util", "estimatesmartpriority", &estimatesmartpriority, true },
/* Not shown in help */
{ "hidden", "invalidateblock", &invalidateblock, true },
diff --git a/src/rpcserver.h b/src/rpcserver.h
index dde8dfdcc3..fc88f82be8 100644
--- a/src/rpcserver.h
+++ b/src/rpcserver.h
@@ -193,6 +193,8 @@ extern UniValue getblocktemplate(const UniValue& params, bool fHelp);
extern UniValue submitblock(const UniValue& params, bool fHelp);
extern UniValue estimatefee(const UniValue& params, bool fHelp);
extern UniValue estimatepriority(const UniValue& params, bool fHelp);
+extern UniValue estimatesmartfee(const UniValue& params, bool fHelp);
+extern UniValue estimatesmartpriority(const UniValue& params, bool fHelp);
extern UniValue getnewaddress(const UniValue& params, bool fHelp); // in rpcwallet.cpp
extern UniValue getaccountaddress(const UniValue& params, bool fHelp);
diff --git a/src/secp256k1/Makefile.am b/src/secp256k1/Makefile.am
index f4121f1705..7772a4e9d2 100644
--- a/src/secp256k1/Makefile.am
+++ b/src/secp256k1/Makefile.am
@@ -75,7 +75,7 @@ TESTS = tests
endif
if USE_ECMULT_STATIC_PRECOMPUTATION
-CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)/
+CPPFLAGS_FOR_BUILD +=-I$(top_srcdir)
CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function
gen_context_OBJECTS = gen_context.o
diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp
index 0c2ade48d6..4a294c6712 100644
--- a/src/test/accounting_tests.cpp
+++ b/src/test/accounting_tests.cpp
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333333;
ae.strOtherAccount = "b";
ae.strComment = "";
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
wtx.mapValue["comment"] = "z";
pwalletMain->AddToWallet(wtx, false, &walletdb);
@@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333336;
ae.strOtherAccount = "c";
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);
@@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333330;
ae.strOtherAccount = "d";
ae.nOrderPos = pwalletMain->IncOrderPosNext();
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);
@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_CASE(acc_orderupgrade)
ae.nTime = 1333333334;
ae.strOtherAccount = "e";
ae.nOrderPos = -1;
- walletdb.WriteAccountingEntry(ae);
+ pwalletMain->AddAccountingEntry(ae, walletdb);
GetResults(walletdb, results);
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp
index 13d848311a..9489a19f63 100644
--- a/src/test/coins_tests.cpp
+++ b/src/test/coins_tests.cpp
@@ -6,6 +6,8 @@
#include "random.h"
#include "uint256.h"
#include "test/test_bitcoin.h"
+#include "main.h"
+#include "consensus/validation.h"
#include <vector>
#include <map>
@@ -45,15 +47,18 @@ public:
bool BatchWrite(CCoinsMap& mapCoins, const uint256& hashBlock)
{
for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); ) {
- map_[it->first] = it->second.coins;
- if (it->second.coins.IsPruned() && insecure_rand() % 3 == 0) {
- // Randomly delete empty entries on write.
- map_.erase(it->first);
+ if (it->second.flags & CCoinsCacheEntry::DIRTY) {
+ // Same optimization used in CCoinsViewDB is to only write dirty entries.
+ map_[it->first] = it->second.coins;
+ if (it->second.coins.IsPruned() && insecure_rand() % 3 == 0) {
+ // Randomly delete empty entries on write.
+ map_.erase(it->first);
+ }
}
mapCoins.erase(it++);
}
- mapCoins.clear();
- hashBestBlock_ = hashBlock;
+ if (!hashBlock.IsNull())
+ hashBestBlock_ = hashBlock;
return true;
}
@@ -160,13 +165,22 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
}
if (insecure_rand() % 100 == 0) {
+ // Every 100 iterations, flush an intermediate cache
+ if (stack.size() > 1 && insecure_rand() % 2 == 0) {
+ unsigned int flushIndex = insecure_rand() % (stack.size() - 1);
+ stack[flushIndex]->Flush();
+ }
+ }
+ if (insecure_rand() % 100 == 0) {
// Every 100 iterations, change the cache stack.
if (stack.size() > 0 && insecure_rand() % 2 == 0) {
+ //Remove the top cache
stack.back()->Flush();
delete stack.back();
stack.pop_back();
}
if (stack.size() == 0 || (stack.size() < 4 && insecure_rand() % 2)) {
+ //Add a new cache
CCoinsView* tip = &base;
if (stack.size() > 0) {
tip = stack.back();
@@ -197,4 +211,140 @@ BOOST_AUTO_TEST_CASE(coins_cache_simulation_test)
BOOST_CHECK(missed_an_entry);
}
+// 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
+// In particular it is tested that spending a duplicate coinbase tx
+// has the expected effect (the other duplicate is overwitten at all cache levels)
+BOOST_AUTO_TEST_CASE(updatecoins_simulation_test)
+{
+ bool spent_a_duplicate_coinbase = false;
+ // A simple map to track what we expect the cache stack to represent.
+ std::map<uint256, CCoins> result;
+
+ // The cache stack.
+ CCoinsViewTest base; // A CCoinsViewTest at the bottom.
+ 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;
+ std::set<uint256> duplicateids;
+
+ for (unsigned int i = 0; i < NUM_SIMULATION_ITERATIONS; i++) {
+ {
+ 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();
+
+ // 1/10 times create a coinbase
+ if (insecure_rand() % 10 == 0 || coinbaseids.size() < 10) {
+ // 1/100 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);
+ }
+ else {
+ coinbaseids[tx.GetHash()] = tx.vout[0].nValue;
+ }
+ assert(CTransaction(tx).IsCoinBase());
+ }
+ // 9/10 times create 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();
+ }
+ prevouthash = *txIt;
+
+ // Construct the tx to spend the coins of prevouthash
+ tx.vin[0].prevout.hash = prevouthash;
+ tx.vin[0].prevout.n = 0;
+
+ // Update the expected result of prevouthash to know these coins are spent
+ CCoins& oldcoins = result[prevouthash];
+ oldcoins.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);
+
+ // 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);
+
+ CValidationState dummy;
+ UpdateCoins(tx, dummy, *(stack.back()), height);
+ }
+
+ // Once every 1000 iterations and at the end, verify the full cache.
+ if (insecure_rand() % 1000 == 1 || i == NUM_SIMULATION_ITERATIONS - 1) {
+ for (std::map<uint256, CCoins>::iterator it = result.begin(); it != result.end(); it++) {
+ const CCoins* coins = stack.back()->AccessCoins(it->first);
+ if (coins) {
+ BOOST_CHECK(*coins == it->second);
+ } else {
+ BOOST_CHECK(it->second.IsPruned());
+ }
+ }
+ }
+
+ if (insecure_rand() % 100 == 0) {
+ // Every 100 iterations, flush an intermediate cache
+ if (stack.size() > 1 && insecure_rand() % 2 == 0) {
+ unsigned int flushIndex = insecure_rand() % (stack.size() - 1);
+ stack[flushIndex]->Flush();
+ }
+ }
+ if (insecure_rand() % 100 == 0) {
+ // Every 100 iterations, change the cache stack.
+ if (stack.size() > 0 && insecure_rand() % 2 == 0) {
+ stack.back()->Flush();
+ delete stack.back();
+ stack.pop_back();
+ }
+ if (stack.size() == 0 || (stack.size() < 4 && insecure_rand() % 2)) {
+ CCoinsView* tip = &base;
+ if (stack.size() > 0) {
+ tip = stack.back();
+ }
+ stack.push_back(new CCoinsViewCacheTest(tip));
+ }
+ }
+ }
+
+ // Clean up the stack.
+ while (stack.size() > 0) {
+ delete stack.back();
+ stack.pop_back();
+ }
+
+ // Verify coverage.
+ BOOST_CHECK(spent_a_duplicate_coinbase);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp
index afb3b282f6..896e1237ed 100644
--- a/src/test/mempool_tests.cpp
+++ b/src/test/mempool_tests.cpp
@@ -17,6 +17,7 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
{
// Test CTxMemPool::remove functionality
+ TestMemPoolEntryHelper entry;
// Parent transaction with three children,
// and three grand-children:
CMutableTransaction txParent;
@@ -60,17 +61,17 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
BOOST_CHECK_EQUAL(removed.size(), 0);
// Just the parent:
- testPool.addUnchecked(txParent.GetHash(), CTxMemPoolEntry(txParent, 0, 0, 0.0, 1));
+ testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
testPool.remove(txParent, removed, true);
BOOST_CHECK_EQUAL(removed.size(), 1);
removed.clear();
// Parent, children, grandchildren:
- testPool.addUnchecked(txParent.GetHash(), CTxMemPoolEntry(txParent, 0, 0, 0.0, 1));
+ testPool.addUnchecked(txParent.GetHash(), entry.FromTx(txParent));
for (int i = 0; i < 3; i++)
{
- testPool.addUnchecked(txChild[i].GetHash(), CTxMemPoolEntry(txChild[i], 0, 0, 0.0, 1));
- testPool.addUnchecked(txGrandChild[i].GetHash(), CTxMemPoolEntry(txGrandChild[i], 0, 0, 0.0, 1));
+ testPool.addUnchecked(txChild[i].GetHash(), entry.FromTx(txChild[i]));
+ testPool.addUnchecked(txGrandChild[i].GetHash(), entry.FromTx(txGrandChild[i]));
}
// Remove Child[0], GrandChild[0] should be removed:
testPool.remove(txChild[0], removed, true);
@@ -90,8 +91,8 @@ BOOST_AUTO_TEST_CASE(MempoolRemoveTest)
// Add children and grandchildren, but NOT the parent (simulate the parent being in a block)
for (int i = 0; i < 3; i++)
{
- testPool.addUnchecked(txChild[i].GetHash(), CTxMemPoolEntry(txChild[i], 0, 0, 0.0, 1));
- testPool.addUnchecked(txGrandChild[i].GetHash(), CTxMemPoolEntry(txGrandChild[i], 0, 0, 0.0, 1));
+ testPool.addUnchecked(txChild[i].GetHash(), entry.FromTx(txChild[i]));
+ testPool.addUnchecked(txGrandChild[i].GetHash(), entry.FromTx(txGrandChild[i]));
}
// 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):
@@ -114,41 +115,45 @@ void CheckSort(CTxMemPool &pool, std::vector<std::string> &sortedOrder)
BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
{
CTxMemPool pool(CFeeRate(0));
+ TestMemPoolEntryHelper entry;
+ entry.hadNoDependencies = true;
/* 3rd highest fee */
CMutableTransaction tx1 = CMutableTransaction();
tx1.vout.resize(1);
tx1.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx1.vout[0].nValue = 10 * COIN;
- pool.addUnchecked(tx1.GetHash(), CTxMemPoolEntry(tx1, 10000LL, 0, 10.0, 1, true));
+ pool.addUnchecked(tx1.GetHash(), entry.Fee(10000LL).Priority(10.0).FromTx(tx1));
/* highest fee */
CMutableTransaction tx2 = CMutableTransaction();
tx2.vout.resize(1);
tx2.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx2.vout[0].nValue = 2 * COIN;
- pool.addUnchecked(tx2.GetHash(), CTxMemPoolEntry(tx2, 20000LL, 0, 9.0, 1, true));
+ pool.addUnchecked(tx2.GetHash(), entry.Fee(20000LL).Priority(9.0).FromTx(tx2));
/* lowest fee */
CMutableTransaction tx3 = CMutableTransaction();
tx3.vout.resize(1);
tx3.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx3.vout[0].nValue = 5 * COIN;
- pool.addUnchecked(tx3.GetHash(), CTxMemPoolEntry(tx3, 0LL, 0, 100.0, 1, true));
+ pool.addUnchecked(tx3.GetHash(), entry.Fee(0LL).Priority(100.0).FromTx(tx3));
/* 2nd highest fee */
CMutableTransaction tx4 = CMutableTransaction();
tx4.vout.resize(1);
tx4.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx4.vout[0].nValue = 6 * COIN;
- pool.addUnchecked(tx4.GetHash(), CTxMemPoolEntry(tx4, 15000LL, 0, 1.0, 1, true));
+ pool.addUnchecked(tx4.GetHash(), entry.Fee(15000LL).Priority(1.0).FromTx(tx4));
/* equal fee rate to tx1, but newer */
CMutableTransaction tx5 = CMutableTransaction();
tx5.vout.resize(1);
tx5.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx5.vout[0].nValue = 11 * COIN;
- pool.addUnchecked(tx5.GetHash(), CTxMemPoolEntry(tx5, 10000LL, 1, 10.0, 1, true));
+ entry.nTime = 1;
+ entry.dPriority = 10.0;
+ pool.addUnchecked(tx5.GetHash(), entry.Fee(10000LL).FromTx(tx5));
BOOST_CHECK_EQUAL(pool.size(), 5);
std::vector<std::string> sortedOrder;
@@ -166,7 +171,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
tx6.vout.resize(1);
tx6.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx6.vout[0].nValue = 20 * COIN;
- pool.addUnchecked(tx6.GetHash(), CTxMemPoolEntry(tx6, 0LL, 1, 10.0, 1, true));
+ pool.addUnchecked(tx6.GetHash(), entry.Fee(0LL).FromTx(tx6));
BOOST_CHECK_EQUAL(pool.size(), 6);
// Check that at this point, tx6 is sorted low
sortedOrder.insert(sortedOrder.begin(), tx6.GetHash().ToString());
@@ -186,11 +191,10 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
CTxMemPool::setEntries setAncestorsCalculated;
std::string dummy;
- CTxMemPoolEntry entry7(tx7, 2000000LL, 1, 10.0, 1, true);
- BOOST_CHECK_EQUAL(pool.CalculateMemPoolAncestors(entry7, setAncestorsCalculated, 100, 1000000, 1000, 1000000, dummy), true);
+ BOOST_CHECK_EQUAL(pool.CalculateMemPoolAncestors(entry.Fee(2000000LL).FromTx(tx7), setAncestorsCalculated, 100, 1000000, 1000, 1000000, dummy), true);
BOOST_CHECK(setAncestorsCalculated == setAncestors);
- pool.addUnchecked(tx7.GetHash(), CTxMemPoolEntry(tx7, 2000000LL, 1, 10.0, 1, true), setAncestors);
+ pool.addUnchecked(tx7.GetHash(), entry.FromTx(tx7), setAncestors);
BOOST_CHECK_EQUAL(pool.size(), 7);
// Now tx6 should be sorted higher (high fee child): tx7, tx6, tx2, ...
@@ -208,7 +212,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
tx8.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx8.vout[0].nValue = 10 * COIN;
setAncestors.insert(pool.mapTx.find(tx7.GetHash()));
- pool.addUnchecked(tx8.GetHash(), CTxMemPoolEntry(tx8, 0LL, 2, 10.0, 1, true), setAncestors);
+ pool.addUnchecked(tx8.GetHash(), entry.Fee(0LL).Time(2).FromTx(tx8), setAncestors);
// Now tx8 should be sorted low, but tx6/tx both high
sortedOrder.insert(sortedOrder.begin(), tx8.GetHash().ToString());
@@ -222,7 +226,7 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
tx9.vout.resize(1);
tx9.vout[0].scriptPubKey = CScript() << OP_11 << OP_EQUAL;
tx9.vout[0].nValue = 1 * COIN;
- pool.addUnchecked(tx9.GetHash(), CTxMemPoolEntry(tx9, 0LL, 3, 10.0, 1, true), setAncestors);
+ pool.addUnchecked(tx9.GetHash(), entry.Fee(0LL).Time(3).FromTx(tx9), setAncestors);
// tx9 should be sorted low
BOOST_CHECK_EQUAL(pool.size(), 9);
@@ -245,11 +249,10 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
tx10.vout[0].nValue = 10 * COIN;
setAncestorsCalculated.clear();
- CTxMemPoolEntry entry10(tx10, 200000LL, 4, 10.0, 1, true);
- BOOST_CHECK_EQUAL(pool.CalculateMemPoolAncestors(entry10, setAncestorsCalculated, 100, 1000000, 1000, 1000000, dummy), true);
+ BOOST_CHECK_EQUAL(pool.CalculateMemPoolAncestors(entry.Fee(200000LL).Time(4).FromTx(tx10), setAncestorsCalculated, 100, 1000000, 1000, 1000000, dummy), true);
BOOST_CHECK(setAncestorsCalculated == setAncestors);
- pool.addUnchecked(tx10.GetHash(), CTxMemPoolEntry(tx10, 200000LL, 4, 10.0, 1, true), setAncestors);
+ pool.addUnchecked(tx10.GetHash(), entry.FromTx(tx10), setAncestors);
/**
* tx8 and tx9 should both now be sorted higher
@@ -284,6 +287,8 @@ BOOST_AUTO_TEST_CASE(MempoolIndexingTest)
BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
{
CTxMemPool pool(CFeeRate(1000));
+ TestMemPoolEntryHelper entry;
+ entry.dPriority = 10.0;
CMutableTransaction tx1 = CMutableTransaction();
tx1.vin.resize(1);
@@ -291,7 +296,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
tx1.vout.resize(1);
tx1.vout[0].scriptPubKey = CScript() << OP_1 << OP_EQUAL;
tx1.vout[0].nValue = 10 * COIN;
- pool.addUnchecked(tx1.GetHash(), CTxMemPoolEntry(tx1, 10000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx1)));
+ pool.addUnchecked(tx1.GetHash(), entry.Fee(10000LL).FromTx(tx1, &pool));
CMutableTransaction tx2 = CMutableTransaction();
tx2.vin.resize(1);
@@ -299,7 +304,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
tx2.vout.resize(1);
tx2.vout[0].scriptPubKey = CScript() << OP_2 << OP_EQUAL;
tx2.vout[0].nValue = 10 * COIN;
- pool.addUnchecked(tx2.GetHash(), CTxMemPoolEntry(tx2, 5000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx2)));
+ pool.addUnchecked(tx2.GetHash(), entry.Fee(5000LL).FromTx(tx2, &pool));
pool.TrimToSize(pool.DynamicMemoryUsage()); // should do nothing
BOOST_CHECK(pool.exists(tx1.GetHash()));
@@ -309,7 +314,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
BOOST_CHECK(pool.exists(tx1.GetHash()));
BOOST_CHECK(!pool.exists(tx2.GetHash()));
- pool.addUnchecked(tx2.GetHash(), CTxMemPoolEntry(tx2, 5000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx2)));
+ pool.addUnchecked(tx2.GetHash(), entry.FromTx(tx2, &pool));
CMutableTransaction tx3 = CMutableTransaction();
tx3.vin.resize(1);
tx3.vin[0].prevout = COutPoint(tx2.GetHash(), 0);
@@ -317,7 +322,7 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
tx3.vout.resize(1);
tx3.vout[0].scriptPubKey = CScript() << OP_3 << OP_EQUAL;
tx3.vout[0].nValue = 10 * COIN;
- pool.addUnchecked(tx3.GetHash(), CTxMemPoolEntry(tx3, 20000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx3)));
+ pool.addUnchecked(tx3.GetHash(), entry.Fee(20000LL).FromTx(tx3, &pool));
pool.TrimToSize(pool.DynamicMemoryUsage() * 3 / 4); // tx3 should pay for tx2 (CPFP)
BOOST_CHECK(!pool.exists(tx1.GetHash()));
@@ -380,10 +385,10 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
tx7.vout[1].scriptPubKey = CScript() << OP_7 << OP_EQUAL;
tx7.vout[1].nValue = 10 * COIN;
- pool.addUnchecked(tx4.GetHash(), CTxMemPoolEntry(tx4, 7000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx4)));
- pool.addUnchecked(tx5.GetHash(), CTxMemPoolEntry(tx5, 1000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx5)));
- pool.addUnchecked(tx6.GetHash(), CTxMemPoolEntry(tx6, 1100LL, 0, 10.0, 1, pool.HasNoInputsOf(tx6)));
- pool.addUnchecked(tx7.GetHash(), CTxMemPoolEntry(tx7, 9000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx7)));
+ pool.addUnchecked(tx4.GetHash(), entry.Fee(7000LL).FromTx(tx4, &pool));
+ pool.addUnchecked(tx5.GetHash(), entry.Fee(1000LL).FromTx(tx5, &pool));
+ pool.addUnchecked(tx6.GetHash(), entry.Fee(1100LL).FromTx(tx6, &pool));
+ pool.addUnchecked(tx7.GetHash(), entry.Fee(9000LL).FromTx(tx7, &pool));
// we only require this remove, at max, 2 txn, because its not clear what we're really optimizing for aside from that
pool.TrimToSize(pool.DynamicMemoryUsage() - 1);
@@ -392,8 +397,8 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
BOOST_CHECK(!pool.exists(tx7.GetHash()));
if (!pool.exists(tx5.GetHash()))
- pool.addUnchecked(tx5.GetHash(), CTxMemPoolEntry(tx5, 1000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx5)));
- pool.addUnchecked(tx7.GetHash(), CTxMemPoolEntry(tx7, 9000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx7)));
+ pool.addUnchecked(tx5.GetHash(), entry.Fee(1000LL).FromTx(tx5, &pool));
+ pool.addUnchecked(tx7.GetHash(), entry.Fee(9000LL).FromTx(tx7, &pool));
pool.TrimToSize(pool.DynamicMemoryUsage() / 2); // should maximize mempool size by only removing 5/7
BOOST_CHECK(pool.exists(tx4.GetHash()));
@@ -401,8 +406,8 @@ BOOST_AUTO_TEST_CASE(MempoolSizeLimitTest)
BOOST_CHECK(pool.exists(tx6.GetHash()));
BOOST_CHECK(!pool.exists(tx7.GetHash()));
- pool.addUnchecked(tx5.GetHash(), CTxMemPoolEntry(tx5, 1000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx5)));
- pool.addUnchecked(tx7.GetHash(), CTxMemPoolEntry(tx7, 9000LL, 0, 10.0, 1, pool.HasNoInputsOf(tx7)));
+ 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::list<CTransaction> conflicts;
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index f745b75a82..dc20e34634 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -65,6 +65,10 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
CMutableTransaction tx,tx2;
CScript script;
uint256 hash;
+ TestMemPoolEntryHelper entry;
+ entry.nFee = 11;
+ entry.dPriority = 111.0;
+ entry.nHeight = 11;
LOCK(cs_main);
fCheckpointsEnabled = false;
@@ -114,7 +118,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
{
tx.vout[0].nValue -= 1000000;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
tx.vin[0].prevout.hash = hash;
}
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
@@ -134,7 +138,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
{
tx.vout[0].nValue -= 10000000;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
tx.vin[0].prevout.hash = hash;
}
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
@@ -143,7 +147,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
// orphan in mempool
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
delete pblocktemplate;
mempool.clear();
@@ -153,7 +157,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vin[0].prevout.hash = txFirst[1]->GetHash();
tx.vout[0].nValue = 4900000000LL;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
tx.vin[0].prevout.hash = hash;
tx.vin.resize(2);
tx.vin[1].scriptSig = CScript() << OP_1;
@@ -161,7 +165,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vin[1].prevout.n = 0;
tx.vout[0].nValue = 5900000000LL;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
delete pblocktemplate;
mempool.clear();
@@ -172,7 +176,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vin[0].scriptSig = CScript() << OP_0 << OP_1;
tx.vout[0].nValue = 0;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
delete pblocktemplate;
mempool.clear();
@@ -185,12 +189,12 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
script = CScript() << OP_0;
tx.vout[0].scriptPubKey = GetScriptForDestination(CScriptID(script));
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
tx.vin[0].prevout.hash = hash;
tx.vin[0].scriptSig = CScript() << (std::vector<unsigned char>)script;
tx.vout[0].nValue -= 1000000;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
delete pblocktemplate;
mempool.clear();
@@ -201,10 +205,10 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].nValue = 4900000000LL;
tx.vout[0].scriptPubKey = CScript() << OP_1;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
tx.vout[0].scriptPubKey = CScript() << OP_2;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
delete pblocktemplate;
mempool.clear();
@@ -230,7 +234,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx.vout[0].scriptPubKey = CScript() << OP_1;
tx.nLockTime = chainActive.Tip()->nHeight+1;
hash = tx.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx));
BOOST_CHECK(!CheckFinalTx(tx, LOCKTIME_MEDIAN_TIME_PAST));
// time locked
@@ -244,7 +248,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity)
tx2.vout[0].scriptPubKey = CScript() << OP_1;
tx2.nLockTime = chainActive.Tip()->GetMedianTimePast()+1;
hash = tx2.GetHash();
- mempool.addUnchecked(hash, CTxMemPoolEntry(tx2, 11, GetTime(), 111.0, 11));
+ mempool.addUnchecked(hash, entry.Time(GetTime()).FromTx(tx2));
BOOST_CHECK(!CheckFinalTx(tx2, LOCKTIME_MEDIAN_TIME_PAST));
BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey));
diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp
index cb64ee7c69..1315146f10 100644
--- a/src/test/policyestimator_tests.cpp
+++ b/src/test/policyestimator_tests.cpp
@@ -16,6 +16,7 @@ BOOST_FIXTURE_TEST_SUITE(policyestimator_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
{
CTxMemPool mpool(CFeeRate(1000));
+ TestMemPoolEntryHelper entry;
CAmount basefee(2000);
double basepri = 1e6;
CAmount deltaFee(100);
@@ -63,7 +64,7 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
for (int k = 0; k < 5; k++) { // add 4 fee txs for every priority tx
tx.vin[0].prevout.n = 10000*blocknum+100*j+k; // make transaction unique
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, CTxMemPoolEntry(tx, feeV[k/4][j], GetTime(), priV[k/4][j], blocknum, mpool.HasNoInputsOf(tx)));
+ mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
txHashes[j].push_back(hash);
}
}
@@ -83,11 +84,18 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
block.clear();
if (blocknum == 30) {
// At this point we should need to combine 5 buckets to get enough data points
- // So estimateFee(1) should fail and estimateFee(2) should return somewhere around
- // 8*baserate
+ // So estimateFee(1,2,3) should fail and estimateFee(4) should return somewhere around
+ // 8*baserate. estimateFee(4) %'s are 100,100,100,100,90 = average 98%
BOOST_CHECK(mpool.estimateFee(1) == CFeeRate(0));
- BOOST_CHECK(mpool.estimateFee(2).GetFeePerK() < 8*baseRate.GetFeePerK() + deltaFee);
- BOOST_CHECK(mpool.estimateFee(2).GetFeePerK() > 8*baseRate.GetFeePerK() - deltaFee);
+ BOOST_CHECK(mpool.estimateFee(2) == CFeeRate(0));
+ BOOST_CHECK(mpool.estimateFee(3) == CFeeRate(0));
+ BOOST_CHECK(mpool.estimateFee(4).GetFeePerK() < 8*baseRate.GetFeePerK() + deltaFee);
+ BOOST_CHECK(mpool.estimateFee(4).GetFeePerK() > 8*baseRate.GetFeePerK() - deltaFee);
+ int answerFound;
+ BOOST_CHECK(mpool.estimateSmartFee(1, &answerFound) == mpool.estimateFee(4) && answerFound == 4);
+ BOOST_CHECK(mpool.estimateSmartFee(3, &answerFound) == mpool.estimateFee(4) && answerFound == 4);
+ BOOST_CHECK(mpool.estimateSmartFee(4, &answerFound) == mpool.estimateFee(4) && answerFound == 4);
+ BOOST_CHECK(mpool.estimateSmartFee(8, &answerFound) == mpool.estimateFee(8) && answerFound == 8);
}
}
@@ -96,9 +104,9 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
// 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 9*baseRate.
- // Third highest feerate has 90% chance of being included by 2 blocks,
- // so estimateFee(2) should return 8*baseRate etc...
+ // so estimateFee(1) should return 10*baseRate.
+ // 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));
@@ -106,10 +114,11 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
BOOST_CHECK(origFeeEst[i-1] <= origFeeEst[i-2]);
BOOST_CHECK(origPriEst[i-1] <= origPriEst[i-2]);
}
- BOOST_CHECK(origFeeEst[i-1] < (10-i)*baseRate.GetFeePerK() + deltaFee);
- BOOST_CHECK(origFeeEst[i-1] > (10-i)*baseRate.GetFeePerK() - deltaFee);
- BOOST_CHECK(origPriEst[i-1] < pow(10,10-i) * basepri + deltaPri);
- BOOST_CHECK(origPriEst[i-1] > pow(10,10-i) * basepri - deltaPri);
+ 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);
}
// Mine 50 more blocks with no transactions happening, estimates shouldn't change
@@ -132,16 +141,19 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
for (int k = 0; k < 5; k++) { // add 4 fee txs for every priority tx
tx.vin[0].prevout.n = 10000*blocknum+100*j+k;
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, CTxMemPoolEntry(tx, feeV[k/4][j], GetTime(), priV[k/4][j], blocknum, mpool.HasNoInputsOf(tx)));
+ mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
txHashes[j].push_back(hash);
}
}
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
}
+ int answerFound;
for (int i = 1; i < 10;i++) {
- BOOST_CHECK(mpool.estimateFee(i).GetFeePerK() > origFeeEst[i-1] - deltaFee);
- BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri);
+ 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
@@ -161,14 +173,14 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
BOOST_CHECK(mpool.estimatePriority(i) > origPriEst[i-1] - deltaPri);
}
- // Mine 100 more blocks where everything is mined every block
- // Estimates should be below original estimates (not possible for last estimate)
- while (blocknum < 365) {
+ // 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
tx.vin[0].prevout.n = 10000*blocknum+100*j+k;
uint256 hash = tx.GetHash();
- mpool.addUnchecked(hash, CTxMemPoolEntry(tx, feeV[k/4][j], GetTime(), priV[k/4][j], blocknum, mpool.HasNoInputsOf(tx)));
+ mpool.addUnchecked(hash, entry.Fee(feeV[k/4][j]).Time(GetTime()).Priority(priV[k/4][j]).Height(blocknum).FromTx(tx, &mpool));
CTransaction btx;
if (mpool.lookup(hash, btx))
block.push_back(btx);
@@ -177,10 +189,22 @@ BOOST_AUTO_TEST_CASE(BlockPolicyEstimates)
mpool.removeForBlock(block, ++blocknum, dummyConflicted);
block.clear();
}
- for (int i = 1; i < 9; i++) {
+ for (int i = 1; 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(), CTxMemPoolEntry(tx, feeV[0][5], GetTime(), priV[1][5], blocknum, mpool.HasNoInputsOf(tx)));
+ // evict that transaction which should set a mempool min fee of minRelayTxFee + feeV[0][5]
+ mpool.TrimToSize(1);
+ BOOST_CHECK(mpool.GetMinFee(1).GetFeePerK() > feeV[0][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());
+ BOOST_CHECK(mpool.estimateSmartPriority(i) == INF_PRIORITY);
+ }
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 816abd9281..2fe190f885 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -15,6 +15,7 @@
#include "pubkey.h"
#include "random.h"
#include "txdb.h"
+#include "txmempool.h"
#include "ui_interface.h"
#include "util.h"
#ifdef ENABLE_WALLET
@@ -141,6 +142,12 @@ TestChain100Setup::~TestChain100Setup()
{
}
+
+CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(CMutableTransaction &tx, CTxMemPool *pool) {
+ return CTxMemPoolEntry(tx, nFee, nTime, dPriority, nHeight,
+ pool ? pool->HasNoInputsOf(tx) : hadNoDependencies);
+}
+
void Shutdown(void* parg)
{
exit(0);
diff --git a/src/test/test_bitcoin.h b/src/test/test_bitcoin.h
index f657d72038..815b227411 100644
--- a/src/test/test_bitcoin.h
+++ b/src/test/test_bitcoin.h
@@ -54,4 +54,29 @@ struct TestChain100Setup : public TestingSetup {
CKey coinbaseKey; // private/public key needed to spend coinbase transactions
};
+class CTxMemPoolEntry;
+class CTxMemPool;
+
+struct TestMemPoolEntryHelper
+{
+ // Default values
+ CAmount nFee;
+ int64_t nTime;
+ double dPriority;
+ unsigned int nHeight;
+ bool hadNoDependencies;
+
+ TestMemPoolEntryHelper() :
+ nFee(0), nTime(0), dPriority(0.0), nHeight(1),
+ hadNoDependencies(false) { }
+
+ CTxMemPoolEntry FromTx(CMutableTransaction &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; }
+};
#endif
diff --git a/src/timedata.cpp b/src/timedata.cpp
index 0641009537..861c375989 100644
--- a/src/timedata.cpp
+++ b/src/timedata.cpp
@@ -55,7 +55,7 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
// Add data
static CMedianFilter<int64_t> vTimeOffsets(BITCOIN_TIMEDATA_MAX_SAMPLES, 0);
vTimeOffsets.input(nOffsetSample);
- LogPrintf("Added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
+ LogPrint("net","added time data, samples %d, offset %+d (%+d minutes)\n", vTimeOffsets.size(), nOffsetSample, nOffsetSample/60);
// There is a known issue here (see issue #4521):
//
@@ -105,11 +105,11 @@ void AddTimeData(const CNetAddr& ip, int64_t nOffsetSample)
}
}
}
- if (fDebug) {
- BOOST_FOREACH(int64_t n, vSorted)
- LogPrintf("%+d ", n);
- LogPrintf("| ");
- }
- LogPrintf("nTimeOffset = %+d (%+d minutes)\n", nTimeOffset, nTimeOffset/60);
+
+ BOOST_FOREACH(int64_t n, vSorted)
+ LogPrint("net", "%+d ", n);
+ LogPrint("net", "| ");
+
+ LogPrint("net", "nTimeOffset = %+d (%+d minutes)\n", nTimeOffset, nTimeOffset/60);
}
}
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index a772e7adea..ec7971c2f1 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -701,11 +701,21 @@ CFeeRate CTxMemPool::estimateFee(int nBlocks) const
LOCK(cs);
return minerPolicyEstimator->estimateFee(nBlocks);
}
+CFeeRate CTxMemPool::estimateSmartFee(int nBlocks, int *answerFoundAtBlocks) const
+{
+ LOCK(cs);
+ return minerPolicyEstimator->estimateSmartFee(nBlocks, answerFoundAtBlocks, *this);
+}
double CTxMemPool::estimatePriority(int nBlocks) const
{
LOCK(cs);
return minerPolicyEstimator->estimatePriority(nBlocks);
}
+double CTxMemPool::estimateSmartPriority(int nBlocks, int *answerFoundAtBlocks) const
+{
+ LOCK(cs);
+ return minerPolicyEstimator->estimateSmartPriority(nBlocks, answerFoundAtBlocks, *this);
+}
bool
CTxMemPool::WriteFeeEstimates(CAutoFile& fileout) const
diff --git a/src/txmempool.h b/src/txmempool.h
index 7b5843a8d0..7f43120f7f 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -420,6 +420,11 @@ public:
*/
bool CalculateMemPoolAncestors(const CTxMemPoolEntry &entry, setEntries &setAncestors, uint64_t limitAncestorCount, uint64_t limitAncestorSize, uint64_t limitDescendantCount, uint64_t limitDescendantSize, std::string &errString, bool fSearchForParents = true);
+ /** Populate setDescendants with all in-mempool descendants of hash.
+ * Assumes that setDescendants includes all in-mempool descendants of anything
+ * already in it. */
+ void CalculateDescendants(txiter it, setEntries &setDescendants);
+
/** 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
@@ -454,9 +459,21 @@ public:
bool lookup(uint256 hash, CTransaction& result) const;
+ /** Estimate fee rate needed to get into the next nBlocks
+ * If no answer can be given at nBlocks, return an estimate
+ * at the lowest number of blocks where one can be given
+ */
+ CFeeRate estimateSmartFee(int nBlocks, int *answerFoundAtBlocks = NULL) const;
+
/** Estimate fee rate needed to get into the next nBlocks */
CFeeRate estimateFee(int nBlocks) const;
+ /** Estimate priority needed to get into the next nBlocks
+ * If no answer can be given at nBlocks, return an estimate
+ * at the lowest number of blocks where one can be given
+ */
+ double estimateSmartPriority(int nBlocks, int *answerFoundAtBlocks = NULL) const;
+
/** Estimate priority needed to get into the next nBlocks */
double estimatePriority(int nBlocks) const;
@@ -493,10 +510,6 @@ private:
void UpdateForRemoveFromMempool(const setEntries &entriesToRemove);
/** Sever link between specified transaction and direct children. */
void UpdateChildrenForRemoval(txiter entry);
- /** Populate setDescendants with all in-mempool descendants of hash.
- * Assumes that setDescendants includes all in-mempool descendants of anything
- * already in it. */
- void CalculateDescendants(txiter it, setEntries &setDescendants);
/** Before calling removeUnchecked for a given transaction,
* UpdateForRemoveFromMempool must be called on the entire (dependent) set
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index bc00c62e9c..b6eaca80b3 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -835,7 +835,7 @@ UniValue movecmd(const UniValue& params, bool fHelp)
debit.nTime = nNow;
debit.strOtherAccount = strTo;
debit.strComment = strComment;
- walletdb.WriteAccountingEntry(debit);
+ pwalletMain->AddAccountingEntry(debit, walletdb);
// Credit
CAccountingEntry credit;
@@ -845,7 +845,7 @@ UniValue movecmd(const UniValue& params, bool fHelp)
credit.nTime = nNow;
credit.strOtherAccount = strFrom;
credit.strComment = strComment;
- walletdb.WriteAccountingEntry(credit);
+ pwalletMain->AddAccountingEntry(credit, walletdb);
if (!walletdb.TxnCommit())
throw JSONRPCError(RPC_DATABASE_ERROR, "database error");
@@ -1417,7 +1417,7 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
" \"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"
- " \"vout\" : n, (numeric) the vout value\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"
" \"confirmations\": n, (numeric) The number of confirmations for the transaction. Available for 'send' and \n"
@@ -1426,12 +1426,13 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
" category of transactions.\n"
" \"blockindex\": n, (numeric) The block index containing the transaction. Available for 'send' and 'receive'\n"
" 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 (midnight Jan 1 1970 GMT).\n"
" \"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"
+ " \"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"
" from (for receiving funds, positive amounts), or went to (for sending funds,\n"
" negative amounts).\n"
@@ -1470,11 +1471,10 @@ UniValue listtransactions(const UniValue& params, bool fHelp)
UniValue ret(UniValue::VARR);
- std::list<CAccountingEntry> acentries;
- CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems(acentries, strAccount);
+ const CWallet::TxItems & txOrdered = pwalletMain->wtxOrdered;
// iterate backwards until we have nCount items to return:
- for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
+ for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
{
CWalletTx *const pwtx = (*it).second.first;
if (pwtx != 0)
@@ -1579,8 +1579,7 @@ UniValue listaccounts(const UniValue& params, bool fHelp)
}
}
- list<CAccountingEntry> acentries;
- CWalletDB(pwalletMain->strWalletFile).ListAccountCreditDebit("*", acentries);
+ const list<CAccountingEntry> & acentries = pwalletMain->laccentries;
BOOST_FOREACH(const CAccountingEntry& entry, acentries)
mapAccountBalances[entry.strAccount] += entry.nCreditDebit;
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index d51b8ddaef..c5246d909e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -588,31 +588,6 @@ int64_t CWallet::IncOrderPosNext(CWalletDB *pwalletdb)
return nRet;
}
-CWallet::TxItems CWallet::OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount)
-{
- AssertLockHeld(cs_wallet); // mapWallet
- CWalletDB walletdb(strWalletFile);
-
- // First: get all CWalletTx and CAccountingEntry into a sorted-by-order multimap.
- TxItems txOrdered;
-
- // Note: maintaining indices in the database of (account,time) --> txid and (account, time) --> acentry
- // would make this much faster for applications that do this a lot.
- for (map<uint256, CWalletTx>::iterator it = mapWallet.begin(); it != mapWallet.end(); ++it)
- {
- CWalletTx* wtx = &((*it).second);
- txOrdered.insert(make_pair(wtx->nOrderPos, TxPair(wtx, (CAccountingEntry*)0)));
- }
- acentries.clear();
- walletdb.ListAccountCreditDebit(strAccount, acentries);
- BOOST_FOREACH(CAccountingEntry& entry, acentries)
- {
- txOrdered.insert(make_pair(entry.nOrderPos, TxPair((CWalletTx*)0, &entry)));
- }
-
- return txOrdered;
-}
-
void CWallet::MarkDirty()
{
{
@@ -629,7 +604,9 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
if (fFromLoadWallet)
{
mapWallet[hash] = wtxIn;
- mapWallet[hash].BindWallet(this);
+ CWalletTx& wtx = mapWallet[hash];
+ wtx.BindWallet(this);
+ wtxOrdered.insert(make_pair(wtx.nOrderPos, TxPair(&wtx, (CAccountingEntry*)0)));
AddToSpends(hash);
}
else
@@ -644,6 +621,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
{
wtx.nTimeReceived = GetAdjustedTime();
wtx.nOrderPos = IncOrderPosNext(pwalletdb);
+ wtxOrdered.insert(make_pair(wtx.nOrderPos, TxPair(&wtx, (CAccountingEntry*)0)));
wtx.nTimeSmart = wtx.nTimeReceived;
if (!wtxIn.hashBlock.IsNull())
@@ -655,9 +633,8 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD
{
// Tolerate times up to the last timestamp in the wallet not more than 5 minutes into the future
int64_t latestTolerated = latestNow + 300;
- std::list<CAccountingEntry> acentries;
- TxItems txOrdered = OrderedTxItems(acentries);
- for (TxItems::reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
+ const TxItems & txOrdered = wtxOrdered;
+ for (TxItems::const_reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
{
CWalletTx *const pwtx = (*it).second.first;
if (pwtx == &wtx)
@@ -2033,13 +2010,9 @@ bool CWallet::CreateTransaction(const vector<CRecipient>& vecSend, CWalletTx& wt
if (fSendFreeTransactions && nBytes <= MAX_FREE_TRANSACTION_CREATE_SIZE)
{
// Not enough fee: enough priority?
- double dPriorityNeeded = mempool.estimatePriority(nTxConfirmTarget);
- // Not enough mempool history to estimate: use hard-coded AllowFree.
- if (dPriorityNeeded <= 0 && AllowFree(dPriority))
- break;
-
- // Small enough, and priority high enough, to send for free
- if (dPriorityNeeded > 0 && dPriority >= dPriorityNeeded)
+ double dPriorityNeeded = mempool.estimateSmartPriority(nTxConfirmTarget);
+ // Require at least hard-coded AllowFree.
+ if (dPriority >= dPriorityNeeded && AllowFree(dPriority))
break;
}
@@ -2118,6 +2091,18 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
return true;
}
+bool CWallet::AddAccountingEntry(const CAccountingEntry& acentry, CWalletDB & pwalletdb)
+{
+ if (!pwalletdb.WriteAccountingEntry_Backend(acentry))
+ return false;
+
+ laccentries.push_back(acentry);
+ CAccountingEntry & entry = laccentries.back();
+ wtxOrdered.insert(make_pair(entry.nOrderPos, TxPair((CWalletTx*)0, &entry)));
+
+ return true;
+}
+
CAmount CWallet::GetRequiredFee(unsigned int nTxBytes)
{
return std::max(minTxFee.GetFee(nTxBytes), ::minRelayTxFee.GetFee(nTxBytes));
@@ -2131,12 +2116,14 @@ CAmount CWallet::GetMinimumFee(unsigned int nTxBytes, unsigned int nConfirmTarge
if (fPayAtLeastCustomFee && nFeeNeeded > 0 && nFeeNeeded < payTxFee.GetFeePerK())
nFeeNeeded = payTxFee.GetFeePerK();
// User didn't set: use -txconfirmtarget to estimate...
- if (nFeeNeeded == 0)
- nFeeNeeded = pool.estimateFee(nConfirmTarget).GetFee(nTxBytes);
- // ... unless we don't have enough mempool data, in which case fall
- // back to the required fee
- if (nFeeNeeded == 0)
- nFeeNeeded = GetRequiredFee(nTxBytes);
+ if (nFeeNeeded == 0) {
+ int estimateFoundTarget = nConfirmTarget;
+ nFeeNeeded = pool.estimateSmartFee(nConfirmTarget, &estimateFoundTarget).GetFee(nTxBytes);
+ // ... unless we don't have enough mempool data for our desired target
+ // so we make sure we're paying at least minTxFee
+ if (nFeeNeeded == 0 || (unsigned int)estimateFoundTarget > nConfirmTarget)
+ nFeeNeeded = std::max(nFeeNeeded, GetRequiredFee(nTxBytes));
+ }
// prevent user from paying a non-sense fee (like 1 satoshi): 0 < fee < minRelayFee
if (nFeeNeeded < ::minRelayTxFee.GetFee(nTxBytes))
nFeeNeeded = ::minRelayTxFee.GetFee(nTxBytes);
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 719f11f206..7e846569ff 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -531,6 +531,11 @@ public:
}
std::map<uint256, CWalletTx> mapWallet;
+ std::list<CAccountingEntry> laccentries;
+
+ typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
+ typedef std::multimap<int64_t, TxPair > TxItems;
+ TxItems wtxOrdered;
int64_t nOrderPosNext;
std::map<uint256, int> mapRequestCount;
@@ -617,16 +622,6 @@ public:
*/
int64_t IncOrderPosNext(CWalletDB *pwalletdb = NULL);
- typedef std::pair<CWalletTx*, CAccountingEntry*> TxPair;
- typedef std::multimap<int64_t, TxPair > TxItems;
-
- /**
- * Get the wallet's activity log
- * @return multimap of ordered transactions and accounting entries
- * @warning Returned pointers are *only* valid within the scope of passed acentries
- */
- TxItems OrderedTxItems(std::list<CAccountingEntry>& acentries, std::string strAccount = "");
-
void MarkDirty();
bool AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletDB* pwalletdb);
void SyncTransaction(const CTransaction& tx, const CBlock* pblock);
@@ -656,6 +651,8 @@ public:
std::string& strFailReason, const CCoinControl *coinControl = NULL, bool sign = true);
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey);
+ bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb);
+
static CFeeRate minTxFee;
/**
* Estimate the minimum fee considering user set parameters
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index ea8a4eb043..9ce9f53bd9 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -191,7 +191,7 @@ bool CWalletDB::WriteAccountingEntry(const uint64_t nAccEntryNum, const CAccount
return Write(std::make_pair(std::string("acentry"), std::make_pair(acentry.strAccount, nAccEntryNum)), acentry);
}
-bool CWalletDB::WriteAccountingEntry(const CAccountingEntry& acentry)
+bool CWalletDB::WriteAccountingEntry_Backend(const CAccountingEntry& acentry)
{
return WriteAccountingEntry(++nAccountingEntryNumber, acentry);
}
@@ -709,6 +709,12 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
if (wss.fAnyUnordered)
result = ReorderTransactions(pwallet);
+ pwallet->laccentries.clear();
+ ListAccountCreditDebit("*", pwallet->laccentries);
+ BOOST_FOREACH(CAccountingEntry& entry, pwallet->laccentries) {
+ pwallet->wtxOrdered.insert(make_pair(entry.nOrderPos, CWallet::TxPair((CWalletTx*)0, &entry)));
+ }
+
return result;
}
diff --git a/src/wallet/walletdb.h b/src/wallet/walletdb.h
index 270f826aed..3ebc05afd1 100644
--- a/src/wallet/walletdb.h
+++ b/src/wallet/walletdb.h
@@ -110,6 +110,9 @@ public:
bool WriteMinVersion(int nVersion);
+ /// This writes directly to the database, and will not update the CWallet's cached accounting entries!
+ /// Use wallet.AddAccountingEntry instead, to write *and* update its caches.
+ bool WriteAccountingEntry_Backend(const CAccountingEntry& acentry);
bool ReadAccount(const std::string& strAccount, CAccount& account);
bool WriteAccount(const std::string& strAccount, const CAccount& account);
@@ -118,7 +121,6 @@ public:
/// Erase destination data tuple from wallet database
bool EraseDestData(const std::string &address, const std::string &key);
- bool WriteAccountingEntry(const CAccountingEntry& acentry);
CAmount GetAccountCreditDebit(const std::string& strAccount);
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& acentries);
diff --git a/src/zmq/zmqnotificationinterface.cpp b/src/zmq/zmqnotificationinterface.cpp
index 09fe3aeb4c..be2aec7d15 100644
--- a/src/zmq/zmqnotificationinterface.cpp
+++ b/src/zmq/zmqnotificationinterface.cpp
@@ -12,7 +12,7 @@
void zmqError(const char *str)
{
- LogPrint("zmq", "Error: %s, errno=%s\n", str, zmq_strerror(errno));
+ LogPrint("zmq", "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno));
}
CZMQNotificationInterface::CZMQNotificationInterface() : pcontext(NULL)
@@ -72,7 +72,7 @@ CZMQNotificationInterface* CZMQNotificationInterface::CreateWithArguments(const
// Called at startup to conditionally set up ZMQ socket(s)
bool CZMQNotificationInterface::Initialize()
{
- LogPrint("zmq", "Initialize notification interface\n");
+ LogPrint("zmq", "zmq: Initialize notification interface\n");
assert(!pcontext);
pcontext = zmq_init(1);
@@ -110,7 +110,7 @@ bool CZMQNotificationInterface::Initialize()
// Called during shutdown sequence
void CZMQNotificationInterface::Shutdown()
{
- LogPrint("zmq", "Shutdown notification interface\n");
+ LogPrint("zmq", "zmq: Shutdown notification interface\n");
if (pcontext)
{
for (std::list<CZMQAbstractNotifier*>::iterator i=notifiers.begin(); i!=notifiers.end(); ++i)
diff --git a/src/zmq/zmqpublishnotifier.cpp b/src/zmq/zmqpublishnotifier.cpp
index ac788843eb..ddc8fe93e9 100644
--- a/src/zmq/zmqpublishnotifier.cpp
+++ b/src/zmq/zmqpublishnotifier.cpp
@@ -78,7 +78,7 @@ bool CZMQAbstractPublishNotifier::Initialize(void *pcontext)
}
else
{
- LogPrint("zmq", " Reuse socket for address %s\n", address);
+ LogPrint("zmq", "zmq: Reusing socket for address %s\n", address);
psocket = i->second->psocket;
mapPublishNotifiers.insert(std::make_pair(address, this));
@@ -120,7 +120,7 @@ void CZMQAbstractPublishNotifier::Shutdown()
bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
{
uint256 hash = pindex->GetBlockHash();
- LogPrint("zmq", "Publish hash block %s\n", hash.GetHex());
+ LogPrint("zmq", "zmq: Publish hashblock %s\n", hash.GetHex());
char data[32];
for (unsigned int i = 0; i < 32; i++)
data[31 - i] = hash.begin()[i];
@@ -131,7 +131,7 @@ bool CZMQPublishHashBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
{
uint256 hash = transaction.GetHash();
- LogPrint("zmq", "Publish hash transaction %s\n", hash.GetHex());
+ LogPrint("zmq", "zmq: Publish hashtx %s\n", hash.GetHex());
char data[32];
for (unsigned int i = 0; i < 32; i++)
data[31 - i] = hash.begin()[i];
@@ -141,7 +141,7 @@ bool CZMQPublishHashTransactionNotifier::NotifyTransaction(const CTransaction &t
bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
{
- LogPrint("zmq", "Publish raw block %s\n", pindex->GetBlockHash().GetHex());
+ LogPrint("zmq", "zmq: Publish rawblock %s\n", pindex->GetBlockHash().GetHex());
const Consensus::Params& consensusParams = Params().GetConsensus();
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
@@ -164,7 +164,7 @@ bool CZMQPublishRawBlockNotifier::NotifyBlock(const CBlockIndex *pindex)
bool CZMQPublishRawTransactionNotifier::NotifyTransaction(const CTransaction &transaction)
{
uint256 hash = transaction.GetHash();
- LogPrint("zmq", "Publish raw transaction %s\n", hash.GetHex());
+ LogPrint("zmq", "zmq: Publish rawtx %s\n", hash.GetHex());
CDataStream ss(SER_NETWORK, PROTOCOL_VERSION);
ss << transaction;
int rc = zmq_send_multipart(psocket, "rawtx", 5, &(*ss.begin()), ss.size(), 0);