aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am3
-rw-r--r--configure.ac4
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml2
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml2
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml2
-rwxr-xr-xcontrib/zmq/zmq_sub.py97
-rwxr-xr-xcontrib/zmq/zmq_sub3.4.py89
-rw-r--r--depends/packages/qrencode.mk2
-rw-r--r--doc/Doxyfile2
-rw-r--r--doc/README.md2
-rw-r--r--doc/README_windows.txt2
-rw-r--r--doc/man/bitcoin-cli.130
-rw-r--r--doc/man/bitcoin-qt.1107
-rw-r--r--doc/man/bitcoin-tx.135
-rw-r--r--doc/man/bitcoind.1107
-rw-r--r--doc/release-notes.md111
-rw-r--r--qa/README.md8
-rwxr-xr-xqa/pull-tester/rpc-tests.py249
-rw-r--r--qa/pull-tester/tests_config.ini.in18
-rw-r--r--qa/pull-tester/tests_config.py.in14
-rwxr-xr-xqa/rpc-tests/bip68-112-113-p2p.py2
-rwxr-xr-xqa/rpc-tests/bip68-sequence.py2
-rwxr-xr-xqa/rpc-tests/bumpfee.py2
-rwxr-xr-xqa/rpc-tests/p2p-compactblocks.py1
-rwxr-xr-xqa/rpc-tests/rpcnamedargs.py6
-rwxr-xr-xqa/rpc-tests/segwit.py8
-rwxr-xr-xqa/rpc-tests/wallet-accounts.py2
-rw-r--r--src/bitcoind.cpp6
-rw-r--r--src/chainparams.cpp1
-rw-r--r--src/clientversion.h2
-rw-r--r--src/hash.h8
-rw-r--r--src/httprpc.cpp2
-rw-r--r--src/init.cpp2
-rw-r--r--src/netbase.cpp52
-rw-r--r--src/qt/bitcoingui.cpp5
-rw-r--r--src/qt/forms/intro.ui35
-rw-r--r--src/qt/guiutil.cpp17
-rw-r--r--src/qt/intro.cpp20
-rw-r--r--src/qt/paymentserver.cpp2
-rw-r--r--src/qt/paymentserver.h2
-rw-r--r--src/rpc/client.cpp2
-rw-r--r--src/rpc/mining.cpp10
-rw-r--r--src/rpc/misc.cpp2
-rw-r--r--src/rpc/server.cpp2
-rw-r--r--src/test/test_bitcoin.cpp4
-rw-r--r--src/test/testutil.cpp18
-rw-r--r--src/txmempool.cpp4
-rw-r--r--src/txmempool.h2
-rw-r--r--src/util.cpp15
-rw-r--r--src/utiltime.h2
-rw-r--r--src/validation.cpp18
-rw-r--r--src/validationinterface.h2
-rw-r--r--src/wallet/rpcdump.cpp2
-rw-r--r--src/wallet/rpcwallet.cpp2
-rw-r--r--src/wallet/wallet.cpp6
56 files changed, 647 insertions, 508 deletions
diff --git a/.gitignore b/.gitignore
index 8ace3c7123..479889cb78 100644
--- a/.gitignore
+++ b/.gitignore
@@ -102,6 +102,7 @@ linux-coverage-build
linux-build
win32-build
qa/pull-tester/tests_config.py
+qa/pull-tester/tests_config.ini
qa/cache/*
!src/leveldb*/Makefile
diff --git a/Makefile.am b/Makefile.am
index 6a8c1b761b..1ee2dfb734 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -227,9 +227,6 @@ EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
-# This file is problematic for out-of-tree builds if it exists.
-DISTCLEANFILES = qa/pull-tester/tests_config.pyc
-
.INTERMEDIATE: $(COVERAGE_INFO)
DISTCHECK_CONFIGURE_FLAGS = --enable-man
diff --git a/configure.ac b/configure.ac
index 346695043d..78129fb202 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, 13)
+define(_CLIENT_VERSION_MINOR, 14)
define(_CLIENT_VERSION_REVISION, 99)
define(_CLIENT_VERSION_BUILD, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
@@ -1087,7 +1087,7 @@ AC_SUBST(ZMQ_LIBS)
AC_SUBST(PROTOBUF_LIBS)
AC_SUBST(QR_LIBS)
AC_CONFIG_FILES([Makefile src/Makefile doc/man/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
-AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])
+AC_CONFIG_FILES([qa/pull-tester/tests_config.ini],[chmod +x qa/pull-tester/tests_config.ini])
AC_CONFIG_FILES([contrib/devtools/split-debug.sh],[chmod +x contrib/devtools/split-debug.sh])
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 6f43119ba2..00af4bdc6f 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -1,5 +1,5 @@
---
-name: "bitcoin-linux-0.13"
+name: "bitcoin-linux-0.15"
enable_cache: true
suites:
- "trusty"
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 991976d59e..05cc65414f 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -1,5 +1,5 @@
---
-name: "bitcoin-osx-0.13"
+name: "bitcoin-osx-0.15"
enable_cache: true
suites:
- "trusty"
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index fe01b5b957..6fead7c208 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -1,5 +1,5 @@
---
-name: "bitcoin-win-0.13"
+name: "bitcoin-win-0.15"
enable_cache: true
suites:
- "trusty"
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
index 5707188f23..ea398a27ea 100755
--- a/contrib/zmq/zmq_sub.py
+++ b/contrib/zmq/zmq_sub.py
@@ -1,43 +1,84 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+"""
+ ZMQ example using python3's asyncio
+
+ Bitcoin should be started with the command line arguments:
+ bitcoind -testnet -daemon \
+ -zmqpubhashblock=tcp://127.0.0.1:28332 \
+ -zmqpubrawtx=tcp://127.0.0.1:28332 \
+ -zmqpubhashtx=tcp://127.0.0.1:28332 \
+ -zmqpubhashblock=tcp://127.0.0.1:28332
+
+ We use the asyncio library here. `self.handle()` installs itself as a
+ future at the end of the function. Since it never returns with the event
+ loop having an empty stack of futures, this creates an infinite loop. An
+ alternative is to wrap the contents of `handle` inside `while True`.
+
+ A blocking example using python 2.7 can be obtained from the git history:
+ https://github.com/bitcoin/bitcoin/blob/37a7fe9e440b83e2364d5498931253937abe9294/contrib/zmq/zmq_sub.py
+"""
+
import binascii
+import asyncio
import zmq
+import zmq.asyncio
+import signal
import struct
+import sys
+
+if not (sys.version_info.major >= 3 and sys.version_info.minor >= 5):
+ print("This example only works with Python 3.5 and greater")
+ exit(1)
port = 28332
-zmqContext = zmq.Context()
-zmqSubSocket = zmqContext.socket(zmq.SUB)
-zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashblock")
-zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "hashtx")
-zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawblock")
-zmqSubSocket.setsockopt(zmq.SUBSCRIBE, "rawtx")
-zmqSubSocket.connect("tcp://127.0.0.1:%i" % port)
-
-try:
- while True:
- msg = zmqSubSocket.recv_multipart()
- topic = str(msg[0])
+class ZMQHandler():
+ def __init__(self):
+ self.loop = zmq.asyncio.install()
+ self.zmqContext = zmq.asyncio.Context()
+
+ self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx")
+ self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port)
+
+ async def handle(self) :
+ msg = await self.zmqSubSocket.recv_multipart()
+ topic = msg[0]
body = msg[1]
sequence = "Unknown"
if len(msg[-1]) == 4:
msgSequence = struct.unpack('<I', msg[-1])[-1]
sequence = str(msgSequence)
- if topic == "hashblock":
- print '- HASH BLOCK ('+sequence+') -'
- print binascii.hexlify(body)
- elif topic == "hashtx":
- print '- HASH TX ('+sequence+') -'
- print binascii.hexlify(body)
- elif topic == "rawblock":
- print '- RAW BLOCK HEADER ('+sequence+') -'
- print binascii.hexlify(body[:80])
- elif topic == "rawtx":
- print '- RAW TX ('+sequence+') -'
- print binascii.hexlify(body)
-
-except KeyboardInterrupt:
- zmqContext.destroy()
+ if topic == b"hashblock":
+ print('- HASH BLOCK ('+sequence+') -')
+ print(binascii.hexlify(body))
+ elif topic == b"hashtx":
+ print('- HASH TX ('+sequence+') -')
+ print(binascii.hexlify(body))
+ elif topic == b"rawblock":
+ print('- RAW BLOCK HEADER ('+sequence+') -')
+ print(binascii.hexlify(body[:80]))
+ elif topic == b"rawtx":
+ print('- RAW TX ('+sequence+') -')
+ print(binascii.hexlify(body))
+ # schedule ourselves to receive the next message
+ asyncio.ensure_future(self.handle())
+
+ def start(self):
+ self.loop.add_signal_handler(signal.SIGINT, self.stop)
+ self.loop.create_task(self.handle())
+ self.loop.run_forever()
+
+ def stop(self):
+ self.loop.stop()
+ self.zmqContext.destroy()
+
+daemon = ZMQHandler()
+daemon.start()
diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py
new file mode 100755
index 0000000000..a2ff64b29b
--- /dev/null
+++ b/contrib/zmq/zmq_sub3.4.py
@@ -0,0 +1,89 @@
+#!/usr/bin/env python3
+# Copyright (c) 2014-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+"""
+ ZMQ example using python3's asyncio
+
+ Bitcoin should be started with the command line arguments:
+ bitcoind -testnet -daemon \
+ -zmqpubhashblock=tcp://127.0.0.1:28332 \
+ -zmqpubrawtx=tcp://127.0.0.1:28332 \
+ -zmqpubhashtx=tcp://127.0.0.1:28332 \
+ -zmqpubhashblock=tcp://127.0.0.1:28332
+
+ We use the asyncio library here. `self.handle()` installs itself as a
+ future at the end of the function. Since it never returns with the event
+ loop having an empty stack of futures, this creates an infinite loop. An
+ alternative is to wrap the contents of `handle` inside `while True`.
+
+ The `@asyncio.coroutine` decorator and the `yield from` syntax found here
+ was introduced in python 3.4 and has been deprecated in favor of the `async`
+ and `await` keywords respectively.
+
+ A blocking example using python 2.7 can be obtained from the git history:
+ https://github.com/bitcoin/bitcoin/blob/37a7fe9e440b83e2364d5498931253937abe9294/contrib/zmq/zmq_sub.py
+"""
+
+import binascii
+import asyncio
+import zmq
+import zmq.asyncio
+import signal
+import struct
+import sys
+
+if not (sys.version_info.major >= 3 and sys.version_info.minor >= 4):
+ print("This example only works with Python 3.4 and greater")
+ exit(1)
+
+port = 28332
+
+class ZMQHandler():
+ def __init__(self):
+ self.loop = zmq.asyncio.install()
+ self.zmqContext = zmq.asyncio.Context()
+
+ self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock")
+ self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawtx")
+ self.zmqSubSocket.connect("tcp://127.0.0.1:%i" % port)
+
+ @asyncio.coroutine
+ def handle(self) :
+ msg = yield from self.zmqSubSocket.recv_multipart()
+ topic = msg[0]
+ body = msg[1]
+ sequence = "Unknown";
+ if len(msg[-1]) == 4:
+ msgSequence = struct.unpack('<I', msg[-1])[-1]
+ sequence = str(msgSequence)
+ if topic == b"hashblock":
+ print('- HASH BLOCK ('+sequence+') -')
+ print(binascii.hexlify(body))
+ elif topic == b"hashtx":
+ print('- HASH TX ('+sequence+') -')
+ print(binascii.hexlify(body))
+ elif topic == b"rawblock":
+ print('- RAW BLOCK HEADER ('+sequence+') -')
+ print(binascii.hexlify(body[:80]))
+ elif topic == b"rawtx":
+ print('- RAW TX ('+sequence+') -')
+ print(binascii.hexlify(body))
+ # schedule ourselves to receive the next message
+ asyncio.ensure_future(self.handle())
+
+ def start(self):
+ self.loop.add_signal_handler(signal.SIGINT, self.stop)
+ self.loop.create_task(self.handle())
+ self.loop.run_forever()
+
+ def stop(self):
+ self.loop.stop()
+ self.zmqContext.destroy()
+
+daemon = ZMQHandler()
+daemon.start()
diff --git a/depends/packages/qrencode.mk b/depends/packages/qrencode.mk
index 7b21247133..44fdf1c295 100644
--- a/depends/packages/qrencode.mk
+++ b/depends/packages/qrencode.mk
@@ -1,7 +1,7 @@
package=qrencode
$(package)_version=3.4.4
$(package)_download_path=https://fukuchi.org/works/qrencode/
-$(package)_file_name=qrencode-$(qrencode_version).tar.bz2
+$(package)_file_name=$(package)-$($(package)_version).tar.bz2
$(package)_sha256_hash=efe5188b1ddbcbf98763b819b146be6a90481aac30cfc8d858ab78a19cde1fa5
define $(package)_set_vars
diff --git a/doc/Doxyfile b/doc/Doxyfile
index ef55acdbc3..45436a6b15 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = "Bitcoin Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 0.13.99
+PROJECT_NUMBER = 0.14.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 a
diff --git a/doc/README.md b/doc/README.md
index 36684e5401..09f32bc09e 100644
--- a/doc/README.md
+++ b/doc/README.md
@@ -1,4 +1,4 @@
-Bitcoin Core 0.13.99
+Bitcoin Core 0.14.99
=====================
Setup
diff --git a/doc/README_windows.txt b/doc/README_windows.txt
index 74a05138a4..0e4c9ce04f 100644
--- a/doc/README_windows.txt
+++ b/doc/README_windows.txt
@@ -1,4 +1,4 @@
-Bitcoin Core 0.13.99
+Bitcoin Core 0.14.99
=====================
Intro
diff --git a/doc/man/bitcoin-cli.1 b/doc/man/bitcoin-cli.1
index 11b690cf85..0493241b1e 100644
--- a/doc/man/bitcoin-cli.1
+++ b/doc/man/bitcoin-cli.1
@@ -1,19 +1,17 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5.
-.TH BITCOIN-CLI "1" "September 2016" "bitcoin-cli v0.13.0.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH BITCOIN-CLI "1" "February 2017" "bitcoin-cli v0.14.99.0" "User Commands"
.SH NAME
-bitcoin-cli \- manual page for bitcoin-cli v0.13.0.0
+bitcoin-cli \- manual page for bitcoin-cli v0.14.99.0
.SH DESCRIPTION
-Bitcoin Core RPC client version v0.13.0.0
+Bitcoin Core RPC client version v0.14.99.0
.SS "Usage:"
.TP
bitcoin\-cli [options] <command> [params]
Send command to Bitcoin Core
-.TP
-bitcoin\-cli [options] help
-List commands
-.TP
-bitcoin\-cli [options] help <command>
-Get help for a command
+.IP
+bitcoin\-cli [options] \fB\-named\fR <command> [name=value] ... Send command to Bitcoin Core (with named arguments)
+bitcoin\-cli [options] help List commands
+bitcoin\-cli [options] help <command> Get help for a command
.SH OPTIONS
.HP
\-?
@@ -40,6 +38,10 @@ Enter regression test mode, which uses a special chain in which blocks
can be solved instantly. This is intended for regression testing
tools and app development.
.HP
+\fB\-named\fR
+.IP
+Pass named instead of positional arguments (default: false)
+.HP
\fB\-rpcconnect=\fR<ip>
.IP
Send commands to node running on <ip> (default: 127.0.0.1)
@@ -69,7 +71,7 @@ Timeout during HTTP requests (default: 900)
Read extra arguments from standard input, one per line until EOF/Ctrl\-D
(recommended for sensitive information such as passphrases)
.SH COPYRIGHT
-Copyright (C) 2009-2016 The Bitcoin Core developers
+Copyright (C) 2009-2017 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org> for further information about the software.
@@ -77,8 +79,8 @@ The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
-or <http://www.opensource.org/licenses/mit-license.php>.
+or <https://opensource.org/licenses/MIT>
This product includes software developed by the OpenSSL Project for use in the
-OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
-by Eric Young and UPnP software written by Thomas Bernard.
+OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by
+Eric Young and UPnP software written by Thomas Bernard.
diff --git a/doc/man/bitcoin-qt.1 b/doc/man/bitcoin-qt.1
index 2129a151e2..ce252612e5 100644
--- a/doc/man/bitcoin-qt.1
+++ b/doc/man/bitcoin-qt.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5.
-.TH BITCOIN-QT "1" "September 2016" "bitcoin-qt v0.13.0.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH BITCOIN-QT "1" "February 2017" "bitcoin-qt v0.14.99.0" "User Commands"
.SH NAME
-bitcoin-qt \- manual page for bitcoin-qt v0.13.0.0
+bitcoin-qt \- manual page for bitcoin-qt v0.14.99.0
.SH DESCRIPTION
-Bitcoin Core version v0.13.0.0 (64\-bit)
+Bitcoin Core version v0.14.99.0 (64\-bit)
Usage:
.IP
bitcoin\-qt [command\-line options]
@@ -27,13 +27,14 @@ long fork (%s in cmd is replaced by message)
Execute command when the best block changes (%s in cmd is replaced by
block hash)
.HP
-\fB\-checkblocks=\fR<n>
+\fB\-assumevalid=\fR<hex>
.IP
-How many blocks to check at startup (default: 288, 0 = all)
-.HP
-\fB\-checklevel=\fR<n>
-.IP
-How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
+If this block is in the chain assume that it and its ancestors are valid
+and potentially skip their script verification (0 to verify all,
+default:
+00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90,
+testnet:
+00000000000128796ee387cf110ccb9d2f36cffaf7f73079c995377c65ac0dcc)
.HP
\fB\-conf=\fR<file>
.IP
@@ -62,11 +63,16 @@ Keep the transaction memory pool below <n> megabytes (default: 300)
\fB\-mempoolexpiry=\fR<n>
.IP
Do not keep transactions in the mempool longer than <n> hours (default:
-72)
+336)
+.HP
+\fB\-blockreconstructionextratxn=\fR<n>
+.IP
+Extra transactions to keep in memory for compact block reconstructions
+(default: 100)
.HP
\fB\-par=\fR<n>
.IP
-Set the number of script verification threads (\fB\-4\fR to 16, 0 = auto, <0 =
+Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
\fB\-pid=\fR<file>
@@ -75,13 +81,15 @@ Specify pid file (default: bitcoind.pid)
.HP
\fB\-prune=\fR<n>
.IP
-Reduce storage requirements by enabling pruning (deleting) of old blocks.
-This allows the pruneblockchain RPC to be called to delete specific blocks,
-and enables automatic pruning of old blocks if a target size in MiB is
-provided. This mode is incompatible with \fB\-txindex\fR and \fB\-rescan\fR.
-Warning: Reverting this setting requires re\-downloading the entire blockchain.
-(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >550 =
-automatically prune block files to stay under the specified target size in MiB)
+Reduce storage requirements by enabling pruning (deleting) of old
+blocks. This allows the pruneblockchain RPC to be called to
+delete specific blocks, and enables automatic pruning of old
+blocks if a target size in MiB is provided. This mode is
+incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this
+setting requires re\-downloading the entire blockchain. (default:
+0 = disable pruning blocks, 1 = allow manual pruning via RPC,
+>550 = automatically prune block files to stay under the
+specified target size in MiB)
.HP
\fB\-reindex\-chainstate\fR
.IP
@@ -123,7 +131,8 @@ for IPv6
.HP
\fB\-connect=\fR<ip>
.IP
-Connect only to the specified node(s)
+Connect only to the specified node(s); \fB\-noconnect\fR or \fB\-connect\fR=\fI\,0\/\fR alone to
+disable automatic connections
.HP
\fB\-discover\fR
.IP
@@ -137,7 +146,7 @@ Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (def
\fB\-dnsseed\fR
.IP
Query for peer addresses via DNS lookup, if low on addresses (default: 1
-unless \fB\-connect\fR)
+unless \fB\-connect\fR/\-noconnect)
.HP
\fB\-externalip=\fR<ip>
.IP
@@ -149,7 +158,8 @@ Always query for peer addresses via DNS lookup (default: 0)
.HP
\fB\-listen\fR
.IP
-Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
+Accept connections from outside (default: 1 if no \fB\-proxy\fR or
+\fB\-connect\fR/\-noconnect)
.HP
\fB\-listenonion\fR
.IP
@@ -204,6 +214,11 @@ Connect through SOCKS5 proxy
Randomize credentials for every proxy connection. This enables Tor
stream isolation (default: 1)
.HP
+\fB\-rpcserialversion\fR
+.IP
+Sets the serialization of raw transaction or block hex returned in
+non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1)
+.HP
\fB\-seednode=\fR<ip>
.IP
Connect to a node to retrieve peer addresses, and disconnect
@@ -221,17 +236,22 @@ Tor control port to use if onion listening enabled (default:
.IP
Tor control port password (default: empty)
.HP
+\fB\-upnp\fR
+.IP
+Use UPnP to map the listening port (default: 0)
+.HP
\fB\-whitebind=\fR<addr>
.IP
Bind to given address and whitelist peers connecting to it. Use
[host]:port notation for IPv6
.HP
-\fB\-whitelist=\fR<netmask>
+\fB\-whitelist=\fR<IP address or network>
.IP
-Whitelist peers connecting from the given netmask or IP address. Can be
-specified multiple times. Whitelisted peers cannot be DoS banned
-and their transactions are always relayed, even if they are
-already in the mempool, useful e.g. for a gateway
+Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or
+CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple
+times. Whitelisted peers cannot be DoS banned and their
+transactions are always relayed, even if they are already in the
+mempool, useful e.g. for a gateway
.HP
\fB\-whitelistrelay\fR
.IP
@@ -240,7 +260,7 @@ not relaying transactions (default: 1)
.HP
\fB\-whitelistforcerelay\fR
.IP
-Force relay of transactions from whitelisted peers even they violate
+Force relay of transactions from whitelisted peers even if they violate
local relay policy (default: 1)
.HP
\fB\-maxuploadtarget=\fR<n>
@@ -287,13 +307,17 @@ Spend unconfirmed change when sending transactions (default: 1)
\fB\-txconfirmtarget=\fR<n>
.IP
If paytxfee is not set, include enough fee so transactions begin
-confirmation on average within n blocks (default: 2)
+confirmation on average within n blocks (default: 6)
.HP
\fB\-usehd\fR
.IP
Use hierarchical deterministic key generation (HD) after BIP32. Only has
effect during wallet creation/first start (default: 1)
.HP
+\fB\-walletrbf\fR
+.IP
+Send transactions with full\-RBF opt\-in enabled (default: 0)
+.HP
\fB\-upgradewallet\fR
.IP
Upgrade wallet to latest format on startup
@@ -347,9 +371,9 @@ Append comment to the user agent string
Output debugging information (default: 0, supplying <category> is
optional). If <category> is not supplied or if <category> = 1,
output all debugging information.<category> can be: addrman,
-alert, bench, coindb, db, http, libevent, lock, mempool,
-mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins,
-tor, zmq, qt.
+alert, bench, cmpctblock, coindb, db, http, libevent, lock,
+mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc,
+selectcoins, tor, zmq, qt.
.HP
\fB\-help\-debug\fR
.IP
@@ -422,6 +446,11 @@ Set maximum block size in bytes (default: 750000)
.IP
Set maximum size of high\-priority/low\-fee transactions in bytes
(default: 0)
+.HP
+\fB\-blockmintxfee=\fR<amt>
+.IP
+Set lowest fee rate (in BTC/kB) for transactions to be included in block
+creation. (default: 0.00001)
.PP
RPC server options:
.HP
@@ -455,8 +484,10 @@ Password for JSON\-RPC connections
.IP
Username and hashed password for JSON\-RPC connections. The field
<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
-canonical python script is included in share/rpcuser. This option
-can be specified multiple times
+canonical python script is included in share/rpcuser. The client
+then connects normally using the
+rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This
+option can be specified multiple times
.HP
\fB\-rpcport=\fR<port>
.IP
@@ -500,7 +531,7 @@ Show splash screen on startup (default: 1)
.IP
Reset all settings changed in the GUI
.SH COPYRIGHT
-Copyright (C) 2009-2016 The Bitcoin Core developers
+Copyright (C) 2009-2017 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org> for further information about the software.
@@ -508,8 +539,8 @@ The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
-or <http://www.opensource.org/licenses/mit-license.php>.
+or <https://opensource.org/licenses/MIT>
This product includes software developed by the OpenSSL Project for use in the
-OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
-by Eric Young and UPnP software written by Thomas Bernard.
+OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by
+Eric Young and UPnP software written by Thomas Bernard.
diff --git a/doc/man/bitcoin-tx.1 b/doc/man/bitcoin-tx.1
index 5c4e31e7f7..98adf2f5b1 100644
--- a/doc/man/bitcoin-tx.1
+++ b/doc/man/bitcoin-tx.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5.
-.TH BITCOIN-TX "1" "September 2016" "bitcoin-tx v0.13.0.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH BITCOIN-TX "1" "February 2017" "bitcoin-tx v0.14.99.0" "User Commands"
.SH NAME
-bitcoin-tx \- manual page for bitcoin-tx v0.13.0.0
+bitcoin-tx \- manual page for bitcoin-tx v0.14.99.0
.SH DESCRIPTION
-Bitcoin Core bitcoin\-tx utility version v0.13.0.0
+Bitcoin Core bitcoin\-tx utility version v0.14.99.0
.SS "Usage:"
.TP
bitcoin\-tx [options] <hex\-tx> [commands]
@@ -67,13 +67,28 @@ outaddr=VALUE:ADDRESS
.IP
Add address\-based output to TX
.IP
+outpubkey=VALUE:PUBKEY[:FLAGS]
+.IP
+Add pay\-to\-pubkey output to TX. Optionally add the "W" flag to produce a
+pay\-to\-witness\-pubkey\-hash output. Optionally add the "S" flag to
+wrap the output in a pay\-to\-script\-hash.
+.IP
outdata=[VALUE:]DATA
.IP
Add data\-based output to TX
.IP
-outscript=VALUE:SCRIPT
+outscript=VALUE:SCRIPT[:FLAGS]
+.IP
+Add raw script output to TX. Optionally add the "W" flag to produce a
+pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to
+wrap the output in a pay\-to\-script\-hash.
+.IP
+outmultisig=VALUE:REQUIRED:PUBKEYS:PUBKEY1:PUBKEY2:....[:FLAGS]
.IP
-Add raw script output to TX
+Add Pay To n\-of\-m Multi\-sig output to TX. n = REQUIRED, m = PUBKEYS.
+Optionally add the "W" flag to produce a
+pay\-to\-witness\-script\-hash output. Optionally add the "S" flag to
+wrap the output in a pay\-to\-script\-hash.
.IP
sign=SIGHASH\-FLAGS
.IP
@@ -92,7 +107,7 @@ set=NAME:JSON\-STRING
.IP
Set register NAME to given JSON\-STRING
.SH COPYRIGHT
-Copyright (C) 2009-2016 The Bitcoin Core developers
+Copyright (C) 2009-2017 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org> for further information about the software.
@@ -100,8 +115,8 @@ The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
-or <http://www.opensource.org/licenses/mit-license.php>.
+or <https://opensource.org/licenses/MIT>
This product includes software developed by the OpenSSL Project for use in the
-OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
-by Eric Young and UPnP software written by Thomas Bernard.
+OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by
+Eric Young and UPnP software written by Thomas Bernard.
diff --git a/doc/man/bitcoind.1 b/doc/man/bitcoind.1
index 47539d8131..fb066e0c6f 100644
--- a/doc/man/bitcoind.1
+++ b/doc/man/bitcoind.1
@@ -1,9 +1,9 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.5.
-.TH BITCOIND "1" "September 2016" "bitcoind v0.13.0.0" "User Commands"
+.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
+.TH BITCOIND "1" "February 2017" "bitcoind v0.14.99.0" "User Commands"
.SH NAME
-bitcoind \- manual page for bitcoind v0.13.0.0
+bitcoind \- manual page for bitcoind v0.14.99.0
.SH DESCRIPTION
-Bitcoin Core Daemon version v0.13.0.0
+Bitcoin Core Daemon version v0.14.99.0
.SS "Usage:"
.TP
bitcoind [options]
@@ -28,13 +28,14 @@ long fork (%s in cmd is replaced by message)
Execute command when the best block changes (%s in cmd is replaced by
block hash)
.HP
-\fB\-checkblocks=\fR<n>
+\fB\-assumevalid=\fR<hex>
.IP
-How many blocks to check at startup (default: 288, 0 = all)
-.HP
-\fB\-checklevel=\fR<n>
-.IP
-How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
+If this block is in the chain assume that it and its ancestors are valid
+and potentially skip their script verification (0 to verify all,
+default:
+00000000000000000013176bf8d7dfeab4e1db31dc93bc311b436e82ab226b90,
+testnet:
+00000000000128796ee387cf110ccb9d2f36cffaf7f73079c995377c65ac0dcc)
.HP
\fB\-conf=\fR<file>
.IP
@@ -67,11 +68,16 @@ Keep the transaction memory pool below <n> megabytes (default: 300)
\fB\-mempoolexpiry=\fR<n>
.IP
Do not keep transactions in the mempool longer than <n> hours (default:
-72)
+336)
+.HP
+\fB\-blockreconstructionextratxn=\fR<n>
+.IP
+Extra transactions to keep in memory for compact block reconstructions
+(default: 100)
.HP
\fB\-par=\fR<n>
.IP
-Set the number of script verification threads (\fB\-4\fR to 16, 0 = auto, <0 =
+Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 =
leave that many cores free, default: 0)
.HP
\fB\-pid=\fR<file>
@@ -80,13 +86,15 @@ Specify pid file (default: bitcoind.pid)
.HP
\fB\-prune=\fR<n>
.IP
-Reduce storage requirements by enabling pruning (deleting) of old blocks.
-This allows the pruneblockchain RPC to be called to delete specific blocks,
-and enables automatic pruning of old blocks if a target size in MiB is
-provided. This mode is incompatible with \fB\-txindex\fR and \fB\-rescan\fR.
-Warning: Reverting this setting requires re\-downloading the entire blockchain.
-(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >550 =
-automatically prune block files to stay under the specified target size in MiB)
+Reduce storage requirements by enabling pruning (deleting) of old
+blocks. This allows the pruneblockchain RPC to be called to
+delete specific blocks, and enables automatic pruning of old
+blocks if a target size in MiB is provided. This mode is
+incompatible with \fB\-txindex\fR and \fB\-rescan\fR. Warning: Reverting this
+setting requires re\-downloading the entire blockchain. (default:
+0 = disable pruning blocks, 1 = allow manual pruning via RPC,
+>550 = automatically prune block files to stay under the
+specified target size in MiB)
.HP
\fB\-reindex\-chainstate\fR
.IP
@@ -128,7 +136,8 @@ for IPv6
.HP
\fB\-connect=\fR<ip>
.IP
-Connect only to the specified node(s)
+Connect only to the specified node(s); \fB\-noconnect\fR or \fB\-connect\fR=\fI\,0\/\fR alone to
+disable automatic connections
.HP
\fB\-discover\fR
.IP
@@ -142,7 +151,7 @@ Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (def
\fB\-dnsseed\fR
.IP
Query for peer addresses via DNS lookup, if low on addresses (default: 1
-unless \fB\-connect\fR)
+unless \fB\-connect\fR/\-noconnect)
.HP
\fB\-externalip=\fR<ip>
.IP
@@ -154,7 +163,8 @@ Always query for peer addresses via DNS lookup (default: 0)
.HP
\fB\-listen\fR
.IP
-Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR)
+Accept connections from outside (default: 1 if no \fB\-proxy\fR or
+\fB\-connect\fR/\-noconnect)
.HP
\fB\-listenonion\fR
.IP
@@ -209,6 +219,11 @@ Connect through SOCKS5 proxy
Randomize credentials for every proxy connection. This enables Tor
stream isolation (default: 1)
.HP
+\fB\-rpcserialversion\fR
+.IP
+Sets the serialization of raw transaction or block hex returned in
+non\-verbose mode, non\-segwit(0) or segwit(1) (default: 1)
+.HP
\fB\-seednode=\fR<ip>
.IP
Connect to a node to retrieve peer addresses, and disconnect
@@ -226,17 +241,22 @@ Tor control port to use if onion listening enabled (default:
.IP
Tor control port password (default: empty)
.HP
+\fB\-upnp\fR
+.IP
+Use UPnP to map the listening port (default: 0)
+.HP
\fB\-whitebind=\fR<addr>
.IP
Bind to given address and whitelist peers connecting to it. Use
[host]:port notation for IPv6
.HP
-\fB\-whitelist=\fR<netmask>
+\fB\-whitelist=\fR<IP address or network>
.IP
-Whitelist peers connecting from the given netmask or IP address. Can be
-specified multiple times. Whitelisted peers cannot be DoS banned
-and their transactions are always relayed, even if they are
-already in the mempool, useful e.g. for a gateway
+Whitelist peers connecting from the given IP address (e.g. 1.2.3.4) or
+CIDR notated network (e.g. 1.2.3.0/24). Can be specified multiple
+times. Whitelisted peers cannot be DoS banned and their
+transactions are always relayed, even if they are already in the
+mempool, useful e.g. for a gateway
.HP
\fB\-whitelistrelay\fR
.IP
@@ -245,7 +265,7 @@ not relaying transactions (default: 1)
.HP
\fB\-whitelistforcerelay\fR
.IP
-Force relay of transactions from whitelisted peers even they violate
+Force relay of transactions from whitelisted peers even if they violate
local relay policy (default: 1)
.HP
\fB\-maxuploadtarget=\fR<n>
@@ -292,13 +312,17 @@ Spend unconfirmed change when sending transactions (default: 1)
\fB\-txconfirmtarget=\fR<n>
.IP
If paytxfee is not set, include enough fee so transactions begin
-confirmation on average within n blocks (default: 2)
+confirmation on average within n blocks (default: 6)
.HP
\fB\-usehd\fR
.IP
Use hierarchical deterministic key generation (HD) after BIP32. Only has
effect during wallet creation/first start (default: 1)
.HP
+\fB\-walletrbf\fR
+.IP
+Send transactions with full\-RBF opt\-in enabled (default: 0)
+.HP
\fB\-upgradewallet\fR
.IP
Upgrade wallet to latest format on startup
@@ -352,9 +376,9 @@ Append comment to the user agent string
Output debugging information (default: 0, supplying <category> is
optional). If <category> is not supplied or if <category> = 1,
output all debugging information.<category> can be: addrman,
-alert, bench, coindb, db, http, libevent, lock, mempool,
-mempoolrej, net, proxy, prune, rand, reindex, rpc, selectcoins,
-tor, zmq.
+alert, bench, cmpctblock, coindb, db, http, libevent, lock,
+mempool, mempoolrej, net, proxy, prune, rand, reindex, rpc,
+selectcoins, tor, zmq.
.HP
\fB\-help\-debug\fR
.IP
@@ -427,6 +451,11 @@ Set maximum block size in bytes (default: 750000)
.IP
Set maximum size of high\-priority/low\-fee transactions in bytes
(default: 0)
+.HP
+\fB\-blockmintxfee=\fR<amt>
+.IP
+Set lowest fee rate (in BTC/kB) for transactions to be included in block
+creation. (default: 0.00001)
.PP
RPC server options:
.HP
@@ -460,8 +489,10 @@ Password for JSON\-RPC connections
.IP
Username and hashed password for JSON\-RPC connections. The field
<userpw> comes in the format: <USERNAME>:<SALT>$<HASH>. A
-canonical python script is included in share/rpcuser. This option
-can be specified multiple times
+canonical python script is included in share/rpcuser. The client
+then connects normally using the
+rpcuser=<USERNAME>/rpcpassword=<PASSWORD> pair of arguments. This
+option can be specified multiple times
.HP
\fB\-rpcport=\fR<port>
.IP
@@ -479,7 +510,7 @@ option can be specified multiple times
.IP
Set the number of threads to service RPC calls (default: 4)
.SH COPYRIGHT
-Copyright (C) 2009-2016 The Bitcoin Core developers
+Copyright (C) 2009-2017 The Bitcoin Core developers
Please contribute if you find Bitcoin Core useful. Visit
<https://bitcoincore.org> for further information about the software.
@@ -487,8 +518,8 @@ The source code is available from <https://github.com/bitcoin/bitcoin>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file COPYING
-or <http://www.opensource.org/licenses/mit-license.php>.
+or <https://opensource.org/licenses/MIT>
This product includes software developed by the OpenSSL Project for use in the
-OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
-by Eric Young and UPnP software written by Thomas Bernard.
+OpenSSL Toolkit <https://www.openssl.org> and cryptographic software written by
+Eric Young and UPnP software written by Thomas Bernard.
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 0ea9e1949e..eaa0b330eb 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -33,117 +33,6 @@ frequently tested on them.
Notable changes
===============
-Low-level RPC changes
-----------------------
-
-- `importprunedfunds` only accepts two required arguments. Some versions accept
- an optional third arg, which was always ignored. Make sure to never pass more
- than two arguments.
-
-Fee Estimation Changes
-----------------------
-
-- Since 0.13.2 fee estimation for a confirmation target of 1 block has been
- disabled. This is only a minor behavior change as there was often insufficient
- data for this target anyway. `estimatefee 1` will now always return -1 and
- `estimatesmartfee 1` will start searching at a target of 2.
-
-- The default target for fee estimation is changed to 6 blocks in both the GUI
- (previously 25) and for RPC calls (previously 2).
-
-Removal of Priority Estimation
--------------------------------
-
-- Estimation of "priority" needed for a transaction to be included within a target
- number of blocks has been removed. The rpc calls are deprecated and will either
- return -1 or 1e24 appropriately. The format for `fee_estimates.dat` has also
- changed to no longer save these priority estimates. It will automatically be
- converted to the new format which is not readable by prior versions of the
- software.
-
-- The concept of "priority" (coin age) transactions is planned to be removed in
- the next major version. To prepare for this, the default for the rate limit of
- priority transactions (`-limitfreerelay`) has been set to `0` kB/minute. This
- is not to be confused with the `prioritisetransaction` RPC which will remain
- supported for adding fee deltas to transactions.
-
-P2P connection management
---------------------------
-
-- Peers manually added through the addnode option or addnode RPC now have their own
- limit of eight connections which does not compete with other inbound or outbound
- connection usage and is not subject to the maxconnections limitation.
-
-- New connections to manually added peers are much faster.
-
-Introduction of assumed-valid blocks
--------------------------------------
-
-- A significant portion of the initial block download time is spent verifying
- scripts/signatures. Although the verification must pass to ensure the security
- of the system, no other result from this verification is needed: If the node
- knew the history of a given block were valid it could skip checking scripts
- for its ancestors.
-
-- A new configuration option 'assumevalid' is provided to express this knowledge
- to the software. Unlike the 'checkpoints' in the past this setting does not
- force the use of a particular chain: chains that are consistent with it are
- processed quicker, but other chains are still accepted if they'd otherwise
- be chosen as best. Also unlike 'checkpoints' the user can configure which
- block history is assumed true, this means that even outdated software can
- sync more quickly if the setting is updated by the user.
-
-- Because the validity of a chain history is a simple objective fact it is much
- easier to review this setting. As a result the software ships with a default
- value adjusted to match the current chain shortly before release. The use
- of this default value can be disabled by setting -assumevalid=0
-
-0.14.0 Change log
-=================
-
-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
-
-UTXO set query (`GET /rest/getutxos/<checkmempool>/<txid>-<n>/<txid>-<n>/.../<txid>-<n>.<bin|hex|json>`) responses
-were changed to return status code HTTP_BAD_REQUEST (400) instead of HTTP_INTERNAL_SERVER_ERROR (500) when requests
-contain invalid parameters.
-
-The first boolean argument to `getaddednodeinfo` has been removed. This is an incompatible change.
-
-Call "getmininginfo" loses the "testnet" field in favor of the more generic "chain" (which has been present for years).
-
-### Configuration and command-line options
-
-### Block and transaction handling
-
-### P2P protocol and network code
-
-### Validation
-
-### Build system
-
-### Wallet
-
-0.14.0 Fundrawtransaction change address reuse
-==============================================
-
-Before 0.14, `fundrawtransaction` was by default wallet stateless. In almost all cases `fundrawtransaction` does add a change-output to the outputs of the funded transaction. Before 0.14, the used keypool key was never marked as change-address key and directly returned to the keypool (leading to address reuse).
-Before 0.14, calling `getnewaddress` directly after `fundrawtransaction` did generate the same address as the change-output address.
-
-Since 0.14, fundrawtransaction does reserve the change-output-key from the keypool by default (optional by setting `reserveChangeKey`, default = `true`)
-
-Users should also consider using `getrawchangeaddress()` in conjunction with `fundrawtransaction`'s `changeAddress` option.
-
-### GUI
-
-### Tests
-
-### Miscellaneous
-
Credits
=======
diff --git a/qa/README.md b/qa/README.md
index 225207cc1c..f4dce7af5c 100644
--- a/qa/README.md
+++ b/qa/README.md
@@ -39,12 +39,12 @@ Run the regression test suite with
Run all possible tests with
- qa/pull-tester/rpc-tests.py -extended
+ qa/pull-tester/rpc-tests.py --extended
By default, tests will be run in parallel. To specify how many jobs to run,
-append `-parallel=n` (default n=4).
+append `--jobs=n` (default n=4).
-If you want to create a basic coverage report for the rpc test suite, append `--coverage`.
+If you want to create a basic coverage report for the RPC test suite, append `--coverage`.
Possible options, which apply to each individual test run:
@@ -83,5 +83,5 @@ killall bitcoind
Writing tests
=============
You are encouraged to write tests for new or existing features.
-Further information about the test framework and individual rpc
+Further information about the test framework and individual RPC
tests is found in [qa/rpc-tests](/qa/rpc-tests).
diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py
index 20ab0fdd1d..973165c4c8 100755
--- a/qa/pull-tester/rpc-tests.py
+++ b/qa/pull-tester/rpc-tests.py
@@ -2,25 +2,21 @@
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
"""
-Run Regression Test Suite
+rpc-tests.py - run regression test suite
This module calls down into individual test cases via subprocess. It will
-forward all unrecognized arguments onto the individual test scripts, other
-than:
+forward all unrecognized arguments onto the individual test scripts.
- - `-extended`: run the "extended" test suite in addition to the basic one.
- - `-win`: signal that this is running in a Windows environment, and we
- should run the tests.
- - `--coverage`: this generates a basic coverage report for the RPC
- interface.
+RPC tests are disabled on Windows by default. Use --force to run them anyway.
For a description of arguments recognized by test scripts, see
`qa/pull-tester/test_framework/test_framework.py:BitcoinTestFramework.main`.
"""
+import argparse
+import configparser
import os
import time
import shutil
@@ -29,77 +25,9 @@ import subprocess
import tempfile
import re
-sys.path.append("qa/pull-tester/")
-from tests_config import *
-
-BOLD = ("","")
-if os.name == 'posix':
- # primitive formatting on supported
- # terminal via ANSI escape sequences:
- BOLD = ('\033[0m', '\033[1m')
-
-RPC_TESTS_DIR = SRCDIR + '/qa/rpc-tests/'
-
-#If imported values are not defined then set to zero (or disabled)
-if 'ENABLE_WALLET' not in vars():
- ENABLE_WALLET=0
-if 'ENABLE_BITCOIND' not in vars():
- ENABLE_BITCOIND=0
-if 'ENABLE_UTILS' not in vars():
- ENABLE_UTILS=0
-if 'ENABLE_ZMQ' not in vars():
- ENABLE_ZMQ=0
-
-ENABLE_COVERAGE=0
-
-#Create a set to store arguments and create the passon string
-opts = set()
-passon_args = []
-PASSON_REGEX = re.compile("^--")
-PARALLEL_REGEX = re.compile('^-parallel=')
-
-print_help = False
-run_parallel = 4
-
-for arg in sys.argv[1:]:
- if arg == "--help" or arg == "-h" or arg == "-?":
- print_help = True
- break
- if arg == '--coverage':
- ENABLE_COVERAGE = 1
- elif PASSON_REGEX.match(arg):
- passon_args.append(arg)
- elif PARALLEL_REGEX.match(arg):
- run_parallel = int(arg.split(sep='=', maxsplit=1)[1])
- else:
- opts.add(arg)
-
-#Set env vars
-if "BITCOIND" not in os.environ:
- os.environ["BITCOIND"] = BUILDDIR + '/src/bitcoind' + EXEEXT
-
-if EXEEXT == ".exe" and "-win" not in opts:
- # https://github.com/bitcoin/bitcoin/commit/d52802551752140cf41f0d9a225a43e84404d3e9
- # https://github.com/bitcoin/bitcoin/pull/5677#issuecomment-136646964
- print("Win tests currently disabled by default. Use -win option to enable")
- sys.exit(0)
-
-if not (ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1):
- print("No rpc tests to run. Wallet, utils, and bitcoind must all be enabled")
- sys.exit(0)
-
-# python3-zmq may not be installed. Handle this gracefully and with some helpful info
-if ENABLE_ZMQ:
- try:
- import zmq
- except ImportError:
- print("ERROR: \"import zmq\" failed. Set ENABLE_ZMQ=0 or "
- "to run zmq tests, see dependency info in /qa/README.md.")
- # ENABLE_ZMQ=0
- raise
-
-testScripts = [
- # longest test should go first, to favor running tests in parallel
+BASE_SCRIPTS= [
+ # Scripts that are run by the travis build process.
+ # Longest test should go first, to favor running tests in parallel
'wallet-hd.py',
'walletbackup.py',
# vv Tests less than 5m vv
@@ -156,10 +84,15 @@ testScripts = [
'listsinceblock.py',
'p2p-leaktests.py',
]
-if ENABLE_ZMQ:
- testScripts.append('zmq_test.py')
-testScriptsExt = [
+ZMQ_SCRIPTS = [
+ # ZMQ test can only be run if bitcoin was built with zmq-enabled.
+ # call rpc_tests.py with -nozmq to explicitly exclude these tests.
+ "zmq_test.py"]
+
+EXTENDED_SCRIPTS = [
+ # These tests are not run by the travis build process.
+ # Longest test should go first, to favor running tests in parallel
'pruning.py',
# vv Tests less than 20m vv
'smartfees.py',
@@ -189,44 +122,126 @@ testScriptsExt = [
'replace-by-fee.py',
]
+ALL_SCRIPTS = BASE_SCRIPTS + ZMQ_SCRIPTS + EXTENDED_SCRIPTS
+
+def main():
+ # Parse arguments and pass through unrecognised args
+ parser = argparse.ArgumentParser(add_help=False,
+ usage='%(prog)s [rpc-test.py options] [script options] [scripts]',
+ description=__doc__,
+ epilog='''
+ Help text and arguments for individual test script:''',
+ formatter_class=argparse.RawTextHelpFormatter)
+ parser.add_argument('--coverage', action='store_true', help='generate a basic coverage report for the RPC interface')
+ parser.add_argument('--extended', action='store_true', help='run the extended test suite in addition to the basic tests')
+ parser.add_argument('--force', '-f', action='store_true', help='run tests even on platforms where they are disabled by default (e.g. windows).')
+ parser.add_argument('--help', '-h', '-?', action='store_true', help='print help text and exit')
+ parser.add_argument('--jobs', '-j', type=int, default=4, help='how many test scripts to run in parallel. Default=4.')
+ parser.add_argument('--nozmq', action='store_true', help='do not run the zmq tests')
+ args, unknown_args = parser.parse_known_args()
+
+ # Create a set to store arguments and create the passon string
+ tests = set(arg for arg in unknown_args if arg[:2] != "--")
+ passon_args = [arg for arg in unknown_args if arg[:2] == "--"]
+
+ # Read config generated by configure.
+ config = configparser.ConfigParser()
+ config.read_file(open(os.path.dirname(__file__) + "/tests_config.ini"))
+
+ enable_wallet = config["components"].getboolean("ENABLE_WALLET")
+ enable_utils = config["components"].getboolean("ENABLE_UTILS")
+ enable_bitcoind = config["components"].getboolean("ENABLE_BITCOIND")
+ enable_zmq = config["components"].getboolean("ENABLE_ZMQ") and not args.nozmq
+
+ if config["environment"]["EXEEXT"] == ".exe" and not args.force:
+ # https://github.com/bitcoin/bitcoin/commit/d52802551752140cf41f0d9a225a43e84404d3e9
+ # https://github.com/bitcoin/bitcoin/pull/5677#issuecomment-136646964
+ print("Tests currently disabled on Windows by default. Use --force option to enable")
+ sys.exit(0)
-def runtests():
- test_list = []
- if '-extended' in opts:
- test_list = testScripts + testScriptsExt
- elif len(opts) == 0 or (len(opts) == 1 and "-win" in opts):
- test_list = testScripts
- else:
- for t in testScripts + testScriptsExt:
- if t in opts or re.sub(".py$", "", t) in opts:
- test_list.append(t)
+ if not (enable_wallet and enable_utils and enable_bitcoind):
+ print("No rpc tests to run. Wallet, utils, and bitcoind must all be enabled")
+ print("Rerun `configure` with -enable-wallet, -with-utils and -with-daemon and rerun make")
+ sys.exit(0)
+
+ # python3-zmq may not be installed. Handle this gracefully and with some helpful info
+ if enable_zmq:
+ try:
+ import zmq
+ except ImportError:
+ print("ERROR: \"import zmq\" failed. Use -nozmq to run without the ZMQ tests."
+ "To run zmq tests, see dependency info in /qa/README.md.")
+ raise
+
+ # Build list of tests
+ if tests:
+ # Individual tests have been specified. Run specified tests that exist
+ # in the ALL_SCRIPTS list. Accept the name with or without .py extension.
+ test_list = [t for t in ALL_SCRIPTS if
+ (t in tests or re.sub(".py$", "", t) in tests)]
+ if not test_list:
+ print("No valid test scripts specified. Check that your test is in one "
+ "of the test lists in rpc-tests.py or run rpc-tests.py with no arguments to run all tests")
+ print("Scripts not found:")
+ print(tests)
+ sys.exit(0)
- if print_help:
- # Only print help of the first script and exit
- subprocess.check_call((RPC_TESTS_DIR + test_list[0]).split() + ['-h'])
+ else:
+ # No individual tests have been specified. Run base tests, and
+ # optionally ZMQ tests and extended tests.
+ test_list = BASE_SCRIPTS
+ if enable_zmq:
+ test_list += ZMQ_SCRIPTS
+ if args.extended:
+ test_list += EXTENDED_SCRIPTS
+ # TODO: BASE_SCRIPTS and EXTENDED_SCRIPTS are sorted by runtime
+ # (for parallel running efficiency). This combined list will is no
+ # longer sorted.
+
+ if args.help:
+ # Print help for rpc-tests.py, then print help of the first script and exit.
+ parser.print_help()
+ subprocess.check_call((config["environment"]["SRCDIR"] + '/qa/rpc-tests/' + test_list[0]).split() + ['-h'])
sys.exit(0)
- coverage = None
+ run_tests(test_list, config["environment"]["SRCDIR"], config["environment"]["BUILDDIR"], config["environment"]["EXEEXT"], args.jobs, args.coverage, passon_args)
+
+def run_tests(test_list, src_dir, build_dir, exeext, jobs=1, enable_coverage=False, args=[]):
+ BOLD = ("","")
+ if os.name == 'posix':
+ # primitive formatting on supported
+ # terminal via ANSI escape sequences:
+ BOLD = ('\033[0m', '\033[1m')
+
+ #Set env vars
+ if "BITCOIND" not in os.environ:
+ os.environ["BITCOIND"] = build_dir + '/src/bitcoind' + exeext
+
+ tests_dir = src_dir + '/qa/rpc-tests/'
- if ENABLE_COVERAGE:
+ flags = ["--srcdir=" + src_dir] + args
+ flags.append("--cachedir=%s/qa/cache" % build_dir)
+
+ if enable_coverage:
coverage = RPCCoverage()
- print("Initializing coverage directory at %s\n" % coverage.dir)
- flags = ["--srcdir=%s/src" % BUILDDIR] + passon_args
- flags.append("--cachedir=%s/qa/cache" % BUILDDIR)
- if coverage:
flags.append(coverage.flag)
+ print("Initializing coverage directory at %s\n" % coverage.dir)
+ else:
+ coverage = None
- if len(test_list) > 1 and run_parallel > 1:
+ if len(test_list) > 1 and jobs > 1:
# Populate cache
- subprocess.check_output([RPC_TESTS_DIR + 'create_cache.py'] + flags)
+ subprocess.check_output([tests_dir + 'create_cache.py'] + flags)
#Run Tests
- max_len_name = len(max(test_list, key=len))
+ all_passed = True
time_sum = 0
time0 = time.time()
- job_queue = RPCTestHandler(run_parallel, test_list, flags)
+
+ job_queue = RPCTestHandler(jobs, tests_dir, test_list, flags)
+
+ max_len_name = len(max(test_list, key=len))
results = BOLD[1] + "%s | %s | %s\n\n" % ("TEST".ljust(max_len_name), "PASSED", "DURATION") + BOLD[0]
- all_passed = True
for _ in range(len(test_list)):
(name, stdout, stderr, passed, duration) = job_queue.get_next()
all_passed = all_passed and passed
@@ -235,8 +250,10 @@ def runtests():
print('\n' + BOLD[1] + name + BOLD[0] + ":")
print('' if passed else stdout + '\n', end='')
print('' if stderr == '' else 'stderr:\n' + stderr + '\n', end='')
- results += "%s | %s | %s s\n" % (name.ljust(max_len_name), str(passed).ljust(6), duration)
print("Pass: %s%s%s, Duration: %s s\n" % (BOLD[1], passed, BOLD[0], duration))
+
+ results += "%s | %s | %s s\n" % (name.ljust(max_len_name), str(passed).ljust(6), duration)
+
results += BOLD[1] + "\n%s | %s | %s s (accumulated)" % ("ALL".ljust(max_len_name), str(all_passed).ljust(6), time_sum) + BOLD[0]
print(results)
print("\nRuntime: %s s" % (int(time.time() - time0)))
@@ -249,15 +266,15 @@ def runtests():
sys.exit(not all_passed)
-
class RPCTestHandler:
"""
Trigger the testscrips passed in via the list.
"""
- def __init__(self, num_tests_parallel, test_list=None, flags=None):
+ def __init__(self, num_tests_parallel, tests_dir, test_list=None, flags=None):
assert(num_tests_parallel >= 1)
self.num_jobs = num_tests_parallel
+ self.tests_dir = tests_dir
self.test_list = test_list
self.flags = flags
self.num_running = 0
@@ -277,7 +294,7 @@ class RPCTestHandler:
log_stderr = tempfile.SpooledTemporaryFile(max_size=2**16)
self.jobs.append((t,
time.time(),
- subprocess.Popen((RPC_TESTS_DIR + t).split() + self.flags + port_seed,
+ subprocess.Popen((self.tests_dir + t).split() + self.flags + port_seed,
universal_newlines=True,
stdout=log_stdout,
stderr=log_stderr),
@@ -342,10 +359,10 @@ class RPCCoverage(object):
"""
# This is shared from `qa/rpc-tests/test-framework/coverage.py`
- REFERENCE_FILENAME = 'rpc_interface.txt'
- COVERAGE_FILE_PREFIX = 'coverage.'
+ reference_filename = 'rpc_interface.txt'
+ coverage_file_prefix = 'coverage.'
- coverage_ref_filename = os.path.join(self.dir, REFERENCE_FILENAME)
+ coverage_ref_filename = os.path.join(self.dir, reference_filename)
coverage_filenames = set()
all_cmds = set()
covered_cmds = set()
@@ -358,7 +375,7 @@ class RPCCoverage(object):
for root, dirs, files in os.walk(self.dir):
for filename in files:
- if filename.startswith(COVERAGE_FILE_PREFIX):
+ if filename.startswith(coverage_file_prefix):
coverage_filenames.add(os.path.join(root, filename))
for filename in coverage_filenames:
@@ -369,4 +386,4 @@ class RPCCoverage(object):
if __name__ == '__main__':
- runtests()
+ main()
diff --git a/qa/pull-tester/tests_config.ini.in b/qa/pull-tester/tests_config.ini.in
new file mode 100644
index 0000000000..e3e457d0b1
--- /dev/null
+++ b/qa/pull-tester/tests_config.ini.in
@@ -0,0 +1,18 @@
+# Copyright (c) 2013-2016 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+# These environment variables are set by the build process and read by
+# rpc-tests.py
+
+[environment]
+SRCDIR=@abs_top_srcdir@
+BUILDDIR=@abs_top_builddir@
+EXEEXT=@EXEEXT@
+
+[components]
+# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
+@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
+@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=true
+@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
+@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=true
diff --git a/qa/pull-tester/tests_config.py.in b/qa/pull-tester/tests_config.py.in
deleted file mode 100644
index a0d0a3d98a..0000000000
--- a/qa/pull-tester/tests_config.py.in
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2013-2016 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-SRCDIR="@abs_top_srcdir@"
-BUILDDIR="@abs_top_builddir@"
-EXEEXT="@EXEEXT@"
-
-# These will turn into comments if they were disabled when configuring.
-@ENABLE_WALLET_TRUE@ENABLE_WALLET=1
-@BUILD_BITCOIN_UTILS_TRUE@ENABLE_UTILS=1
-@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=1
-@ENABLE_ZMQ_TRUE@ENABLE_ZMQ=1
diff --git a/qa/rpc-tests/bip68-112-113-p2p.py b/qa/rpc-tests/bip68-112-113-p2p.py
index c96b746c9d..e03bc1c37b 100755
--- a/qa/rpc-tests/bip68-112-113-p2p.py
+++ b/qa/rpc-tests/bip68-112-113-p2p.py
@@ -5,7 +5,7 @@
from test_framework.test_framework import ComparisonTestFramework
from test_framework.util import *
-from test_framework.mininode import ToHex, CTransaction, NetworkThread
+from test_framework.mininode import ToHex, NetworkThread
from test_framework.blocktools import create_coinbase, create_block
from test_framework.comptool import TestInstance, TestManager
from test_framework.script import *
diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py
index a12bf10ebd..1b099f9339 100755
--- a/qa/rpc-tests/bip68-sequence.py
+++ b/qa/rpc-tests/bip68-sequence.py
@@ -9,8 +9,6 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
-from test_framework.script import *
-from test_framework.mininode import *
from test_framework.blocktools import *
SEQUENCE_LOCKTIME_DISABLE_FLAG = (1<<31)
diff --git a/qa/rpc-tests/bumpfee.py b/qa/rpc-tests/bumpfee.py
index ac282796c1..e02cb4c300 100755
--- a/qa/rpc-tests/bumpfee.py
+++ b/qa/rpc-tests/bumpfee.py
@@ -8,10 +8,8 @@ from test_framework.test_framework import BitcoinTestFramework
from test_framework import blocktools
from test_framework.mininode import CTransaction
from test_framework.util import *
-from test_framework.util import *
import io
-import time
# Sequence number that is BIP 125 opt-in and BIP 68-compliant
BIP125_SEQUENCE_NUMBER = 0xfffffffd
diff --git a/qa/rpc-tests/p2p-compactblocks.py b/qa/rpc-tests/p2p-compactblocks.py
index 9151ecf5de..47dfe4f5fd 100755
--- a/qa/rpc-tests/p2p-compactblocks.py
+++ b/qa/rpc-tests/p2p-compactblocks.py
@@ -7,7 +7,6 @@ from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
from test_framework.blocktools import create_block, create_coinbase, add_witness_commitment
-from test_framework.siphash import siphash256
from test_framework.script import CScript, OP_TRUE
'''
diff --git a/qa/rpc-tests/rpcnamedargs.py b/qa/rpc-tests/rpcnamedargs.py
index da2d8f040f..f9a40955c0 100755
--- a/qa/rpc-tests/rpcnamedargs.py
+++ b/qa/rpc-tests/rpcnamedargs.py
@@ -3,17 +3,11 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-from decimal import Decimal
-
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.authproxy import JSONRPCException
from test_framework.util import (
assert_equal,
assert_raises_jsonrpc,
- assert_is_hex_string,
- assert_is_hash_string,
start_nodes,
- connect_nodes_bi,
)
diff --git a/qa/rpc-tests/segwit.py b/qa/rpc-tests/segwit.py
index 299f5387e7..d6831e00e3 100755
--- a/qa/rpc-tests/segwit.py
+++ b/qa/rpc-tests/segwit.py
@@ -130,10 +130,14 @@ class SegWitTest(BitcoinTestFramework):
print("Verify sigops are counted in GBT with pre-BIP141 rules before the fork")
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
tmpl = self.nodes[0].getblocktemplate({})
+ assert(tmpl['sizelimit'] == 1000000)
+ assert('weightlimit' not in tmpl)
assert(tmpl['sigoplimit'] == 20000)
assert(tmpl['transactions'][0]['hash'] == txid)
assert(tmpl['transactions'][0]['sigops'] == 2)
tmpl = self.nodes[0].getblocktemplate({'rules':['segwit']})
+ assert(tmpl['sizelimit'] == 1000000)
+ assert('weightlimit' not in tmpl)
assert(tmpl['sigoplimit'] == 20000)
assert(tmpl['transactions'][0]['hash'] == txid)
assert(tmpl['transactions'][0]['sigops'] == 2)
@@ -241,6 +245,8 @@ class SegWitTest(BitcoinTestFramework):
print("Verify sigops are counted in GBT with BIP141 rules after the fork")
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
tmpl = self.nodes[0].getblocktemplate({'rules':['segwit']})
+ assert(tmpl['sizelimit'] >= 3999577) # actual maximum size is lower due to minimum mandatory non-witness data
+ assert(tmpl['weightlimit'] == 4000000)
assert(tmpl['sigoplimit'] == 80000)
assert(tmpl['transactions'][0]['txid'] == txid)
assert(tmpl['transactions'][0]['sigops'] == 8)
@@ -250,6 +256,8 @@ class SegWitTest(BitcoinTestFramework):
try:
tmpl = self.nodes[0].getblocktemplate({})
assert(len(tmpl['transactions']) == 1) # Doesn't include witness tx
+ assert(tmpl['sizelimit'] == 1000000)
+ assert('weightlimit' not in tmpl)
assert(tmpl['sigoplimit'] == 20000)
assert(tmpl['transactions'][0]['hash'] == txid)
assert(tmpl['transactions'][0]['sigops'] == 2)
diff --git a/qa/rpc-tests/wallet-accounts.py b/qa/rpc-tests/wallet-accounts.py
index c51181e4f8..45a9db0571 100755
--- a/qa/rpc-tests/wallet-accounts.py
+++ b/qa/rpc-tests/wallet-accounts.py
@@ -6,9 +6,7 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
start_nodes,
- start_node,
assert_equal,
- connect_nodes_bi,
)
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 9bab3a2026..a3d02afcdb 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -136,17 +136,17 @@ bool AppInit(int argc, char* argv[])
if (!AppInitBasicSetup())
{
// InitError will have been called with detailed error, which ends up on console
- exit(1);
+ exit(EXIT_FAILURE);
}
if (!AppInitParameterInteraction())
{
// InitError will have been called with detailed error, which ends up on console
- exit(1);
+ exit(EXIT_FAILURE);
}
if (!AppInitSanityChecks())
{
// InitError will have been called with detailed error, which ends up on console
- exit(1);
+ exit(EXIT_FAILURE);
}
if (GetBoolArg("-daemon", false))
{
diff --git a/src/chainparams.cpp b/src/chainparams.cpp
index 383d9849af..8c38558829 100644
--- a/src/chainparams.cpp
+++ b/src/chainparams.cpp
@@ -125,6 +125,7 @@ public:
vSeeds.push_back(CDNSSeedData("dashjr.org", "dnsseed.bitcoin.dashjr.org")); // Luke Dashjr
vSeeds.push_back(CDNSSeedData("bitcoinstats.com", "seed.bitcoinstats.com", true)); // Christian Decker, supports x1 - xf
vSeeds.push_back(CDNSSeedData("bitcoin.jonasschnelli.ch", "seed.bitcoin.jonasschnelli.ch", true)); // Jonas Schnelli, only supports x1, x5, x9, and xd
+ vSeeds.push_back(CDNSSeedData("petertodd.org", "seed.btc.petertodd.org", true)); // Peter Todd, only supports x1, x5, x9, and xd
base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,0);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,5);
diff --git a/src/clientversion.h b/src/clientversion.h
index 0b27bb1bdf..69154d546d 100644
--- a/src/clientversion.h
+++ b/src/clientversion.h
@@ -15,7 +15,7 @@
//! These need to be macros, as clientversion.cpp's and bitcoin*-res.rc's voodoo requires it
#define CLIENT_VERSION_MAJOR 0
-#define CLIENT_VERSION_MINOR 13
+#define CLIENT_VERSION_MINOR 14
#define CLIENT_VERSION_REVISION 99
#define CLIENT_VERSION_BUILD 0
diff --git a/src/hash.h b/src/hash.h
index 3b86fcc033..eacb8f04fe 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -25,9 +25,9 @@ public:
static const size_t OUTPUT_SIZE = CSHA256::OUTPUT_SIZE;
void Finalize(unsigned char hash[OUTPUT_SIZE]) {
- unsigned char buf[sha.OUTPUT_SIZE];
+ unsigned char buf[CSHA256::OUTPUT_SIZE];
sha.Finalize(buf);
- sha.Reset().Write(buf, sha.OUTPUT_SIZE).Finalize(hash);
+ sha.Reset().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(hash);
}
CHash256& Write(const unsigned char *data, size_t len) {
@@ -49,9 +49,9 @@ public:
static const size_t OUTPUT_SIZE = CRIPEMD160::OUTPUT_SIZE;
void Finalize(unsigned char hash[OUTPUT_SIZE]) {
- unsigned char buf[sha.OUTPUT_SIZE];
+ unsigned char buf[CSHA256::OUTPUT_SIZE];
sha.Finalize(buf);
- CRIPEMD160().Write(buf, sha.OUTPUT_SIZE).Finalize(hash);
+ CRIPEMD160().Write(buf, CSHA256::OUTPUT_SIZE).Finalize(hash);
}
CHash160& Write(const unsigned char *data, size_t len) {
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index daac7a0f1a..8ac6925acd 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -112,7 +112,7 @@ static bool multiUserAuthorized(std::string strUserPass)
std::string strSalt = vFields[1];
std::string strHash = vFields[2];
- unsigned int KEY_SIZE = 32;
+ static const unsigned int KEY_SIZE = 32;
unsigned char out[KEY_SIZE];
CHMAC_SHA256(reinterpret_cast<const unsigned char*>(strSalt.c_str()), strSalt.size()).Write(reinterpret_cast<const unsigned char*>(strPass.c_str()), strPass.size()).Finalize(out);
diff --git a/src/init.cpp b/src/init.cpp
index 7c108ac4a6..cf265180ff 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -934,7 +934,7 @@ bool AppInitParameterInteraction()
int64_t nMempoolSizeMin = GetArg("-limitdescendantsize", DEFAULT_DESCENDANT_SIZE_LIMIT) * 1000 * 40;
if (nMempoolSizeMax < 0 || nMempoolSizeMax < nMempoolSizeMin)
return InitError(strprintf(_("-maxmempool must be at least %d MB"), std::ceil(nMempoolSizeMin / 1000000.0)));
- // incremental relay fee sets the minimimum feerate increase necessary for BIP 125 replacement in the mempool
+ // incremental relay fee sets the minimum feerate increase necessary for BIP 125 replacement in the mempool
// and the amount the mempool min fee increases above the feerate of txs evicted due to mempool limiting.
if (IsArgSet("-incrementalrelayfee"))
{
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 8fd2a8efd2..fc9a6ed0be 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -198,6 +198,14 @@ struct timeval MillisToTimeval(int64_t nTimeout)
return timeout;
}
+enum class IntrRecvError {
+ OK,
+ Timeout,
+ Disconnected,
+ NetworkError,
+ Interrupted
+};
+
/**
* Read bytes from socket. This will either read the full number of bytes requested
* or return False on error or timeout.
@@ -209,7 +217,7 @@ struct timeval MillisToTimeval(int64_t nTimeout)
*
* @note This function requires that hSocket is in non-blocking mode.
*/
-bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSocket)
+static IntrRecvError InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSocket)
{
int64_t curTime = GetTimeMillis();
int64_t endTime = curTime + timeout;
@@ -222,12 +230,12 @@ bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSock
len -= ret;
data += ret;
} else if (ret == 0) { // Unexpected disconnection
- return false;
+ return IntrRecvError::Disconnected;
} else { // Other error or blocking
int nErr = WSAGetLastError();
if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL) {
if (!IsSelectableSocket(hSocket)) {
- return false;
+ return IntrRecvError::NetworkError;
}
struct timeval tval = MillisToTimeval(std::min(endTime - curTime, maxWait));
fd_set fdset;
@@ -235,17 +243,17 @@ bool static InterruptibleRecv(char* data, size_t len, int timeout, SOCKET& hSock
FD_SET(hSocket, &fdset);
int nRet = select(hSocket + 1, &fdset, NULL, NULL, &tval);
if (nRet == SOCKET_ERROR) {
- return false;
+ return IntrRecvError::NetworkError;
}
} else {
- return false;
+ return IntrRecvError::NetworkError;
}
}
if (interruptSocks5Recv)
- return false;
+ return IntrRecvError::Interrupted;
curTime = GetTimeMillis();
}
- return len == 0;
+ return len == 0 ? IntrRecvError::OK : IntrRecvError::Timeout;
}
struct ProxyCredentials
@@ -272,6 +280,7 @@ std::string Socks5ErrorString(int err)
/** Connect using SOCKS5 (as described in RFC1928) */
static bool Socks5(const std::string& strDest, int port, const ProxyCredentials *auth, SOCKET& hSocket)
{
+ IntrRecvError recvr;
LogPrint("net", "SOCKS5 connecting %s\n", strDest);
if (strDest.size() > 255) {
CloseSocket(hSocket);
@@ -294,7 +303,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
return error("Error sending to proxy");
}
char pchRet1[2];
- if (!InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
+ if ((recvr = InterruptibleRecv(pchRet1, 2, SOCKS5_RECV_TIMEOUT, hSocket)) != IntrRecvError::OK) {
CloseSocket(hSocket);
LogPrintf("Socks5() connect to %s:%d failed: InterruptibleRecv() timeout or other failure\n", strDest, port);
return false;
@@ -320,7 +329,7 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
}
LogPrint("proxy", "SOCKS5 sending proxy authentication %s:%s\n", auth->username, auth->password);
char pchRetA[2];
- if (!InterruptibleRecv(pchRetA, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
+ if ((recvr = InterruptibleRecv(pchRetA, 2, SOCKS5_RECV_TIMEOUT, hSocket)) != IntrRecvError::OK) {
CloseSocket(hSocket);
return error("Error reading proxy authentication response");
}
@@ -349,9 +358,16 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
return error("Error sending to proxy");
}
char pchRet2[4];
- if (!InterruptibleRecv(pchRet2, 4, SOCKS5_RECV_TIMEOUT, hSocket)) {
+ if ((recvr = InterruptibleRecv(pchRet2, 4, SOCKS5_RECV_TIMEOUT, hSocket)) != IntrRecvError::OK) {
CloseSocket(hSocket);
- return error("Error reading proxy response");
+ if (recvr == IntrRecvError::Timeout) {
+ /* If a timeout happens here, this effectively means we timed out while connecting
+ * to the remote node. This is very common for Tor, so do not print an
+ * error message. */
+ return false;
+ } else {
+ return error("Error while reading proxy response");
+ }
}
if (pchRet2[0] != 0x05) {
CloseSocket(hSocket);
@@ -370,26 +386,26 @@ static bool Socks5(const std::string& strDest, int port, const ProxyCredentials
char pchRet3[256];
switch (pchRet2[3])
{
- case 0x01: ret = InterruptibleRecv(pchRet3, 4, SOCKS5_RECV_TIMEOUT, hSocket); break;
- case 0x04: ret = InterruptibleRecv(pchRet3, 16, SOCKS5_RECV_TIMEOUT, hSocket); break;
+ case 0x01: recvr = InterruptibleRecv(pchRet3, 4, SOCKS5_RECV_TIMEOUT, hSocket); break;
+ case 0x04: recvr = InterruptibleRecv(pchRet3, 16, SOCKS5_RECV_TIMEOUT, hSocket); break;
case 0x03:
{
- ret = InterruptibleRecv(pchRet3, 1, SOCKS5_RECV_TIMEOUT, hSocket);
- if (!ret) {
+ recvr = InterruptibleRecv(pchRet3, 1, SOCKS5_RECV_TIMEOUT, hSocket);
+ if (recvr != IntrRecvError::OK) {
CloseSocket(hSocket);
return error("Error reading from proxy");
}
int nRecv = pchRet3[0];
- ret = InterruptibleRecv(pchRet3, nRecv, SOCKS5_RECV_TIMEOUT, hSocket);
+ recvr = InterruptibleRecv(pchRet3, nRecv, SOCKS5_RECV_TIMEOUT, hSocket);
break;
}
default: CloseSocket(hSocket); return error("Error: malformed proxy response");
}
- if (!ret) {
+ if (recvr != IntrRecvError::OK) {
CloseSocket(hSocket);
return error("Error reading from proxy");
}
- if (!InterruptibleRecv(pchRet3, 2, SOCKS5_RECV_TIMEOUT, hSocket)) {
+ if ((recvr = InterruptibleRecv(pchRet3, 2, SOCKS5_RECV_TIMEOUT, hSocket)) != IntrRecvError::OK) {
CloseSocket(hSocket);
return error("Error reading from proxy");
}
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 1c1acb6b10..be79a67990 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -518,7 +518,10 @@ void BitcoinGUI::setClientModel(ClientModel *_clientModel)
// Propagate cleared model to child objects
rpcConsole->setClientModel(nullptr);
#ifdef ENABLE_WALLET
- walletFrame->setClientModel(nullptr);
+ if (walletFrame)
+ {
+ walletFrame->setClientModel(nullptr);
+ }
#endif // ENABLE_WALLET
unitDisplayControl->setOptionsModel(nullptr);
}
diff --git a/src/qt/forms/intro.ui b/src/qt/forms/intro.ui
index e4ff3da1ab..cfdd8482e3 100644
--- a/src/qt/forms/intro.ui
+++ b/src/qt/forms/intro.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>674</width>
- <height>363</height>
+ <height>415</height>
</rect>
</property>
<property name="windowTitle">
@@ -55,9 +55,6 @@
</item>
<item>
<widget class="QLabel" name="sizeWarningLabel">
- <property name="text">
- <string>%1 will download and store a copy of the Bitcoin block chain. At least %2GB of data will be stored in this directory, and it will grow over time. The wallet will also be stored in this directory.</string>
- </property>
<property name="wordWrap">
<bool>true</bool>
</property>
@@ -204,6 +201,36 @@
</layout>
</item>
<item>
+ <widget class="QLabel" name="lblExplanation1">
+ <property name="text">
+ <string>When you click OK, %1 will begin to download and process the full %4 block chain (%2GB) starting with the earliest transactions in %3 when %4 initially launched.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lblExplanation2">
+ <property name="text">
+ <string>This initial synchronisation is very demanding, and may expose hardware problems with your computer that had previously gone unnoticed. Each time you run %1, it will continue downloading where it left off.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lblExplanation3">
+ <property name="text">
+ <string>If you have chosen to limit block chain storage (pruning), the historical data must still be downloaded and processed, but will be deleted afterward to keep your disk usage low.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp
index e0961fe7dd..fd3dcac424 100644
--- a/src/qt/guiutil.cpp
+++ b/src/qt/guiutil.cpp
@@ -37,9 +37,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
-#if BOOST_FILESYSTEM_VERSION >= 3
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
-#endif
#include <boost/scoped_array.hpp>
#include <QAbstractItemView>
@@ -67,9 +65,7 @@
#include <QFontDatabase>
#endif
-#if BOOST_FILESYSTEM_VERSION >= 3
static boost::filesystem::detail::utf8_codecvt_facet utf8;
-#endif
#if defined(Q_OS_MAC)
extern double NSAppKitVersionNumber;
@@ -863,7 +859,6 @@ void setClipboard(const QString& str)
QApplication::clipboard()->setText(str, QClipboard::Selection);
}
-#if BOOST_FILESYSTEM_VERSION >= 3
boost::filesystem::path qstringToBoostPath(const QString &path)
{
return boost::filesystem::path(path.toStdString(), utf8);
@@ -873,18 +868,6 @@ QString boostPathToQString(const boost::filesystem::path &path)
{
return QString::fromStdString(path.string(utf8));
}
-#else
-#warning Conversion between boost path and QString can use invalid character encoding with boost_filesystem v2 and older
-boost::filesystem::path qstringToBoostPath(const QString &path)
-{
- return boost::filesystem::path(path.toStdString());
-}
-
-QString boostPathToQString(const boost::filesystem::path &path)
-{
- return QString::fromStdString(path.string());
-}
-#endif
QString formatDurationStr(int secs)
{
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 6b5ac47f20..4939648ff0 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -124,16 +124,34 @@ Intro::Intro(QWidget *parent) :
ui->setupUi(this);
ui->welcomeLabel->setText(ui->welcomeLabel->text().arg(tr(PACKAGE_NAME)));
ui->storageLabel->setText(ui->storageLabel->text().arg(tr(PACKAGE_NAME)));
+
+ ui->lblExplanation1->setText(ui->lblExplanation1->text()
+ .arg(tr(PACKAGE_NAME))
+ .arg(BLOCK_CHAIN_SIZE)
+ .arg(2009)
+ .arg(tr("Bitcoin"))
+ );
+ ui->lblExplanation2->setText(ui->lblExplanation2->text().arg(tr(PACKAGE_NAME)));
+
uint64_t pruneTarget = std::max<int64_t>(0, GetArg("-prune", 0));
requiredSpace = BLOCK_CHAIN_SIZE;
+ QString storageRequiresMsg = tr("At least %1 GB of data will be stored in this directory, and it will grow over time.");
if (pruneTarget) {
uint64_t prunedGBs = std::ceil(pruneTarget * 1024 * 1024.0 / GB_BYTES);
if (prunedGBs <= requiredSpace) {
requiredSpace = prunedGBs;
+ storageRequiresMsg = tr("Approximately %1 GB of data will be stored in this directory.");
}
+ ui->lblExplanation3->setVisible(true);
+ } else {
+ ui->lblExplanation3->setVisible(false);
}
requiredSpace += CHAIN_STATE_SIZE;
- ui->sizeWarningLabel->setText(ui->sizeWarningLabel->text().arg(tr(PACKAGE_NAME)).arg(requiredSpace));
+ ui->sizeWarningLabel->setText(
+ tr("%1 will download and store a copy of the Bitcoin block chain.").arg(tr(PACKAGE_NAME)) + " " +
+ storageRequiresMsg.arg(requiredSpace) + " " +
+ tr("The wallet will also be stored in this directory.")
+ );
startThread();
}
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 688e8123af..dd75f12076 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -55,8 +55,6 @@ const char* BIP70_MESSAGE_PAYMENTREQUEST = "PaymentRequest";
const char* BIP71_MIMETYPE_PAYMENT = "application/bitcoin-payment";
const char* BIP71_MIMETYPE_PAYMENTACK = "application/bitcoin-paymentack";
const char* BIP71_MIMETYPE_PAYMENTREQUEST = "application/bitcoin-paymentrequest";
-// BIP70 max payment request size in bytes (DoS protection)
-const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
struct X509StoreDeleter {
void operator()(X509_STORE* b) {
diff --git a/src/qt/paymentserver.h b/src/qt/paymentserver.h
index 9d46280a37..7c6d4507fe 100644
--- a/src/qt/paymentserver.h
+++ b/src/qt/paymentserver.h
@@ -53,7 +53,7 @@ class QUrl;
QT_END_NAMESPACE
// BIP70 max payment request size in bytes (DoS protection)
-extern const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE;
+static const qint64 BIP70_MAX_PAYMENTREQUEST_SIZE = 50000;
class PaymentServer : public QObject
{
diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp
index 5bdd84e555..29bdb37682 100644
--- a/src/rpc/client.cpp
+++ b/src/rpc/client.cpp
@@ -24,7 +24,7 @@ public:
};
/**
- * Specifiy a (method, idx, name) here if the argument is a non-string RPC
+ * Specify a (method, idx, name) here if the argument is a non-string RPC
* argument and needs to be converted from JSON.
*
* @note Parameter indexes start from 0.
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index c594daca0d..7708771d00 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -282,7 +282,7 @@ UniValue prioritisetransaction(const JSONRPCRequest& request)
uint256 hash = ParseHashStr(request.params[0].get_str(), "txid");
CAmount nAmount = request.params[2].get_int64();
- mempool.PrioritiseTransaction(hash, request.params[0].get_str(), request.params[1].get_real(), nAmount);
+ mempool.PrioritiseTransaction(hash, request.params[1].get_real(), nAmount);
return true;
}
@@ -676,8 +676,12 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
nSigOpLimit /= WITNESS_SCALE_FACTOR;
}
result.push_back(Pair("sigoplimit", nSigOpLimit));
- result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE));
- result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT));
+ if (fPreSegWit) {
+ result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_BASE_SIZE));
+ } else {
+ result.push_back(Pair("sizelimit", (int64_t)MAX_BLOCK_SERIALIZED_SIZE));
+ result.push_back(Pair("weightlimit", (int64_t)MAX_BLOCK_WEIGHT));
+ }
result.push_back(Pair("curtime", pblock->GetBlockTime()));
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight+1)));
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index 6fd50127bd..140cb4840b 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -445,7 +445,7 @@ UniValue setmocktime(const JSONRPCRequest& request)
// this could have an effect on mempool time-based eviction, as well as
// IsCurrentForFeeEstimation() and IsInitialBlockDownload().
// TODO: figure out the right way to synchronize around mocktime, and
- // ensure all callsites of GetTime() are accessing this safely.
+ // ensure all call sites of GetTime() are accessing this safely.
LOCK(cs_main);
RPCTypeCheck(request.params, boost::assign::list_of(UniValue::VNUM));
diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp
index 283d458c8d..0b763acd45 100644
--- a/src/rpc/server.cpp
+++ b/src/rpc/server.cpp
@@ -18,8 +18,6 @@
#include <boost/bind.hpp>
#include <boost/filesystem.hpp>
#include <boost/foreach.hpp>
-#include <boost/iostreams/concepts.hpp>
-#include <boost/iostreams/stream.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/thread.hpp>
diff --git a/src/test/test_bitcoin.cpp b/src/test/test_bitcoin.cpp
index 4785415e3c..51fc6ae0ba 100644
--- a/src/test/test_bitcoin.cpp
+++ b/src/test/test_bitcoin.cpp
@@ -156,12 +156,12 @@ CTxMemPoolEntry TestMemPoolEntryHelper::FromTx(const CTransaction &txn, CTxMemPo
void Shutdown(void* parg)
{
- exit(0);
+ exit(EXIT_SUCCESS);
}
void StartShutdown()
{
- exit(0);
+ exit(EXIT_SUCCESS);
}
bool ShutdownRequested()
diff --git a/src/test/testutil.cpp b/src/test/testutil.cpp
index 304cffb798..e6d8622979 100644
--- a/src/test/testutil.cpp
+++ b/src/test/testutil.cpp
@@ -11,23 +11,5 @@
#include <boost/filesystem.hpp>
boost::filesystem::path GetTempPath() {
-#if BOOST_FILESYSTEM_VERSION == 3
return boost::filesystem::temp_directory_path();
-#else
- // TODO: remove when we don't support filesystem v2 anymore
- boost::filesystem::path path;
-#ifdef WIN32
- char pszPath[MAX_PATH] = "";
-
- if (GetTempPathA(MAX_PATH, pszPath))
- path = boost::filesystem::path(pszPath);
-#else
- path = boost::filesystem::path("/tmp");
-#endif
- if (path.empty() || !boost::filesystem::is_directory(path)) {
- LogPrintf("GetTempPath(): failed to find temp path\n");
- return boost::filesystem::path("");
- }
- return path;
-#endif
}
diff --git a/src/txmempool.cpp b/src/txmempool.cpp
index 5842dd88d8..942a6fcce7 100644
--- a/src/txmempool.cpp
+++ b/src/txmempool.cpp
@@ -920,7 +920,7 @@ CTxMemPool::ReadFeeEstimates(CAutoFile& filein)
return true;
}
-void CTxMemPool::PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta)
+void CTxMemPool::PrioritiseTransaction(const uint256& hash, double dPriorityDelta, const CAmount& nFeeDelta)
{
{
LOCK(cs);
@@ -940,7 +940,7 @@ void CTxMemPool::PrioritiseTransaction(const uint256 hash, const std::string str
}
}
}
- LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", strHash, dPriorityDelta, FormatMoney(nFeeDelta));
+ LogPrintf("PrioritiseTransaction: %s priority += %f, fee += %d\n", hash.ToString(), dPriorityDelta, FormatMoney(nFeeDelta));
}
void CTxMemPool::ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta) const
diff --git a/src/txmempool.h b/src/txmempool.h
index db1a02455f..a7ecb64390 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -555,7 +555,7 @@ public:
bool HasNoInputsOf(const CTransaction& tx) const;
/** Affect CreateNewBlock prioritisation of transactions */
- void PrioritiseTransaction(const uint256 hash, const std::string strHash, double dPriorityDelta, const CAmount& nFeeDelta);
+ void PrioritiseTransaction(const uint256& hash, double dPriorityDelta, const CAmount& nFeeDelta);
void ApplyDeltas(const uint256 hash, double &dPriorityDelta, CAmount &nFeeDelta) const;
void ClearPrioritisation(const uint256 hash);
diff --git a/src/util.cpp b/src/util.cpp
index ba157625d8..78c353dfe5 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -214,12 +214,13 @@ void OpenDebugLog()
assert(vMsgsBeforeOpenLog);
boost::filesystem::path pathDebug = GetDataDir() / "debug.log";
fileout = fopen(pathDebug.string().c_str(), "a");
- if (fileout) setbuf(fileout, NULL); // unbuffered
-
- // dump buffered messages from before we opened the log
- while (!vMsgsBeforeOpenLog->empty()) {
- FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);
- vMsgsBeforeOpenLog->pop_front();
+ if (fileout) {
+ setbuf(fileout, NULL); // unbuffered
+ // dump buffered messages from before we opened the log
+ while (!vMsgsBeforeOpenLog->empty()) {
+ FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);
+ vMsgsBeforeOpenLog->pop_front();
+ }
}
delete vMsgsBeforeOpenLog;
@@ -838,4 +839,4 @@ std::string CopyrightHolders(const std::string& strPrefix)
strCopyrightHolders += "\n" + strPrefix + "The Bitcoin Core developers";
}
return strCopyrightHolders;
-}
+} \ No newline at end of file
diff --git a/src/utiltime.h b/src/utiltime.h
index 05c6790495..cc3290c631 100644
--- a/src/utiltime.h
+++ b/src/utiltime.h
@@ -11,7 +11,7 @@
/**
* GetTimeMicros() and GetTimeMillis() both return the system time, but in
- * different units. GetTime() returns the sytem time in seconds, but also
+ * different units. GetTime() returns the system time in seconds, but also
* supports mocktime, where the time can be specified by the user, eg for
* testing (eg with the setmocktime rpc, or -mocktime argument).
*
diff --git a/src/validation.cpp b/src/validation.cpp
index dbb42ab8c4..e84b1a7281 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -1429,7 +1429,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi
// Helps prevent CPU exhaustion attacks.
// Skip script verification when connecting blocks under the
- // assumedvalid block. Assuming the assumedvalid block is valid this
+ // assumevalid block. Assuming the assumevalid block is valid this
// is safe because block merkle hashes are still computed and checked,
// Of course, if an assumed valid block is invalid due to false scriptSigs
// this optimization would allow an invalid chain to be accepted.
@@ -1771,7 +1771,7 @@ bool ConnectBlock(const CBlock& block, CValidationState& state, CBlockIndex* pin
pindexBestHeader->GetAncestor(pindex->nHeight) == pindex &&
pindexBestHeader->nChainWork >= UintToArith256(chainparams.GetConsensus().nMinimumChainWork)) {
// This block is a member of the assumed verified chain and an ancestor of the best header.
- // The equivalent time check discourages hashpower from extorting the network via DOS attack
+ // The equivalent time check discourages hash power from extorting the network via DOS attack
// into accepting an invalid block through telling users they must manually set assumevalid.
// Requiring a software change or burying the invalid block, regardless of the setting, makes
// it hard to hide the implication of the demand. This also avoids having release candidates
@@ -2486,12 +2486,12 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
bool fInitialDownload;
{
LOCK(cs_main);
- { // TODO: Tempoarily ensure that mempool removals are notified before
+ { // TODO: Temporarily ensure that mempool removals are notified before
// connected transactions. This shouldn't matter, but the abandoned
// state of transactions in our wallet is currently cleared when we
// receive another notification and there is a race condition where
// notification of a connected conflict might cause an outside process
- // to abandon a transaction and then have it inadvertantly cleared by
+ // to abandon a transaction and then have it inadvertently cleared by
// the notification that the conflicted transaction was evicted.
MemPoolConflictRemovalTracker mrt(mempool);
CBlockIndex *pindexOldTip = chainActive.Tip();
@@ -2520,7 +2520,7 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
} // MemPoolConflictRemovalTracker destroyed and conflict evictions are notified
- // Transactions in the connnected block are notified
+ // Transactions in the connected block are notified
for (const auto& pair : connectTrace.blocksConnected) {
assert(pair.second);
const CBlock& block = *(pair.second);
@@ -4185,7 +4185,7 @@ static const uint64_t MEMPOOL_DUMP_VERSION = 1;
bool LoadMempool(void)
{
int64_t nExpiryTimeout = GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60;
- FILE* filestr = fopen((GetDataDir() / "mempool.dat").string().c_str(), "r");
+ FILE* filestr = fopen((GetDataDir() / "mempool.dat").string().c_str(), "rb");
CAutoFile file(filestr, SER_DISK, CLIENT_VERSION);
if (file.IsNull()) {
LogPrintf("Failed to open mempool file from disk. Continuing anyway.\n");
@@ -4216,7 +4216,7 @@ bool LoadMempool(void)
CAmount amountdelta = nFeeDelta;
if (amountdelta) {
- mempool.PrioritiseTransaction(tx->GetHash(), tx->GetHash().ToString(), prioritydummy, amountdelta);
+ mempool.PrioritiseTransaction(tx->GetHash(), prioritydummy, amountdelta);
}
CValidationState state;
if (nTime + nExpiryTimeout > nNow) {
@@ -4237,7 +4237,7 @@ bool LoadMempool(void)
file >> mapDeltas;
for (const auto& i : mapDeltas) {
- mempool.PrioritiseTransaction(i.first, i.first.ToString(), prioritydummy, i.second);
+ mempool.PrioritiseTransaction(i.first, prioritydummy, i.second);
}
} catch (const std::exception& e) {
LogPrintf("Failed to deserialize mempool data on disk: %s. Continuing anyway.\n", e.what());
@@ -4266,7 +4266,7 @@ void DumpMempool(void)
int64_t mid = GetTimeMicros();
try {
- FILE* filestr = fopen((GetDataDir() / "mempool.dat.new").string().c_str(), "w");
+ FILE* filestr = fopen((GetDataDir() / "mempool.dat.new").string().c_str(), "wb");
if (!filestr) {
return;
}
diff --git a/src/validationinterface.h b/src/validationinterface.h
index a2e76f2036..a494eb6990 100644
--- a/src/validationinterface.h
+++ b/src/validationinterface.h
@@ -50,7 +50,7 @@ protected:
struct CMainSignals {
/** Notifies listeners of updated block chain tip */
boost::signals2::signal<void (const CBlockIndex *, const CBlockIndex *, bool fInitialDownload)> UpdatedBlockTip;
- /** A posInBlock value for SyncTransaction calls for tranactions not
+ /** A posInBlock value for SyncTransaction calls for transactions not
* included in connected blocks such as transactions removed from mempool,
* accepted to mempool or appearing in disconnected blocks.*/
static const int SYNC_TRANSACTION_NOT_IN_BLOCK = -1;
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp
index 68049dcef7..8a9e7d1444 100644
--- a/src/wallet/rpcdump.cpp
+++ b/src/wallet/rpcdump.cpp
@@ -1072,7 +1072,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
}
}
- if (fRescan && fRunScan && requests.size() && nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()) {
+ if (fRescan && fRunScan && requests.size()) {
CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(std::max<int64_t>(nLowestTimestamp - 7200, 0)) : chainActive.Genesis();
CBlockIndex* scannedRange = nullptr;
if (pindex) {
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp
index 45b572aa2e..01005bf338 100644
--- a/src/wallet/rpcwallet.cpp
+++ b/src/wallet/rpcwallet.cpp
@@ -2725,7 +2725,7 @@ UniValue bumpfee(const JSONRPCRequest& request)
" be left unchanged from the original. If false, any input sequence numbers in the\n"
" original transaction that were less than 0xfffffffe will be increased to 0xfffffffe\n"
" so the new transaction will not be explicitly bip-125 replaceable (though it may\n"
- " still be replacable in practice, for example if it has unconfirmed ancestors which\n"
+ " still be replaceable in practice, for example if it has unconfirmed ancestors which\n"
" are replaceable).\n"
" }\n"
"\nResult:\n"
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 1b59c3cd80..63501b04be 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1028,7 +1028,7 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
* TODO: One exception to this is that the abandoned state is cleared under the
* assumption that any further notification of a transaction that was considered
* abandoned is an indication that it is not safe to be considered abandoned.
- * Abandoned state should probably be more carefuly tracked via different
+ * Abandoned state should probably be more carefully tracked via different
* posInBlock signals or by checking mempool presence when necessary.
*/
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlockIndex* pIndex, int posInBlock, bool fUpdate)
@@ -3899,11 +3899,7 @@ bool CWallet::BackupWallet(const std::string& strDest)
pathDest /= strWalletFile;
try {
-#if BOOST_VERSION >= 104000
boost::filesystem::copy_file(pathSrc, pathDest, boost::filesystem::copy_option::overwrite_if_exists);
-#else
- boost::filesystem::copy_file(pathSrc, pathDest);
-#endif
LogPrintf("copied %s to %s\n", strWalletFile, pathDest.string());
return true;
} catch (const boost::filesystem::filesystem_error& e) {