aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac2
-rw-r--r--contrib/gitian-descriptors/gitian-osx-signer.yml2
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml2
-rw-r--r--contrib/gitian-downloader/luke-jr-key.pgpbin7322 -> 6518 bytes
-rw-r--r--contrib/linearize/example-linearize.cfg10
-rwxr-xr-xcontrib/linearize/linearize-data.py6
-rw-r--r--contrib/macdeploy/DS_Storebin10244 -> 10244 bytes
-rw-r--r--contrib/macdeploy/README.md2
-rwxr-xr-xcontrib/macdeploy/detached-sig-apply.sh21
-rwxr-xr-xcontrib/macdeploy/detached-sig-create.sh22
-rw-r--r--contrib/macdeploy/fancy.plist2
-rwxr-xr-xcontrib/macdeploy/macdeployqtplus6
-rw-r--r--doc/Doxyfile2
-rw-r--r--doc/README.md3
-rw-r--r--doc/README_windows.txt2
-rw-r--r--doc/REST-interface.md4
-rw-r--r--doc/build-osx.md4
-rw-r--r--doc/release-notes.md36
-rw-r--r--doc/release-notes/release-notes-0.9.5.md60
-rw-r--r--doc/translation_strings_policy.md72
-rwxr-xr-xqa/pull-tester/rpc-tests.sh32
-rw-r--r--qa/rpc-tests/README.md28
-rwxr-xr-xqa/rpc-tests/bipdersig-p2p.py12
-rwxr-xr-xqa/rpc-tests/bipdersig.py5
-rwxr-xr-xqa/rpc-tests/forknotify.py5
-rwxr-xr-xqa/rpc-tests/getblocktemplate_longpoll.py5
-rwxr-xr-xqa/rpc-tests/getblocktemplate_proposals.py5
-rwxr-xr-xqa/rpc-tests/getchaintips.py4
-rwxr-xr-xqa/rpc-tests/httpbasics.py4
-rwxr-xr-xqa/rpc-tests/invalidateblock.py5
-rwxr-xr-xqa/rpc-tests/invalidblockrequest.py10
-rwxr-xr-xqa/rpc-tests/keypool.py4
-rwxr-xr-xqa/rpc-tests/listtransactions.py5
-rwxr-xr-xqa/rpc-tests/maxblocksinflight.py6
-rwxr-xr-xqa/rpc-tests/mempool_coinbase_spends.py5
-rwxr-xr-xqa/rpc-tests/mempool_resurrect_test.py6
-rwxr-xr-xqa/rpc-tests/mempool_spendcoinbase.py5
-rwxr-xr-xqa/rpc-tests/merkle_blocks.py5
-rwxr-xr-xqa/rpc-tests/proxy_test.py6
-rwxr-xr-xqa/rpc-tests/pruning.py5
-rw-r--r--qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/.gitignore1
-rw-r--r--qa/rpc-tests/python-bitcoinrpc/setup.py15
-rwxr-xr-xqa/rpc-tests/rawtransactions.py4
-rwxr-xr-xqa/rpc-tests/receivedby.py5
-rwxr-xr-xqa/rpc-tests/reindex.py5
-rwxr-xr-xqa/rpc-tests/rest.py117
-rwxr-xr-xqa/rpc-tests/rpcbind_test.py6
-rwxr-xr-xqa/rpc-tests/script_test.py14
-rwxr-xr-xqa/rpc-tests/signrawtransactions.py4
-rwxr-xr-xqa/rpc-tests/smartfees.py5
-rw-r--r--qa/rpc-tests/test_framework/__init__.py (renamed from qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/__init__.py)0
-rw-r--r--qa/rpc-tests/test_framework/authproxy.py (renamed from qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py)0
-rw-r--r--qa/rpc-tests/test_framework/bignum.py (renamed from qa/rpc-tests/bignum.py)0
-rw-r--r--qa/rpc-tests/test_framework/blockstore.py (renamed from qa/rpc-tests/blockstore.py)0
-rw-r--r--qa/rpc-tests/test_framework/blocktools.py (renamed from qa/rpc-tests/blocktools.py)0
-rwxr-xr-xqa/rpc-tests/test_framework/comptool.py (renamed from qa/rpc-tests/comptool.py)0
-rwxr-xr-xqa/rpc-tests/test_framework/mininode.py (renamed from qa/rpc-tests/mininode.py)0
-rw-r--r--qa/rpc-tests/test_framework/netutil.py (renamed from qa/rpc-tests/netutil.py)0
-rw-r--r--qa/rpc-tests/test_framework/script.py (renamed from qa/rpc-tests/script.py)4
-rw-r--r--qa/rpc-tests/test_framework/socks5.py (renamed from qa/rpc-tests/socks5.py)0
-rwxr-xr-xqa/rpc-tests/test_framework/test_framework.py (renamed from qa/rpc-tests/test_framework.py)3
-rw-r--r--qa/rpc-tests/test_framework/util.py (renamed from qa/rpc-tests/util.py)3
-rwxr-xr-xqa/rpc-tests/txn_doublespend.py5
-rwxr-xr-xqa/rpc-tests/wallet.py5
-rwxr-xr-xqa/rpc-tests/walletbackup.py4
-rwxr-xr-xqa/rpc-tests/zapwallettxes.py4
-rw-r--r--share/certs/PrivateKeyNotes.md4
-rw-r--r--src/Makefile.am5
-rw-r--r--src/amount.h10
-rw-r--r--src/bitcoin-cli-res.rc4
-rw-r--r--src/bitcoin-tx-res.rc35
-rw-r--r--src/bitcoind-res.rc4
-rw-r--r--src/chainparams.h1
-rw-r--r--src/consensus/validation.h80
-rw-r--r--src/init.cpp31
-rw-r--r--src/main.cpp187
-rw-r--r--src/main.h81
-rw-r--r--src/miner.cpp4
-rw-r--r--src/net.cpp4
-rw-r--r--src/netbase.cpp26
-rw-r--r--src/netbase.h2
-rw-r--r--src/qt/bitcoingui.cpp1
-rw-r--r--src/qt/locale/bitcoin_ar.ts6
-rw-r--r--src/qt/locale/bitcoin_be_BY.ts140
-rw-r--r--src/qt/locale/bitcoin_bg.ts6
-rw-r--r--src/qt/locale/bitcoin_ca.ts4
-rw-r--r--src/qt/locale/bitcoin_ca@valencia.ts4
-rw-r--r--src/qt/locale/bitcoin_ca_ES.ts4
-rw-r--r--src/qt/locale/bitcoin_cs.ts4
-rw-r--r--src/qt/locale/bitcoin_da.ts12
-rw-r--r--src/qt/locale/bitcoin_de.ts40
-rw-r--r--src/qt/locale/bitcoin_el_GR.ts228
-rw-r--r--src/qt/locale/bitcoin_eo.ts6
-rw-r--r--src/qt/locale/bitcoin_es.ts4
-rw-r--r--src/qt/locale/bitcoin_es_CL.ts6
-rw-r--r--src/qt/locale/bitcoin_es_DO.ts6
-rw-r--r--src/qt/locale/bitcoin_et.ts6
-rw-r--r--src/qt/locale/bitcoin_fa.ts6
-rw-r--r--src/qt/locale/bitcoin_fa_IR.ts6
-rw-r--r--src/qt/locale/bitcoin_fi.ts4
-rw-r--r--src/qt/locale/bitcoin_fr.ts8
-rw-r--r--src/qt/locale/bitcoin_gl.ts6
-rw-r--r--src/qt/locale/bitcoin_he.ts4
-rw-r--r--src/qt/locale/bitcoin_hu.ts6
-rw-r--r--src/qt/locale/bitcoin_id_ID.ts6
-rw-r--r--src/qt/locale/bitcoin_it.ts4
-rw-r--r--src/qt/locale/bitcoin_ja.ts8
-rw-r--r--src/qt/locale/bitcoin_ka.ts6
-rw-r--r--src/qt/locale/bitcoin_ko_KR.ts6
-rw-r--r--src/qt/locale/bitcoin_ky.ts6
-rw-r--r--src/qt/locale/bitcoin_la.ts6
-rw-r--r--src/qt/locale/bitcoin_lt.ts6
-rw-r--r--src/qt/locale/bitcoin_lv_LV.ts6
-rw-r--r--src/qt/locale/bitcoin_nb.ts8
-rw-r--r--src/qt/locale/bitcoin_nl.ts4
-rw-r--r--src/qt/locale/bitcoin_pam.ts6
-rw-r--r--src/qt/locale/bitcoin_pl.ts4
-rw-r--r--src/qt/locale/bitcoin_pt_BR.ts34
-rw-r--r--src/qt/locale/bitcoin_pt_PT.ts4
-rw-r--r--src/qt/locale/bitcoin_ro_RO.ts106
-rw-r--r--src/qt/locale/bitcoin_ru.ts4
-rw-r--r--src/qt/locale/bitcoin_sk.ts6
-rw-r--r--src/qt/locale/bitcoin_sl_SI.ts6
-rw-r--r--src/qt/locale/bitcoin_sv.ts8
-rw-r--r--src/qt/locale/bitcoin_tr.ts12
-rw-r--r--src/qt/locale/bitcoin_uk.ts8
-rw-r--r--src/qt/locale/bitcoin_zh_CN.ts20
-rw-r--r--src/qt/locale/bitcoin_zh_TW.ts4
-rw-r--r--src/qt/overviewpage.cpp6
-rw-r--r--src/qt/res/bitcoin-qt-res.rc2
-rw-r--r--src/qt/scicon.cpp6
-rw-r--r--src/rest.cpp94
-rw-r--r--src/rpcblockchain.cpp2
-rw-r--r--src/rpcmining.cpp1
-rw-r--r--src/rpcrawtransaction.cpp3
-rw-r--r--src/scheduler.cpp2
-rw-r--r--src/test/alert_tests.cpp65
-rw-r--r--src/test/checkblock_tests.cpp9
-rw-r--r--src/test/main_tests.cpp39
-rw-r--r--src/test/miner_tests.cpp1
-rw-r--r--src/test/netbase_tests.cpp5
-rw-r--r--src/test/sighash_tests.cpp7
-rw-r--r--src/test/transaction_tests.cpp3
-rw-r--r--src/txmempool.cpp1
-rw-r--r--src/wallet/wallet.cpp1
-rw-r--r--src/wallet/walletdb.cpp1
147 files changed, 1495 insertions, 666 deletions
diff --git a/Makefile.am b/Makefile.am
index 2cb933d5bb..56c8c09223 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,8 +14,8 @@ BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
-OSX_APP=Bitcoin-Qt.app
-OSX_DMG=Bitcoin-Qt.dmg
+OSX_APP=Bitcoin-Core.app
+OSX_DMG=Bitcoin-Core.dmg
OSX_BACKGROUND_IMAGE=background.tiff
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
@@ -106,7 +106,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-Qt" -no-pad -r -apple -o $@ dist
+ $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
$(MKDIR_P) $(@D)
diff --git a/configure.ac b/configure.ac
index c5d08a0285..6dd03ea408 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 0)
-define(_CLIENT_VERSION_MINOR, 10)
+define(_CLIENT_VERSION_MINOR, 11)
define(_CLIENT_VERSION_REVISION, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
diff --git a/contrib/gitian-descriptors/gitian-osx-signer.yml b/contrib/gitian-descriptors/gitian-osx-signer.yml
index 1792f9de3f..afe03c7a22 100644
--- a/contrib/gitian-descriptors/gitian-osx-signer.yml
+++ b/contrib/gitian-descriptors/gitian-osx-signer.yml
@@ -33,5 +33,5 @@ script: |
tar -xf ${UNSIGNED}
./detached-sig-apply.sh ${UNSIGNED} signature.tar.gz
- ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o uncompressed.dmg signed-app
+ ${WRAP_DIR}/genisoimage -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o uncompressed.dmg signed-app
${WRAP_DIR}/dmg dmg uncompressed.dmg ${OUTDIR}/${SIGNED}
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index b401482c70..61eb5b1001 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -120,7 +120,7 @@ script: |
popd
make deploy
- ${WRAP_DIR}/dmg dmg Bitcoin-Qt.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
+ ${WRAP_DIR}/dmg dmg Bitcoin-Core.dmg ${OUTDIR}/${DISTNAME}-osx-unsigned.dmg
cd installed
find . -name "lib*.la" -delete
diff --git a/contrib/gitian-downloader/luke-jr-key.pgp b/contrib/gitian-downloader/luke-jr-key.pgp
index 275b041d20..4406e6d5be 100644
--- a/contrib/gitian-downloader/luke-jr-key.pgp
+++ b/contrib/gitian-downloader/luke-jr-key.pgp
Binary files differ
diff --git a/contrib/linearize/example-linearize.cfg b/contrib/linearize/example-linearize.cfg
index e0fef13886..38da02e66c 100644
--- a/contrib/linearize/example-linearize.cfg
+++ b/contrib/linearize/example-linearize.cfg
@@ -4,13 +4,23 @@ rpcuser=someuser
rpcpassword=somepassword
host=127.0.0.1
port=8332
+#port=18332
# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313000
# bootstrap.dat input/output settings (linearize-data)
+
+# mainnet
netmagic=f9beb4d9
+genesis=000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
input=/home/example/.bitcoin/blocks
+
+# testnet
+#netmagic=0b110907
+#genesis=000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943
+#input=/home/example/.bitcoin/testnet3/blocks
+
output_file=/home/example/Downloads/bootstrap.dat
hashlist=hashlist.txt
split_year=1
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index a3a1173b1f..7947c6bf72 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -205,7 +205,7 @@ class BlockDataCopier:
inMagic = inhdr[:4]
if (inMagic != self.settings['netmagic']):
- print("Invalid magic: " + inMagic)
+ print("Invalid magic: " + inMagic.encode('hex'))
return
inLenLE = inhdr[4:]
su = struct.unpack("<I", inLenLE)
@@ -265,6 +265,8 @@ if __name__ == '__main__':
if 'netmagic' not in settings:
settings['netmagic'] = 'f9beb4d9'
+ if 'genesis' not in settings:
+ settings['genesis'] = '000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f'
if 'input' not in settings:
settings['input'] = 'input'
if 'hashlist' not in settings:
@@ -291,7 +293,7 @@ if __name__ == '__main__':
blkindex = get_block_hashes(settings)
blkmap = mkblockmap(blkindex)
- if not "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f" in blkmap:
+ if not settings['genesis'] in blkmap:
print("Genesis block not found in hashlist")
else:
BlockDataCopier(settings, blkindex, blkmap).run()
diff --git a/contrib/macdeploy/DS_Store b/contrib/macdeploy/DS_Store
index 099960712a..ca19b207c0 100644
--- a/contrib/macdeploy/DS_Store
+++ b/contrib/macdeploy/DS_Store
Binary files differ
diff --git a/contrib/macdeploy/README.md b/contrib/macdeploy/README.md
index 0aa57b4777..6163734e62 100644
--- a/contrib/macdeploy/README.md
+++ b/contrib/macdeploy/README.md
@@ -11,5 +11,5 @@ This script should not be run manually, instead, after building as usual:
During the process, the disk image window will pop up briefly where the fancy
settings are applied. This is normal, please do not interfere.
-When finished, it will produce `Bitcoin-Qt.dmg`.
+When finished, it will produce `Bitcoin-Core.dmg`.
diff --git a/contrib/macdeploy/detached-sig-apply.sh b/contrib/macdeploy/detached-sig-apply.sh
index 7b3eb1b197..169f690438 100755
--- a/contrib/macdeploy/detached-sig-apply.sh
+++ b/contrib/macdeploy/detached-sig-apply.sh
@@ -1,11 +1,10 @@
#!/bin/sh
set -e
-UNSIGNED=$1
-SIGNATURE=$2
+UNSIGNED="$1"
+SIGNATURE="$2"
ARCH=x86_64
ROOTDIR=dist
-BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
TEMPDIR=signed.temp
OUTDIR=signed-app
@@ -31,21 +30,21 @@ if [ -z "${CODESIGN_ALLOCATE}" ]; then
CODESIGN_ALLOCATE=${TEMPDIR}/codesign_allocate
fi
-for i in `find ${TEMPDIR} -name "*.sign"`; do
- SIZE=`stat -c %s ${i}`
- TARGET_FILE=`echo ${i} | sed 's/\.sign$//'`
+find ${TEMPDIR} -name "*.sign" | while read i; do
+ SIZE=`stat -c %s "${i}"`
+ TARGET_FILE="`echo "${i}" | sed 's/\.sign$//'`"
echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
- ${CODESIGN_ALLOCATE} -i ${TARGET_FILE} -a ${ARCH} ${SIZE} -o ${i}.tmp
+ ${CODESIGN_ALLOCATE} -i "${TARGET_FILE}" -a ${ARCH} ${SIZE} -o "${i}.tmp"
- OFFSET=`${PAGESTUFF} ${i}.tmp -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
+ OFFSET=`${PAGESTUFF} "${i}.tmp" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
if [ -z ${QUIET} ]; then
echo "Attaching signature at offset ${OFFSET}"
fi
- dd if=$i of=${i}.tmp bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
- mv ${i}.tmp ${TARGET_FILE}
- rm ${i}
+ dd if="$i" of="${i}.tmp" bs=1 seek=${OFFSET} count=${SIZE} 2>/dev/null
+ mv "${i}.tmp" "${TARGET_FILE}"
+ rm "${i}"
echo "Success."
done
mv ${TEMPDIR}/${ROOTDIR} ${OUTDIR}
diff --git a/contrib/macdeploy/detached-sig-create.sh b/contrib/macdeploy/detached-sig-create.sh
index aff4f08da8..fd7314bd7e 100755
--- a/contrib/macdeploy/detached-sig-create.sh
+++ b/contrib/macdeploy/detached-sig-create.sh
@@ -2,7 +2,7 @@
set -e
ROOTDIR=dist
-BUNDLE=${ROOTDIR}/Bitcoin-Qt.app
+BUNDLE="${ROOTDIR}/Bitcoin Core.app"
CODESIGN=codesign
TEMPDIR=sign.temp
TEMPLIST=${TEMPDIR}/signatures.txt
@@ -19,19 +19,19 @@ mkdir -p ${TEMPDIR}
${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}"
-for i in `grep -v CodeResources ${TEMPLIST}`; do
- TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
- SIZE=`pagestuff $i -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
- OFFSET=`pagestuff $i -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
+grep -v CodeResources < "${TEMPLIST}" | while read i; do
+ TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
+ SIZE=`pagestuff "$i" -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
+ OFFSET=`pagestuff "$i" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
SIGNFILE="${TEMPDIR}/${TARGETFILE}.sign"
- DIRNAME="`dirname ${SIGNFILE}`"
+ DIRNAME="`dirname "${SIGNFILE}"`"
mkdir -p "${DIRNAME}"
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
- dd if=$i of=${SIGNFILE} bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
+ dd if="$i" of="${SIGNFILE}" bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
done
-for i in `grep CodeResources ${TEMPLIST}`; do
- TARGETFILE="${BUNDLE}/`echo ${i} | sed "s|.*${BUNDLE}/||"`"
+grep CodeResources < "${TEMPLIST}" | while read i; do
+ TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
RESOURCE="${TEMPDIR}/${TARGETFILE}"
DIRNAME="`dirname "${RESOURCE}"`"
mkdir -p "${DIRNAME}"
@@ -41,6 +41,6 @@ done
rm ${TEMPLIST}
-tar -C ${TEMPDIR} -czf ${OUT} .
-rm -rf ${TEMPDIR}
+tar -C "${TEMPDIR}" -czf "${OUT}" .
+rm -rf "${TEMPDIR}"
echo "Created ${OUT}"
diff --git a/contrib/macdeploy/fancy.plist b/contrib/macdeploy/fancy.plist
index ef277a7f14..a333f5dccd 100644
--- a/contrib/macdeploy/fancy.plist
+++ b/contrib/macdeploy/fancy.plist
@@ -22,7 +22,7 @@
<integer>370</integer>
<integer>156</integer>
</array>
- <key>Bitcoin-Qt.app</key>
+ <key>Bitcoin Core.app</key>
<array>
<integer>128</integer>
<integer>156</integer>
diff --git a/contrib/macdeploy/macdeployqtplus b/contrib/macdeploy/macdeployqtplus
index 0eb6b2c84d..a625987ca7 100755
--- a/contrib/macdeploy/macdeployqtplus
+++ b/contrib/macdeploy/macdeployqtplus
@@ -155,7 +155,7 @@ class FrameworkInfo(object):
class ApplicationBundleInfo(object):
def __init__(self, path):
self.path = path
- appName = os.path.splitext(os.path.basename(path))[0]
+ appName = "Bitcoin-Qt"
self.binaryPath = os.path.join(path, "Contents", "MacOS", appName)
if not os.path.exists(self.binaryPath):
raise RuntimeError("Could not find bundle binary for " + path)
@@ -596,7 +596,7 @@ if os.path.exists("dist"):
# ------------------------------------------------
-target = os.path.join("dist", app_bundle)
+target = os.path.join("dist", "Bitcoin Core.app")
if verbose >= 2:
print "+ Copying source bundle +"
@@ -837,7 +837,7 @@ if config.dmg is not None:
items_positions.append(itemscript.substitute(params))
params = {
- "disk" : "Bitcoin-Qt",
+ "disk" : "Bitcoin-Core",
"window_bounds" : "300,300,800,620",
"icon_size" : "96",
"background_commands" : "",
diff --git a/doc/Doxyfile b/doc/Doxyfile
index 8a11d1e8d0..925a33ee89 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -34,7 +34,7 @@ PROJECT_NAME = Bitcoin
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 0.10.99
+PROJECT_NUMBER = 0.11.99
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer
diff --git a/doc/README.md b/doc/README.md
index 22b7065f62..ecddf50d4b 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.99
+Bitcoin Core 0.11.99
=====================
Setup
@@ -55,6 +55,7 @@ The Bitcoin repo's [root README](https://github.com/bitcoin/bitcoin/blob/master/
- [Release Process](release-process.md)
- [Source Code Documentation (External Link)](https://dev.visucore.com/bitcoin/doxygen/)
- [Translation Process](translation_process.md)
+- [Translation Strings Policy](translation_strings_policy.md)
- [Unit Tests](unit-tests.md)
- [Unauthenticated REST Interface](REST-interface.md)
- [BIPS](bips.md)
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index c582941696..e4fd9bdf90 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,4 +1,4 @@
-Bitcoin Core 0.10.99
+Bitcoin Core 0.11.99
=====================
Intro
diff --git a/doc/REST-interface.md b/doc/REST-interface.md
index 0b718d664e..2219ceb65f 100644
--- a/doc/REST-interface.md
+++ b/doc/REST-interface.md
@@ -47,7 +47,7 @@ Only supports JSON as output format.
* chainwork : (string) total amount of work in active chain, in hexadecimal
####Query UTXO set
-`GET /rest/getutxos.<bin|hex|json>`
+`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`
The getutxo command allows querying of the UTXO set given a set of outpoints.
See BIP64 for input and output serialisation:
@@ -55,7 +55,7 @@ https://github.com/bitcoin/bips/blob/master/bip-0064.mediawiki
Example:
```
-$ curl --data '{"checkmempool":true,"outpoints":[{"txid":"b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75","n":0}]}' localhost:18332/rest/getutxos.json 2>/dev/null | json_pp
+$ curl localhost:18332/rest/getutxos/checkmempool/b2cdfd7b89def827ff8af7cd9bff7627ff72e5e8b0f71210f92ea7a4000c5d75-0.json 2>/dev/null | json_pp
{
"chaintipHash" : "00000000fb01a7f3745a717f8caebee056c484e6e0bfe4a9591c235bb70506fb",
"chainHeight" : 325347,
diff --git a/doc/build-osx.md b/doc/build-osx.md
index 913e72519f..02adff0615 100644
--- a/doc/build-osx.md
+++ b/doc/build-osx.md
@@ -100,7 +100,7 @@ Creating a release build
------------------------
You can ignore this section if you are building `bitcoind` for your own use.
-bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Qt.app bundle.
+bitcoind/bitcoin-cli binaries are not included in the Bitcoin-Core.app bundle.
If you are building `bitcoind` or `Bitcoin-Qt` for others, your build machine should be set up
as follows for maximum compatibility:
@@ -111,7 +111,7 @@ All dependencies should be compiled with these flags:
-arch x86_64
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
-Once dependencies are compiled, see [doc/release-process.md](release-process.md) for how the Bitcoin-Qt.app
+Once dependencies are compiled, see [doc/release-process.md](release-process.md) for how the Bitcoin-Core.app
bundle is packaged and signed to create the .dmg disk image that is distributed.
Running
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 1cb517e5c7..6bb8587d78 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,3 +1,39 @@
(note: this is a temporary file, to be added-to by anybody, and moved to
release-notes at release time)
+Notable changes
+===============
+
+Example header
+----------------------
+
+Example content.
+
+0.12.0 Change log
+=================
+
+Detailed release notes follow. This overview includes changes that affect
+behavior, not code moves, refactors and string updates. For convenience in locating
+the code changes and accompanying discussion, both the pull request and
+git merge commit are mentioned.
+
+### RPC and REST
+
+### Configuration and command-line options
+
+### Block and transaction handling
+
+### P2P protocol and network code
+
+### Validation
+
+### Build system
+
+### Wallet
+
+### GUI
+
+### Tests
+
+### Miscellaneous
+
diff --git a/doc/release-notes/release-notes-0.9.5.md b/doc/release-notes/release-notes-0.9.5.md
new file mode 100644
index 0000000000..bed0af9879
--- /dev/null
+++ b/doc/release-notes/release-notes-0.9.5.md
@@ -0,0 +1,60 @@
+Bitcoin Core version 0.9.5 is now available from:
+
+ https://bitcoin.org/bin/0.9.5/
+
+This is a new minor version release, with the goal of backporting BIP66. There
+are also a few bug fixes and updated translations. Upgrading to this release is
+recommended.
+
+Please report bugs using the issue tracker at github:
+
+ https://github.com/bitcoin/bitcoin/issues
+
+How to Upgrade
+===============
+
+If you are running an older version, shut it down. Wait until it has completely
+shut down (which might take a few minutes for older versions), then run the
+installer (on Windows) or just copy over /Applications/Bitcoin-Qt (on Mac) or
+bitcoind/bitcoin-qt (on Linux).
+
+Notable changes
+================
+
+Mining and relay policy enhancements
+------------------------------------
+
+Bitcoin Core's block templates are now for version 3 blocks only, and any mining
+software relying on its `getblocktemplate` must be updated in parallel to use
+libblkmaker either version 0.4.2 or any version from 0.5.1 onward.
+If you are solo mining, this will affect you the moment you upgrade Bitcoin
+Core, which must be done prior to BIP66 achieving its 951/1001 status.
+If you are mining with the stratum mining protocol: this does not affect you.
+If you are mining with the getblocktemplate protocol to a pool: this will affect
+you at the pool operator's discretion, which must be no later than BIP66
+achieving its 951/1001 status.
+
+0.9.5 changelog
+================
+
+- `74f29c2` Check pindexBestForkBase for null
+- `9cd1dd9` Fix priority calculation in CreateTransaction
+- `6b4163b` Sanitize command strings before logging them.
+- `3230b32` Raise version of created blocks, and enforce DERSIG in mempool
+- `989d499` Backport of some of BIP66's tests
+- `ab03660` Implement BIP 66 validation rules and switchover logic
+- `8438074` build: fix dynamic boost check when --with-boost= is used
+
+Credits
+--------
+
+Thanks to who contributed to this release, at least:
+
+- 21E14
+- Alex Morcos
+- Cory Fields
+- Gregory Maxwell
+- Pieter Wuille
+- Wladimir J. van der Laan
+
+As well as everyone that helped translating on [Transifex](https://www.transifex.com/projects/p/bitcoin/).
diff --git a/doc/translation_strings_policy.md b/doc/translation_strings_policy.md
new file mode 100644
index 0000000000..6824b1d8ef
--- /dev/null
+++ b/doc/translation_strings_policy.md
@@ -0,0 +1,72 @@
+Translation Strings Policy
+===========================
+
+This document provides guidelines for internationalization of the Bitcoin Core software.
+
+How to translate?
+------------------
+
+To mark a message as translatable
+
+- In GUI source code (under `src/qt`): use `tr("...")`
+
+- In non-GUI source code (under `src`): use `_("...")`
+
+No internationalization is used for e.g. developer scripts outside `src`.
+
+Strings to be translated
+-------------------------
+
+On a high level, these strings are to be translated:
+
+- GUI strings, anything that appears in a dialog or window
+
+- Command-line option documentation
+
+### GUI strings
+
+Anything that appears to the user in the GUI is to be translated. This includes labels, menu items, button texts, tooltips and window titles.
+This includes messages passed to the GUI through the UI interface through `InitMessage`, `ThreadSafeMessageBox` or `ShowProgress`.
+
+### Command-line options
+
+Documentation for the command line options in the output of `--help` should be translated as well.
+
+Make sure that default values do not end up in the string, but use string formatting like `strprintf(_("Threshold for disconnecting misbehaving peers (default: %u)"), 100)`. Putting default values in strings has led to accidental translations in the past, and forces the string to be retranslated every time the value changes.
+
+Do not translate messages that are only shown to developers, such as those that only appear when `--help-debug` is used.
+
+General recommendations
+------------------------
+
+### Avoid unnecessary translation strings
+
+Try not to burden translators with translating messages that are e.g. slight variations of other messages.
+In the GUI, avoid the use of text where an icon or symbol will do.
+Make sure that placeholder texts in forms don't end up in the list of strings to be translated (use `<string notr="true">`).
+
+### Make translated strings understandable
+
+Try to write translation strings in an understandable way, for both the user and the translator. Avoid overly technical or detailed messages
+
+### Do not translate internal errors
+
+Do not translate internal errors, or log messages, or messages that appear on the RPC interface. If an error is to be shown to the user,
+use a generic message, then log the detailed message to the log. E.g. "Error: A fatal internal error occurred, see debug.log for details".
+This helps troubleshooting; if the error is the same for everyone, the likelihood is increased that it can be found using a search engine.
+
+### Avoid fragments
+
+Avoid dividing up a message into fragments. Translators see every string separately, so may misunderstand the context if the messages are not self-contained.
+
+### Avoid HTML in translation strings
+
+There have been difficulties with use of HTML in translation strings; translators should not be able to accidentally affect the formatting of messages.
+This may sometimes be at conflict with the recommendation in the previous section.
+
+### String freezes
+
+During a string freeze (often before a major release), no translation strings are to be added, modified or removed.
+
+This can be checked by executing `make translate` in the `src` directory, then verifying that `bitcoin_en.ts` remains unchanged.
+
diff --git a/qa/pull-tester/rpc-tests.sh b/qa/pull-tester/rpc-tests.sh
index ecde45059b..88772a9c32 100755
--- a/qa/pull-tester/rpc-tests.sh
+++ b/qa/pull-tester/rpc-tests.sh
@@ -31,18 +31,46 @@ testScripts=(
'proxy_test.py'
'merkle_blocks.py'
'signrawtransactions.py'
+ 'walletbackup.py'
+);
+testScriptsExt=(
+ 'bipdersig-p2p.py'
+ 'bipdersig.py'
+ 'getblocktemplate_longpoll.py'
+ 'getblocktemplate_proposals.py'
+ 'pruning.py'
+ 'forknotify.py'
+ 'invalidateblock.py'
+ 'keypool.py'
+ 'receivedby.py'
+ 'reindex.py'
+ 'rpcbind_test.py'
+# 'script_test.py'
+ 'smartfees.py'
'maxblocksinflight.py'
'invalidblockrequest.py'
'rawtransactions.py'
# 'forknotify.py'
);
+
+extArg="-extended"
+passOn=${@#$extArg}
+
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
for (( i = 0; i < ${#testScripts[@]}; i++ ))
do
- if [ -z "$1" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
+ if [ -z "$1" ] || [ "${1:0:1}" == "-" ] || [ "$1" == "${testScripts[$i]}" ] || [ "$1.py" == "${testScripts[$i]}" ]
then
echo -e "Running testscript \033[1m${testScripts[$i]}...\033[0m"
- ${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src"
+ ${BUILDDIR}/qa/rpc-tests/${testScripts[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
+ fi
+ done
+ for (( i = 0; i < ${#testScriptsExt[@]}; i++ ))
+ do
+ if [ "$1" == $extArg ] || [ "$1" == "${testScriptsExt[$i]}" ] || [ "$1.py" == "${testScriptsExt[$i]}" ]
+ then
+ echo -e "Running \033[1m2nd level\033[0m testscript \033[1m${testScriptsExt[$i]}...\033[0m"
+ ${BUILDDIR}/qa/rpc-tests/${testScriptsExt[$i]} --srcdir "${BUILDDIR}/src" ${passOn}
fi
done
else
diff --git a/qa/rpc-tests/README.md b/qa/rpc-tests/README.md
index d9fbb109e8..6221c93d8b 100644
--- a/qa/rpc-tests/README.md
+++ b/qa/rpc-tests/README.md
@@ -6,25 +6,37 @@ Git subtree of [https://github.com/jgarzik/python-bitcoinrpc](https://github.com
Changes to python-bitcoinrpc should be made upstream, and then
pulled here using git subtree.
-### [test_framework.py](test_framework.py)
+### [test_framework/test_framework.py](test_framework/test_framework.py)
Base class for new regression tests.
-### [listtransactions.py](listtransactions.py)
-Tests for the listtransactions RPC call.
-
-### [util.py](util.py)
+### [test_framework/util.py](test_framework/util.py)
Generally useful functions.
Bash-based tests, to be ported to Python:
-----------------------------------------
-- wallet.sh : Exercise wallet send/receive code.
-- walletbackup.sh : Exercise wallet backup / dump / import
-- txnmall.sh : Test proper accounting of malleable transactions
- conflictedbalance.sh : More testing of malleable transaction handling
Notes
=====
+You can run a single test by calling `qa/pull-tester/rpc-tests.sh <testname>`.
+
+Run all possible tests with `qa/pull-tester/rpc-tests.sh -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.sh 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
diff --git a/qa/rpc-tests/bipdersig-p2p.py b/qa/rpc-tests/bipdersig-p2p.py
index ff0c878898..41717377b2 100755
--- a/qa/rpc-tests/bipdersig-p2p.py
+++ b/qa/rpc-tests/bipdersig-p2p.py
@@ -4,14 +4,14 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from test_framework import ComparisonTestFramework
-from util import *
-from mininode import CTransaction, NetworkThread
-from blocktools import create_coinbase, create_block
+from test_framework.test_framework import ComparisonTestFramework
+from test_framework.util import *
+from test_framework.mininode import CTransaction, NetworkThread
+from test_framework.blocktools import create_coinbase, create_block
+from test_framework.comptool import TestInstance, TestManager
+from test_framework.script import CScript
from binascii import hexlify, unhexlify
import cStringIO
-from comptool import TestInstance, TestManager
-from script import CScript
import time
# A canonical signature consists of:
diff --git a/qa/rpc-tests/bipdersig.py b/qa/rpc-tests/bipdersig.py
index 2c43bba865..243f816f65 100755
--- a/qa/rpc-tests/bipdersig.py
+++ b/qa/rpc-tests/bipdersig.py
@@ -7,9 +7,8 @@
# Test the BIP66 changeover logic
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
diff --git a/qa/rpc-tests/forknotify.py b/qa/rpc-tests/forknotify.py
index af22ffb1a5..0acef8e30b 100755
--- a/qa/rpc-tests/forknotify.py
+++ b/qa/rpc-tests/forknotify.py
@@ -7,9 +7,8 @@
# Test -alertnotify
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
diff --git a/qa/rpc-tests/getblocktemplate_longpoll.py b/qa/rpc-tests/getblocktemplate_longpoll.py
index 64fe49b835..aab4562422 100755
--- a/qa/rpc-tests/getblocktemplate_longpoll.py
+++ b/qa/rpc-tests/getblocktemplate_longpoll.py
@@ -3,9 +3,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
def check_array_result(object_array, to_match, expected):
diff --git a/qa/rpc-tests/getblocktemplate_proposals.py b/qa/rpc-tests/getblocktemplate_proposals.py
index a63f456d6b..aca0cd7495 100755
--- a/qa/rpc-tests/getblocktemplate_proposals.py
+++ b/qa/rpc-tests/getblocktemplate_proposals.py
@@ -3,9 +3,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
from binascii import a2b_hex, b2a_hex
from hashlib import sha256
diff --git a/qa/rpc-tests/getchaintips.py b/qa/rpc-tests/getchaintips.py
index 83a9537285..6a2bcb2969 100755
--- a/qa/rpc-tests/getchaintips.py
+++ b/qa/rpc-tests/getchaintips.py
@@ -7,8 +7,8 @@
# on chains of different lengths, and join the network together again.
# This gives us two tips, verify that it works.
-from test_framework import BitcoinTestFramework
-from util import assert_equal
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import assert_equal
class GetChainTipsTest (BitcoinTestFramework):
diff --git a/qa/rpc-tests/httpbasics.py b/qa/rpc-tests/httpbasics.py
index 24533741e5..64ba49df64 100755
--- a/qa/rpc-tests/httpbasics.py
+++ b/qa/rpc-tests/httpbasics.py
@@ -7,8 +7,8 @@
# Test REST interface
#
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import base64
try:
diff --git a/qa/rpc-tests/invalidateblock.py b/qa/rpc-tests/invalidateblock.py
index fd8a8e5785..2b9c8154e0 100755
--- a/qa/rpc-tests/invalidateblock.py
+++ b/qa/rpc-tests/invalidateblock.py
@@ -7,9 +7,8 @@
# Test InvalidateBlock code
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
class InvalidateTest(BitcoinTestFramework):
diff --git a/qa/rpc-tests/invalidblockrequest.py b/qa/rpc-tests/invalidblockrequest.py
index 8b685ed9b2..64b8e26395 100755
--- a/qa/rpc-tests/invalidblockrequest.py
+++ b/qa/rpc-tests/invalidblockrequest.py
@@ -4,11 +4,11 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from test_framework import ComparisonTestFramework
-from util import *
-from comptool import TestManager, TestInstance
-from mininode import *
-from blocktools import *
+from test_framework.test_framework import ComparisonTestFramework
+from test_framework.util import *
+from test_framework.comptool import TestManager, TestInstance
+from test_framework.mininode import *
+from test_framework.blocktools import *
import logging
import copy
import time
diff --git a/qa/rpc-tests/keypool.py b/qa/rpc-tests/keypool.py
index 3840ea39d3..aee29a596a 100755
--- a/qa/rpc-tests/keypool.py
+++ b/qa/rpc-tests/keypool.py
@@ -8,7 +8,6 @@
# Add python-bitcoinrpc to module search path:
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
import json
import shutil
@@ -16,8 +15,7 @@ import subprocess
import tempfile
import traceback
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.util import *
def check_array_result(object_array, to_match, expected):
diff --git a/qa/rpc-tests/listtransactions.py b/qa/rpc-tests/listtransactions.py
index 11e3635c04..eeae2d2fa2 100755
--- a/qa/rpc-tests/listtransactions.py
+++ b/qa/rpc-tests/listtransactions.py
@@ -5,9 +5,8 @@
# Exercise the listtransactions API
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
def check_array_result(object_array, to_match, expected):
diff --git a/qa/rpc-tests/maxblocksinflight.py b/qa/rpc-tests/maxblocksinflight.py
index 87c80cd97e..a601147ce8 100755
--- a/qa/rpc-tests/maxblocksinflight.py
+++ b/qa/rpc-tests/maxblocksinflight.py
@@ -4,9 +4,9 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from mininode import *
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.mininode import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import logging
'''
diff --git a/qa/rpc-tests/mempool_coinbase_spends.py b/qa/rpc-tests/mempool_coinbase_spends.py
index 853d031de4..c64a15b9f5 100755
--- a/qa/rpc-tests/mempool_coinbase_spends.py
+++ b/qa/rpc-tests/mempool_coinbase_spends.py
@@ -8,9 +8,8 @@
# that spend (directly or indirectly) coinbase transactions.
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
diff --git a/qa/rpc-tests/mempool_resurrect_test.py b/qa/rpc-tests/mempool_resurrect_test.py
index 6f7f577e36..19c74bb751 100755
--- a/qa/rpc-tests/mempool_resurrect_test.py
+++ b/qa/rpc-tests/mempool_resurrect_test.py
@@ -8,9 +8,8 @@
# the blockchain is re-organized.
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
@@ -34,7 +33,6 @@ class MempoolCoinbaseTest(BitcoinTestFramework):
def run_test(self):
node0_address = self.nodes[0].getnewaddress()
-
# Spend block 1/2/3's coinbase transactions
# Mine a block.
# Create three more transactions, spending the spends
diff --git a/qa/rpc-tests/mempool_spendcoinbase.py b/qa/rpc-tests/mempool_spendcoinbase.py
index ab5817c869..fc17c50692 100755
--- a/qa/rpc-tests/mempool_spendcoinbase.py
+++ b/qa/rpc-tests/mempool_spendcoinbase.py
@@ -13,9 +13,8 @@
# but less mature coinbase spends are NOT.
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
diff --git a/qa/rpc-tests/merkle_blocks.py b/qa/rpc-tests/merkle_blocks.py
index a143d21a21..72a80ce6ca 100755
--- a/qa/rpc-tests/merkle_blocks.py
+++ b/qa/rpc-tests/merkle_blocks.py
@@ -7,9 +7,8 @@
# Test merkleblock fetch/validation
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os
import shutil
diff --git a/qa/rpc-tests/proxy_test.py b/qa/rpc-tests/proxy_test.py
index d6d9e6725b..9a9b2f5300 100755
--- a/qa/rpc-tests/proxy_test.py
+++ b/qa/rpc-tests/proxy_test.py
@@ -7,9 +7,9 @@ import traceback, sys
from binascii import hexlify
import time, os
-from socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
'''
Test plan:
- Start bitcoind's with different proxy configurations
diff --git a/qa/rpc-tests/pruning.py b/qa/rpc-tests/pruning.py
index 85fd1c982a..2824c51ce7 100755
--- a/qa/rpc-tests/pruning.py
+++ b/qa/rpc-tests/pruning.py
@@ -11,9 +11,8 @@
# This test takes 30 mins or more (up to 2 hours)
# ********
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os.path
def calc_usage(blockdir):
diff --git a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/.gitignore b/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/.gitignore
deleted file mode 100644
index 0d20b6487c..0000000000
--- a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-*.pyc
diff --git a/qa/rpc-tests/python-bitcoinrpc/setup.py b/qa/rpc-tests/python-bitcoinrpc/setup.py
deleted file mode 100644
index 43cdb1c038..0000000000
--- a/qa/rpc-tests/python-bitcoinrpc/setup.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python2
-
-from distutils.core import setup
-
-setup(name='python-bitcoinrpc',
- version='0.1',
- description='Enhanced version of python-jsonrpc for use with Bitcoin',
- long_description=open('README').read(),
- author='Jeff Garzik',
- author_email='<jgarzik@exmulti.com>',
- maintainer='Jeff Garzik',
- maintainer_email='<jgarzik@exmulti.com>',
- url='http://www.github.com/jgarzik/python-bitcoinrpc',
- packages=['bitcoinrpc'],
- classifiers=['License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', 'Operating System :: OS Independent'])
diff --git a/qa/rpc-tests/rawtransactions.py b/qa/rpc-tests/rawtransactions.py
index 3d80c97d74..1378514c84 100755
--- a/qa/rpc-tests/rawtransactions.py
+++ b/qa/rpc-tests/rawtransactions.py
@@ -8,8 +8,8 @@
# that spend (directly or indirectly) coinbase transactions.
#
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
from pprint import pprint
from time import sleep
diff --git a/qa/rpc-tests/receivedby.py b/qa/rpc-tests/receivedby.py
index 1a681e1aae..16d6bd4cf1 100755
--- a/qa/rpc-tests/receivedby.py
+++ b/qa/rpc-tests/receivedby.py
@@ -5,9 +5,8 @@
# Exercise the listreceivedbyaddress API
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
def get_sub_array_from_array(object_array, to_match):
diff --git a/qa/rpc-tests/reindex.py b/qa/rpc-tests/reindex.py
index fe767586bb..f2e3f248ea 100755
--- a/qa/rpc-tests/reindex.py
+++ b/qa/rpc-tests/reindex.py
@@ -6,9 +6,8 @@
#
# Test -reindex with CheckBlockIndex
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
import os.path
class ReindexTest(BitcoinTestFramework):
diff --git a/qa/rpc-tests/rest.py b/qa/rpc-tests/rest.py
index 9f0d049fe9..6c51b2fcd9 100755
--- a/qa/rpc-tests/rest.py
+++ b/qa/rpc-tests/rest.py
@@ -7,8 +7,9 @@
# Test REST interface
#
-from test_framework import BitcoinTestFramework
-from util import *
+
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
from struct import *
import binascii
import json
@@ -54,78 +55,78 @@ class RESTTest (BitcoinTestFramework):
connect_nodes_bi(self.nodes,0,2)
self.is_network_split=False
self.sync_all()
-
+
def run_test(self):
url = urlparse.urlparse(self.nodes[0].url)
print "Mining blocks..."
-
+
self.nodes[0].generate(1)
self.sync_all()
self.nodes[2].generate(100)
self.sync_all()
-
+
assert_equal(self.nodes[0].getbalance(), 50)
-
+
txid = self.nodes[0].sendtoaddress(self.nodes[1].getnewaddress(), 0.1)
self.sync_all()
self.nodes[2].generate(1)
self.sync_all()
bb_hash = self.nodes[0].getbestblockhash()
-
+
assert_equal(self.nodes[1].getbalance(), Decimal("0.1")) #balance now should be 0.1 on node 1
-
+
# load the latest 0.1 tx over the REST API
json_string = http_get_call(url.hostname, url.port, '/rest/tx/'+txid+self.FORMAT_SEPARATOR+"json")
json_obj = json.loads(json_string)
vintx = json_obj['vin'][0]['txid'] # get the vin to later check for utxo (should be spent by then)
- # get n of 0.1 outpoint
+ # get n of 0.1 outpoint
n = 0
for vout in json_obj['vout']:
if vout['value'] == 0.1:
n = vout['n']
-
-
+
+
######################################
# GETUTXOS: query a unspent outpoint #
######################################
- json_request = '{"checkmempool":true,"outpoints":[{"txid":"'+txid+'","n":'+str(n)+'}]}'
- json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request)
+ json_request = '/checkmempool/'+txid+'-'+str(n)
+ json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
-
+
#check chainTip response
assert_equal(json_obj['chaintipHash'], bb_hash)
-
+
#make sure there is one utxo
assert_equal(len(json_obj['utxos']), 1)
assert_equal(json_obj['utxos'][0]['value'], 0.1)
-
-
+
+
################################################
# GETUTXOS: now query a already spent outpoint #
################################################
- json_request = '{"checkmempool":true,"outpoints":[{"txid":"'+vintx+'","n":0}]}'
- json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request)
+ json_request = '/checkmempool/'+vintx+'-0'
+ json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
-
+
#check chainTip response
assert_equal(json_obj['chaintipHash'], bb_hash)
#make sure there is no utox in the response because this oupoint has been spent
assert_equal(len(json_obj['utxos']), 0)
-
+
#check bitmap
assert_equal(json_obj['bitmap'], "0")
-
-
+
+
##################################################
# GETUTXOS: now check both with the same request #
##################################################
- json_request = '{"checkmempool":true,"outpoints":[{"txid":"'+txid+'","n":'+str(n)+'},{"txid":"'+vintx+'","n":0}]}'
- json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request)
+ json_request = '/checkmempool/'+txid+'-'+str(n)+'/'+vintx+'-0'
+ json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
assert_equal(len(json_obj['utxos']), 1)
assert_equal(json_obj['bitmap'], "10")
-
+
#test binary response
bb_hash = self.nodes[0].getbestblockhash()
@@ -134,19 +135,18 @@ class RESTTest (BitcoinTestFramework):
binaryRequest += pack("i", n);
binaryRequest += binascii.unhexlify(vintx);
binaryRequest += pack("i", 0);
-
+
bin_response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', binaryRequest)
-
output = StringIO.StringIO()
output.write(bin_response)
output.seek(0)
chainHeight = unpack("i", output.read(4))[0]
hashFromBinResponse = hex(deser_uint256(output))[2:].zfill(65).rstrip("L")
-
+
assert_equal(bb_hash, hashFromBinResponse) #check if getutxo's chaintip during calculation was fine
assert_equal(chainHeight, 102) #chain height must be 102
-
-
+
+
############################
# GETUTXOS: mempool checks #
############################
@@ -156,55 +156,56 @@ class RESTTest (BitcoinTestFramework):
json_string = http_get_call(url.hostname, url.port, '/rest/tx/'+txid+self.FORMAT_SEPARATOR+"json")
json_obj = json.loads(json_string)
vintx = json_obj['vin'][0]['txid'] # get the vin to later check for utxo (should be spent by then)
- # get n of 0.1 outpoint
+ # get n of 0.1 outpoint
n = 0
for vout in json_obj['vout']:
if vout['value'] == 0.1:
n = vout['n']
-
- json_request = '{"checkmempool":false,"outpoints":[{"txid":"'+txid+'","n":'+str(n)+'}]}'
- json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request)
+
+ json_request = '/'+txid+'-'+str(n)
+ json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
assert_equal(len(json_obj['utxos']), 0) #there should be a outpoint because it has just added to the mempool
-
- json_request = '{"checkmempool":true,"outpoints":[{"txid":"'+txid+'","n":'+str(n)+'}]}'
- json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request)
+
+ json_request = '/checkmempool/'+txid+'-'+str(n)
+ json_string = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json')
json_obj = json.loads(json_string)
assert_equal(len(json_obj['utxos']), 1) #there should be a outpoint because it has just added to the mempool
-
+
#do some invalid requests
json_request = '{"checkmempool'
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
assert_equal(response.status, 500) #must be a 500 because we send a invalid json request
-
+
json_request = '{"checkmempool'
response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'bin', json_request, True)
assert_equal(response.status, 500) #must be a 500 because we send a invalid bin request
-
+
+ response = http_get_call(url.hostname, url.port, '/rest/getutxos/checkmempool'+self.FORMAT_SEPARATOR+'bin', '', True)
+ assert_equal(response.status, 500) #must be a 500 because we send a invalid bin request
+
#test limits
- json_request = '{"checkmempool":true,"outpoints":['
- for x in range(0, 200):
- json_request += '{"txid":"'+txid+'","n":'+str(n)+'},'
- json_request = json_request.rstrip(",")
- json_request+="]}";
- response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
+ json_request = '/checkmempool/'
+ for x in range(0, 20):
+ json_request += txid+'-'+str(n)+'/'
+ json_request = json_request.rstrip("/")
+ response = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
assert_equal(response.status, 500) #must be a 500 because we exceeding the limits
-
- json_request = '{"checkmempool":true,"outpoints":['
- for x in range(0, 90):
- json_request += '{"txid":"'+txid+'","n":'+str(n)+'},'
- json_request = json_request.rstrip(",")
- json_request+="]}";
- response = http_get_call(url.hostname, url.port, '/rest/getutxos'+self.FORMAT_SEPARATOR+'json', json_request, True)
+
+ json_request = '/checkmempool/'
+ for x in range(0, 15):
+ json_request += txid+'-'+str(n)+'/'
+ json_request = json_request.rstrip("/");
+ response = http_get_call(url.hostname, url.port, '/rest/getutxos'+json_request+self.FORMAT_SEPARATOR+'json', '', True)
assert_equal(response.status, 200) #must be a 500 because we exceeding the limits
self.nodes[0].generate(1) #generate block to not affect upcomming tests
self.sync_all()
-
+
################
# /rest/block/ #
################
-
+
# check binary format
response = http_get_call(url.hostname, url.port, '/rest/block/'+bb_hash+self.FORMAT_SEPARATOR+"bin", "", True)
assert_equal(response.status, 200)
@@ -248,7 +249,7 @@ class RESTTest (BitcoinTestFramework):
hex_string = http_get_call(url.hostname, url.port, '/rest/tx/'+tx_hash+self.FORMAT_SEPARATOR+"hex", "", True)
assert_equal(hex_string.status, 200)
assert_greater_than(int(response.getheader('content-length')), 10)
-
+
# check block tx details
@@ -278,7 +279,7 @@ class RESTTest (BitcoinTestFramework):
#test rest bestblock
bb_hash = self.nodes[0].getbestblockhash()
-
+
json_string = http_get_call(url.hostname, url.port, '/rest/chaininfo.json')
json_obj = json.loads(json_string)
assert_equal(json_obj['bestblockhash'], bb_hash)
diff --git a/qa/rpc-tests/rpcbind_test.py b/qa/rpc-tests/rpcbind_test.py
index 655e00b6e7..04110c2831 100755
--- a/qa/rpc-tests/rpcbind_test.py
+++ b/qa/rpc-tests/rpcbind_test.py
@@ -8,7 +8,6 @@
# Add python-bitcoinrpc to module search path:
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
import json
import shutil
@@ -16,9 +15,8 @@ import subprocess
import tempfile
import traceback
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
-from netutil import *
+from test_framework.util import *
+from test_framework.netutil import *
def run_bind_test(tmpdir, allow_ips, connect_to, addresses, expected):
'''
diff --git a/qa/rpc-tests/script_test.py b/qa/rpc-tests/script_test.py
index 1ba3a478a8..860fa56b64 100755
--- a/qa/rpc-tests/script_test.py
+++ b/qa/rpc-tests/script_test.py
@@ -19,12 +19,12 @@ 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 import ComparisonTestFramework
-from util import *
-from comptool import TestInstance, TestManager
-from mininode import *
-from blocktools import *
-from script import *
+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
@@ -42,7 +42,7 @@ class ScriptTestFile(object):
def load_files(self):
for f in self.files:
- self.data.extend(json.loads(open(f).read()))
+ 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):
diff --git a/qa/rpc-tests/signrawtransactions.py b/qa/rpc-tests/signrawtransactions.py
index 943634bd19..d51d6ee610 100755
--- a/qa/rpc-tests/signrawtransactions.py
+++ b/qa/rpc-tests/signrawtransactions.py
@@ -3,8 +3,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
class SignRawTransactionsTest(BitcoinTestFramework):
diff --git a/qa/rpc-tests/smartfees.py b/qa/rpc-tests/smartfees.py
index 69f3c22c17..c15c5fda09 100755
--- a/qa/rpc-tests/smartfees.py
+++ b/qa/rpc-tests/smartfees.py
@@ -7,9 +7,8 @@
# Test fee estimation code
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
# Construct 2 trivial P2SH's and the ScriptSigs that spend them
# So we can create many many transactions without needing to spend
diff --git a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/__init__.py b/qa/rpc-tests/test_framework/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/__init__.py
+++ b/qa/rpc-tests/test_framework/__init__.py
diff --git a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py b/qa/rpc-tests/test_framework/authproxy.py
index bc7d655fdf..bc7d655fdf 100644
--- a/qa/rpc-tests/python-bitcoinrpc/bitcoinrpc/authproxy.py
+++ b/qa/rpc-tests/test_framework/authproxy.py
diff --git a/qa/rpc-tests/bignum.py b/qa/rpc-tests/test_framework/bignum.py
index b0c58ccd47..b0c58ccd47 100644
--- a/qa/rpc-tests/bignum.py
+++ b/qa/rpc-tests/test_framework/bignum.py
diff --git a/qa/rpc-tests/blockstore.py b/qa/rpc-tests/test_framework/blockstore.py
index c57b6df81b..c57b6df81b 100644
--- a/qa/rpc-tests/blockstore.py
+++ b/qa/rpc-tests/test_framework/blockstore.py
diff --git a/qa/rpc-tests/blocktools.py b/qa/rpc-tests/test_framework/blocktools.py
index f397fe7cd6..f397fe7cd6 100644
--- a/qa/rpc-tests/blocktools.py
+++ b/qa/rpc-tests/test_framework/blocktools.py
diff --git a/qa/rpc-tests/comptool.py b/qa/rpc-tests/test_framework/comptool.py
index 23a979250c..23a979250c 100755
--- a/qa/rpc-tests/comptool.py
+++ b/qa/rpc-tests/test_framework/comptool.py
diff --git a/qa/rpc-tests/mininode.py b/qa/rpc-tests/test_framework/mininode.py
index b7d78e74fa..b7d78e74fa 100755
--- a/qa/rpc-tests/mininode.py
+++ b/qa/rpc-tests/test_framework/mininode.py
diff --git a/qa/rpc-tests/netutil.py b/qa/rpc-tests/test_framework/netutil.py
index b30a88a4f7..b30a88a4f7 100644
--- a/qa/rpc-tests/netutil.py
+++ b/qa/rpc-tests/test_framework/netutil.py
diff --git a/qa/rpc-tests/script.py b/qa/rpc-tests/test_framework/script.py
index 03695b8635..e37ab5d45a 100644
--- a/qa/rpc-tests/script.py
+++ b/qa/rpc-tests/test_framework/script.py
@@ -14,7 +14,7 @@ Functionality to build scripts, as well as SignatureHash().
from __future__ import absolute_import, division, print_function, unicode_literals
-from mininode import CTransaction, CTxOut, hash256
+from test_framework.mininode import CTransaction, CTxOut, hash256
import sys
bchr = chr
@@ -27,7 +27,7 @@ if sys.version > '3':
import copy
import struct
-import bignum
+import test_framework.bignum
MAX_SCRIPT_SIZE = 10000
MAX_SCRIPT_ELEMENT_SIZE = 520
diff --git a/qa/rpc-tests/socks5.py b/qa/rpc-tests/test_framework/socks5.py
index 1dbfb98d5d..1dbfb98d5d 100644
--- a/qa/rpc-tests/socks5.py
+++ b/qa/rpc-tests/test_framework/socks5.py
diff --git a/qa/rpc-tests/test_framework.py b/qa/rpc-tests/test_framework/test_framework.py
index 15a357a340..5671431f6e 100755
--- a/qa/rpc-tests/test_framework.py
+++ b/qa/rpc-tests/test_framework/test_framework.py
@@ -8,13 +8,12 @@
# Add python-bitcoinrpc to module search path:
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
import shutil
import tempfile
import traceback
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from authproxy import AuthServiceProxy, JSONRPCException
from util import *
diff --git a/qa/rpc-tests/util.py b/qa/rpc-tests/test_framework/util.py
index 997bbcc373..c236ec2602 100644
--- a/qa/rpc-tests/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -8,7 +8,6 @@
# Add python-bitcoinrpc to module search path:
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "python-bitcoinrpc"))
from decimal import Decimal, ROUND_DOWN
import json
@@ -18,7 +17,7 @@ import subprocess
import time
import re
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from authproxy import AuthServiceProxy, JSONRPCException
from util import *
def p2p_port(n):
diff --git a/qa/rpc-tests/txn_doublespend.py b/qa/rpc-tests/txn_doublespend.py
index fe9168944b..99dcdae552 100755
--- a/qa/rpc-tests/txn_doublespend.py
+++ b/qa/rpc-tests/txn_doublespend.py
@@ -7,10 +7,9 @@
# Test proper accounting with malleable transactions
#
-from test_framework import BitcoinTestFramework
-from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
from decimal import Decimal
-from util import *
import os
import shutil
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py
index b8965b3662..46dc7765b6 100755
--- a/qa/rpc-tests/wallet.py
+++ b/qa/rpc-tests/wallet.py
@@ -19,9 +19,8 @@
# k) test ResendWalletTransactions - create transactions, startup fourth node, make sure it syncs
#
-from test_framework import BitcoinTestFramework
-from util import *
-
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
class WalletTest (BitcoinTestFramework):
diff --git a/qa/rpc-tests/walletbackup.py b/qa/rpc-tests/walletbackup.py
index b9fc862234..da100d7fc0 100755
--- a/qa/rpc-tests/walletbackup.py
+++ b/qa/rpc-tests/walletbackup.py
@@ -33,8 +33,8 @@ Shutdown again, restore using importwallet,
and confirm again balances are correct.
"""
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
from random import randint
import logging
logging.basicConfig(format='%(levelname)s:%(message)s', level=logging.INFO)
diff --git a/qa/rpc-tests/zapwallettxes.py b/qa/rpc-tests/zapwallettxes.py
index 045614e94c..0ec8ec5364 100755
--- a/qa/rpc-tests/zapwallettxes.py
+++ b/qa/rpc-tests/zapwallettxes.py
@@ -3,8 +3,8 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-from test_framework import BitcoinTestFramework
-from util import *
+from test_framework.test_framework import BitcoinTestFramework
+from test_framework.util import *
class ZapWalletTXesTest (BitcoinTestFramework):
diff --git a/share/certs/PrivateKeyNotes.md b/share/certs/PrivateKeyNotes.md
index da299d168f..cbd060c268 100644
--- a/share/certs/PrivateKeyNotes.md
+++ b/share/certs/PrivateKeyNotes.md
@@ -7,7 +7,7 @@ signing requests.
For OSX, the private key was generated by Keychain.app on Gavin's main work machine.
The key and certificate is in a separate, passphrase-protected keychain file that is
-unlocked to sign the Bitcoin-Qt.app bundle.
+unlocked to sign the Bitcoin-Core.app bundle.
For Windows, the private key was generated by Firefox running on Gavin's main work machine.
The key and certificate were exported into a separate, passphrase-protected PKCS#12 file, and
@@ -17,7 +17,7 @@ Threat analysis
--
Gavin is a single point of failure. He could be coerced to divulge the secret signing keys,
-allowing somebody to distribute a Bitcoin-Qt.app or bitcoin-qt-setup.exe with a valid
+allowing somebody to distribute a Bitcoin-Core.app or bitcoin-qt-setup.exe with a valid
signature but containing a malicious binary.
Or the machine Gavin uses to sign the binaries could be compromised, either remotely or
diff --git a/src/Makefile.am b/src/Makefile.am
index c0aba3eae6..1c2f770418 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -92,6 +92,7 @@ BITCOIN_CORE_H = \
compressor.h \
consensus/consensus.h \
consensus/params.h \
+ consensus/validation.h \
core_io.h \
eccryptoverify.h \
ecwrapper.h \
@@ -352,6 +353,10 @@ bitcoin_tx_SOURCES = bitcoin-tx.cpp
bitcoin_tx_CPPFLAGS = $(BITCOIN_INCLUDES)
bitcoin_tx_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)
+if TARGET_WINDOWS
+bitcoin_tx_SOURCES += bitcoin-tx-res.rc
+endif
+
bitcoin_tx_LDADD = \
$(LIBBITCOIN_UNIVALUE) \
$(LIBBITCOIN_COMMON) \
diff --git a/src/amount.h b/src/amount.h
index 9212244a88..7dc62edac4 100644
--- a/src/amount.h
+++ b/src/amount.h
@@ -16,7 +16,15 @@ typedef int64_t CAmount;
static const CAmount COIN = 100000000;
static const CAmount CENT = 1000000;
-/** No amount larger than this (in satoshi) is valid */
+/** No amount larger than this (in satoshi) is valid.
+ *
+ * Note that this constant is *not* the total money supply, which in Bitcoin
+ * currently happens to be less than 21,000,000 BTC for various reasons, but
+ * rather a sanity check. As this sanity check is used by consensus-critical
+ * validation code, the exact value of the MAX_MONEY constant is consensus
+ * critical; in unusual circumstances like a(nother) overflow bug that allowed
+ * for the creation of coins out of thin air modification could lead to a fork.
+ * */
static const CAmount MAX_MONEY = 21000000 * COIN;
inline bool MoneyRange(const CAmount& nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
diff --git a/src/bitcoin-cli-res.rc b/src/bitcoin-cli-res.rc
index 4ea1f38e47..1e4aa609bb 100644
--- a/src/bitcoin-cli-res.rc
+++ b/src/bitcoin-cli-res.rc
@@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoin-cli (OSS RPC client for Bitcoin)"
+ VALUE "FileDescription", "bitcoin-cli (JSON-RPC client for Bitcoin Core)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-cli"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoin-cli.exe"
- VALUE "ProductName", "Bitcoin-cli"
+ VALUE "ProductName", "bitcoin-cli"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/bitcoin-tx-res.rc b/src/bitcoin-tx-res.rc
new file mode 100644
index 0000000000..3e49b820bc
--- /dev/null
+++ b/src/bitcoin-tx-res.rc
@@ -0,0 +1,35 @@
+#include <windows.h> // needed for VERSIONINFO
+#include "clientversion.h" // holds the needed client version information
+
+#define VER_PRODUCTVERSION CLIENT_VERSION_MAJOR,CLIENT_VERSION_MINOR,CLIENT_VERSION_REVISION,CLIENT_VERSION_BUILD
+#define VER_PRODUCTVERSION_STR STRINGIZE(CLIENT_VERSION_MAJOR) "." STRINGIZE(CLIENT_VERSION_MINOR) "." STRINGIZE(CLIENT_VERSION_REVISION) "." STRINGIZE(CLIENT_VERSION_BUILD)
+#define VER_FILEVERSION VER_PRODUCTVERSION
+#define VER_FILEVERSION_STR VER_PRODUCTVERSION_STR
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEOS VOS_NT_WINDOWS32
+FILETYPE VFT_APP
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4" // U.S. English - multilingual (hex)
+ BEGIN
+ VALUE "CompanyName", "Bitcoin"
+ VALUE "FileDescription", "bitcoin-tx (CLI Bitcoin transaction editor utility)"
+ VALUE "FileVersion", VER_FILEVERSION_STR
+ VALUE "InternalName", "bitcoin-tx"
+ VALUE "LegalCopyright", COPYRIGHT_STR
+ VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
+ VALUE "OriginalFilename", "bitcoin-tx.exe"
+ VALUE "ProductName", "bitcoin-tx"
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1252 // language neutral - multilingual (decimal)
+ END
+END
diff --git a/src/bitcoind-res.rc b/src/bitcoind-res.rc
index d183179b17..3a64acd5d1 100644
--- a/src/bitcoind-res.rc
+++ b/src/bitcoind-res.rc
@@ -17,13 +17,13 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoind (OSS daemon/client for Bitcoin)"
+ VALUE "FileDescription", "bitcoind (Bitcoin node with a JSON-RPC server)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoind"
VALUE "LegalCopyright", COPYRIGHT_STR
VALUE "LegalTrademarks1", "Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php."
VALUE "OriginalFilename", "bitcoind.exe"
- VALUE "ProductName", "Bitcoind"
+ VALUE "ProductName", "bitcoind"
VALUE "ProductVersion", VER_PRODUCTVERSION_STR
END
END
diff --git a/src/chainparams.h b/src/chainparams.h
index 6274bf3eb4..8044b553e1 100644
--- a/src/chainparams.h
+++ b/src/chainparams.h
@@ -49,7 +49,6 @@ public:
const CMessageHeader::MessageStartChars& MessageStart() const { return pchMessageStart; }
const std::vector<unsigned char>& AlertKey() const { return vAlertPubKey; }
int GetDefaultPort() const { return nDefaultPort; }
- int SubsidyHalvingInterval() const { return consensus.nSubsidyHalvingInterval; }
/** Used if GenerateBitcoins is called with a negative number of threads */
int DefaultMinerThreads() const { return nMinerThreads; }
diff --git a/src/consensus/validation.h b/src/consensus/validation.h
new file mode 100644
index 0000000000..c92bec4fae
--- /dev/null
+++ b/src/consensus/validation.h
@@ -0,0 +1,80 @@
+// Copyright (c) 2009-2010 Satoshi Nakamoto
+// Copyright (c) 2009-2014 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_CONSENSUS_VALIDATION_H
+#define BITCOIN_CONSENSUS_VALIDATION_H
+
+#include <string>
+
+/** "reject" message codes */
+static const unsigned char REJECT_MALFORMED = 0x01;
+static const unsigned char REJECT_INVALID = 0x10;
+static const unsigned char REJECT_OBSOLETE = 0x11;
+static const unsigned char REJECT_DUPLICATE = 0x12;
+static const unsigned char REJECT_NONSTANDARD = 0x40;
+static const unsigned char REJECT_DUST = 0x41;
+static const unsigned char REJECT_INSUFFICIENTFEE = 0x42;
+static const unsigned char REJECT_CHECKPOINT = 0x43;
+
+/** Capture information about block/transaction validation */
+class CValidationState {
+private:
+ enum mode_state {
+ MODE_VALID, //! everything ok
+ MODE_INVALID, //! network rule violation (DoS value may be set)
+ MODE_ERROR, //! run-time error
+ } mode;
+ int nDoS;
+ std::string strRejectReason;
+ unsigned char chRejectCode;
+ bool corruptionPossible;
+public:
+ CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {}
+ bool DoS(int level, bool ret = false,
+ unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
+ bool corruptionIn=false) {
+ chRejectCode = chRejectCodeIn;
+ strRejectReason = strRejectReasonIn;
+ corruptionPossible = corruptionIn;
+ if (mode == MODE_ERROR)
+ return ret;
+ nDoS += level;
+ mode = MODE_INVALID;
+ return ret;
+ }
+ bool Invalid(bool ret = false,
+ unsigned char _chRejectCode=0, std::string _strRejectReason="") {
+ return DoS(0, ret, _chRejectCode, _strRejectReason);
+ }
+ bool Error(std::string strRejectReasonIn="") {
+ if (mode == MODE_VALID)
+ strRejectReason = strRejectReasonIn;
+ mode = MODE_ERROR;
+ return false;
+ }
+ bool IsValid() const {
+ return mode == MODE_VALID;
+ }
+ bool IsInvalid() const {
+ return mode == MODE_INVALID;
+ }
+ bool IsError() const {
+ return mode == MODE_ERROR;
+ }
+ bool IsInvalid(int &nDoSOut) const {
+ if (IsInvalid()) {
+ nDoSOut = nDoS;
+ return true;
+ }
+ return false;
+ }
+ bool CorruptionPossible() const {
+ return corruptionPossible;
+ }
+ unsigned char GetRejectCode() const { return chRejectCode; }
+ std::string GetRejectReason() const { return strRejectReason; }
+};
+
+#endif // BITCOIN_CONSENSUS_VALIDATION_H
diff --git a/src/init.cpp b/src/init.cpp
index 7e9230a228..2e4740602f 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -13,6 +13,7 @@
#include "amount.h"
#include "checkpoints.h"
#include "compat/sanity.h"
+#include "consensus/validation.h"
#include "key.h"
#include "main.h"
#include "miner.h"
@@ -39,7 +40,9 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
+#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
+#include <boost/function.hpp>
#include <boost/interprocess/sync/file_lock.hpp>
#include <boost/thread.hpp>
#include <openssl/crypto.h>
@@ -188,7 +191,11 @@ void Shutdown()
pwalletMain->Flush(true);
#endif
#ifndef WIN32
- boost::filesystem::remove(GetPidFile());
+ try {
+ boost::filesystem::remove(GetPidFile());
+ } catch (const boost::filesystem::filesystem_error& e) {
+ LogPrintf("%s: Unable to remove pidfile: %s\n", __func__, e.what());
+ }
#endif
UnregisterAllValidationInterfaces();
#ifdef ENABLE_WALLET
@@ -661,6 +668,10 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
// to protect privacy, do not listen by default if a default proxy server is specified
if (SoftSetBoolArg("-listen", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -listen=0\n", __func__);
+ // to protect privacy, do not use UPNP when a proxy is set. The user may still specify -listen=1
+ // to listen locally, so don't rely on this happening through -listen below.
+ if (SoftSetBoolArg("-upnp", false))
+ LogPrintf("%s: parameter interaction: -proxy set -> setting -upnp=0\n", __func__);
// to protect privacy, do not discover addresses by default
if (SoftSetBoolArg("-discover", false))
LogPrintf("%s: parameter interaction: -proxy set -> setting -discover=0\n", __func__);
@@ -863,9 +874,15 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
boost::filesystem::path pathLockFile = GetDataDir() / ".lock";
FILE* file = fopen(pathLockFile.string().c_str(), "a"); // empty lock file; created if it doesn't exist.
if (file) fclose(file);
- static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
- if (!lock.try_lock())
- return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running."), strDataDir));
+
+ try {
+ static boost::interprocess::file_lock lock(pathLockFile.string().c_str());
+ if (!lock.try_lock())
+ return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running."), strDataDir));
+ } catch(const boost::interprocess::interprocess_exception& e) {
+ return InitError(strprintf(_("Cannot obtain a lock on data directory %s. Bitcoin Core is probably already running.") + " %s.", strDataDir, e.what()));
+ }
+
#ifndef WIN32
CreatePidFile(GetPidFile(), getpid());
#endif
@@ -1382,6 +1399,12 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
StartNode(threadGroup, scheduler);
+ // Monitor the chain, and alert if we get blocks much quicker or slower than expected
+ int64_t nPowTargetSpacing = Params().GetConsensus().nPowTargetSpacing;
+ CScheduler::Function f = boost::bind(&PartitionCheck, &IsInitialBlockDownload,
+ boost::ref(cs_main), boost::cref(chainActive), nPowTargetSpacing);
+ scheduler.scheduleEvery(f, nPowTargetSpacing);
+
#ifdef ENABLE_WALLET
// Generate coins in the background
if (pwalletMain)
diff --git a/src/main.cpp b/src/main.cpp
index 7d7c97f773..039092cd19 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -11,6 +11,7 @@
#include "chainparams.h"
#include "checkpoints.h"
#include "checkqueue.h"
+#include "consensus/validation.h"
#include "init.h"
#include "merkleblock.h"
#include "net.h"
@@ -28,6 +29,7 @@
#include <boost/algorithm/string/replace.hpp>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
+#include <boost/math/distributions/poisson.hpp>
#include <boost/thread.hpp>
using namespace std;
@@ -153,8 +155,8 @@ namespace {
uint256 hash;
CBlockIndex *pindex; //! Optional.
int64_t nTime; //! Time of "getdata" request in microseconds.
- int nValidatedQueuedBefore; //! Number of blocks queued with validated headers (globally) at the time this one is requested.
bool fValidatedHeaders; //! Whether this block has validated headers at the time of request.
+ int64_t nTimeDisconnect; //! The timeout for this block request (for disconnecting a slow peer)
};
map<uint256, pair<NodeId, list<QueuedBlock>::iterator> > mapBlocksInFlight;
@@ -215,6 +217,7 @@ struct CNodeState {
int64_t nStallingSince;
list<QueuedBlock> vBlocksInFlight;
int nBlocksInFlight;
+ int nBlocksInFlightValidHeaders;
//! Whether we consider this a preferred download peer.
bool fPreferredDownload;
@@ -228,6 +231,7 @@ struct CNodeState {
fSyncStarted = false;
nStallingSince = 0;
nBlocksInFlight = 0;
+ nBlocksInFlightValidHeaders = 0;
fPreferredDownload = false;
}
};
@@ -259,6 +263,12 @@ void UpdatePreferredDownload(CNode* node, CNodeState* state)
nPreferredDownload += state->fPreferredDownload;
}
+// Returns time at which to timeout block request (nTime in microseconds)
+int64_t GetBlockTimeout(int64_t nTime, int nValidatedQueuedBefore, const Consensus::Params &consensusParams)
+{
+ return nTime + 500000 * consensusParams.nPowTargetSpacing * (4 + nValidatedQueuedBefore);
+}
+
void InitializeNode(NodeId nodeid, const CNode *pnode) {
LOCK(cs_main);
CNodeState &state = mapNodeState.insert(std::make_pair(nodeid, CNodeState())).first->second;
@@ -291,6 +301,7 @@ void MarkBlockAsReceived(const uint256& hash) {
if (itInFlight != mapBlocksInFlight.end()) {
CNodeState *state = State(itInFlight->second.first);
nQueuedValidatedHeaders -= itInFlight->second.second->fValidatedHeaders;
+ state->nBlocksInFlightValidHeaders -= itInFlight->second.second->fValidatedHeaders;
state->vBlocksInFlight.erase(itInFlight->second.second);
state->nBlocksInFlight--;
state->nStallingSince = 0;
@@ -299,17 +310,19 @@ void MarkBlockAsReceived(const uint256& hash) {
}
// Requires cs_main.
-void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, CBlockIndex *pindex = NULL) {
+void MarkBlockAsInFlight(NodeId nodeid, const uint256& hash, const Consensus::Params& consensusParams, CBlockIndex *pindex = NULL) {
CNodeState *state = State(nodeid);
assert(state != NULL);
// Make sure it's not listed somewhere already.
MarkBlockAsReceived(hash);
- QueuedBlock newentry = {hash, pindex, GetTimeMicros(), nQueuedValidatedHeaders, pindex != NULL};
+ int64_t nNow = GetTimeMicros();
+ QueuedBlock newentry = {hash, pindex, nNow, pindex != NULL, GetBlockTimeout(nNow, nQueuedValidatedHeaders, consensusParams)};
nQueuedValidatedHeaders += newentry.fValidatedHeaders;
list<QueuedBlock>::iterator it = state->vBlocksInFlight.insert(state->vBlocksInFlight.end(), newentry);
state->nBlocksInFlight++;
+ state->nBlocksInFlightValidHeaders += newentry.fValidatedHeaders;
mapBlocksInFlight[hash] = std::make_pair(nodeid, it);
}
@@ -1133,7 +1146,7 @@ bool GetTransaction(const uint256 &hash, CTransaction &txOut, uint256 &hashBlock
// CBlock and CBlockIndex
//
-bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
+bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenBlockFile(pos), SER_DISK, CLIENT_VERSION);
@@ -1142,7 +1155,7 @@ bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos)
// Write index header
unsigned int nSize = fileout.GetSerializeSize(block);
- fileout << FLATDATA(Params().MessageStart()) << nSize;
+ fileout << FLATDATA(messageStart) << nSize;
// Write block
long fileOutPos = ftell(fileout.Get());
@@ -1188,19 +1201,17 @@ bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex)
return true;
}
-CAmount GetBlockValue(int nHeight, const CAmount& nFees)
+CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
- CAmount nSubsidy = 50 * COIN;
- int halvings = nHeight / Params().SubsidyHalvingInterval();
-
+ int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
// Force block reward to zero when right shift is undefined.
if (halvings >= 64)
- return nFees;
+ return 0;
+ CAmount nSubsidy = 50 * COIN;
// Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
nSubsidy >>= halvings;
-
- return nSubsidy + nFees;
+ return nSubsidy;
}
bool IsInitialBlockDownload()
@@ -1498,7 +1509,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
namespace {
-bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint256& hashBlock)
+bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint256& hashBlock, const CMessageHeader::MessageStartChars& messageStart)
{
// Open history file to append
CAutoFile fileout(OpenUndoFile(pos), SER_DISK, CLIENT_VERSION);
@@ -1507,7 +1518,7 @@ bool UndoWriteToDisk(const CBlockUndo& blockundo, CDiskBlockPos& pos, const uint
// Write index header
unsigned int nSize = fileout.GetSerializeSize(blockundo);
- fileout << FLATDATA(Params().MessageStart()) << nSize;
+ fileout << FLATDATA(messageStart) << nSize;
// Write undo data
long fileOutPos = ftell(fileout.Get());
@@ -1552,6 +1563,24 @@ bool UndoReadFromDisk(CBlockUndo& blockundo, const CDiskBlockPos& pos, const uin
return true;
}
+/** Abort with a message */
+bool AbortNode(const std::string& strMessage, const std::string& userMessage="")
+{
+ strMiscWarning = strMessage;
+ LogPrintf("*** %s\n", strMessage);
+ uiInterface.ThreadSafeMessageBox(
+ userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
+ "", CClientUIInterface::MSG_ERROR);
+ StartShutdown();
+ return false;
+}
+
+bool AbortNode(CValidationState& state, const std::string& strMessage, const std::string& userMessage="")
+{
+ AbortNode(strMessage, userMessage);
+ return state.Error(strMessage);
+}
+
} // anon namespace
/**
@@ -1687,6 +1716,64 @@ void ThreadScriptCheck() {
scriptcheckqueue.Thread();
}
+//
+// Called periodically asynchronously; alerts if it smells like
+// we're being fed a bad chain (blocks being generated much
+// too slowly or too quickly).
+//
+void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CChain& chain, int64_t nPowTargetSpacing)
+{
+ if (initialDownloadCheck()) return;
+
+ static int64_t lastAlertTime = 0;
+ int64_t now = GetAdjustedTime();
+ if (lastAlertTime > now-60*60*24) return; // Alert at most once per day
+
+ const int SPAN_HOURS=4;
+ const int SPAN_SECONDS=SPAN_HOURS*60*60;
+ int BLOCKS_EXPECTED = SPAN_SECONDS / nPowTargetSpacing;
+
+ boost::math::poisson_distribution<double> poisson(BLOCKS_EXPECTED);
+
+ std::string strWarning;
+ int64_t startTime = GetAdjustedTime()-SPAN_SECONDS;
+
+ LOCK(cs);
+ int h = chain.Height();
+ while (h > 0 && chain[h]->GetBlockTime() >= startTime)
+ --h;
+ int nBlocks = chain.Height()-h;
+
+ // How likely is it to find that many by chance?
+ double p = boost::math::pdf(poisson, nBlocks);
+
+ LogPrint("partitioncheck", "%s : Found %d blocks in the last %d hours\n", __func__, nBlocks, SPAN_HOURS);
+ LogPrint("partitioncheck", "%s : likelihood: %g\n", __func__, p);
+
+ // Aim for one false-positive about every fifty years of normal running:
+ const int FIFTY_YEARS = 50*365*24*60*60;
+ double alertThreshold = 1.0 / (FIFTY_YEARS / SPAN_SECONDS);
+
+ if (p <= alertThreshold && nBlocks < BLOCKS_EXPECTED)
+ {
+ // Many fewer blocks than expected: alert!
+ strWarning = strprintf(_("WARNING: check your network connection, %d blocks received in the last %d hours (%d expected)"),
+ nBlocks, SPAN_HOURS, BLOCKS_EXPECTED);
+ }
+ else if (p <= alertThreshold && nBlocks > BLOCKS_EXPECTED)
+ {
+ // Many more blocks than expected: alert!
+ strWarning = strprintf(_("WARNING: abnormally high number of blocks generated, %d blocks received in the last %d hours (%d expected)"),
+ nBlocks, SPAN_HOURS, BLOCKS_EXPECTED);
+ }
+ if (!strWarning.empty())
+ {
+ strMiscWarning = strWarning;
+ CAlert::Notify(strWarning, true);
+ lastAlertTime = now;
+ }
+}
+
static int64_t nTimeVerify = 0;
static int64_t nTimeConnect = 0;
static int64_t nTimeIndex = 0;
@@ -1809,10 +1896,11 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
int64_t nTime1 = GetTimeMicros(); nTimeConnect += nTime1 - nTimeStart;
LogPrint("bench", " - Connect %u transactions: %.2fms (%.3fms/tx, %.3fms/txin) [%.2fs]\n", (unsigned)block.vtx.size(), 0.001 * (nTime1 - nTimeStart), 0.001 * (nTime1 - nTimeStart) / block.vtx.size(), nInputs <= 1 ? 0 : 0.001 * (nTime1 - nTimeStart) / (nInputs-1), nTimeConnect * 0.000001);
- if (block.vtx[0].GetValueOut() > GetBlockValue(pindex->nHeight, nFees))
+ CAmount blockReward = nFees + GetBlockSubsidy(pindex->nHeight, chainparams.GetConsensus());
+ if (block.vtx[0].GetValueOut() > blockReward)
return state.DoS(100,
error("ConnectBlock(): coinbase pays too much (actual=%d vs limit=%d)",
- block.vtx[0].GetValueOut(), GetBlockValue(pindex->nHeight, nFees)),
+ block.vtx[0].GetValueOut(), blockReward),
REJECT_INVALID, "bad-cb-amount");
if (!control.Wait())
@@ -1830,8 +1918,8 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
CDiskBlockPos pos;
if (!FindUndoPos(state, pindex->nFile, pos, ::GetSerializeSize(blockundo, SER_DISK, CLIENT_VERSION) + 40))
return error("ConnectBlock(): FindUndoPos failed");
- if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash()))
- return state.Abort("Failed to write undo data");
+ if (!UndoWriteToDisk(blockundo, pos, pindex->pprev->GetBlockHash(), chainparams.MessageStart()))
+ return AbortNode(state, "Failed to write undo data");
// update nUndoPos in block index
pindex->nUndoPos = pos.nPos;
@@ -1844,7 +1932,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
if (fTxIndex)
if (!pblocktree->WriteTxIndex(vPos))
- return state.Abort("Failed to write transaction index");
+ return AbortNode(state, "Failed to write transaction index");
// add this block to the view's block chain
view.SetBestBlock(pindex->GetBlockHash());
@@ -1939,7 +2027,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
setDirtyBlockIndex.erase(it++);
}
if (!pblocktree->WriteBatchSync(vFiles, nLastBlockFile, vBlocks)) {
- return state.Abort("Files to write to block index database");
+ return AbortNode(state, "Files to write to block index database");
}
}
// Finally remove any pruned files
@@ -1958,7 +2046,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
return state.Error("out of disk space");
// Flush the chainstate (which may refer to block index entries).
if (!pcoinsTip->Flush())
- return state.Abort("Failed to write to coin database");
+ return AbortNode(state, "Failed to write to coin database");
nLastFlush = nNow;
}
if ((mode == FLUSH_STATE_ALWAYS || mode == FLUSH_STATE_PERIODIC) && nNow > nLastSetChain + (int64_t)DATABASE_WRITE_INTERVAL * 1000000) {
@@ -1967,7 +2055,7 @@ bool static FlushStateToDisk(CValidationState &state, FlushStateMode mode) {
nLastSetChain = nNow;
}
} catch (const std::runtime_error& e) {
- return state.Abort(std::string("System error while flushing: ") + e.what());
+ return AbortNode(state, std::string("System error while flushing: ") + e.what());
}
return true;
}
@@ -2031,7 +2119,7 @@ bool static DisconnectTip(CValidationState &state) {
// Read block from disk.
CBlock block;
if (!ReadBlockFromDisk(block, pindexDelete))
- return state.Abort("Failed to read block");
+ return AbortNode(state, "Failed to read block");
// Apply the block atomically to the chain state.
int64_t nStart = GetTimeMicros();
{
@@ -2082,7 +2170,7 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
CBlock block;
if (!pblock) {
if (!ReadBlockFromDisk(block, pindexNew))
- return state.Abort("Failed to read block");
+ return AbortNode(state, "Failed to read block");
pblock = &block;
}
// Apply the block atomically to the chain state.
@@ -2753,6 +2841,7 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex, CDiskBlockPos* dbp)
{
+ const CChainParams& chainparams = Params();
AssertLockHeld(cs_main);
CBlockIndex *&pindex = *ppindex;
@@ -2788,12 +2877,12 @@ bool AcceptBlock(CBlock& block, CValidationState& state, CBlockIndex** ppindex,
if (!FindBlockPos(state, blockPos, nBlockSize+8, nHeight, block.GetBlockTime(), dbp != NULL))
return error("AcceptBlock(): FindBlockPos failed");
if (dbp == NULL)
- if (!WriteBlockToDisk(block, blockPos))
- return state.Abort("Failed to write block");
+ if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart()))
+ AbortNode(state, "Failed to write block");
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
return error("AcceptBlock(): ReceivedBlockTransactions failed");
} catch (const std::runtime_error& e) {
- return state.Abort(std::string("System error: ") + e.what());
+ return AbortNode(state, std::string("System error: ") + e.what());
}
if (fCheckForPruning)
@@ -2868,24 +2957,6 @@ bool TestBlockValidity(CValidationState &state, const CBlock& block, CBlockIndex
return true;
}
-
-
-
-
-
-
-
-bool AbortNode(const std::string &strMessage, const std::string &userMessage) {
- strMiscWarning = strMessage;
- LogPrintf("*** %s\n", strMessage);
- uiInterface.ThreadSafeMessageBox(
- userMessage.empty() ? _("Error: A fatal internal error occured, see debug.log for details") : userMessage,
- "", CClientUIInterface::MSG_ERROR);
- StartShutdown();
- return false;
-}
-
-
/**
* BLOCK PRUNING CODE
*/
@@ -3296,6 +3367,7 @@ bool LoadBlockIndex()
bool InitBlockIndex() {
+ const CChainParams& chainparams = Params();
LOCK(cs_main);
// Check whether we're already initialized
if (chainActive.Genesis() != NULL)
@@ -3316,7 +3388,7 @@ bool InitBlockIndex() {
CValidationState state;
if (!FindBlockPos(state, blockPos, nBlockSize+8, 0, block.GetBlockTime()))
return error("LoadBlockIndex(): FindBlockPos failed");
- if (!WriteBlockToDisk(block, blockPos))
+ if (!WriteBlockToDisk(block, blockPos, chainparams.MessageStart()))
return error("LoadBlockIndex(): writing genesis block to disk failed");
CBlockIndex *pindex = AddToBlockIndex(block);
if (!ReceivedBlockTransactions(block, state, pindex, blockPos))
@@ -4111,7 +4183,7 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv,
vToFetch.push_back(inv);
// Mark block as in flight already, even though the actual "getdata" message only goes out
// later (within the same cs_main lock, though).
- MarkBlockAsInFlight(pfrom->GetId(), inv.hash);
+ MarkBlockAsInFlight(pfrom->GetId(), inv.hash, chainparams.GetConsensus());
}
LogPrint("net", "getheaders (%d) %s to peer=%d\n", pindexBestHeader->nHeight, inv.hash.ToString(), pfrom->id);
}
@@ -4957,9 +5029,22 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
// timeout. We compensate for in-flight blocks to prevent killing off peers due to our own downstream link
// being saturated. We only count validated in-flight blocks so peers can't advertise non-existing block hashes
// to unreasonably increase our timeout.
- if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0 && state.vBlocksInFlight.front().nTime < nNow - 500000 * consensusParams.nPowTargetSpacing * (4 + state.vBlocksInFlight.front().nValidatedQueuedBefore)) {
- LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", state.vBlocksInFlight.front().hash.ToString(), pto->id);
- pto->fDisconnect = true;
+ // We also compare the block download timeout originally calculated against the time at which we'd disconnect
+ // if we assumed the block were being requested now (ignoring blocks we've requested from this peer, since we're
+ // only looking at this peer's oldest request). This way a large queue in the past doesn't result in a
+ // permanently large window for this block to be delivered (ie if the number of blocks in flight is decreasing
+ // more quickly than once every 5 minutes, then we'll shorten the download window for this block).
+ if (!pto->fDisconnect && state.vBlocksInFlight.size() > 0) {
+ QueuedBlock &queuedBlock = state.vBlocksInFlight.front();
+ int64_t nTimeoutIfRequestedNow = GetBlockTimeout(nNow, nQueuedValidatedHeaders - state.nBlocksInFlightValidHeaders, consensusParams);
+ if (queuedBlock.nTimeDisconnect > nTimeoutIfRequestedNow) {
+ LogPrint("net", "Reducing block download timeout for peer=%d block=%s, orig=%d new=%d\n", pto->id, queuedBlock.hash.ToString(), queuedBlock.nTimeDisconnect, nTimeoutIfRequestedNow);
+ queuedBlock.nTimeDisconnect = nTimeoutIfRequestedNow;
+ }
+ if (queuedBlock.nTimeDisconnect < nNow) {
+ LogPrintf("Timeout downloading block %s from peer=%d, disconnecting\n", queuedBlock.hash.ToString(), pto->id);
+ pto->fDisconnect = true;
+ }
}
//
@@ -4972,7 +5057,7 @@ bool SendMessages(CNode* pto, bool fSendTrickle)
FindNextBlocksToDownload(pto->GetId(), MAX_BLOCKS_IN_TRANSIT_PER_PEER - state.nBlocksInFlight, vToDownload, staller);
BOOST_FOREACH(CBlockIndex *pindex, vToDownload) {
vGetData.push_back(CInv(MSG_BLOCK, pindex->GetBlockHash()));
- MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), pindex);
+ MarkBlockAsInFlight(pto->GetId(), pindex->GetBlockHash(), consensusParams, pindex);
LogPrint("net", "Requesting block %s (%d) peer=%d\n", pindex->GetBlockHash().ToString(),
pindex->nHeight, pto->id);
}
diff --git a/src/main.h b/src/main.h
index fcbc4075d2..9bf7bbb2f8 100644
--- a/src/main.h
+++ b/src/main.h
@@ -89,16 +89,6 @@ static const unsigned int DATABASE_FLUSH_INTERVAL = 24 * 60 * 60;
/** Maximum length of reject messages. */
static const unsigned int MAX_REJECT_MESSAGE_LENGTH = 111;
-/** "reject" message codes */
-static const unsigned char REJECT_MALFORMED = 0x01;
-static const unsigned char REJECT_INVALID = 0x10;
-static const unsigned char REJECT_OBSOLETE = 0x11;
-static const unsigned char REJECT_DUPLICATE = 0x12;
-static const unsigned char REJECT_NONSTANDARD = 0x40;
-static const unsigned char REJECT_DUST = 0x41;
-static const unsigned char REJECT_INSUFFICIENTFEE = 0x42;
-static const unsigned char REJECT_CHECKPOINT = 0x43;
-
struct BlockHasher
{
size_t operator()(const uint256& hash) const { return hash.GetCheapHash(); }
@@ -194,6 +184,8 @@ bool ProcessMessages(CNode* pfrom);
bool SendMessages(CNode* pto, bool fSendTrickle);
/** Run an instance of the script checking thread */
void ThreadScriptCheck();
+/** Try to detect Partition (network isolation) attacks against us */
+void PartitionCheck(bool (*initialDownloadCheck)(), CCriticalSection& cs, const CChain& chain, int64_t nPowTargetSpacing);
/** Check whether we are doing an initial block download (synchronizing from disk or network) */
bool IsInitialBlockDownload();
/** Format a string that describes several potential problems detected by the core */
@@ -202,7 +194,7 @@ std::string GetWarnings(std::string strFor);
bool GetTransaction(const uint256 &hash, CTransaction &tx, uint256 &hashBlock, bool fAllowSlow = false);
/** Find the best known block, and make it the tip of the block chain */
bool ActivateBestChain(CValidationState &state, CBlock *pblock = NULL);
-CAmount GetBlockValue(int nHeight, const CAmount& nFees);
+CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
/**
* Prune block and undo files (blk???.dat and undo???.dat) so that the disk space used is less than a user-defined target.
@@ -228,8 +220,6 @@ void UnlinkPrunedFiles(std::set<int>& setFilesToPrune);
/** Create a new block index entry for a given block hash */
CBlockIndex * InsertBlockIndex(uint256 hash);
-/** Abort with a message */
-bool AbortNode(const std::string &msg, const std::string &userMessage="");
/** Get statistics from node state */
bool GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats);
/** Increase a node's misbehavior score. */
@@ -372,7 +362,7 @@ public:
/** Functions for disk access for blocks */
-bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos);
+bool WriteBlockToDisk(CBlock& block, CDiskBlockPos& pos, const CMessageHeader::MessageStartChars& messageStart);
bool ReadBlockFromDisk(CBlock& block, const CDiskBlockPos& pos);
bool ReadBlockFromDisk(CBlock& block, const CBlockIndex* pindex);
@@ -459,69 +449,6 @@ public:
}
};
-/** Capture information about block/transaction validation */
-class CValidationState {
-private:
- enum mode_state {
- MODE_VALID, //! everything ok
- MODE_INVALID, //! network rule violation (DoS value may be set)
- MODE_ERROR, //! run-time error
- } mode;
- int nDoS;
- std::string strRejectReason;
- unsigned char chRejectCode;
- bool corruptionPossible;
-public:
- CValidationState() : mode(MODE_VALID), nDoS(0), chRejectCode(0), corruptionPossible(false) {}
- bool DoS(int level, bool ret = false,
- unsigned char chRejectCodeIn=0, std::string strRejectReasonIn="",
- bool corruptionIn=false) {
- chRejectCode = chRejectCodeIn;
- strRejectReason = strRejectReasonIn;
- corruptionPossible = corruptionIn;
- if (mode == MODE_ERROR)
- return ret;
- nDoS += level;
- mode = MODE_INVALID;
- return ret;
- }
- bool Invalid(bool ret = false,
- unsigned char _chRejectCode=0, std::string _strRejectReason="") {
- return DoS(0, ret, _chRejectCode, _strRejectReason);
- }
- bool Error(std::string strRejectReasonIn="") {
- if (mode == MODE_VALID)
- strRejectReason = strRejectReasonIn;
- mode = MODE_ERROR;
- return false;
- }
- bool Abort(const std::string &msg) {
- AbortNode(msg);
- return Error(msg);
- }
- bool IsValid() const {
- return mode == MODE_VALID;
- }
- bool IsInvalid() const {
- return mode == MODE_INVALID;
- }
- bool IsError() const {
- return mode == MODE_ERROR;
- }
- bool IsInvalid(int &nDoSOut) const {
- if (IsInvalid()) {
- nDoSOut = nDoS;
- return true;
- }
- return false;
- }
- bool CorruptionPossible() const {
- return corruptionPossible;
- }
- unsigned char GetRejectCode() const { return chRejectCode; }
- std::string GetRejectReason() const { return strRejectReason; }
-};
-
/** RAII wrapper for VerifyDB: Verify consistency of the block and coin databases */
class CVerifyDB {
public:
diff --git a/src/miner.cpp b/src/miner.cpp
index 4bceb7d7b4..7a57b42e30 100644
--- a/src/miner.cpp
+++ b/src/miner.cpp
@@ -8,6 +8,7 @@
#include "amount.h"
#include "chainparams.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "hash.h"
#include "main.h"
#include "net.h"
@@ -91,6 +92,7 @@ void UpdateTime(CBlockHeader* pblock, const Consensus::Params& consensusParams,
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
{
+ const CChainParams& chainparams = Params();
// Create new block
auto_ptr<CBlockTemplate> pblocktemplate(new CBlockTemplate());
if(!pblocktemplate.get())
@@ -320,7 +322,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
LogPrintf("CreateNewBlock(): total size %u\n", nBlockSize);
// Compute final coinbase transaction.
- txNew.vout[0].nValue = GetBlockValue(nHeight, nFees);
+ txNew.vout[0].nValue = nFees + GetBlockSubsidy(nHeight, chainparams.GetConsensus());
txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
pblock->vtx[0] = txNew;
pblocktemplate->vTxFees[0] = -nFees;
diff --git a/src/net.cpp b/src/net.cpp
index 6849d79263..3908be6824 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1363,7 +1363,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect, CSemaphoreGrant *grantOu
FindNode((CNetAddr)addrConnect) || CNode::IsBanned(addrConnect) ||
FindNode(addrConnect.ToStringIPPort()))
return false;
- } else if (FindNode(pszDest))
+ } else if (FindNode(std::string(pszDest)))
return false;
CNode* pnode = ConnectNode(addrConnect, pszDest);
@@ -1385,7 +1385,7 @@ void ThreadMessageHandler()
{
boost::mutex condition_mutex;
boost::unique_lock<boost::mutex> lock(condition_mutex);
-
+
SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL);
while (true)
{
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 2015d0271a..e3cb4e706f 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -35,8 +35,6 @@
#define MSG_NOSIGNAL 0
#endif
-using namespace std;
-
// Settings
static proxyType proxyInfo[NET_MAX];
static proxyType nameProxy;
@@ -597,13 +595,13 @@ bool ConnectSocket(const CService &addrDest, SOCKET& hSocketRet, int nTimeout, b
bool ConnectSocketByName(CService &addr, SOCKET& hSocketRet, const char *pszDest, int portDefault, int nTimeout, bool *outProxyConnectionFailed)
{
- string strDest;
+ std::string strDest;
int port = portDefault;
if (outProxyConnectionFailed)
*outProxyConnectionFailed = false;
- SplitHostPort(string(pszDest), port, strDest);
+ SplitHostPort(std::string(pszDest), port, strDest);
proxyType nameProxy;
GetNameProxy(nameProxy);
@@ -1252,15 +1250,15 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
std::string strNetmask = strSubnet.substr(slash + 1);
int32_t n;
// IPv4 addresses start at offset 12, and first 12 bytes must match, so just offset n
- int noffset = network.IsIPv4() ? (12 * 8) : 0;
+ const int astartofs = network.IsIPv4() ? 12 : 0;
if (ParseInt32(strNetmask, &n)) // If valid number, assume /24 symtex
{
- if(n >= 0 && n <= (128 - noffset)) // Only valid if in range of bits of address
+ if(n >= 0 && n <= (128 - astartofs*8)) // Only valid if in range of bits of address
{
- n += noffset;
+ n += astartofs*8;
// Clear bits [n..127]
for (; n < 128; ++n)
- netmask[n>>3] &= ~(1<<(n&7));
+ netmask[n>>3] &= ~(1<<(7-(n&7)));
}
else
{
@@ -1271,12 +1269,10 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
{
if (LookupHost(strNetmask.c_str(), vIP, 1, false)) // Never allow lookup for netmask
{
- // Remember: GetByte returns bytes in reversed order
// Copy only the *last* four bytes in case of IPv4, the rest of the mask should stay 1's as
// we don't want pchIPv4 to be part of the mask.
- int asize = network.IsIPv4() ? 4 : 16;
- for(int x=0; x<asize; ++x)
- netmask[15-x] = vIP[0].GetByte(x);
+ for(int x=astartofs; x<16; ++x)
+ netmask[x] = vIP[0].ip[x];
}
else
{
@@ -1289,6 +1285,10 @@ CSubNet::CSubNet(const std::string &strSubnet, bool fAllowLookup)
{
valid = false;
}
+
+ // Normalize network according to netmask
+ for(int x=0; x<16; ++x)
+ network.ip[x] &= netmask[x];
}
bool CSubNet::Match(const CNetAddr &addr) const
@@ -1296,7 +1296,7 @@ bool CSubNet::Match(const CNetAddr &addr) const
if (!valid || !addr.IsValid())
return false;
for(int x=0; x<16; ++x)
- if ((addr.GetByte(x) & netmask[15-x]) != network.GetByte(x))
+ if ((addr.ip[x] & netmask[x]) != network.ip[x])
return false;
return true;
}
diff --git a/src/netbase.h b/src/netbase.h
index 6d2ca4afb2..1f2957116e 100644
--- a/src/netbase.h
+++ b/src/netbase.h
@@ -100,6 +100,8 @@ class CNetAddr
inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
READWRITE(FLATDATA(ip));
}
+
+ friend class CSubNet;
};
class CSubNet
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 70bf894599..efba0f5e18 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -414,6 +414,7 @@ void BitcoinGUI::createToolBars()
if(walletFrame)
{
QToolBar *toolbar = addToolBar(tr("Tabs toolbar"));
+ toolbar->setMovable(false);
toolbar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
toolbar->addAction(overviewAction);
toolbar->addAction(sendCoinsAction);
diff --git a/src/qt/locale/bitcoin_ar.ts b/src/qt/locale/bitcoin_ar.ts
index a2e4c376b8..235b22cd1f 100644
--- a/src/qt/locale/bitcoin_ar.ts
+++ b/src/qt/locale/bitcoin_ar.ts
@@ -765,11 +765,7 @@
<source>Your current total balance</source>
<translation>رصيدك الكلي الحالي</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>خارج المزامنه</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_be_BY.ts b/src/qt/locale/bitcoin_be_BY.ts
index 6db3f58061..b727b75566 100644
--- a/src/qt/locale/bitcoin_be_BY.ts
+++ b/src/qt/locale/bitcoin_be_BY.ts
@@ -102,7 +102,7 @@
<name>AddressTableModel</name>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Address</source>
@@ -383,6 +383,10 @@
<translation>Дапамога</translation>
</message>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>Request payments (generates QR codes and bitcoin: URIs)</source>
<translation>Запатрабаваць плацёж (генеруецца QR-код для біткойн URI)</translation>
</message>
@@ -403,9 +407,17 @@
<translation>Паказаць спіс адрасоў і метак для прымання</translation>
</message>
<message>
+ <source>Open a bitcoin: URI or payment request</source>
+ <translation>Адкрыць біткойн: URI ці запыт плацяжу</translation>
+ </message>
+ <message>
<source>&amp;Command-line options</source>
<translation>Опцыі каманднага радка</translation>
</message>
+ <message>
+ <source>Show the Bitcoin Core help message to get a list with possible Bitcoin command-line options</source>
+ <translation>Паказваць даведку Bitcoin Core каб атрымаць спіс магчымых опцый каманднага радка</translation>
+ </message>
<message numerus="yes">
<source>%n active connection(s) to Bitcoin network</source>
<translation><numerusform>%n актыўнае злучэнне з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform><numerusform>%n актыўных злучэнняў з сецівам Bitcoin</numerusform></translation>
@@ -430,6 +442,10 @@
<source>%n week(s)</source>
<translation><numerusform>%n тыдзень</numerusform><numerusform>%n тыдні</numerusform><numerusform>%n тыдняў</numerusform><numerusform>%n тыдняў</numerusform></translation>
</message>
+ <message>
+ <source>%1 and %2</source>
+ <translation>%1 і %2</translation>
+ </message>
<message numerus="yes">
<source>%n year(s)</source>
<translation><numerusform>%n год</numerusform><numerusform>%n гады</numerusform><numerusform>%n гадоў</numerusform><numerusform>%n гадоў</numerusform></translation>
@@ -523,6 +539,10 @@
<context>
<name>CoinControlDialog</name>
<message>
+ <source>Quantity:</source>
+ <translation>Колькасць:</translation>
+ </message>
+ <message>
<source>Bytes:</source>
<translation>Байтаў:</translation>
</message>
@@ -547,6 +567,10 @@
<translation>Пасля камісіі:</translation>
</message>
<message>
+ <source>(un)select all</source>
+ <translation>(не)выбраць ўсё</translation>
+ </message>
+ <message>
<source>Tree mode</source>
<translation>Рэжым дрэва</translation>
</message>
@@ -559,6 +583,14 @@
<translation>Колькасць</translation>
</message>
<message>
+ <source>Received with label</source>
+ <translation>Прыняць праз метку</translation>
+ </message>
+ <message>
+ <source>Received with address</source>
+ <translation>Прыняць праз адрас</translation>
+ </message>
+ <message>
<source>Date</source>
<translation>Дата</translation>
</message>
@@ -591,6 +623,38 @@
<translation>Капіяваць ID транзакцыі</translation>
</message>
<message>
+ <source>Lock unspent</source>
+ <translation>Замкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Unlock unspent</source>
+ <translation>Адамкнуць непатрачанае</translation>
+ </message>
+ <message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy priority</source>
+ <translation>Капіяваць прыярытэт</translation>
+ </message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
+ <message>
<source>highest</source>
<translation>найвышэйшы</translation>
</message>
@@ -635,6 +699,14 @@
<translation>не</translation>
</message>
<message>
+ <source>This means a fee of at least %1 per kB is required.</source>
+ <translation>Гэта значыць патрэбную камісію мінімум %1 на Кб.</translation>
+ </message>
+ <message>
+ <source>Transactions with higher priority are more likely to get included into a block.</source>
+ <translation>Транзакцыя большага прыярытэту больш прываблівая для ўключэння ў блок.</translation>
+ </message>
+ <message>
<source>(no label)</source>
<translation>непазначаны</translation>
</message>
@@ -647,7 +719,7 @@
</message>
<message>
<source>&amp;Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>&amp;Address</source>
@@ -684,10 +756,26 @@
</context>
<context>
<name>FreespaceChecker</name>
+ <message>
+ <source>A new data directory will be created.</source>
+ <translation>Будзе створаны новы каталог з данымі.</translation>
+ </message>
+ <message>
+ <source>name</source>
+ <translation>імя</translation>
+ </message>
+ <message>
+ <source>Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <translation>Каталог ужо існуе. Дадайце %1 калі вы збіраецеся стварыць тут новы каталог.</translation>
+ </message>
</context>
<context>
<name>HelpMessageDialog</name>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>(%1-bit)</source>
<translation>(%1-біт)</translation>
</message>
@@ -719,6 +807,10 @@
<translation>Вітаем у Bitcoin Core.</translation>
</message>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>Error</source>
<translation>Памылка</translation>
</message>
@@ -779,7 +871,7 @@
<name>ReceiveCoinsDialog</name>
<message>
<source>&amp;Label:</source>
- <translation>Пазнака:</translation>
+ <translation>Метка:</translation>
</message>
<message>
<source>Copy label</source>
@@ -802,7 +894,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Message</source>
@@ -817,7 +909,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Message</source>
@@ -839,6 +931,10 @@
<translation>Даслаць Манеты</translation>
</message>
<message>
+ <source>Quantity:</source>
+ <translation>Колькасць:</translation>
+ </message>
+ <message>
<source>Bytes:</source>
<translation>Байтаў:</translation>
</message>
@@ -879,10 +975,30 @@
<translation>Пацвердзіць дасыланне манет</translation>
</message>
<message>
+ <source>Copy quantity</source>
+ <translation>Капіяваць колькасць</translation>
+ </message>
+ <message>
<source>Copy amount</source>
<translation>Капіяваць колькасць</translation>
</message>
<message>
+ <source>Copy fee</source>
+ <translation>Капіяваць камісію</translation>
+ </message>
+ <message>
+ <source>Copy after fee</source>
+ <translation>Капіяваць з выняткам камісіі</translation>
+ </message>
+ <message>
+ <source>Copy bytes</source>
+ <translation>Капіяваць байты</translation>
+ </message>
+ <message>
+ <source>Copy priority</source>
+ <translation>Капіяваць прыярытэт</translation>
+ </message>
+ <message>
<source>The amount to pay must be larger than 0.</source>
<translation>Велічыня плацяжу мае быць больш за 0.</translation>
</message>
@@ -890,6 +1006,10 @@
<source>(no label)</source>
<translation>непазначаны</translation>
</message>
+ <message>
+ <source>Copy dust</source>
+ <translation>Капіяваць пыл</translation>
+ </message>
</context>
<context>
<name>SendCoinsEntry</name>
@@ -907,7 +1027,7 @@
</message>
<message>
<source>&amp;Label:</source>
- <translation>Пазнака:</translation>
+ <translation>Метка:</translation>
</message>
<message>
<source>Alt+A</source>
@@ -947,6 +1067,10 @@
<context>
<name>SplashScreen</name>
<message>
+ <source>Bitcoin Core</source>
+ <translation>Bitcoin Core</translation>
+ </message>
+ <message>
<source>The Bitcoin Core developers</source>
<translation>Распрацоўнікі Bitcoin Core</translation>
</message>
@@ -1044,7 +1168,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Received with</source>
@@ -1187,7 +1311,7 @@
</message>
<message>
<source>Label</source>
- <translation>Пазнака</translation>
+ <translation>Метка</translation>
</message>
<message>
<source>Address</source>
diff --git a/src/qt/locale/bitcoin_bg.ts b/src/qt/locale/bitcoin_bg.ts
index 2ef1c7160f..c86fdd42dd 100644
--- a/src/qt/locale/bitcoin_bg.ts
+++ b/src/qt/locale/bitcoin_bg.ts
@@ -1009,11 +1009,7 @@
<source>Recent transactions</source>
<translation>Скорошни транзакции</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>несинхронизиран</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ca.ts b/src/qt/locale/bitcoin_ca.ts
index 37d1dfc9eb..f7d97eb061 100644
--- a/src/qt/locale/bitcoin_ca.ts
+++ b/src/qt/locale/bitcoin_ca.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ca@valencia.ts b/src/qt/locale/bitcoin_ca@valencia.ts
index 0a52b1bc9a..c68cfb686a 100644
--- a/src/qt/locale/bitcoin_ca@valencia.ts
+++ b/src/qt/locale/bitcoin_ca@valencia.ts
@@ -1073,10 +1073,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ca_ES.ts b/src/qt/locale/bitcoin_ca_ES.ts
index 3baa6e00cd..cd6aa96d34 100644
--- a/src/qt/locale/bitcoin_ca_ES.ts
+++ b/src/qt/locale/bitcoin_ca_ES.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanç total actual en adreces de només lectura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_cs.ts b/src/qt/locale/bitcoin_cs.ts
index b4d9ca146d..47464b7a53 100644
--- a/src/qt/locale/bitcoin_cs.ts
+++ b/src/qt/locale/bitcoin_cs.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Aktuální stav účtu sledovaných adres</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesynchronizováno</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_da.ts b/src/qt/locale/bitcoin_da.ts
index 6979124615..1467791047 100644
--- a/src/qt/locale/bitcoin_da.ts
+++ b/src/qt/locale/bitcoin_da.ts
@@ -1211,10 +1211,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nuværende totalsaldo på kigge-adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ikke synkroniseret</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2922,7 +2918,7 @@
</message>
<message>
<source>Do you want to rebuild the block database now?</source>
- <translation>Ønsker du at genbygge blokdatabasen nu?</translation>
+ <translation>Ønsker du at genopbygge blokdatabasen nu?</translation>
</message>
<message>
<source>Error initializing block database</source>
@@ -3162,7 +3158,7 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
</message>
<message>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
- <translation>Du er nødt til at genbygge databasen ved hjælp af -reindex for at gå tilbage til ikke-beskåret tilstand. Dette vil downloade hele blokkæden igen</translation>
+ <translation>Du er nødt til at genopbygge databasen ved hjælp af -reindex for at gå tilbage til ikke-beskåret tilstand. Dette vil downloade hele blokkæden igen</translation>
</message>
<message>
<source>(default: %u)</source>
@@ -3281,6 +3277,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slør tilfældigt 1 ud af hver &lt;n&gt; netværksbeskeder</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Genopbyg blokkædeindeks fra nuværende blk000??.dat-filer ved 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>
diff --git a/src/qt/locale/bitcoin_de.ts b/src/qt/locale/bitcoin_de.ts
index 263852fad2..ab0367dbab 100644
--- a/src/qt/locale/bitcoin_de.ts
+++ b/src/qt/locale/bitcoin_de.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Aktueller Gesamtbetrag in beobachteten Adressen aus obigen Kategorien</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nicht synchron</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2164,6 +2160,10 @@
<translation>Nachricht &amp;signieren</translation>
</message>
<message>
+ <source>You can sign messages/agreements with your addresses to prove you can receive bitcoins sent to them. Be careful not to sign anything vague or random, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
+ <translation>Sie können Nachrichten/Vereinbarungen mit Hilfe Ihrer Adressen signieren, um zu beweisen, dass Sie Bitcoins empfangen können, die an diese Adressen überwiesen werden. Seien Sie vorsichtig und signieren Sie nichts Vages oder Willkürliches, um Ihre Indentität vor Phishingangriffen zu schützen. Signieren Sie nur vollständig-detaillierte Aussagen, mit denen Sie auch einverstanden sind.</translation>
+ </message>
+ <message>
<source>The Bitcoin address to sign the message with</source>
<translation>Die Bitcoin-Adresse mit der die Nachricht signiert wird</translation>
</message>
@@ -2216,6 +2216,10 @@
<translation>Nachricht &amp;verifizieren</translation>
</message>
<message>
+ <source>Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source>
+ <translation>Geben Sie die Zahlungsadresse des Empfängers, Nachricht (achten Sie darauf Zeilenumbrüche, Leerzeichen, Tabulatoren usw. exakt zu kopieren) und Signatur unten ein, um die Nachricht zu verifizieren. Vorsicht, interpretieren Sie nicht mehr in die Signatur hinein, als in der signierten Nachricht selber enthalten ist, um nicht von einem Man-in-the-middle-Angriff hinters Licht geführt zu werden. Beachten Sie dass dies nur beweißt, dass die signierende Partei über diese Adresse Überweisungen empfangen kann.</translation>
+ </message>
+ <message>
<source>The Bitcoin address the message was signed with</source>
<translation>Die Bitcoin-Adresse mit der die Nachricht signiert wurde</translation>
</message>
@@ -2841,6 +2845,10 @@
<translation>Maximale Gesamtgebühren je Wallet-Transaktion, ein zu niedriger Wert kann große Transaktionen abbrechen (Standard: %s)</translation>
</message>
<message>
+ <source>Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. Warning: Reverting this setting requires re-downloading the entire blockchain. (default: 0 = disable pruning blocks, &gt;%u = target size in MiB to use for block files)</source>
+ <translation>Speicherplatzanforderung durch kürzen (löschen) alter Blöcke reduzieren. Dieser Modus deaktiviert die Wallet-Unterstützung und ist nicht mit -txindex kompatibel. Warnung: Die Umkehr dieser Einstellung erfordert das erneute Herunterladen der gesamten Blockkette. (Standard: 0 = deaktiviert das Kürzen von Blöcken, &gt;%u = Zielgröße in MiB, die für Blockdateien verwendet werden darf)</translation>
+ </message>
+ <message>
<source>Set the number of script verification threads (%u to %d, 0 = auto, &lt;0 = leave that many cores free, default: %d)</source>
<translation>Maximale Anzahl an Skript-Verifizierungs-Threads festlegen (%u bis %d, 0 = automatisch, &lt;0 = so viele Kerne frei lassen, Standard: %d)</translation>
</message>
@@ -2969,6 +2977,14 @@
<translation>Nur zu Knoten des Netzwerktyps &lt;net&gt; verbinden (ipv4, ipv6 oder onion)</translation>
</message>
<message>
+ <source>Prune cannot be configured with a negative value.</source>
+ <translation>Kürzungsmodus kann nicht mit einem negativen Wert konfiguriert werden.</translation>
+ </message>
+ <message>
+ <source>Prune mode is incompatible with -txindex.</source>
+ <translation>Kürzungsmodus ist nicht mit -txindex kompatibel.</translation>
+ </message>
+ <message>
<source>Set database cache size in megabytes (%d to %d, default: %d)</source>
<translation>Größe des Datenbankcaches in Megabyte festlegen (%d bis %d, Standard: %d)</translation>
</message>
@@ -3077,6 +3093,10 @@
<translation>Maximale Datengröße in "Data Carrier"-Transaktionen die weitergeleitet und erarbeitet werden (Standard: %u)</translation>
</message>
<message>
+ <source>Prune configured below the minimum of %d MB. Please use a higher number.</source>
+ <translation>Kürzungsmodus wurde kleiner als das Minimum in Höhe von %d MiB konfiguriert. Bitte verwenden Sie einen größeren Wert.</translation>
+ </message>
+ <message>
<source>Query for peer addresses via DNS lookup, if low on addresses (default: 1 unless -connect)</source>
<translation>Adressen von Gegenstellen via DNS-Namensauflösung finden, falls zu wenige Adressen verfügbar sind (Standard: 1, außer bei -connect)</translation>
</message>
@@ -3141,6 +3161,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Erlaubte Gegenstellen werden nicht für DoS-Attacken gesperrt und ihre Transkationen werden immer weitergeleitet, auch wenn sie sich bereits im Speicherpool befinden, was z.B. für Gateways sinnvoll ist.</translation>
</message>
<message>
+ <source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
+ <translation>Sie müssen die Datenbank mit Hilfe von -reindex neu aufbauen, um zum ungekürzten Modus zurückzukehren. Dies erfordert, dass die gesamte Blockkette erneut heruntergeladen wird.</translation>
+ </message>
+ <message>
<source>(default: %u)</source>
<translation>(Standard: %u)</translation>
</message>
@@ -3157,6 +3181,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Selbstunterschriebene Stammzertifikate erlauben (Standard: 0)</translation>
</message>
<message>
+ <source>Can't run with a wallet in prune mode.</source>
+ <translation>Eine Wallet kann im Kürzungsmodus nicht verwendet werden.</translation>
+ </message>
+ <message>
<source>Cannot resolve -whitebind address: '%s'</source>
<translation>Kann Adresse in -whitebind nicht auflösen: '%s'</translation>
</message>
@@ -3253,6 +3281,10 @@ Beispiel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Zufällig eine von &lt;n&gt; Netzwerknachrichten verwürfeln</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Blockkettenindex aus aktuellen Dateien blk000??.dat beim Starten wiederaufbauen</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Rückverfolgungs- und Debuginformationen an die Konsole senden, anstatt sie in debug.log zu schreiben</translation>
</message>
diff --git a/src/qt/locale/bitcoin_el_GR.ts b/src/qt/locale/bitcoin_el_GR.ts
index 5cabe43032..a4c95857ba 100644
--- a/src/qt/locale/bitcoin_el_GR.ts
+++ b/src/qt/locale/bitcoin_el_GR.ts
@@ -2,6 +2,10 @@
<context>
<name>AddressBookPage</name>
<message>
+ <source>Right-click to edit address or label</source>
+ <translation>Δεξί-κλικ για επεξεργασία της διεύθυνσης ή της ετικέτας</translation>
+ </message>
+ <message>
<source>Create a new address</source>
<translation>Δημιουργία νέας διεύθυνσης</translation>
</message>
@@ -881,10 +885,18 @@
<translation>Διεύθυνση IP του διαμεσολαβητή (π.χ. 127.0.0.1 / IPv6: ::1)</translation>
</message>
<message>
+ <source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
+ <translation>URLs από τρίτους (π.χ. ένας εξερευνητής μπλοκ) τα οποία εμφανίζονται στην καρτέλα συναλλαγών ως στοιχεία μενού. Το %s στα URL αντικαθιστάται από την τιμή της κατατεμαχισμένης συναλλαγής.</translation>
+ </message>
+ <message>
<source>Third party transaction URLs</source>
<translation>Διευθύνσεις τρίτων συναλλαγών.</translation>
</message>
<message>
+ <source>Active command-line options that override above options:</source>
+ <translation>Ενεργές επιλογές γραμμής-εντολών που παρακάμπτουν τις παραπάνω επιλογές:</translation>
+ </message>
+ <message>
<source>Reset all client options to default.</source>
<translation>Επαναφορα όλων των επιλογων του πελάτη σε default.</translation>
</message>
@@ -897,6 +909,10 @@
<translation>&amp;Δίκτυο</translation>
</message>
<message>
+ <source>(0 = auto, &lt;0 = leave that many cores free)</source>
+ <translation>(0 = αυτόματο, &lt;0 = ελεύθεροι πυρήνες)</translation>
+ </message>
+ <message>
<source>W&amp;allet</source>
<translation>Π&amp;ορτοφόλι</translation>
</message>
@@ -909,6 +925,14 @@
<translation>Επιλογή κατα πόσο να αναδείχνονται οι δυνατότητες ελέγχου κερμάτων.</translation>
</message>
<message>
+ <source>If you disable the spending of unconfirmed change, the change from a transaction cannot be used until that transaction has at least one confirmation. This also affects how your balance is computed.</source>
+ <translation>Εάν απενεργοποιήσετε το ξόδεμα μη επικυρωμένων ρέστων, τα ρέστα από μια συναλλαγή δεν μπορούν να χρησιμοποιηθούν έως ότου αυτή η συναλλαγή έχει έστω μια επικύρωση. Αυτό επίσης επηρεάζει το πως υπολογίζεται το υπόλοιπό σας.</translation>
+ </message>
+ <message>
+ <source>&amp;Spend unconfirmed change</source>
+ <translation>&amp;Ξόδεμα μη επικυρωμένων ρέστων</translation>
+ </message>
+ <message>
<source>Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Αυτόματο άνοιγμα των θυρών Bitcoin στον δρομολογητή. Λειτουργεί μόνο αν ο δρομολογητής σας υποστηρίζει τη λειτουργία UPnP.</translation>
</message>
@@ -1057,6 +1081,10 @@
<translation>Το τρέχον συνολικό υπόλοιπο</translation>
</message>
<message>
+ <source>Your current balance in watch-only addresses</source>
+ <translation>Το τρέχον υπόλοιπο σας σε διευθύνσεις παρακολούθησης μόνο</translation>
+ </message>
+ <message>
<source>Spendable:</source>
<translation>Ξοδεμένα:</translation>
</message>
@@ -1065,8 +1093,16 @@
<translation>Πρόσφατες συναλλαγές</translation>
</message>
<message>
- <source>out of sync</source>
- <translation>εκτός συγχρονισμού</translation>
+ <source>Unconfirmed transactions to watch-only addresses</source>
+ <translation>Μη επικυρωμένες συναλλαγές σε διευθύνσεις παρακολούθησης μόνο</translation>
+ </message>
+ <message>
+ <source>Mined balance in watch-only addresses that has not yet matured</source>
+ <translation>Εξορυγμένο υπόλοιπο σε διευθύνσεις παρακολούθησης μόνο που δεν έχει ωριμάσει ακόμα</translation>
+ </message>
+ <message>
+ <source>Current total balance in watch-only addresses</source>
+ <translation>Το τρέχον συνολικό υπόλοιπο σε διευθύνσεις παρακολούθησης μόνο</translation>
</message>
</context>
<context>
@@ -1088,6 +1124,10 @@
<translation>Η αίτηση πληρωμής δεν έχει αρχίζει ακόμα.</translation>
</message>
<message>
+ <source>Requested payment amount of %1 is too small (considered dust).</source>
+ <translation>Το ζητούμενο ποσό πληρωμής του %1 είναι πολύ μικρό (θεωρείται σκόνη)</translation>
+ </message>
+ <message>
<source>Payment request error</source>
<translation>Σφάλμα αιτήματος πληρωμής</translation>
</message>
@@ -1108,6 +1148,18 @@
<translation>Επιστροφή ποσού από %1</translation>
</message>
<message>
+ <source>Error communicating with %1: %2</source>
+ <translation>Σφάλμα επικοινωνίας με %1: %2</translation>
+ </message>
+ <message>
+ <source>Payment request cannot be parsed!</source>
+ <translation>Η αίτηση πληρωμής δεν μπορεί να αναλυθεί!</translation>
+ </message>
+ <message>
+ <source>Bad response from server %1</source>
+ <translation>Κακή απάντηση από διακομιστή %1</translation>
+ </message>
+ <message>
<source>Payment acknowledged</source>
<translation>Πληρωμή αναγνωρίστηκε</translation>
</message>
@@ -1212,6 +1264,10 @@
<translation>Χρησιμοποιηση της OpenSSL εκδοσης</translation>
</message>
<message>
+ <source>Using BerkeleyDB version</source>
+ <translation>Χρήση BerkeleyDB έκδοσης</translation>
+ </message>
+ <message>
<source>Startup time</source>
<translation>Χρόνος εκκίνησης</translation>
</message>
@@ -1240,6 +1296,18 @@
<translation>Παραλήφθησαν</translation>
</message>
<message>
+ <source>Sent</source>
+ <translation>Αποστολή</translation>
+ </message>
+ <message>
+ <source>&amp;Peers</source>
+ <translation>&amp;Χρήστες</translation>
+ </message>
+ <message>
+ <source>Select a peer to view detailed information.</source>
+ <translation>Επιλέξτε ένα χρήστη για να δείτε αναλυτικές πληροφορίες.</translation>
+ </message>
+ <message>
<source>Version</source>
<translation>Έκδοση</translation>
</message>
@@ -1248,6 +1316,38 @@
<translation>Υπηρεσίες</translation>
</message>
<message>
+ <source>Starting Height</source>
+ <translation>Αρχικό ύψος</translation>
+ </message>
+ <message>
+ <source>Sync Height</source>
+ <translation>Ύψος συγχονισμού</translation>
+ </message>
+ <message>
+ <source>Ban Score</source>
+ <translation>Σκορ αποκλησμού</translation>
+ </message>
+ <message>
+ <source>Connection Time</source>
+ <translation>Χρόνος σύνδεσης</translation>
+ </message>
+ <message>
+ <source>Last Send</source>
+ <translation>Τελευταία αποστολή</translation>
+ </message>
+ <message>
+ <source>Last Receive</source>
+ <translation>Τελευταία λήψη</translation>
+ </message>
+ <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>
@@ -1339,7 +1439,11 @@
<source>Unknown</source>
<translation>Άγνωστο(α)</translation>
</message>
- </context>
+ <message>
+ <source>Fetching...</source>
+ <translation>Ανάκτηση...</translation>
+ </message>
+</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
@@ -1355,6 +1459,10 @@
<translation>&amp;Μήνυμα:</translation>
</message>
<message>
+ <source>R&amp;euse an existing receiving address (not recommended)</source>
+ <translation>Ε&amp;παναχρησιμοποίηση υπάρχουσας διεύθυνσης λήψης (δεν συνιστάται)</translation>
+ </message>
+ <message>
<source>Clear all fields of the form.</source>
<translation>Καθαρισμός όλων των πεδίων της φόρμας.</translation>
</message>
@@ -1371,6 +1479,10 @@
<translation>Εμφάνιση</translation>
</message>
<message>
+ <source>Remove the selected entries from the list</source>
+ <translation>Αφαίρεση επιλεγμένων καταχωρίσεων από τη λίστα</translation>
+ </message>
+ <message>
<source>Remove</source>
<translation>Αφαίρεση</translation>
</message>
@@ -1398,10 +1510,18 @@
<translation>Αντιγραφη της επιλεγμενης διεύθυνσης στο πρόχειρο του συστηματος</translation>
</message>
<message>
+ <source>Copy &amp;Address</source>
+ <translation>Αντιγραφή &amp;Διεύθυνσης</translation>
+ </message>
+ <message>
<source>&amp;Save Image...</source>
<translation>&amp;Αποθήκευση εικόνας...</translation>
</message>
<message>
+ <source>Request payment to %1</source>
+ <translation>Αίτηση πληρωμής για %1</translation>
+ </message>
+ <message>
<source>Payment information</source>
<translation>Πληροφορίες πληρωμής</translation>
</message>
@@ -1476,6 +1596,10 @@
<translation>Χαρακτηρηστικά επιλογής κερμάτων</translation>
</message>
<message>
+ <source>Inputs...</source>
+ <translation>Εισροές...</translation>
+ </message>
+ <message>
<source>automatically selected</source>
<translation>επιλεγμένο αυτόματα</translation>
</message>
@@ -1512,6 +1636,14 @@
<translation>Ρέστα:</translation>
</message>
<message>
+ <source>If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
+ <translation>Όταν ενεργό, αλλά η διεύθυνση ρέστων είναι κενή ή άκυρη, τα ρέστα θα σταλούν σε μία πρόσφατα δημιουργημένη διεύθυνση.</translation>
+ </message>
+ <message>
+ <source>Custom change address</source>
+ <translation>Προσαρμοσμένη διεύθυνση ρέστων</translation>
+ </message>
+ <message>
<source>Transaction Fee:</source>
<translation>Τέλος συναλλαγής:</translation>
</message>
@@ -1520,10 +1652,34 @@
<translation>Επιλογή...</translation>
</message>
<message>
+ <source>per kilobyte</source>
+ <translation>ανά kilobyte</translation>
+ </message>
+ <message>
+ <source>Recommended:</source>
+ <translation>Προτεινόμενο: </translation>
+ </message>
+ <message>
+ <source>Custom:</source>
+ <translation>Προσαρμογή:</translation>
+ </message>
+ <message>
+ <source>Confirmation time:</source>
+ <translation>Χρόνος επικύρωσης:</translation>
+ </message>
+ <message>
+ <source>normal</source>
+ <translation>κανονικό</translation>
+ </message>
+ <message>
<source>fast</source>
<translation>Γρήγορο</translation>
</message>
<message>
+ <source>(confirmation may take longer)</source>
+ <translation>(η επικύρωση ίσως χρειαστεί περισσότερο χρόνο)</translation>
+ </message>
+ <message>
<source>Send to multiple recipients at once</source>
<translation>Αποστολή σε πολλούς αποδέκτες ταυτόχρονα</translation>
</message>
@@ -1659,6 +1815,14 @@
<translation>Επιλογή διεύθυνσης που έχει ήδη χρησιμοποιηθεί</translation>
</message>
<message>
+ <source>This is a normal payment.</source>
+ <translation>Αυτή είναι μια απλή πληρωμή.</translation>
+ </message>
+ <message>
+ <source>The Bitcoin address to send the payment to</source>
+ <translation>Η διεύθυνση Bitcoin που θα σταλεί η πληρωμή</translation>
+ </message>
+ <message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
@@ -1679,6 +1843,10 @@
<translation>Μήνυμα:</translation>
</message>
<message>
+ <source>Enter a label for this address to add it to the list of used addresses</source>
+ <translation>Εισάγεται μία ετικέτα για αυτή την διεύθυνση για να προστεθεί στη λίστα με τις χρησιμοποιημένες διευθύνσεις</translation>
+ </message>
+ <message>
<source>Pay To:</source>
<translation>Πληρωμή σε:</translation>
</message>
@@ -2191,6 +2359,10 @@
<translation>Επιτυχής εξαγωγή</translation>
</message>
<message>
+ <source>The transaction history was successfully saved to %1.</source>
+ <translation>Το ιστορικό συναλλαγών αποθηκεύτηκε επιτυχώς στο %1.</translation>
+ </message>
+ <message>
<source>Comma separated file (*.csv)</source>
<translation>Αρχείο οριοθετημένο με κόμματα (*.csv)</translation>
</message>
@@ -2229,7 +2401,11 @@
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
- </context>
+ <message>
+ <source>Unit to show amounts in. Click to select another unit.</source>
+ <translation>Μονάδα μέτρησης προβολής ποσών. Κάντε κλικ για επιλογή άλλης μονάδας.</translation>
+ </message>
+</context>
<context>
<name>WalletFrame</name>
<message>
@@ -2267,6 +2443,10 @@
<translation>Αποτυχία κατά τη δημιουργία αντιγράφου</translation>
</message>
<message>
+ <source>There was an error trying to save the wallet data to %1.</source>
+ <translation>Παρουσιάστηκε σφάλμα κατά την αποθήκευση των δεδομένων πορτοφολιού στο %1.</translation>
+ </message>
+ <message>
<source>The wallet data was successfully saved to %1.</source>
<translation>Τα δεδομένα πορτοφολιού αποθηκεύτηκαν με επιτυχία στο %1.</translation>
</message>
@@ -2314,6 +2494,10 @@
<translation>Αποθηκευση σε συγκεκριμένη διεύθυνση. Χρησιμοποιήστε τα πλήκτρα [Host] : συμβολισμός θύρα για IPv6</translation>
</message>
<message>
+ <source>Enter regression test mode, which uses a special chain in which blocks can be solved instantly.</source>
+ <translation>Εισαγωγή δοκιμαστικής λειτουργίας παλινδρόμησης, που χρησιμοποιεί μια ειδική αλυσίδα στην οποία τα μπλοκ επιλύονται στιγμιαία.</translation>
+ </message>
+ <message>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Εκτέλεσε την εντολή όταν το καλύτερο μπλοκ αλλάξει(%s στην εντολή αντικαθίσταται από το hash του μπλοκ)</translation>
</message>
@@ -2402,10 +2586,18 @@
<translation>Δεν ειναι αρκετες περιγραφες αρχείων διαθέσιμες.</translation>
</message>
<message>
+ <source>Only connect to nodes in network &lt;net&gt; (ipv4, ipv6 or onion)</source>
+ <translation>Μόνο σύνδεση σε κόμβους του δικτύου &lt;net&gt; (ipv4, ipv6 ή onion)</translation>
+ </message>
+ <message>
<source>Specify wallet file (within data directory)</source>
<translation>Επιλέξτε αρχείο πορτοφολιού (μέσα απο κατάλογο δεδομένων)</translation>
</message>
<message>
+ <source>This is intended for regression testing tools and app development.</source>
+ <translation>Αυτό προορίζεται για εργαλεία δοκιμών παλινδρόμησης και την ανάπτυξη εφαρμογών.</translation>
+ </message>
+ <message>
<source>Verifying blocks...</source>
<translation>Επαλήθευση των μπλοκ... </translation>
</message>
@@ -2414,6 +2606,10 @@
<translation>Επαλήθευση πορτοφολιου... </translation>
</message>
<message>
+ <source>Wallet %s resides outside data directory %s</source>
+ <translation>Το πορτοφόλι %s βρίσκεται έξω από το φάκελο δεδομένων %s</translation>
+ </message>
+ <message>
<source>Wallet options:</source>
<translation>Επιλογές πορτοφολιού:</translation>
</message>
@@ -2426,6 +2622,10 @@
<translation>Αδυναμία κλειδώματος του φακέλου δεδομένων %s. Πιθανώς το Bitcoin να είναι ήδη ενεργό.</translation>
</message>
<message>
+ <source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Bitcoin Core will not work properly.</source>
+ <translation>Προειδοποίηση: Παρακαλώ ελέγξτε ότι η ημερομηνία και ώρα του υπολογιστή σας είναι σωστά ρυθμισμένες! Εάν το ρολόι σας είναι λάθος το Bitcoin Core δεν θα λειτουργήσει σωστά. </translation>
+ </message>
+ <message>
<source>Choose data directory on startup (default: 0)</source>
<translation>Επιλογή φακέλου δεδομένων στην εκκίνηση (προεπιλεγμένο: 0)</translation>
</message>
@@ -2442,6 +2642,10 @@
<translation>Σφάλμα φόρτωσης wallet.dat: Το Πορτοφόλι απαιτεί μια νεότερη έκδοση του Bitcoin</translation>
</message>
<message>
+ <source>Error reading from database, shutting down.</source>
+ <translation>Σφάλμα ανάγνωσης από τη βάση δεδομένων, γίνεται τερματισμός.</translation>
+ </message>
+ <message>
<source>Error: Unsupported argument -tor found, use -onion.</source>
<translation>Σφάλμα: Μη συμβατή παράμετρος -tor. Χρησιμοποιήσε την παράμετρο -onion</translation>
</message>
@@ -2450,6 +2654,10 @@
<translation>Πληροφορία</translation>
</message>
<message>
+ <source>Initialization sanity check failed. Bitcoin Core is shutting down.</source>
+ <translation>Η εκκίνηση ελέγχου ορθότητας απέτυχε. Γίνεται τερματισμός του Bitcoin Core.</translation>
+ </message>
+ <message>
<source>Invalid amount for -minrelaytxfee=&lt;amount&gt;: '%s'</source>
<translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
</message>
@@ -2458,10 +2666,18 @@
<translation>Μη έγκυρο ποσό για την παράμετρο -paytxfee=&lt;amount&gt;: '%s'</translation>
</message>
<message>
+ <source>Node relay options:</source>
+ <translation>Επιλογές αναμετάδοσης κόμβου: </translation>
+ </message>
+ <message>
<source>RPC SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>Ρυθμίσεις SSL: (ανατρέξτε στο Bitcoin Wiki για οδηγίες ρυθμίσεων SSL)</translation>
</message>
<message>
+ <source>RPC server options:</source>
+ <translation>Επιλογές διακομιστή RPC:</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Αποστολή πληροφοριών εντοπισμού σφαλμάτων στην κονσόλα αντί του αρχείου debug.log</translation>
</message>
@@ -2474,6 +2690,10 @@
<translation>Όρισε γλώσσα, για παράδειγμα "de_DE"(προεπιλογή:τοπικές ρυθμίσεις)</translation>
</message>
<message>
+ <source>Show all debugging options (usage: --help -help-debug)</source>
+ <translation>Προβολή όλων των επιλογών εντοπισμού σφαλμάτων (χρήση: --help -help-debug)</translation>
+ </message>
+ <message>
<source>Show splash screen on startup (default: 1)</source>
<translation>Εμφάνισε την οθόνη εκκίνησης κατά την εκκίνηση(προεπιλογή:1)</translation>
</message>
diff --git a/src/qt/locale/bitcoin_eo.ts b/src/qt/locale/bitcoin_eo.ts
index fbfac8fc10..007acbc495 100644
--- a/src/qt/locale/bitcoin_eo.ts
+++ b/src/qt/locale/bitcoin_eo.ts
@@ -949,11 +949,7 @@
<source>Your current total balance</source>
<translation>via aktuala totala saldo</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesinkronigita</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_es.ts b/src/qt/locale/bitcoin_es.ts
index 2e1b7dd278..17ec4dca5d 100644
--- a/src/qt/locale/bitcoin_es.ts
+++ b/src/qt/locale/bitcoin_es.ts
@@ -1175,10 +1175,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Saldo total en las direcciones watch-only</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_es_CL.ts b/src/qt/locale/bitcoin_es_CL.ts
index c3690480d8..f50aa49110 100644
--- a/src/qt/locale/bitcoin_es_CL.ts
+++ b/src/qt/locale/bitcoin_es_CL.ts
@@ -582,11 +582,7 @@
<source>Total:</source>
<translation>Total:</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_es_DO.ts b/src/qt/locale/bitcoin_es_DO.ts
index c5b1e41886..d2cdf87a0e 100644
--- a/src/qt/locale/bitcoin_es_DO.ts
+++ b/src/qt/locale/bitcoin_es_DO.ts
@@ -953,11 +953,7 @@
<source>Your current total balance</source>
<translation>Su balance actual total</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>desincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_et.ts b/src/qt/locale/bitcoin_et.ts
index 4a502f1a54..29a45960c9 100644
--- a/src/qt/locale/bitcoin_et.ts
+++ b/src/qt/locale/bitcoin_et.ts
@@ -755,11 +755,7 @@
<source>Recent transactions</source>
<translation>Hiljutised tehingud</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>sünkimata</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_fa.ts b/src/qt/locale/bitcoin_fa.ts
index 25d437668f..33f43f0c2d 100644
--- a/src/qt/locale/bitcoin_fa.ts
+++ b/src/qt/locale/bitcoin_fa.ts
@@ -757,11 +757,7 @@
<source>Your current total balance</source>
<translation>تراز کل فعلی شما</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ناهمگام</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_fa_IR.ts b/src/qt/locale/bitcoin_fa_IR.ts
index 2dde67d3d5..da95f10474 100644
--- a/src/qt/locale/bitcoin_fa_IR.ts
+++ b/src/qt/locale/bitcoin_fa_IR.ts
@@ -390,11 +390,7 @@
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>اطلاعات نمایش داده شده ممکن است روزآمد نباشد. wallet شما به صورت خودکار بعد از برقراری اتصال با شبکه bitcoin به روز می شود اما این فرایند هنوز تکمیل نشده است.</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>خارج از روزآمد سازی</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_fi.ts b/src/qt/locale/bitcoin_fi.ts
index 0ca66e8b26..db59ea1751 100644
--- a/src/qt/locale/bitcoin_fi.ts
+++ b/src/qt/locale/bitcoin_fi.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nykyinen tase seurantaosoitetteissa</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Ei ajan tasalla</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_fr.ts b/src/qt/locale/bitcoin_fr.ts
index fe4288467b..67d920fd5e 100644
--- a/src/qt/locale/bitcoin_fr.ts
+++ b/src/qt/locale/bitcoin_fr.ts
@@ -1207,10 +1207,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Solde total actuel dans des adresses juste-regarder</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>désynchronisé</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3273,6 +3269,10 @@ par exemple : alertnotify=echo %%s | mail -s "Alerte Bitcoin" admin@foo.com
<translation>Tester aléatoirement 1 message du réseau sur &lt;n&gt;</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Reconstruire au démarrage l'index de la chaîne de blocs à partir des fichiers blk000??.dat actuels</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Envoyer les informations de débogage/trace à la console au lieu du fichier debug.log</translation>
</message>
diff --git a/src/qt/locale/bitcoin_gl.ts b/src/qt/locale/bitcoin_gl.ts
index 93ece390d1..2473260c84 100644
--- a/src/qt/locale/bitcoin_gl.ts
+++ b/src/qt/locale/bitcoin_gl.ts
@@ -869,11 +869,7 @@
<source>Your current total balance</source>
<translation>O teu balance actual total</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non sincronizado</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_he.ts b/src/qt/locale/bitcoin_he.ts
index 0a4b2f7847..66dd05fca7 100644
--- a/src/qt/locale/bitcoin_he.ts
+++ b/src/qt/locale/bitcoin_he.ts
@@ -1073,10 +1073,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>המאזן הכולל הנוכחי בכתובות לצפייה בלבד</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>לא בסנכרון</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_hu.ts b/src/qt/locale/bitcoin_hu.ts
index 0d9a57d3b4..c84d2c4e87 100644
--- a/src/qt/locale/bitcoin_hu.ts
+++ b/src/qt/locale/bitcoin_hu.ts
@@ -1001,11 +1001,7 @@
<source>Recent transactions</source>
<translation>A legutóbbi tranzakciók</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>Nincs szinkronban.</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_id_ID.ts b/src/qt/locale/bitcoin_id_ID.ts
index 7bc7ed4607..dec30dafb3 100644
--- a/src/qt/locale/bitcoin_id_ID.ts
+++ b/src/qt/locale/bitcoin_id_ID.ts
@@ -1005,11 +1005,7 @@
<source>Your current total balance</source>
<translation>Jumlah saldo Anda sekarang</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>tidak tersinkron</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_it.ts b/src/qt/locale/bitcoin_it.ts
index 6b52362b8a..c81f458e39 100644
--- a/src/qt/locale/bitcoin_it.ts
+++ b/src/qt/locale/bitcoin_it.ts
@@ -1208,10 +1208,6 @@ Per specificare più URL separarli con una barra verticale "|".</translation>
<source>Current total balance in watch-only addresses</source>
<translation>Saldo corrente totale negli indirizzi di sola lettura</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non sincronizzato</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ja.ts b/src/qt/locale/bitcoin_ja.ts
index d46d748ef2..376d36bed0 100644
--- a/src/qt/locale/bitcoin_ja.ts
+++ b/src/qt/locale/bitcoin_ja.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>監視限定アドレス内の現在の全残高</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>同期していない</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3286,6 +3282,10 @@ rpcpassword=%s
<translation>&lt;n&gt;個のネットワークメッセージごとにひとつをランダムに改変する</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>起動時に現在の blk000??.dat ファイルからブロック チェーンのインデックスを再構築</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>トレース/デバッグ情報を debug.log ファイルの代わりにコンソールへ送る</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ka.ts b/src/qt/locale/bitcoin_ka.ts
index 0b96a18d18..b9e118a620 100644
--- a/src/qt/locale/bitcoin_ka.ts
+++ b/src/qt/locale/bitcoin_ka.ts
@@ -981,11 +981,7 @@
<source>Your current total balance</source>
<translation>თქვენი სრული მიმდინარე ბალანსი</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>არ არის სინქრონიზებული</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ko_KR.ts b/src/qt/locale/bitcoin_ko_KR.ts
index d9ce8ea1be..42eb9eedbb 100644
--- a/src/qt/locale/bitcoin_ko_KR.ts
+++ b/src/qt/locale/bitcoin_ko_KR.ts
@@ -1025,11 +1025,7 @@
<source>Your current balance in watch-only addresses</source>
<translation>모니터링 지갑의 현재 잔액</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>동기화 필요</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_ky.ts b/src/qt/locale/bitcoin_ky.ts
index 7d4511b57d..8edee19c70 100644
--- a/src/qt/locale/bitcoin_ky.ts
+++ b/src/qt/locale/bitcoin_ky.ts
@@ -149,11 +149,7 @@
</context>
<context>
<name>OverviewPage</name>
- <message>
- <source>out of sync</source>
- <translation>синхрондоштурулган эмес</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_la.ts b/src/qt/locale/bitcoin_la.ts
index 8f03a20cf6..3e25cf95b6 100644
--- a/src/qt/locale/bitcoin_la.ts
+++ b/src/qt/locale/bitcoin_la.ts
@@ -601,11 +601,7 @@
<source>Mined balance that has not yet matured</source>
<translation>Fossum pendendum quod nondum maturum est</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>non synchronizato</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_lt.ts b/src/qt/locale/bitcoin_lt.ts
index b96afbbcc9..01fa94bab3 100644
--- a/src/qt/locale/bitcoin_lt.ts
+++ b/src/qt/locale/bitcoin_lt.ts
@@ -737,11 +737,7 @@
<source>Your current total balance</source>
<translation>Jūsų balansas</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesinchronizuota</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_lv_LV.ts b/src/qt/locale/bitcoin_lv_LV.ts
index a46ab83c6b..25f92b6642 100644
--- a/src/qt/locale/bitcoin_lv_LV.ts
+++ b/src/qt/locale/bitcoin_lv_LV.ts
@@ -933,11 +933,7 @@
<source>Your current total balance</source>
<translation>Jūsu kopējā tekošā bilance</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nav sinhronizēts</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_nb.ts b/src/qt/locale/bitcoin_nb.ts
index eddc61e56a..6e2b4e9fcc 100644
--- a/src/qt/locale/bitcoin_nb.ts
+++ b/src/qt/locale/bitcoin_nb.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Nåværende totale balanse i kun observerbare adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ute av synk</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3285,6 +3281,10 @@ for eksempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slumpvis bland 1 av hver &lt;n&gt; nettverksmeldinger</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Gjenopprett blokkjedeindeks fra gjeldende blk000??.dat filer 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>
diff --git a/src/qt/locale/bitcoin_nl.ts b/src/qt/locale/bitcoin_nl.ts
index c953c35404..385972845a 100644
--- a/src/qt/locale/bitcoin_nl.ts
+++ b/src/qt/locale/bitcoin_nl.ts
@@ -1207,10 +1207,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Huidige balans in alleen-bekijkbare adressen.</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>niet gesynchroniseerd</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_pam.ts b/src/qt/locale/bitcoin_pam.ts
index 503528f4a7..54c30dfb6f 100644
--- a/src/qt/locale/bitcoin_pam.ts
+++ b/src/qt/locale/bitcoin_pam.ts
@@ -593,11 +593,7 @@
<source>Your current total balance</source>
<translation>Ing kekang kasalungsungan kabuuang balanse</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>ali ya maka-sync</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
</context>
diff --git a/src/qt/locale/bitcoin_pl.ts b/src/qt/locale/bitcoin_pl.ts
index aece2bfa1e..db49e20cf1 100644
--- a/src/qt/locale/bitcoin_pl.ts
+++ b/src/qt/locale/bitcoin_pl.ts
@@ -1097,10 +1097,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Łączna kwota na podglądanych adresach</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nie zsynchronizowany</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_pt_BR.ts b/src/qt/locale/bitcoin_pt_BR.ts
index 89467bae43..42a781de99 100644
--- a/src/qt/locale/bitcoin_pt_BR.ts
+++ b/src/qt/locale/bitcoin_pt_BR.ts
@@ -63,7 +63,7 @@
</message>
<message>
<source>Receiving addresses</source>
- <translation>Endereços para receber</translation>
+ <translation>Endereços de recebimento</translation>
</message>
<message>
<source>These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
@@ -224,7 +224,7 @@
<name>BitcoinGUI</name>
<message>
<source>Sign &amp;message...</source>
- <translation>&amp;Assinar Mensagem...</translation>
+ <translation>&amp;Assinar mensagem...</translation>
</message>
<message>
<source>Synchronizing with network...</source>
@@ -284,11 +284,11 @@
</message>
<message>
<source>&amp;Sending addresses...</source>
- <translation>Enviando endereço&amp;s...</translation>
+ <translation>Endereço&amp;s de envio...</translation>
</message>
<message>
<source>&amp;Receiving addresses...</source>
- <translation>&amp;Receber endereços...</translation>
+ <translation>Endereços de &amp;Recebimento...</translation>
</message>
<message>
<source>Open &amp;URI...</source>
@@ -380,7 +380,7 @@
</message>
<message>
<source>&amp;Help</source>
- <translation>&amp;Ajuda</translation>
+ <translation>A&amp;juda</translation>
</message>
<message>
<source>Tabs toolbar</source>
@@ -1211,10 +1211,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Balanço total em endereços monitorados</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -1392,7 +1388,7 @@
</message>
<message>
<source>Debug window</source>
- <translation>Janela de debug</translation>
+ <translation>Janela de depuração</translation>
</message>
<message>
<source>General</source>
@@ -2125,7 +2121,7 @@
</message>
<message>
<source>&amp;Sign Message</source>
- <translation>&amp;Assinar Mensagem</translation>
+ <translation>&amp;Assinar mensagem</translation>
</message>
<message>
<source>The Bitcoin address to sign the message with</source>
@@ -2165,7 +2161,7 @@
</message>
<message>
<source>Sign &amp;Message</source>
- <translation>Assinar &amp;Mensagem</translation>
+ <translation>Assinar &amp;mensagem</translation>
</message>
<message>
<source>Reset all sign message fields</source>
@@ -2177,7 +2173,7 @@
</message>
<message>
<source>&amp;Verify Message</source>
- <translation>&amp;Verificar Mensagem</translation>
+ <translation>&amp;Verificar mensagem</translation>
</message>
<message>
<source>The Bitcoin address the message was signed with</source>
@@ -2189,7 +2185,7 @@
</message>
<message>
<source>Verify &amp;Message</source>
- <translation>Verificar &amp;Mensagem</translation>
+ <translation>Verificar &amp;mensagem</translation>
</message>
<message>
<source>Reset all verify message fields</source>
@@ -2197,7 +2193,7 @@
</message>
<message>
<source>Click "Sign Message" to generate signature</source>
- <translation>Clique em "Assinar Mensagem" para gerar a assinatura</translation>
+ <translation>Clique em "Assinar mensagem" para gerar a assinatura</translation>
</message>
<message>
<source>The entered address is invalid.</source>
@@ -2850,7 +2846,7 @@
</message>
<message>
<source>Debugging/Testing options:</source>
- <translation>Opções de Debug/Teste:</translation>
+ <translation>Opções de depuração/teste:</translation>
</message>
<message>
<source>Do not load the wallet and disable wallet RPC calls</source>
@@ -2890,7 +2886,7 @@
</message>
<message>
<source>If &lt;category&gt; is not supplied, output all debugging information.</source>
- <translation>Se &lt;category&gt; não for informada, logar toda informação de debug.</translation>
+ <translation>Se &lt;category&gt; não for informada, registrar toda informação de depuração.</translation>
</message>
<message>
<source>Importing...</source>
@@ -3118,7 +3114,7 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
</message>
<message>
<source>Show all debugging options (usage: --help -help-debug)</source>
- <translation>Exibir todas opções de debug (uso: --help -help-debug)</translation>
+ <translation>Exibir todas opções de depuração (uso: --help -help-debug)</translation>
</message>
<message>
<source>Show splash screen on startup (default: 1)</source>
@@ -3246,7 +3242,7 @@ por exemplo: alertnotify=echo %%s | mail -s "Alerta do Bitcoin" admin@foo.com.br
</message>
<message>
<source>Include IP addresses in debug output (default: %u)</source>
- <translation>Incluir endereço IP na saída de debug (padrão: %u)</translation>
+ <translation>Incluir endereço IP na saída de depuração (padrão: %u)</translation>
</message>
<message>
<source>Invalid -proxy address: '%s'</source>
diff --git a/src/qt/locale/bitcoin_pt_PT.ts b/src/qt/locale/bitcoin_pt_PT.ts
index 30ac9fdf31..5012ff8d83 100644
--- a/src/qt/locale/bitcoin_pt_PT.ts
+++ b/src/qt/locale/bitcoin_pt_PT.ts
@@ -1138,10 +1138,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Saldo disponivél em enderços modo-verificação</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>fora de sincronia</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_ro_RO.ts b/src/qt/locale/bitcoin_ro_RO.ts
index 8b029eeca1..11a29e86c9 100644
--- a/src/qt/locale/bitcoin_ro_RO.ts
+++ b/src/qt/locale/bitcoin_ro_RO.ts
@@ -168,6 +168,10 @@
<translation>Sigur doriţi să criptaţi portofelul dvs.?</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>Bitcoin se va închide acum pentru a termina procesul de criptare. Ţineţi minte că criptarea portofelului nu vă poate proteja în totalitate de furtul monedelor de către programe dăunătoare care vă infectează calculatorul.</translation>
+ </message>
+ <message>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>IMPORTANT: Orice copie de siguranţă făcută anterior portofelului dumneavoastră ar trebui înlocuită cu cea generată cel mai recent, fişier criptat al portofelului. Pentru siguranţă, copiile de siguranţă vechi ale portofelului ne-criptat vor deveni inutile imediat ce veţi începe folosirea noului fişier criptat al portofelului.</translation>
</message>
@@ -184,6 +188,10 @@
<translation>Introduceţi noua parolă a portofelului electronic.&lt;br/&gt;Vă rugăm să folosiţi o parolă de&lt;b&gt;minimum 10 caractere aleatoare&lt;/b&gt;, sau &lt;b&gt;minimum 8 cuvinte&lt;/b&gt;.</translation>
</message>
<message>
+ <source>Enter the old passphrase and new passphrase to the wallet.</source>
+ <translation>Introduceţi vechea şi noua parolă pentru portofel.</translation>
+ </message>
+ <message>
<source>Wallet encryption failed</source>
<translation>Criptarea portofelului nu a reuşit</translation>
</message>
@@ -391,6 +399,10 @@
<translation>&amp;Despre Nucleul Bitcoin</translation>
</message>
<message>
+ <source>Modify configuration options for Bitcoin Core</source>
+ <translation>Modifică opţiunile de configurare pentru Bitcoin</translation>
+ </message>
+ <message>
<source>Show the list of used sending addresses and labels</source>
<translation>Arată lista de adrese trimise şi etichetele folosite.</translation>
</message>
@@ -419,6 +431,10 @@
<translation>Nici o sursă de bloc disponibilă...</translation>
</message>
<message numerus="yes">
+ <source>Processed %n block(s) of transaction history.</source>
+ <translation><numerusform>S-a procesat %n bloc din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n blocuri din istoricul tranzacţiilor.</numerusform><numerusform>S-au procesat %n de blocuri din istoricul tranzacţiilor.</numerusform></translation>
+ </message>
+ <message numerus="yes">
<source>%n hour(s)</source>
<translation><numerusform>%n oră</numerusform><numerusform>%n ore</numerusform><numerusform>%n ore</numerusform></translation>
</message>
@@ -471,6 +487,36 @@
<translation>Se actualizează...</translation>
</message>
<message>
+ <source>Date: %1
+</source>
+ <translation>Data: %1
+</translation>
+ </message>
+ <message>
+ <source>Amount: %1
+</source>
+ <translation>Sumă: %1
+</translation>
+ </message>
+ <message>
+ <source>Type: %1
+</source>
+ <translation>Tip: %1
+</translation>
+ </message>
+ <message>
+ <source>Label: %1
+</source>
+ <translation>Etichetă: %1
+</translation>
+ </message>
+ <message>
+ <source>Address: %1
+</source>
+ <translation>Adresă: %1
+</translation>
+ </message>
+ <message>
<source>Sent transaction</source>
<translation>Tranzacţie expediată</translation>
</message>
@@ -665,6 +711,18 @@
<translation>nimic</translation>
</message>
<message>
+ <source>This label turns red if the transaction size is greater than 1000 bytes.</source>
+ <translation>Această etichetă devine roşie în cazul în care dimensiunea tranzacţiei este mai mare de 1000 de octeţi.</translation>
+ </message>
+ <message>
+ <source>This label turns red if the priority is smaller than "medium".</source>
+ <translation>Această etichetă devine roşie dacă prioritatea e mai mică decît "medie".</translation>
+ </message>
+ <message>
+ <source>This label turns red if any recipient receives an amount smaller than %1.</source>
+ <translation>Această etichetă devine roşie, dacă orice beneficiar primeşte o sumă mai mică decât %1.</translation>
+ </message>
+ <message>
<source>Can vary +/- %1 satoshi(s) per input.</source>
<translation>Poate varia +/- %1 satoshi pentru fiecare intrare.</translation>
</message>
@@ -907,6 +965,14 @@
<translation>Adresa IP a serverului proxy (de exemplu: IPv4: 127.0.0.1 / IPv6: ::1)</translation>
</message>
<message>
+ <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Exit in the menu.</source>
+ <translation>Minimizează fereastra în locul părăsirii programului în momentul închiderii ferestrei. Cînd acestă opţiune e activă, aplicaţia se va opri doar în momentul selectării comenzii 'Închide aplicaţia' din menu.</translation>
+ </message>
+ <message>
+ <source>The user interface language can be set here. This setting will take effect after restarting Bitcoin Core.</source>
+ <translation>Limba interfeţei utilizatorului poate fi setată aici. Această setare va avea efect după repornirea Nucleului Bitcoin.</translation>
+ </message>
+ <message>
<source>Third party URLs (e.g. a block explorer) that appear in the transactions tab as context menu items. %s in the URL is replaced by transaction hash. Multiple URLs are separated by vertical bar |.</source>
<translation>URL-uri terţe părţi (de exemplu, un explorator de bloc), care apar în tab-ul tranzacţiilor ca elemente de meniu contextual. %s în URL este înlocuit cu hash de tranzacţie. URL-urile multiple sînt separate prin bară verticală |.</translation>
</message>
@@ -931,6 +997,10 @@
<translation>Reţea</translation>
</message>
<message>
+ <source>&amp;Start Bitcoin Core on system login</source>
+ <translation>Porneşte Nucleul Bitcoin la pornirea sistemului</translation>
+ </message>
+ <message>
<source>(0 = auto, &lt;0 = leave that many cores free)</source>
<translation>(0 = automat, &lt;0 = lasă atîtea nuclee libere)</translation>
</message>
@@ -1043,6 +1113,10 @@
<translation>Este necesară repornirea clientului pentru a activa schimbările.</translation>
</message>
<message>
+ <source>Client will be shut down. Do you want to proceed?</source>
+ <translation>Clientul va fi închis. Doriţi să continuaţi?</translation>
+ </message>
+ <message>
<source>This change would require a client restart.</source>
<translation>Această schimbare necesită o repornire a clientului.</translation>
</message>
@@ -1125,10 +1199,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Soldul dvs. total în adresele doar-supraveghere</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesincronizat</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -1169,6 +1239,10 @@
<translation>URL-ul cererii de plată preluat nu este valid: %1</translation>
</message>
<message>
+ <source>URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <translation>URI nu poate fi analizat! Acest lucru poate fi cauzat de o adresă Bitcoin nevalidă sau parametri URI deformaţi.</translation>
+ </message>
+ <message>
<source>Payment request file handling</source>
<translation>Manipulare fişier cerere de plată</translation>
</message>
@@ -1177,10 +1251,18 @@
<translation>Fişierul cerere de plată nu poate fi citit! Cauza poate fi un fişier cerere de plată nevalid.</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <translation>Cererea de plată a expirat.</translation>
+ </message>
+ <message>
<source>Unverified payment requests to custom payment scripts are unsupported.</source>
<translation>Cererile de plată neverificate prin script-uri personalizate de plată nu sînt suportate.</translation>
</message>
<message>
+ <source>Invalid payment request.</source>
+ <translation>Cerere de plată nevalidă.</translation>
+ </message>
+ <message>
<source>Refund from %1</source>
<translation>Rambursare de la %1</translation>
</message>
@@ -1441,6 +1523,10 @@
<translation>Curăţă consola</translation>
</message>
<message>
+ <source>Welcome to the Bitcoin Core RPC console.</source>
+ <translation>Bun venit la consola Nucleului Bitcoin RPC.</translation>
+ </message>
+ <message>
<source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source>
<translation>Folosiţi săgetile sus şi jos pentru a naviga în istoric şi &lt;b&gt;Ctrl-L&lt;/b&gt; pentru a curăţa.</translation>
</message>
@@ -1729,6 +1815,10 @@
<translation>per kilooctet</translation>
</message>
<message>
+ <source>Hide</source>
+ <translation>Ascunde</translation>
+ </message>
+ <message>
<source>total at least</source>
<translation>total cel puţin</translation>
</message>
@@ -1857,10 +1947,18 @@
<translation>Tranzacţia a fost respinsă! Acest lucru se poate întîmpla dacă o parte din monedele tale din portofel au fost deja cheltuite, la fel ca şi cum aţi fi folosit o copie a wallet.dat şi monedele au fost cheltuite în copie, dar nu au fost marcate ca şi cheltuite şi aici.</translation>
</message>
<message>
+ <source>Payment request expired.</source>
+ <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>
+ <message>
<source>Warning: Invalid Bitcoin address</source>
<translation>Atenţie: Adresa bitcoin nevalidă!</translation>
</message>
diff --git a/src/qt/locale/bitcoin_ru.ts b/src/qt/locale/bitcoin_ru.ts
index 30d44b090f..c208b3e25e 100644
--- a/src/qt/locale/bitcoin_ru.ts
+++ b/src/qt/locale/bitcoin_ru.ts
@@ -1105,10 +1105,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Текущий общий баланс на адресах наблюдения</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>не синхронизировано</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_sk.ts b/src/qt/locale/bitcoin_sk.ts
index 294eca4127..8e7d38be00 100644
--- a/src/qt/locale/bitcoin_sk.ts
+++ b/src/qt/locale/bitcoin_sk.ts
@@ -1081,11 +1081,7 @@
<source>Recent transactions</source>
<translation>Nedávne transakcie</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>nesynchronizované</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_sl_SI.ts b/src/qt/locale/bitcoin_sl_SI.ts
index 7a283bcca1..abbdba3760 100644
--- a/src/qt/locale/bitcoin_sl_SI.ts
+++ b/src/qt/locale/bitcoin_sl_SI.ts
@@ -929,11 +929,7 @@
<source>Your current total balance</source>
<translation>Vaše trenutno skupno stanje</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>iz sinhronizacije</translation>
- </message>
-</context>
+ </context>
<context>
<name>PaymentServer</name>
<message>
diff --git a/src/qt/locale/bitcoin_sv.ts b/src/qt/locale/bitcoin_sv.ts
index 8a46ae8470..289074f134 100644
--- a/src/qt/locale/bitcoin_sv.ts
+++ b/src/qt/locale/bitcoin_sv.ts
@@ -1212,10 +1212,6 @@ Var vänlig och försök igen.</translation>
<source>Current total balance in watch-only addresses</source>
<translation>Nuvarande total balans i granska-bara adresser</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>osynkroniserad</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3270,6 +3266,10 @@ till exempel: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Slupmässigt brus 1 gång varje &lt;n&gt; nätverksmeddelande</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer under uppstarten</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Skicka trace-/debuginformation till terminalen istället för till debug.log</translation>
</message>
diff --git a/src/qt/locale/bitcoin_tr.ts b/src/qt/locale/bitcoin_tr.ts
index ff398c5d2a..bf6f3f2791 100644
--- a/src/qt/locale/bitcoin_tr.ts
+++ b/src/qt/locale/bitcoin_tr.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Sadece izlenen adreslerdeki güncel toplam bakiye</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>eşleşme dışı</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -3101,6 +3097,10 @@
<translation>Adres sayısı azaldıysa DNS sorgulamasıyla eş adresleri ara (varsayılan: 1 -connect kullanılmadıysa)</translation>
</message>
<message>
+ <source>Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)</source>
+ <translation>Her vekil bağlantısı için kimlik verilerini rastgele yap. Bu, Tor akış izolasyonunu etkinleştirir (varsayılan: %u)</translation>
+ </message>
+ <message>
<source>Require high priority for relaying free or low-fee transactions (default: %u)</source>
<translation>Ücretsiz ya da düşük ücretli muamelelerin geçişi için yüksek öncelik iste (varsayılan: %u)</translation>
</message>
@@ -3277,6 +3277,10 @@ mesela: alertnotify=echo %%s | mail -s "Bitcoin Alert" admin@foo.com
<translation>Her &lt;n&gt; şebeke mesajından rastgele birini bulanıklaştır</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>Başlangıçta blok zinciri indeksini güncel blk000??.dat dosyalarından tekrar inşa et</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Trace/hata ayıklama verilerini debug.log dosyası yerine konsola gönder</translation>
</message>
diff --git a/src/qt/locale/bitcoin_uk.ts b/src/qt/locale/bitcoin_uk.ts
index b2e67e296e..92e0cc75c4 100644
--- a/src/qt/locale/bitcoin_uk.ts
+++ b/src/qt/locale/bitcoin_uk.ts
@@ -440,7 +440,7 @@
</message>
<message>
<source>%1 behind</source>
- <translation>%1 позаду</translation>
+ <translation>%1 тому</translation>
</message>
<message>
<source>Last received block was generated %1 ago.</source>
@@ -1123,7 +1123,7 @@
</message>
<message>
<source>Recent transactions</source>
- <translation>Недавні транзакції</translation>
+ <translation>Останні транзакції</translation>
</message>
<message>
<source>Unconfirmed transactions to watch-only addresses</source>
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>Поточний сукупний баланс в адресах для спостереження</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>не синхронізовано</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/locale/bitcoin_zh_CN.ts b/src/qt/locale/bitcoin_zh_CN.ts
index 4c9f287e95..3bcce1faab 100644
--- a/src/qt/locale/bitcoin_zh_CN.ts
+++ b/src/qt/locale/bitcoin_zh_CN.ts
@@ -1215,10 +1215,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>观察地址(watch-only address)中的当前总余额 </translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>数据同步中</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
@@ -2018,6 +2014,10 @@
<source>Payment request expired.</source>
<translation>支付请求已过期。</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>
@@ -2208,6 +2208,10 @@
<translation>验证消息(&amp;V)</translation>
</message>
<message>
+ <source>Enter the receiver's address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack. Note that this only proves the signing party receives with the address, it cannot prove sendership of any transaction!</source>
+ <translation>请在下面输入接收者地址、消息(确保换行符、空格符、制表符等完全相同)和签名以验证消息。请仔细核对签名信息,以提防中间人攻击。请注意,这只是证明接收方签名的地址,它不能证明任何交易!</translation>
+ </message>
+ <message>
<source>The Bitcoin address the message was signed with</source>
<translation>消息使用的签名地址</translation>
</message>
@@ -2811,6 +2815,10 @@
<translation>绑定指定的IP地址开始监听。IPv6地址请使用[host]:port 格式</translation>
</message>
<message>
+ <source>Continuously rate-limit free transactions to &lt;n&gt;*1000 bytes per minute (default: %u)</source>
+ <translation>自由交易不断的速率限制为&lt;n&gt;*1000 字节每分钟(默认值: %u)</translation>
+ </message>
+ <message>
<source>Delete all wallet transactions and only recover those parts of the blockchain through -rescan on startup</source>
<translation>删除钱包的所有交易记录,且只有用 -rescan参数启动客户端才能重新取回交易记录 </translation>
</message>
@@ -3267,6 +3275,10 @@ rpcpassword=%s
<translation>随机每1个模拟测试&lt;n&gt;网络信息</translation>
</message>
<message>
+ <source>Rebuild block chain index from current blk000??.dat files on startup</source>
+ <translation>启动时重新为当前的 blk000??.dat 文件建立索引</translation>
+ </message>
+ <message>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>跟踪/调试信息输出到控制台,不输出到 debug.log 文件</translation>
</message>
diff --git a/src/qt/locale/bitcoin_zh_TW.ts b/src/qt/locale/bitcoin_zh_TW.ts
index 254b33d5a4..3792a76095 100644
--- a/src/qt/locale/bitcoin_zh_TW.ts
+++ b/src/qt/locale/bitcoin_zh_TW.ts
@@ -1137,10 +1137,6 @@
<source>Current total balance in watch-only addresses</source>
<translation>所有只能看位址的目前全部餘額</translation>
</message>
- <message>
- <source>out of sync</source>
- <translation>還沒同步</translation>
- </message>
</context>
<context>
<name>PaymentServer</name>
diff --git a/src/qt/overviewpage.cpp b/src/qt/overviewpage.cpp
index a422ff9a71..2e33b9adf8 100644
--- a/src/qt/overviewpage.cpp
+++ b/src/qt/overviewpage.cpp
@@ -121,6 +121,12 @@ OverviewPage::OverviewPage(QWidget *parent) :
{
ui->setupUi(this);
+ // use a SingleColorIcon for the "out of sync warning" icon
+ QIcon icon = SingleColorIcon(":/icons/warning");
+ icon.addPixmap(icon.pixmap(QSize(64,64), QIcon::Normal), QIcon::Disabled); // also set the disabled icon because we are using a disabled QPushButton to work around missing HiDPI support of QLabel (https://bugreports.qt.io/browse/QTBUG-42503)
+ ui->labelTransactionsStatus->setIcon(icon);
+ ui->labelWalletStatus->setIcon(icon);
+
// Recent transactions
ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
diff --git a/src/qt/res/bitcoin-qt-res.rc b/src/qt/res/bitcoin-qt-res.rc
index c0f3e2fb39..9f66d0af79 100644
--- a/src/qt/res/bitcoin-qt-res.rc
+++ b/src/qt/res/bitcoin-qt-res.rc
@@ -19,7 +19,7 @@ BEGIN
BLOCK "040904E4" // U.S. English - multilingual (hex)
BEGIN
VALUE "CompanyName", "Bitcoin"
- VALUE "FileDescription", "Bitcoin Core (OSS GUI client for Bitcoin)"
+ VALUE "FileDescription", "Bitcoin Core (GUI node for Bitcoin)"
VALUE "FileVersion", VER_FILEVERSION_STR
VALUE "InternalName", "bitcoin-qt"
VALUE "LegalCopyright", COPYRIGHT_STR
diff --git a/src/qt/scicon.cpp b/src/qt/scicon.cpp
index b2f2399b24..c493b5569e 100644
--- a/src/qt/scicon.cpp
+++ b/src/qt/scicon.cpp
@@ -11,7 +11,9 @@
#include <QPalette>
#include <QPixmap>
-static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
+namespace {
+
+void MakeSingleColorImage(QImage& img, const QColor& colorbase)
{
img = img.convertToFormat(QImage::Format_ARGB32);
for (int x = img.width(); x--; )
@@ -24,6 +26,8 @@ static void MakeSingleColorImage(QImage& img, const QColor& colorbase)
}
}
+}
+
QImage SingleColorImage(const QString& filename, const QColor& colorbase)
{
QImage img(filename);
diff --git a/src/rest.cpp b/src/rest.cpp
index 1b7954bbf6..7c238d506d 100644
--- a/src/rest.cpp
+++ b/src/rest.cpp
@@ -19,7 +19,7 @@
using namespace std;
using namespace json_spirit;
-static const int MAX_GETUTXOS_OUTPOINTS = 100; //allow a max of 100 outpoints to be queried at once
+static const int MAX_GETUTXOS_OUTPOINTS = 15; //allow a max of 15 outpoints to be queried at once
enum RetFormat {
RF_UNDEF,
@@ -262,12 +262,12 @@ static bool rest_chaininfo(AcceptedConnection* conn,
{
vector<string> params;
const RetFormat rf = ParseDataFormat(params, strURIPart);
-
+
switch (rf) {
case RF_JSON: {
Array rpcParams;
Value chainInfoObject = getblockchaininfo(rpcParams, false);
-
+
string strJSON = write_string(chainInfoObject, false) + "\n";
conn->stream() << HTTPReply(HTTP_OK, strJSON, fRun) << std::flush;
return true;
@@ -276,7 +276,7 @@ static bool rest_chaininfo(AcceptedConnection* conn,
throw RESTERR(HTTP_NOT_FOUND, "output format not found (available: json)");
}
}
-
+
// not reached
return true; // continue to process further HTTP reqs on this cxn
}
@@ -342,18 +342,53 @@ static bool rest_getutxos(AcceptedConnection* conn,
vector<string> params;
enum RetFormat rf = ParseDataFormat(params, strURIPart);
+ vector<string> uriParts;
+ if (params.size() > 0 && params[0].length() > 1)
+ {
+ std::string strUriParams = params[0].substr(1);
+ boost::split(uriParts, strUriParams, boost::is_any_of("/"));
+ }
+
// throw exception in case of a empty request
- if (strRequest.length() == 0)
+ if (strRequest.length() == 0 && uriParts.size() == 0)
throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
+ bool fInputParsed = false;
bool fCheckMemPool = false;
vector<COutPoint> vOutPoints;
// parse/deserialize input
// input-format = output-format, rest/getutxos/bin requires binary input, gives binary output, ...
-
+
+ if (uriParts.size() > 0)
+ {
+
+ //inputs is sent over URI scheme (/rest/getutxos/checkmempool/txid1-n/txid2-n/...)
+ if (uriParts.size() > 0 && uriParts[0] == "checkmempool")
+ fCheckMemPool = true;
+
+ for (size_t i = (fCheckMemPool) ? 1 : 0; i < uriParts.size(); i++)
+ {
+ uint256 txid;
+ int32_t nOutput;
+ std::string strTxid = uriParts[i].substr(0, uriParts[i].find("-"));
+ std::string strOutput = uriParts[i].substr(uriParts[i].find("-")+1);
+
+ if (!ParseInt32(strOutput, &nOutput) || !IsHex(strTxid))
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
+
+ txid.SetHex(strTxid);
+ vOutPoints.push_back(COutPoint(txid, (uint32_t)nOutput));
+ }
+
+ if (vOutPoints.size() > 0)
+ fInputParsed = true;
+ else
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
+ }
+
string strRequestMutable = strRequest; //convert const string to string for allowing hex to bin converting
-
+
switch (rf) {
case RF_HEX: {
// convert hex to bin, continue then with bin part
@@ -363,11 +398,17 @@ static bool rest_getutxos(AcceptedConnection* conn,
case RF_BINARY: {
try {
- //deserialize
- CDataStream oss(SER_NETWORK, PROTOCOL_VERSION);
- oss << strRequestMutable;
- oss >> fCheckMemPool;
- oss >> vOutPoints;
+ //deserialize only if user sent a request
+ if (strRequestMutable.size() > 0)
+ {
+ if (fInputParsed) //don't allow sending input over URI and HTTP RAW DATA
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Combination of URI scheme inputs and raw post data is not allowed");
+
+ CDataStream oss(SER_NETWORK, PROTOCOL_VERSION);
+ oss << strRequestMutable;
+ oss >> fCheckMemPool;
+ oss >> vOutPoints;
+ }
} catch (const std::ios_base::failure& e) {
// abort in case of unreadable binary data
throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
@@ -376,33 +417,8 @@ static bool rest_getutxos(AcceptedConnection* conn,
}
case RF_JSON: {
- try {
- // parse json request
- Value valRequest;
- if (!read_string(strRequest, valRequest))
- throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
-
- Object jsonObject = valRequest.get_obj();
- const Value& checkMempoolValue = find_value(jsonObject, "checkmempool");
-
- if (!checkMempoolValue.is_null()) {
- fCheckMemPool = checkMempoolValue.get_bool();
- }
- const Value& outpointsValue = find_value(jsonObject, "outpoints");
- if (!outpointsValue.is_null()) {
- Array outPoints = outpointsValue.get_array();
- BOOST_FOREACH (const Value& outPoint, outPoints) {
- Object outpointObject = outPoint.get_obj();
- uint256 txid = ParseHashO(outpointObject, "txid");
- Value nValue = find_value(outpointObject, "n");
- int nOutput = nValue.get_int();
- vOutPoints.push_back(COutPoint(txid, nOutput));
- }
- }
- } catch (...) {
- // return HTTP 500 if there was a json parsing error
- throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Parse error");
- }
+ if (!fInputParsed)
+ throw RESTERR(HTTP_INTERNAL_SERVER_ERROR, "Error: empty request");
break;
}
default: {
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp
index 4315c5ec18..79528db2fe 100644
--- a/src/rpcblockchain.cpp
+++ b/src/rpcblockchain.cpp
@@ -4,7 +4,9 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "checkpoints.h"
+#include "consensus/validation.h"
#include "main.h"
+#include "primitives/transaction.h"
#include "rpcserver.h"
#include "sync.h"
#include "util.h"
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index a6a8b9422f..d58d438573 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -6,6 +6,7 @@
#include "amount.h"
#include "chainparams.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
#include "main.h"
diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp
index e84d2693a2..3e37b797e8 100644
--- a/src/rpcrawtransaction.cpp
+++ b/src/rpcrawtransaction.cpp
@@ -4,13 +4,14 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "base58.h"
-#include "primitives/transaction.h"
+#include "consensus/validation.h"
#include "core_io.h"
#include "init.h"
#include "keystore.h"
#include "main.h"
#include "merkleblock.h"
#include "net.h"
+#include "primitives/transaction.h"
#include "rpcserver.h"
#include "script/script.h"
#include "script/script_error.h"
diff --git a/src/scheduler.cpp b/src/scheduler.cpp
index 4f1d8be7c0..c42eb7244d 100644
--- a/src/scheduler.cpp
+++ b/src/scheduler.cpp
@@ -29,8 +29,6 @@ void CScheduler::serviceQueue()
{
boost::unique_lock<boost::mutex> lock(newTaskMutex);
++nThreadsServicingQueue;
- stopRequested = false;
- stopWhenEmpty = false;
// newTaskMutex is locked throughout this loop EXCEPT
// when the thread is waiting or when the user's function
diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp
index 6b6df5199a..22cb475e02 100644
--- a/src/test/alert_tests.cpp
+++ b/src/test/alert_tests.cpp
@@ -7,10 +7,12 @@
//
#include "alert.h"
+#include "chain.h"
+#include "chainparams.h"
#include "clientversion.h"
#include "data/alertTests.raw.h"
-#include "chainparams.h"
+#include "main.h"
#include "serialize.h"
#include "streams.h"
#include "util.h"
@@ -193,4 +195,65 @@ BOOST_AUTO_TEST_CASE(AlertNotify)
SetMockTime(0);
}
+static bool falseFunc() { return false; }
+
+BOOST_AUTO_TEST_CASE(PartitionAlert)
+{
+ // Test PartitionCheck
+ CCriticalSection csDummy;
+ CChain chainDummy;
+ CBlockIndex indexDummy[100];
+ CChainParams& params = Params(CBaseChainParams::MAIN);
+ int64_t nPowTargetSpacing = params.GetConsensus().nPowTargetSpacing;
+
+ // Generate fake blockchain timestamps relative to
+ // an arbitrary time:
+ int64_t now = 1427379054;
+ SetMockTime(now);
+ for (int i = 0; i < 100; i++)
+ {
+ indexDummy[i].phashBlock = NULL;
+ if (i == 0) indexDummy[i].pprev = NULL;
+ else indexDummy[i].pprev = &indexDummy[i-1];
+ indexDummy[i].nHeight = i;
+ indexDummy[i].nTime = now - (100-i)*nPowTargetSpacing;
+ // Other members don't matter, the partition check code doesn't
+ // use them
+ }
+ chainDummy.SetTip(&indexDummy[99]);
+
+ // Test 1: chain with blocks every nPowTargetSpacing seconds,
+ // as normal, no worries:
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(strMiscWarning.empty());
+
+ // Test 2: go 3.5 hours without a block, expect a warning:
+ now += 3*60*60+30*60;
+ SetMockTime(now);
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(!strMiscWarning.empty());
+ BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning);
+ strMiscWarning = "";
+
+ // Test 3: test the "partition alerts only go off once per day"
+ // code:
+ now += 60*10;
+ SetMockTime(now);
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(strMiscWarning.empty());
+
+ // Test 4: get 2.5 times as many blocks as expected:
+ now += 60*60*24; // Pretend it is a day later
+ SetMockTime(now);
+ int64_t quickSpacing = nPowTargetSpacing*2/5;
+ for (int i = 0; i < 100; i++) // Tweak chain timestamps:
+ indexDummy[i].nTime = now - (100-i)*quickSpacing;
+ PartitionCheck(falseFunc, csDummy, chainDummy, nPowTargetSpacing);
+ BOOST_CHECK(!strMiscWarning.empty());
+ BOOST_TEST_MESSAGE(std::string("Got alert text: ")+strMiscWarning);
+ strMiscWarning = "";
+
+ SetMockTime(0);
+}
+
BOOST_AUTO_TEST_SUITE_END()
diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp
index 7abfad151e..51530c4de5 100644
--- a/src/test/checkblock_tests.cpp
+++ b/src/test/checkblock_tests.cpp
@@ -2,16 +2,11 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-//
-// Unit tests for block.CheckBlock()
-//
-
-
-
#include "clientversion.h"
+#include "consensus/validation.h"
#include "main.h"
-#include "utiltime.h"
#include "test/test_bitcoin.h"
+#include "utiltime.h"
#include <cstdio>
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp
index 9ec533bcca..21ae46d6e9 100644
--- a/src/test/main_tests.cpp
+++ b/src/test/main_tests.cpp
@@ -2,25 +2,58 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-#include "primitives/transaction.h"
+#include "chainparams.h"
#include "main.h"
#include "test/test_bitcoin.h"
+#include <boost/signals2/signal.hpp>
#include <boost/test/unit_test.hpp>
BOOST_FIXTURE_TEST_SUITE(main_tests, TestingSetup)
+static void TestBlockSubsidyHalvings(const Consensus::Params& consensusParams)
+{
+ int maxHalvings = 64;
+ CAmount nInitialSubsidy = 50 * COIN;
+
+ CAmount nPreviousSubsidy = nInitialSubsidy * 2; // for height == 0
+ BOOST_CHECK_EQUAL(nPreviousSubsidy, nInitialSubsidy * 2);
+ for (int nHalvings = 0; nHalvings < maxHalvings; nHalvings++) {
+ int nHeight = nHalvings * consensusParams.nSubsidyHalvingInterval;
+ CAmount nSubsidy = GetBlockSubsidy(nHeight, consensusParams);
+ BOOST_CHECK(nSubsidy <= nInitialSubsidy);
+ BOOST_CHECK_EQUAL(nSubsidy, nPreviousSubsidy / 2);
+ nPreviousSubsidy = nSubsidy;
+ }
+ BOOST_CHECK_EQUAL(GetBlockSubsidy(maxHalvings * consensusParams.nSubsidyHalvingInterval, consensusParams), 0);
+}
+
+static void TestBlockSubsidyHalvings(int nSubsidyHalvingInterval)
+{
+ Consensus::Params consensusParams;
+ consensusParams.nSubsidyHalvingInterval = nSubsidyHalvingInterval;
+ TestBlockSubsidyHalvings(consensusParams);
+}
+
+BOOST_AUTO_TEST_CASE(block_subsidy_test)
+{
+ TestBlockSubsidyHalvings(Params(CBaseChainParams::MAIN).GetConsensus()); // As in main
+ TestBlockSubsidyHalvings(150); // As in regtest
+ TestBlockSubsidyHalvings(1000); // Just another interval
+}
+
BOOST_AUTO_TEST_CASE(subsidy_limit_test)
{
+ const Consensus::Params& consensusParams = Params(CBaseChainParams::MAIN).GetConsensus();
CAmount nSum = 0;
for (int nHeight = 0; nHeight < 14000000; nHeight += 1000) {
- CAmount nSubsidy = GetBlockValue(nHeight, 0);
+ CAmount nSubsidy = GetBlockSubsidy(nHeight, consensusParams);
BOOST_CHECK(nSubsidy <= 50 * COIN);
nSum += nSubsidy * 1000;
BOOST_CHECK(MoneyRange(nSum));
}
- BOOST_CHECK(nSum == 2099999997690000ULL);
+ BOOST_CHECK_EQUAL(nSum, 2099999997690000ULL);
}
bool ReturnFalse() { return false; }
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index d7ea91607c..b6365b1b3a 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -2,6 +2,7 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "consensus/validation.h"
#include "main.h"
#include "miner.h"
#include "pubkey.h"
diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp
index cb357d295c..0f5e1615c6 100644
--- a/src/test/netbase_tests.cpp
+++ b/src/test/netbase_tests.cpp
@@ -117,6 +117,11 @@ BOOST_AUTO_TEST_CASE(subnet_test)
BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:8")));
BOOST_CHECK(!CSubNet("1:2:3:4:5:6:7:8").Match(CNetAddr("1:2:3:4:5:6:7:9")));
BOOST_CHECK(CSubNet("1:2:3:4:5:6:7:0/112").Match(CNetAddr("1:2:3:4:5:6:7:1234")));
+ BOOST_CHECK(CSubNet("192.168.0.1/24").Match(CNetAddr("192.168.0.2")));
+ BOOST_CHECK(CSubNet("192.168.0.20/29").Match(CNetAddr("192.168.0.18")));
+ BOOST_CHECK(CSubNet("1.2.2.1/24").Match(CNetAddr("1.2.2.4")));
+ BOOST_CHECK(CSubNet("1.2.2.110/31").Match(CNetAddr("1.2.2.111")));
+ BOOST_CHECK(CSubNet("1.2.2.20/26").Match(CNetAddr("1.2.2.63")));
// All-Matching IPv6 Matches arbitrary IPv4 and IPv6
BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1:2:3:4:5:6:7:1234")));
BOOST_CHECK(CSubNet("::/0").Match(CNetAddr("1.2.3.4")));
diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp
index afb7a41bbd..87be2217c4 100644
--- a/src/test/sighash_tests.cpp
+++ b/src/test/sighash_tests.cpp
@@ -2,15 +2,16 @@
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+#include "consensus/validation.h"
#include "data/sighash.json.h"
#include "main.h"
#include "random.h"
-#include "serialize.h"
-#include "script/script.h"
#include "script/interpreter.h"
+#include "script/script.h"
+#include "serialize.h"
+#include "test/test_bitcoin.h"
#include "util.h"
#include "version.h"
-#include "test/test_bitcoin.h"
#include <iostream>
diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp
index 2a3083316e..d12535e438 100644
--- a/src/test/transaction_tests.cpp
+++ b/src/test/transaction_tests.cpp
@@ -7,12 +7,13 @@
#include "test/test_bitcoin.h"
#include "clientversion.h"
+#include "consensus/validation.h"
+#include "core_io.h"
#include "key.h"
#include "keystore.h"
#include "main.h"
#include "script/script.h"
#include "script/script_error.h"
-#include "core_io.h"
#include <map>
#include <string>
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 071fa9d52c..1c16e2092e 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -7,6 +7,7 @@
#include "clientversion.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "main.h"
#include "policy/fees.h"
#include "streams.h"
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 3396a3a188..d892c66eda 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -9,6 +9,7 @@
#include "checkpoints.h"
#include "coincontrol.h"
#include "consensus/consensus.h"
+#include "consensus/validation.h"
#include "main.h"
#include "net.h"
#include "script/script.h"
diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp
index 13eaf95aa6..f777926e72 100644
--- a/src/wallet/walletdb.cpp
+++ b/src/wallet/walletdb.cpp
@@ -6,6 +6,7 @@
#include "wallet/walletdb.h"
#include "base58.h"
+#include "consensus/validation.h"
#include "main.h"
#include "protocol.h"
#include "serialize.h"