aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml6
-rw-r--r--.cirrus.yml4
-rw-r--r--.tx/config6
-rw-r--r--build-aux/m4/bitcoin_qt.m46
-rw-r--r--build_msvc/README.md28
-rw-r--r--build_msvc/bitcoind/bitcoind.vcxproj3
-rw-r--r--build_msvc/common.init.vcxproj1
-rw-r--r--build_msvc/common.qt.init.vcxproj6
-rw-r--r--build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj2
-rw-r--r--ci/test/00_setup_env_native_asan.sh2
-rw-r--r--configure.ac4
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-osx.yml1
-rw-r--r--contrib/gitian-descriptors/gitian-win.yml1
-rw-r--r--contrib/guix/libexec/build.sh1
-rw-r--r--depends/README.md5
-rw-r--r--depends/packages/native_libmultiprocess.mk4
-rw-r--r--depends/packages/native_mac_alias.mk4
-rw-r--r--depends/packages/qt.mk6
-rw-r--r--doc/multiprocess.md39
-rw-r--r--doc/release-notes.md6
-rw-r--r--src/Makefile.am50
-rw-r--r--src/Makefile.qt.include5
-rw-r--r--src/Makefile.test.include1
-rw-r--r--src/bitcoin-cli.cpp78
-rw-r--r--src/bitcoind.cpp15
-rw-r--r--src/compressor.cpp4
-rw-r--r--src/compressor.h20
-rw-r--r--src/init.cpp195
-rw-r--r--src/init/bitcoin-node.cpp45
-rw-r--r--src/init/bitcoind.cpp29
-rw-r--r--src/init/common.cpp167
-rw-r--r--src/init/common.h28
-rw-r--r--src/interfaces/README.md6
-rw-r--r--src/interfaces/echo.cpp18
-rw-r--r--src/interfaces/echo.h26
-rw-r--r--src/interfaces/init.cpp17
-rw-r--r--src/interfaces/init.h52
-rw-r--r--src/interfaces/ipc.h71
-rw-r--r--src/ipc/capnp/.gitignore2
-rw-r--r--src/ipc/capnp/echo.capnp17
-rw-r--r--src/ipc/capnp/init-types.h10
-rw-r--r--src/ipc/capnp/init.capnp20
-rw-r--r--src/ipc/capnp/protocol.cpp90
-rw-r--r--src/ipc/capnp/protocol.h17
-rw-r--r--src/ipc/exception.h20
-rw-r--r--src/ipc/interfaces.cpp77
-rw-r--r--src/ipc/process.cpp61
-rw-r--r--src/ipc/process.h42
-rw-r--r--src/ipc/protocol.h39
-rw-r--r--src/logging.cpp1
-rw-r--r--src/logging.h1
-rw-r--r--src/net.cpp53
-rw-r--r--src/net.h34
-rw-r--r--[-rwxr-xr-x]src/net_processing.cpp4
-rw-r--r--src/net_processing.h2
-rw-r--r--src/netaddress.cpp9
-rw-r--r--src/node/context.h3
-rw-r--r--src/qt/addressbookpage.cpp31
-rw-r--r--src/qt/addressbookpage.h1
-rw-r--r--src/qt/bitcoin.cpp12
-rw-r--r--src/qt/bitcoin.h2
-rw-r--r--src/qt/bitcoingui.cpp7
-rw-r--r--src/qt/bitcoinstrings.cpp51
-rw-r--r--src/qt/clientmodel.cpp12
-rw-r--r--src/qt/clientmodel.h3
-rw-r--r--src/qt/coincontroldialog.cpp28
-rw-r--r--src/qt/forms/intro.ui53
-rw-r--r--src/qt/forms/modaloverlay.ui10
-rw-r--r--src/qt/intro.cpp31
-rw-r--r--src/qt/intro.h5
-rw-r--r--src/qt/locale/bitcoin_en.ts906
-rw-r--r--src/qt/locale/bitcoin_en.xlf5688
-rw-r--r--src/qt/modaloverlay.cpp1
-rw-r--r--src/qt/peertablemodel.cpp69
-rw-r--r--src/qt/peertablemodel.h14
-rw-r--r--src/qt/peertablesortproxy.cpp43
-rw-r--r--src/qt/peertablesortproxy.h25
-rw-r--r--src/qt/qrimagewidget.cpp8
-rw-r--r--src/qt/receivecoinsdialog.cpp24
-rw-r--r--src/qt/rpcconsole.cpp108
-rw-r--r--src/qt/rpcconsole.h4
-rw-r--r--src/qt/sendcoinsdialog.cpp23
-rw-r--r--src/qt/sendcoinsdialog.h3
-rw-r--r--src/qt/transactionview.cpp45
-rw-r--r--src/rpc/blockchain.cpp3
-rw-r--r--src/rpc/mining.cpp7
-rw-r--r--src/rpc/misc.cpp41
-rw-r--r--src/rpc/net.cpp98
-rw-r--r--src/rpc/net.h15
-rw-r--r--src/script/descriptor.cpp189
-rw-r--r--src/test/compress_tests.cpp8
-rw-r--r--src/test/dbwrapper_tests.cpp18
-rw-r--r--src/test/denialofservice_tests.cpp4
-rw-r--r--src/test/descriptor_tests.cpp12
-rw-r--r--src/test/flatfile_tests.cpp8
-rw-r--r--src/test/fs_tests.cpp2
-rw-r--r--src/test/fuzz/process_message.cpp1
-rw-r--r--src/test/fuzz/process_messages.cpp1
-rw-r--r--src/test/fuzz/rpc.cpp378
-rw-r--r--src/test/fuzz/script.cpp56
-rw-r--r--src/test/fuzz/script_flags.cpp4
-rw-r--r--src/test/getarg_tests.cpp120
-rw-r--r--src/test/settings_tests.cpp2
-rw-r--r--src/test/util/setup_common.cpp8
-rw-r--r--src/test/util/setup_common.h2
-rw-r--r--src/test/util_tests.cpp43
-rw-r--r--src/test/versionbits_tests.cpp64
-rw-r--r--src/util/system.cpp164
-rw-r--r--src/util/system.h28
-rw-r--r--src/validation.cpp194
-rw-r--r--src/validation.h28
-rw-r--r--src/wallet/coincontrol.cpp16
-rw-r--r--src/wallet/coincontrol.h23
-rw-r--r--src/wallet/coinselection.h30
-rw-r--r--src/wallet/wallet.cpp63
-rw-r--r--src/wallet/wallet.h82
-rwxr-xr-xtest/functional/feature_blockfilterindex_prune.py2
-rwxr-xr-xtest/functional/feature_cltv.py172
-rwxr-xr-xtest/functional/feature_notifications.py2
-rwxr-xr-xtest/functional/mempool_spend_coinbase.py35
-rwxr-xr-xtest/functional/p2p_addr_relay.py170
-rwxr-xr-xtest/functional/p2p_blocksonly.py6
-rwxr-xr-xtest/functional/p2p_filter.py3
-rwxr-xr-xtest/functional/p2p_segwit.py46
-rwxr-xr-xtest/functional/rpc_misc.py3
-rwxr-xr-xtest/functional/test_framework/p2p.py10
-rwxr-xr-xtest/functional/test_framework/test_framework.py5
-rwxr-xr-xtest/functional/test_framework/test_node.py1
-rw-r--r--test/functional/test_framework/wallet.py28
-rwxr-xr-xtest/lint/lint-include-guards.sh2
-rw-r--r--test/sanitizer_suppressions/ubsan1
132 files changed, 9213 insertions, 1657 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 097874b17a..fb95876c36 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -7,9 +7,9 @@ clone_depth: 5
environment:
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
PYTHONUTF8: 1
- QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt598x64_vs2019_v1681/qt598_x64_vs2019_1681.zip'
- QT_DOWNLOAD_HASH: '00cf7327818c07d74e0b1a4464ffe987c2728b00d49d4bf333065892af0515c3'
- QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
+ QT_DOWNLOAD_URL: 'https://github.com/sipsorcery/qt_win_binary/releases/download/qt51210x64_vs2019_1694/Qt5.12.10_x64_static_vs2019_1694.zip'
+ QT_DOWNLOAD_HASH: '3035a1307e8302bb3a76eba9bb3102979f945ab4022cc3bc2e1583edd44bdc99'
+ QT_LOCAL_PATH: 'C:\Qt5.12.10_x64_static_vs2019_1694'
VCPKG_TAG: '75522bb1f2e7d863078bcd06322348f053a9e33f'
install:
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
diff --git a/.cirrus.yml b/.cirrus.yml
index 6dc029ee51..e353101ecc 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -143,10 +143,10 @@ task:
FILE_ENV: "./ci/test/00_setup_env_native_msan.sh"
task:
- name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [focal]'
+ name: '[no depends, sanitizers: address/leak (ASan + LSan) + undefined (UBSan) + integer] [hirsute]'
<< : *GLOBAL_TASK_TEMPLATE
container:
- image: ubuntu:focal
+ image: ubuntu:hirsute
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
diff --git a/.tx/config b/.tx/config
index 86b517a612..232d481e18 100644
--- a/.tx/config
+++ b/.tx/config
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
-[bitcoin.qt-translation-021x]
-file_filter = src/qt/locale/bitcoin_<lang>.ts
-source_file = src/qt/locale/bitcoin_en.ts
+[bitcoin.qt-translation-022x]
+file_filter = src/qt/locale/bitcoin_<lang>.xlf
+source_file = src/qt/locale/bitcoin_en.xlf
source_lang = en
diff --git a/build-aux/m4/bitcoin_qt.m4 b/build-aux/m4/bitcoin_qt.m4
index 57b4c10d77..0995ef1406 100644
--- a/build-aux/m4/bitcoin_qt.m4
+++ b/build-aux/m4/bitcoin_qt.m4
@@ -225,6 +225,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt5 rcc5 rcc], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LRELEASE], [lrelease-qt5 lrelease5 lrelease], $qt_bin_path)
BITCOIN_QT_PATH_PROGS([LUPDATE], [lupdate-qt5 lupdate5 lupdate],$qt_bin_path, yes)
+ BITCOIN_QT_PATH_PROGS([LCONVERT], [lconvert-qt5 lconvert5 lconvert], $qt_bin_path, yes)
MOC_DEFS='-DHAVE_CONFIG_H -I$(srcdir)'
case $host in
@@ -258,7 +259,10 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
AC_MSG_ERROR([libQtDBus not found. Install libQtDBus or remove --with-qtdbus.])
fi
if test "x$LUPDATE" = x; then
- AC_MSG_WARN([lupdate is required to update qt translations])
+ AC_MSG_WARN([lupdate tool is required to update Qt translations.])
+ fi
+ if test "x$LCONVERT" = x; then
+ AC_MSG_WARN([lconvert tool is required to update Qt translations.])
fi
],[
bitcoin_enable_qt=no
diff --git a/build_msvc/README.md b/build_msvc/README.md
index 87ea556a23..7c1704d30f 100644
--- a/build_msvc/README.md
+++ b/build_msvc/README.md
@@ -27,7 +27,11 @@ Options for installing the dependencies in a Visual Studio compatible manner are
- Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files.
- Use [nuget](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party.
-The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. The `msbuild` project files are configured to automatically install the `vcpkg` dependencies.
+The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are listed in the `build_msvc/vcpkg.json` file. To ensure `msbuild` project files automatically install the `vcpkg` dependencies use:
+
+```
+vcpkg integrate install
+```
Qt
---------------------
@@ -77,3 +81,25 @@ For safety reasons the Bitcoin Core .appveyor.yml file has the artifact options
#- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
#- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip
```
+
+Security
+---------------------
+[Base address randomization](https://docs.microsoft.com/en-us/cpp/build/reference/dynamicbase-use-address-space-layout-randomization?view=msvc-160) is used to make Bitcoin Core more secure. When building Bitcoin using the `build_msvc` process base address randomization can be disabled by editing `common.init.vcproj` to change `RandomizedBaseAddress` from `true` to `false` and then rebuilding the project.
+
+To check if `bitcoind` has `RandomizedBaseAddress` enabled or disabled run
+
+```
+.\dumpbin.exe /headers src/bitcoind.exe
+```
+
+If is it enabled then in the output `Dynamic base` will be listed in the `DLL characteristics` under `OPTIONAL HEADER VALUES` as shown below
+
+```
+ 8160 DLL characteristics
+ High Entropy Virtual Addresses
+ Dynamic base
+ NX compatible
+ Terminal Server Aware
+```
+
+This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration. \ No newline at end of file
diff --git a/build_msvc/bitcoind/bitcoind.vcxproj b/build_msvc/bitcoind/bitcoind.vcxproj
index 48dfafaee0..c2c32af838 100644
--- a/build_msvc/bitcoind/bitcoind.vcxproj
+++ b/build_msvc/bitcoind/bitcoind.vcxproj
@@ -10,6 +10,9 @@
</PropertyGroup>
<ItemGroup>
<ClCompile Include="..\..\src\bitcoind.cpp" />
+ <ClCompile Include="..\..\src\init\bitcoind.cpp">
+ <ObjectFileName>$(IntDir)init_bitcoind.obj</ObjectFileName>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libbitcoinconsensus\libbitcoinconsensus.vcxproj">
diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj
index f195d3d451..6ea018d846 100644
--- a/build_msvc/common.init.vcxproj
+++ b/build_msvc/common.init.vcxproj
@@ -105,6 +105,7 @@
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <RandomizedBaseAddress>true</RandomizedBaseAddress>
</Link>
<Lib>
<AdditionalOptions>/ignore:4221</AdditionalOptions>
diff --git a/build_msvc/common.qt.init.vcxproj b/build_msvc/common.qt.init.vcxproj
index 42150a2310..837c088451 100644
--- a/build_msvc/common.qt.init.vcxproj
+++ b/build_msvc/common.qt.init.vcxproj
@@ -2,15 +2,15 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="QtGlobals">
- <QtBaseDir>C:\Qt5.9.8_x64_static_vs2019</QtBaseDir>
+ <QtBaseDir>C:\Qt5.12.10_x64_static_vs2019_1694</QtBaseDir>
<QtPluginsLibraryDir>$(QtBaseDir)\plugins</QtPluginsLibraryDir>
<QtLibraryDir>$(QtBaseDir)\lib</QtLibraryDir>
<QtIncludeDir>$(QtBaseDir)\include</QtIncludeDir>
<QtIncludes>$(QtIncludeDir);$(QtIncludeDir)\QtNetwork;$(QtIncludeDir)\QtCore;$(QtIncludeDir)\QtWidgets;$(QtIncludeDir)\QtGui;</QtIncludes>
<GeneratedFilesOutDir>.\QtGeneratedFiles\qt</GeneratedFilesOutDir>
<QtToolsDir>$(QtBaseDir)\bin</QtToolsDir>
- <QtReleaseLibraries>$(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib</QtReleaseLibraries>
- <QtDebugLibraries>$(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtLibraryDir)\*d.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib</QtDebugLibraries>
+ <QtReleaseLibraries>$(QtPluginsLibraryDir)\platforms\qminimal.lib;$(QtPluginsLibraryDir)\platforms\qwindows.lib;$(QtLibraryDir)\Qt5WindowsUIAutomationSupport.lib;$(QtLibraryDir)\qtfreetype.lib;$(QtLibraryDir)\qtharfbuzz.lib;$(QtLibraryDir)\qtlibpng.lib;$(QtLibraryDir)\qtpcre2.lib;$(QtLibraryDir)\Qt5AccessibilitySupport.lib;$(QtLibraryDir)\Qt5Core.lib;$(QtLibraryDir)\Qt5Concurrent.lib;$(QtLibraryDir)\Qt5EventDispatcherSupport.lib;$(QtLibraryDir)\Qt5FontDatabaseSupport.lib;$(QtLibraryDir)\Qt5Gui.lib;$(QtLibraryDir)\Qt5Network.lib;$(QtLibraryDir)\Qt5PlatformCompositorSupport.lib;$(QtLibraryDir)\Qt5ThemeSupport.lib;$(QtLibraryDir)\Qt5Widgets.lib;$(QtLibraryDir)\Qt5WinExtras.lib;$(QtLibraryDir)\qtmain.lib;Wtsapi32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib</QtReleaseLibraries>
+ <QtDebugLibraries>$(QtPluginsLibraryDir)\platforms\qwindowsd.lib;$(QtPluginsLibraryDir)\platforms\qminimald.lib;$(QtLibraryDir)\*d.lib;Wtsapi32.lib;crypt32.lib;userenv.lib;netapi32.lib;imm32.lib;Dwmapi.lib;version.lib;winmm.lib;UxTheme.lib</QtDebugLibraries>
</PropertyGroup>
</Project>
diff --git a/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj b/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
index 490ce8b1ce..96bb584375 100644
--- a/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
+++ b/build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj
@@ -34,6 +34,7 @@
<ClCompile Include="..\..\src\qt\overviewpage.cpp" />
<ClCompile Include="..\..\src\qt\paymentserver.cpp" />
<ClCompile Include="..\..\src\qt\peertablemodel.cpp" />
+ <ClCompile Include="..\..\src\qt\peertablesortproxy.cpp" />
<ClCompile Include="..\..\src\qt\platformstyle.cpp" />
<ClCompile Include="..\..\src\qt\psbtoperationsdialog.cpp" />
<ClCompile Include="..\..\src\qt\qrimagewidget.cpp" />
@@ -87,6 +88,7 @@
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_overviewpage.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_paymentserver.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_peertablemodel.cpp" />
+ <ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_peertablesortproxy.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_platformstyle.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_psbtoperationsdialog.cpp" />
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_qrimagewidget.cpp" />
diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh
index 6039c51018..92af98aa9b 100644
--- a/ci/test/00_setup_env_native_asan.sh
+++ b/ci/test/00_setup_env_native_asan.sh
@@ -8,7 +8,7 @@ export LC_ALL=C.UTF-8
export CONTAINER_NAME=ci_native_asan
export PACKAGES="clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
-export DOCKER_NAME_TAG=ubuntu:20.04
+export DOCKER_NAME_TAG=ubuntu:hirsute
export NO_DEPENDS=1
export GOAL="install"
export BITCOIN_CONFIG="--enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++ --enable-external-signer"
diff --git a/configure.ac b/configure.ac
index cce97e9259..d1707dfd64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1640,6 +1640,10 @@ if test "x$use_ccache" != "xno"; then
CXX="$ac_cv_path_CCACHE $CXX"
fi
AC_MSG_RESULT($use_ccache)
+ if test "x$use_ccache" = "xyes"; then
+ AX_CHECK_COMPILE_FLAG([-fdebug-prefix-map=A=B],[DEBUG_CXXFLAGS="$DEBUG_CXXFLAGS -fdebug-prefix-map=\$(abs_srcdir)=."],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_PREPROC_FLAG([-fmacro-prefix-map=A=B],[DEBUG_CPPFLAGS="$DEBUG_CPPFLAGS -fmacro-prefix-map=\$(abs_srcdir)=."],,[[$CXXFLAG_WERROR]])
+ fi
fi
dnl enable wallet
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 52e2a0514a..9b5f5d7e07 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -55,7 +55,6 @@ script: |
HOST_CXXFLAGS="-O2 -g"
HOST_LDFLAGS_BASE="-static-libstdc++ -Wl,-O2"
- export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC"
export BUILD_DIR="$PWD"
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index c37ad5b842..c1bd545501 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -41,7 +41,6 @@ script: |
FAKETIME_HOST_PROGS=""
FAKETIME_PROGS="ar ranlib date dmg xorrisofs"
- export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC"
export BUILD_DIR="$PWD"
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 95cf0185e2..dbf1e8cc67 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -37,7 +37,6 @@ script: |
HOST_CFLAGS="-O2 -g -fno-ident"
HOST_CXXFLAGS="-O2 -g -fno-ident"
- export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TZ="UTC"
export BUILD_DIR="$PWD"
diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh
index 4239c3d475..6ea32329ba 100644
--- a/contrib/guix/libexec/build.sh
+++ b/contrib/guix/libexec/build.sh
@@ -175,7 +175,6 @@ case "$HOST" in
esac
# Environment variables for determinism
-export QT_RCC_TEST=1
export QT_RCC_SOURCE_DATE_OVERRIDE=1
export TAR_OPTIONS="--owner=0 --group=0 --numeric-owner --mtime='@${SOURCE_DATE_EPOCH}' --sort=name"
export TZ="UTC"
diff --git a/depends/README.md b/depends/README.md
index 6b20791281..50e1a32c70 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -49,6 +49,11 @@ The paths are automatically configured and no other options are needed unless ta
sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libz-dev python3-setuptools libtinfo5 xorriso
+Note: You must obtain the macOS SDK before proceeding with a cross-compile.
+Under the depends directory, create a subdirectory named `SDKs`.
+Then, place the extracted SDK under this new directory.
+For more information, see [SDK Extraction](../contrib/macdeploy/README.md#sdk-extraction).
+
#### For Win64 cross compilation
- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)
diff --git a/depends/packages/native_libmultiprocess.mk b/depends/packages/native_libmultiprocess.mk
index c50fdc3f6b..14653ce9fb 100644
--- a/depends/packages/native_libmultiprocess.mk
+++ b/depends/packages/native_libmultiprocess.mk
@@ -1,8 +1,8 @@
package=native_libmultiprocess
-$(package)_version=5741d750a04e644a03336090d8979c6d033e32c0
+$(package)_version=d576d975debdc9090bd2582f83f49c76c0061698
$(package)_download_path=https://github.com/chaincodelabs/libmultiprocess/archive
$(package)_file_name=$($(package)_version).tar.gz
-$(package)_sha256_hash=ac848db49a6ed53e423c62d54bd87f1f08cbb0326254a8667e10bbfe5bf032a4
+$(package)_sha256_hash=9f8b055c8bba755dc32fe799b67c20b91e7b13e67cadafbc54c0f1def057a370
$(package)_dependencies=native_capnp
define $(package)_config_cmds
diff --git a/depends/packages/native_mac_alias.mk b/depends/packages/native_mac_alias.mk
index 5fe027fb8a..783f87ca7c 100644
--- a/depends/packages/native_mac_alias.mk
+++ b/depends/packages/native_mac_alias.mk
@@ -1,8 +1,8 @@
package=native_mac_alias
-$(package)_version=2.1.1
+$(package)_version=2.2.0
$(package)_download_path=https://github.com/al45tair/mac_alias/archive/
$(package)_file_name=v$($(package)_version).tar.gz
-$(package)_sha256_hash=c0ffceee14f7d04a6eb323fb7b8217dc3f373b346198d2ca42300a8362db7efa
+$(package)_sha256_hash=421e6d7586d1f155c7db3e7da01ca0dacc9649a509a253ad7077b70174426499
$(package)_install_libdir=$(build_prefix)/lib/python3/dist-packages
define $(package)_build_cmds
diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
index ae83eae911..0133eee920 100644
--- a/depends/packages/qt.mk
+++ b/depends/packages/qt.mk
@@ -173,7 +173,6 @@ $(package)_config_opts_armv7a_android += -android-arch armeabi-v7a
$(package)_config_opts_x86_64_android += -android-arch x86_64
$(package)_config_opts_i686_android += -android-arch i686
-$(package)_build_env = QT_RCC_TEST=1
$(package)_build_env += QT_RCC_SOURCE_DATE_OVERRIDE=1
endef
@@ -261,13 +260,15 @@ define $(package)_config_cmds
qtbase/bin/qmake -o qttranslations/Makefile qttranslations/qttranslations.pro && \
qtbase/bin/qmake -o qttranslations/translations/Makefile qttranslations/translations/translations.pro && \
qtbase/bin/qmake -o qttools/src/linguist/lrelease/Makefile qttools/src/linguist/lrelease/lrelease.pro && \
- qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro
+ qtbase/bin/qmake -o qttools/src/linguist/lupdate/Makefile qttools/src/linguist/lupdate/lupdate.pro && \
+ qtbase/bin/qmake -o qttools/src/linguist/lconvert/Makefile qttools/src/linguist/lconvert/lconvert.pro
endef
define $(package)_build_cmds
$(MAKE) -C qtbase/src $(addprefix sub-,$($(package)_qt_libs)) && \
$(MAKE) -C qttools/src/linguist/lrelease && \
$(MAKE) -C qttools/src/linguist/lupdate && \
+ $(MAKE) -C qttools/src/linguist/lconvert && \
$(MAKE) -C qttranslations
endef
@@ -275,6 +276,7 @@ define $(package)_stage_cmds
$(MAKE) -C qtbase/src INSTALL_ROOT=$($(package)_staging_dir) $(addsuffix -install_subtargets,$(addprefix sub-,$($(package)_qt_libs))) && \
$(MAKE) -C qttools/src/linguist/lrelease INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttools/src/linguist/lupdate INSTALL_ROOT=$($(package)_staging_dir) install_target && \
+ $(MAKE) -C qttools/src/linguist/lconvert INSTALL_ROOT=$($(package)_staging_dir) install_target && \
$(MAKE) -C qttranslations INSTALL_ROOT=$($(package)_staging_dir) install_subtargets
endef
diff --git a/doc/multiprocess.md b/doc/multiprocess.md
index 7a42fdd734..e3f389a6d3 100644
--- a/doc/multiprocess.md
+++ b/doc/multiprocess.md
@@ -15,7 +15,7 @@ Specific next steps after [#10102](https://github.com/bitcoin/bitcoin/pull/10102
## Debugging
-After [#10102](https://github.com/bitcoin/bitcoin/pull/10102), the `-debug=ipc` command line option can be used to see requests and responses between processes.
+The `-debug=ipc` command line option can be used to see requests and responses between processes.
## Installation
@@ -33,3 +33,40 @@ BITCOIND=bitcoin-node test/functional/test_runner.py
The configure script will pick up settings and library locations from the depends directory, so there is no need to pass `--enable-multiprocess` as a separate flag when using the depends system (it's controlled by the `MULTIPROCESS=1` option).
Alternately, you can install [Cap'n Proto](https://capnproto.org/) and [libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) packages on your system, and just run `./configure --enable-multiprocess` without using the depends system. The configure script will be able to locate the installed packages via [pkg-config](https://www.freedesktop.org/wiki/Software/pkg-config/). See [Installation](https://github.com/chaincodelabs/libmultiprocess#installation) section of the libmultiprocess readme for install steps. See [build-unix.md](build-unix.md) and [build-osx.md](build-osx.md) for information about installing dependencies in general.
+
+## IPC implementation details
+
+Cross process Node, Wallet, and Chain interfaces are defined in
+[`src/interfaces/`](../src/interfaces/). These are C++ classes which follow
+[conventions](developer-notes.md#internal-interface-guidelines), like passing
+serializable arguments so they can be called from different processes, and
+making methods pure virtual so they can have proxy implementations that forward
+calls between processes.
+
+When Wallet, Node, and Chain code is running in the same process, calling any
+interface method invokes the implementation directly. When code is running in
+different processes, calling an interface method invokes a proxy interface
+implementation that communicates with a remote process and invokes the real
+implementation in the remote process. The
+[libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) code
+generation tool internally generates proxy client classes and proxy server
+classes for this purpose that are thin wrappers around Cap'n Proto
+[client](https://capnproto.org/cxxrpc.html#clients) and
+[server](https://capnproto.org/cxxrpc.html#servers) classes, which handle the
+actual serialization and socket communication.
+
+As much as possible, calls between processes are meant to work the same as
+calls within a single process without adding limitations or requiring extra
+implementation effort. Processes communicate with each other by calling regular
+[C++ interface methods](../src/interfaces/README.md). Method arguments and
+return values are automatically serialized and sent between processes. Object
+references and `std::function` arguments are automatically tracked and mapped
+to allow invoked code to call back into invoking code at any time, and there is
+a 1:1 threading model where any thread invoking a method in another process has
+a corresponding thread in the invoked process responsible for executing all
+method calls from the source thread, without blocking I/O or holding up another
+call, and using the same thread local variables, locks, and callbacks between
+calls. The forwarding, tracking, and threading is implemented inside the
+[libmultiprocess](https://github.com/chaincodelabs/libmultiprocess) library
+which has the design goal of making calls between processes look like calls in
+the same process to the extent possible.
diff --git a/doc/release-notes.md b/doc/release-notes.md
index fced86254a..874b919f08 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -136,6 +136,12 @@ Changes to Wallet or GUI related settings can be found in the GUI or Wallet sect
Tools and Utilities
-------------------
+- A new CLI `-addrinfo` command returns the number of addresses known to the
+ node per network type (including Tor v2 versus v3) and total. This can be
+ useful to see if the node knows enough addresses in a network to use options
+ like `-onlynet=<network>` or to upgrade to current and future Tor releases
+ that support Tor v3 addresses only. (#21595)
+
Wallet
------
diff --git a/src/Makefile.am b/src/Makefile.am
index 73d4edb77a..972a3e279b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -74,6 +74,7 @@ EXTRA_LIBRARIES += \
$(LIBBITCOIN_CONSENSUS) \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_CLI) \
+ $(LIBBITCOIN_IPC) \
$(LIBBITCOIN_WALLET) \
$(LIBBITCOIN_WALLET_TOOL) \
$(LIBBITCOIN_ZMQ)
@@ -157,8 +158,12 @@ BITCOIN_CORE_H = \
index/txindex.h \
indirectmap.h \
init.h \
+ init/common.h \
interfaces/chain.h \
+ interfaces/echo.h \
interfaces/handler.h \
+ interfaces/init.h \
+ interfaces/ipc.h \
interfaces/node.h \
interfaces/wallet.h \
key.h \
@@ -200,6 +205,7 @@ BITCOIN_CORE_H = \
rpc/blockchain.h \
rpc/client.h \
rpc/mining.h \
+ rpc/net.h \
rpc/protocol.h \
rpc/rawtransaction_util.h \
rpc/register.h \
@@ -298,6 +304,8 @@ obj/build.h: FORCE
"$(abs_top_srcdir)"
libbitcoin_util_a-clientversion.$(OBJEXT): obj/build.h
+ipc/capnp/libbitcoin_ipc_a-ipc.$(OBJEXT): $(libbitcoin_ipc_mpgen_input:=.h)
+
# server: shared between bitcoind and bitcoin-qt
# Contains code accessing mempool and chain state that is meant to be separated
# from wallet and gui code (see node/README.md). Shared code should go in
@@ -522,6 +530,7 @@ libbitcoin_common_a_SOURCES = \
core_read.cpp \
core_write.cpp \
external_signer.cpp \
+ init/common.cpp \
key.cpp \
key_io.cpp \
merkleblock.cpp \
@@ -557,7 +566,9 @@ libbitcoin_util_a_SOURCES = \
compat/glibcxx_sanity.cpp \
compat/strnlen.cpp \
fs.cpp \
+ interfaces/echo.cpp \
interfaces/handler.cpp \
+ interfaces/init.cpp \
logging.cpp \
random.cpp \
randomenv.cpp \
@@ -633,17 +644,17 @@ bitcoin_bin_ldadd = \
bitcoin_bin_ldadd += $(BOOST_LIBS) $(BDB_LIBS) $(MINIUPNPC_LIBS) $(NATPMP_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(ZMQ_LIBS) $(SQLITE_LIBS)
-bitcoind_SOURCES = $(bitcoin_daemon_sources)
+bitcoind_SOURCES = $(bitcoin_daemon_sources) init/bitcoind.cpp
bitcoind_CPPFLAGS = $(bitcoin_bin_cppflags)
bitcoind_CXXFLAGS = $(bitcoin_bin_cxxflags)
bitcoind_LDFLAGS = $(bitcoin_bin_ldflags)
bitcoind_LDADD = $(LIBBITCOIN_SERVER) $(bitcoin_bin_ldadd)
-bitcoin_node_SOURCES = $(bitcoin_daemon_sources)
+bitcoin_node_SOURCES = $(bitcoin_daemon_sources) init/bitcoin-node.cpp
bitcoin_node_CPPFLAGS = $(bitcoin_bin_cppflags)
bitcoin_node_CXXFLAGS = $(bitcoin_bin_cxxflags)
bitcoin_node_LDFLAGS = $(bitcoin_bin_ldflags)
-bitcoin_node_LDADD = $(LIBBITCOIN_SERVER) $(bitcoin_bin_ldadd)
+bitcoin_node_LDADD = $(LIBBITCOIN_SERVER) $(bitcoin_bin_ldadd) $(LIBBITCOIN_IPC) $(LIBMULTIPROCESS_LIBS)
# bitcoin-cli binary #
bitcoin_cli_SOURCES = bitcoin-cli.cpp
@@ -807,6 +818,39 @@ if HARDEN
$(AM_V_at) OBJDUMP=$(OBJDUMP) OTOOL=$(OTOOL) $(PYTHON) $(top_srcdir)/contrib/devtools/security-check.py $(bin_PROGRAMS)
endif
+libbitcoin_ipc_mpgen_input = \
+ ipc/capnp/echo.capnp \
+ ipc/capnp/init.capnp
+EXTRA_DIST += $(libbitcoin_ipc_mpgen_input)
+%.capnp:
+
+if BUILD_MULTIPROCESS
+LIBBITCOIN_IPC=libbitcoin_ipc.a
+libbitcoin_ipc_a_SOURCES = \
+ ipc/capnp/init-types.h \
+ ipc/capnp/protocol.cpp \
+ ipc/capnp/protocol.h \
+ ipc/exception.h \
+ ipc/interfaces.cpp \
+ ipc/process.cpp \
+ ipc/process.h \
+ ipc/protocol.h
+libbitcoin_ipc_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
+libbitcoin_ipc_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) $(LIBMULTIPROCESS_CFLAGS)
+
+include $(MPGEN_PREFIX)/include/mpgen.mk
+libbitcoin_ipc_mpgen_output = \
+ $(libbitcoin_ipc_mpgen_input:=.c++) \
+ $(libbitcoin_ipc_mpgen_input:=.h) \
+ $(libbitcoin_ipc_mpgen_input:=.proxy-client.c++) \
+ $(libbitcoin_ipc_mpgen_input:=.proxy-server.c++) \
+ $(libbitcoin_ipc_mpgen_input:=.proxy-types.c++) \
+ $(libbitcoin_ipc_mpgen_input:=.proxy-types.h) \
+ $(libbitcoin_ipc_mpgen_input:=.proxy.h)
+nodist_libbitcoin_ipc_a_SOURCES = $(libbitcoin_ipc_mpgen_output)
+CLEANFILES += $(libbitcoin_ipc_mpgen_output)
+endif
+
if EMBEDDED_LEVELDB
include Makefile.crc32c.include
include Makefile.leveldb.include
diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include
index 399a8430ef..caa8500ffa 100644
--- a/src/Makefile.qt.include
+++ b/src/Makefile.qt.include
@@ -61,6 +61,7 @@ QT_MOC_CPP = \
qt/moc_optionsmodel.cpp \
qt/moc_overviewpage.cpp \
qt/moc_peertablemodel.cpp \
+ qt/moc_peertablesortproxy.cpp \
qt/moc_paymentserver.cpp \
qt/moc_psbtoperationsdialog.cpp \
qt/moc_qrimagewidget.cpp \
@@ -134,6 +135,7 @@ BITCOIN_QT_H = \
qt/overviewpage.h \
qt/paymentserver.h \
qt/peertablemodel.h \
+ qt/peertablesortproxy.h \
qt/platformstyle.h \
qt/psbtoperationsdialog.h \
qt/qrimagewidget.h \
@@ -232,6 +234,7 @@ BITCOIN_QT_BASE_CPP = \
qt/optionsdialog.cpp \
qt/optionsmodel.cpp \
qt/peertablemodel.cpp \
+ qt/peertablesortproxy.cpp \
qt/platformstyle.cpp \
qt/qvalidatedlineedit.cpp \
qt/qvaluecombobox.cpp \
@@ -356,6 +359,8 @@ $(srcdir)/qt/bitcoinstrings.cpp: FORCE
translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_BASE_CPP) qt/bitcoin.cpp $(BITCOIN_QT_WINDOWS_CPP) $(BITCOIN_QT_WALLET_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts $(srcdir)/qt/locale/bitcoin_en.ts
+ @test -n $(LCONVERT) || echo "lconvert is required for updating translations"
+ $(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LCONVERT) -o $(srcdir)/qt/locale/bitcoin_en.xlf -i $(srcdir)/qt/locale/bitcoin_en.ts
$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
@test -f $(RCC)
diff --git a/src/Makefile.test.include b/src/Makefile.test.include
index b546f1f55f..9360aa05f1 100644
--- a/src/Makefile.test.include
+++ b/src/Makefile.test.include
@@ -275,6 +275,7 @@ test_fuzz_fuzz_SOURCES = \
test/fuzz/random.cpp \
test/fuzz/rbf.cpp \
test/fuzz/rolling_bloom_filter.cpp \
+ test/fuzz/rpc.cpp \
test/fuzz/script.cpp \
test/fuzz/script_assets_test_minimizer.cpp \
test/fuzz/script_bitcoin_consensus.cpp \
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 4f3d7a4ffe..4a4710ea3a 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -42,6 +42,7 @@ static const char DEFAULT_RPCCONNECT[] = "127.0.0.1";
static const int DEFAULT_HTTP_CLIENT_TIMEOUT=900;
static const bool DEFAULT_NAMED=false;
static const int CONTINUE_EXECUTION=-1;
+static constexpr int8_t UNKNOWN_NETWORK{-1};
/** Default number of blocks to generate for RPC generatetoaddress. */
static const std::string DEFAULT_NBLOCKS = "1";
@@ -59,6 +60,7 @@ static void SetupCliArgs(ArgsManager& argsman)
argsman.AddArg("-conf=<file>", strprintf("Specify configuration file. Relative paths will be prefixed by datadir location. (default: %s)", BITCOIN_CONF_FILENAME), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-generate", strprintf("Generate blocks immediately, equivalent to RPC getnewaddress followed by RPC generatetoaddress. Optional positional integer arguments are number of blocks to generate (default: %s) and maximum iterations to try (default: %s), equivalent to RPC generatetoaddress nblocks and maxtries arguments. Example: bitcoin-cli -generate 4 1000", DEFAULT_NBLOCKS, DEFAULT_MAX_TRIES), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
+ argsman.AddArg("-addrinfo", "Get the number of addresses known to the node, per network and total.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-getinfo", "Get general information from the remote server. Note that unlike server-side RPC calls, the results of -getinfo is the result of multiple non-atomic requests. Some entries in the result may represent results from different states (e.g. wallet balance may be as of a different block from the chain state reported)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-netinfo", "Get network peer connection information from the remote server. An optional integer argument from 0 to 4 can be passed for different peers listings (default: 0). Pass \"help\" for detailed help documentation.", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
@@ -228,6 +230,60 @@ public:
virtual UniValue ProcessReply(const UniValue &batch_in) = 0;
};
+/** Process addrinfo requests */
+class AddrinfoRequestHandler : public BaseRequestHandler
+{
+private:
+ static constexpr std::array m_networks{"ipv4", "ipv6", "torv2", "torv3", "i2p"};
+ int8_t NetworkStringToId(const std::string& str) const
+ {
+ for (size_t i = 0; i < m_networks.size(); ++i) {
+ if (str == m_networks.at(i)) return i;
+ }
+ return UNKNOWN_NETWORK;
+ }
+
+public:
+ UniValue PrepareRequest(const std::string& method, const std::vector<std::string>& args) override
+ {
+ if (!args.empty()) {
+ throw std::runtime_error("-addrinfo takes no arguments");
+ }
+ UniValue params{RPCConvertValues("getnodeaddresses", std::vector<std::string>{{"0"}})};
+ return JSONRPCRequestObj("getnodeaddresses", params, 1);
+ }
+
+ UniValue ProcessReply(const UniValue& reply) override
+ {
+ if (!reply["error"].isNull()) return reply;
+ const std::vector<UniValue>& nodes{reply["result"].getValues()};
+ if (!nodes.empty() && nodes.at(0)["network"].isNull()) {
+ throw std::runtime_error("-addrinfo requires bitcoind server to be running v22.0 and up");
+ }
+ // Count the number of peers we know by network, including torv2 versus torv3.
+ std::array<uint64_t, m_networks.size()> counts{{}};
+ for (const UniValue& node : nodes) {
+ std::string network_name{node["network"].get_str()};
+ if (network_name == "onion") {
+ network_name = node["address"].get_str().size() > 22 ? "torv3" : "torv2";
+ }
+ const int8_t network_id{NetworkStringToId(network_name)};
+ if (network_id == UNKNOWN_NETWORK) continue;
+ ++counts.at(network_id);
+ }
+ // Prepare result to return to user.
+ UniValue result{UniValue::VOBJ}, addresses{UniValue::VOBJ};
+ uint64_t total{0}; // Total address count
+ for (size_t i = 0; i < m_networks.size(); ++i) {
+ addresses.pushKV(m_networks.at(i), counts.at(i));
+ total += counts.at(i);
+ }
+ addresses.pushKV("total", total);
+ result.pushKV("addresses_known", addresses);
+ return JSONRPCReplyObj(result, NullUniValue, 1);
+ }
+};
+
/** Process getinfo requests */
class GetinfoRequestHandler: public BaseRequestHandler
{
@@ -299,16 +355,14 @@ public:
class NetinfoRequestHandler : public BaseRequestHandler
{
private:
- static constexpr int8_t UNKNOWN_NETWORK{-1};
- static constexpr uint8_t m_networks_size{4};
static constexpr uint8_t MAX_DETAIL_LEVEL{4};
- const std::array<std::string, m_networks_size> m_networks{{"ipv4", "ipv6", "onion", "i2p"}};
- std::array<std::array<uint16_t, m_networks_size + 1>, 3> m_counts{{{}}}; //!< Peer counts by (in/out/total, networks/total)
+ static constexpr std::array m_networks{"ipv4", "ipv6", "onion", "i2p"};
+ std::array<std::array<uint16_t, m_networks.size() + 1>, 3> m_counts{{{}}}; //!< Peer counts by (in/out/total, networks/total)
uint8_t m_block_relay_peers_count{0};
uint8_t m_manual_peers_count{0};
int8_t NetworkStringToId(const std::string& str) const
{
- for (uint8_t i = 0; i < m_networks_size; ++i) {
+ for (size_t i = 0; i < m_networks.size(); ++i) {
if (str == m_networks.at(i)) return i;
}
return UNKNOWN_NETWORK;
@@ -405,10 +459,10 @@ public:
const bool is_outbound{!peer["inbound"].get_bool()};
const bool is_block_relay{!peer["relaytxes"].get_bool()};
const std::string conn_type{peer["connection_type"].get_str()};
- ++m_counts.at(is_outbound).at(network_id); // in/out by network
- ++m_counts.at(is_outbound).at(m_networks_size); // in/out overall
- ++m_counts.at(2).at(network_id); // total by network
- ++m_counts.at(2).at(m_networks_size); // total overall
+ ++m_counts.at(is_outbound).at(network_id); // in/out by network
+ ++m_counts.at(is_outbound).at(m_networks.size()); // in/out overall
+ ++m_counts.at(2).at(network_id); // total by network
+ ++m_counts.at(2).at(m_networks.size()); // total overall
if (conn_type == "block-relay-only") ++m_block_relay_peers_count;
if (conn_type == "manual") ++m_manual_peers_count;
if (DetailsRequested()) {
@@ -478,11 +532,11 @@ public:
if (any_i2p_peers) result += " i2p";
result += " total block";
if (m_manual_peers_count) result += " manual";
- const std::array<std::string, 3> rows{{"in", "out", "total"}};
+ const std::array rows{"in", "out", "total"};
for (uint8_t i = 0; i < 3; ++i) {
result += strprintf("\n%-5s %5i %5i %5i", rows.at(i), m_counts.at(i).at(0), m_counts.at(i).at(1), m_counts.at(i).at(2)); // ipv4/ipv6/onion peers counts
if (any_i2p_peers) result += strprintf(" %5i", m_counts.at(i).at(3)); // i2p peers count
- result += strprintf(" %5i", m_counts.at(i).at(m_networks_size)); // total peers count
+ result += strprintf(" %5i", m_counts.at(i).at(m_networks.size())); // total peers count
if (i == 1) { // the outbound row has two extra columns for block relay and manual peer counts
result += strprintf(" %5i", m_block_relay_peers_count);
if (m_manual_peers_count) result += strprintf(" %5i", m_manual_peers_count);
@@ -914,6 +968,8 @@ static int CommandLineRPC(int argc, char *argv[])
} else {
ParseError(error, strPrint, nRet);
}
+ } else if (gArgs.GetBoolArg("-addrinfo", false)) {
+ rh.reset(new AddrinfoRequestHandler());
} else {
rh.reset(new DefaultRequestHandler());
if (args.size() < 1) {
diff --git a/src/bitcoind.cpp b/src/bitcoind.cpp
index 225b8b1ec4..cf9e4fad44 100644
--- a/src/bitcoind.cpp
+++ b/src/bitcoind.cpp
@@ -12,6 +12,7 @@
#include <compat.h>
#include <init.h>
#include <interfaces/chain.h>
+#include <interfaces/init.h>
#include <node/context.h>
#include <node/ui_interface.h>
#include <noui.h>
@@ -104,10 +105,8 @@ int fork_daemon(bool nochdir, bool noclose, TokenPipeEnd& endpoint)
#endif
-static bool AppInit(int argc, char* argv[])
+static bool AppInit(NodeContext& node, int argc, char* argv[])
{
- NodeContext node;
-
bool fRet = false;
util::ThreadSetInternalName("init");
@@ -254,10 +253,18 @@ int main(int argc, char* argv[])
util::WinCmdLineArgs winArgs;
std::tie(argc, argv) = winArgs.get();
#endif
+
+ NodeContext node;
+ int exit_status;
+ std::unique_ptr<interfaces::Init> init = interfaces::MakeNodeInit(node, argc, argv, exit_status);
+ if (!init) {
+ return exit_status;
+ }
+
SetupEnvironment();
// Connect bitcoind signal handlers
noui_connect();
- return (AppInit(argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
+ return (AppInit(node, argc, argv) ? EXIT_SUCCESS : EXIT_FAILURE);
}
diff --git a/src/compressor.cpp b/src/compressor.cpp
index a70306d320..ef3135e7a5 100644
--- a/src/compressor.cpp
+++ b/src/compressor.cpp
@@ -52,7 +52,7 @@ static bool IsToPubKey(const CScript& script, CPubKey &pubkey)
return false;
}
-bool CompressScript(const CScript& script, std::vector<unsigned char> &out)
+bool CompressScript(const CScript& script, CompressedScript& out)
{
CKeyID keyID;
if (IsToKeyID(script, keyID)) {
@@ -92,7 +92,7 @@ unsigned int GetSpecialScriptSize(unsigned int nSize)
return 0;
}
-bool DecompressScript(CScript& script, unsigned int nSize, const std::vector<unsigned char> &in)
+bool DecompressScript(CScript& script, unsigned int nSize, const CompressedScript& in)
{
switch(nSize) {
case 0x00:
diff --git a/src/compressor.h b/src/compressor.h
index 478bfff0b6..40b2496f06 100644
--- a/src/compressor.h
+++ b/src/compressor.h
@@ -6,14 +6,26 @@
#ifndef BITCOIN_COMPRESSOR_H
#define BITCOIN_COMPRESSOR_H
+#include <prevector.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <serialize.h>
#include <span.h>
-bool CompressScript(const CScript& script, std::vector<unsigned char> &out);
+/**
+ * This saves us from making many heap allocations when serializing
+ * and deserializing compressed scripts.
+ *
+ * This prevector size is determined by the largest .resize() in the
+ * CompressScript function. The largest compressed script format is a
+ * compressed public key, which is 33 bytes.
+ */
+using CompressedScript = prevector<33, unsigned char>;
+
+
+bool CompressScript(const CScript& script, CompressedScript& out);
unsigned int GetSpecialScriptSize(unsigned int nSize);
-bool DecompressScript(CScript& script, unsigned int nSize, const std::vector<unsigned char> &out);
+bool DecompressScript(CScript& script, unsigned int nSize, const CompressedScript& in);
/**
* Compress amount.
@@ -51,7 +63,7 @@ struct ScriptCompression
template<typename Stream>
void Ser(Stream &s, const CScript& script) {
- std::vector<unsigned char> compr;
+ CompressedScript compr;
if (CompressScript(script, compr)) {
s << MakeSpan(compr);
return;
@@ -66,7 +78,7 @@ struct ScriptCompression
unsigned int nSize = 0;
s >> VARINT(nSize);
if (nSize < nSpecialScripts) {
- std::vector<unsigned char> vch(GetSpecialScriptSize(nSize), 0x00);
+ CompressedScript vch(GetSpecialScriptSize(nSize), 0x00);
s >> MakeSpan(vch);
DecompressScript(script, nSize, vch);
return;
diff --git a/src/init.cpp b/src/init.cpp
index f8265b5db2..b56c25c145 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -23,9 +23,9 @@
#include <index/blockfilterindex.h>
#include <index/coinstatsindex.h>
#include <index/txindex.h>
+#include <init/common.h>
#include <interfaces/chain.h>
#include <interfaces/node.h>
-#include <key.h>
#include <mapport.h>
#include <miner.h>
#include <net.h>
@@ -152,8 +152,6 @@ static fs::path GetPidFile(const ArgsManager& args)
// shutdown thing.
//
-static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle;
-
void Interrupt(NodeContext& node)
{
InterruptHTTPServer();
@@ -200,20 +198,7 @@ void Shutdown(NodeContext& node)
// Because these depend on each-other, we make sure that neither can be
// using the other before destroying them.
if (node.peerman) UnregisterValidationInterface(node.peerman.get());
- // Follow the lock order requirements:
- // * CheckForStaleTipAndEvictPeers locks cs_main before indirectly calling GetExtraFullOutboundCount
- // which locks cs_vNodes.
- // * ProcessMessage locks cs_main and g_cs_orphans before indirectly calling ForEachNode which
- // locks cs_vNodes.
- // * CConnman::Stop calls DeleteNode, which calls FinalizeNode, which locks cs_main and calls
- // EraseOrphansFor, which locks g_cs_orphans.
- //
- // Thus the implicit locking order requirement is: (1) cs_main, (2) g_cs_orphans, (3) cs_vNodes.
- if (node.connman) {
- node.connman->StopThreads();
- LOCK2(::cs_main, ::g_cs_orphans);
- node.connman->StopNodes();
- }
+ if (node.connman) node.connman->Stop();
StopTorControl();
@@ -294,8 +279,7 @@ void Shutdown(NodeContext& node)
node.chain_clients.clear();
UnregisterAllValidationInterfaces();
GetMainSignals().UnregisterBackgroundSignalScheduler();
- globalVerifyHandle.reset();
- ECC_Stop();
+ init::UnsetGlobals();
node.mempool.reset();
node.fee_estimator.reset();
node.chainman = nullptr;
@@ -371,6 +355,8 @@ void SetupServerArgs(NodeContext& node)
SetupHelpOptions(argsman);
argsman.AddArg("-help-debug", "Print help message with debugging options and exit", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST); // server-only for now
+ init::AddLoggingArgs(argsman);
+
const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::MAIN);
const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET);
const auto signetBaseParams = CreateBaseChainParams(CBaseChainParams::SIGNET);
@@ -403,7 +389,6 @@ void SetupServerArgs(NodeContext& node)
argsman.AddArg("-datadir=<dir>", "Specify data directory", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbbatchsize", strprintf("Maximum database write batch size in bytes (default: %u)", nDefaultDbBatchSize), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-dbcache=<n>", strprintf("Maximum database cache size <n> MiB (%d to %d, default: %d). In addition, unused mempool memory is shared for this cache (see -maxmempool).", nMinDbCache, nMaxDbCache, nDefaultDbCache), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
- argsman.AddArg("-debuglogfile=<file>", strprintf("Specify location of debug log file. Relative paths will be prefixed by a net-specific datadir location. (-nodebuglogfile to disable; default: %s)", DEFAULT_DEBUGLOGFILE), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-feefilter", strprintf("Tell other nodes to filter invs to us by our mempool min fee (default: %u)", DEFAULT_FEEFILTER), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-includeconf=<file>", "Specify additional configuration file, relative to the -datadir path (only useable from configuration file, not command line)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-loadblock=<file>", "Imports blocks from external file on startup", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
@@ -531,25 +516,10 @@ void SetupServerArgs(NodeContext& node)
argsman.AddArg("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-addrmantest", "Allows to test address relay on localhost", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-capturemessages", "Capture all P2P messages to disk", ArgsManager::ALLOW_BOOL | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-debug=<category>", "Output debugging information (default: -nodebug, supplying <category> is optional). "
- "If <category> is not supplied or if <category> = 1, output all debugging information. <category> can be: " + LogInstance().LogCategoriesString() + ". This option can be specified multiple times to output multiple categories.",
- ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-debugexclude=<category>", strprintf("Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except the specified category. This option can be specified multiple times to exclude multiple categories."), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-logips", strprintf("Include IP addresses in debug output (default: %u)", DEFAULT_LOGIPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-logtimestamps", strprintf("Prepend debug output with timestamp (default: %u)", DEFAULT_LOGTIMESTAMPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
-#ifdef HAVE_THREAD_LOCAL
- argsman.AddArg("-logthreadnames", strprintf("Prepend debug output with name of the originating thread (only available on platforms supporting thread_local) (default: %u)", DEFAULT_LOGTHREADNAMES), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
-#else
- hidden_args.emplace_back("-logthreadnames");
-#endif
- argsman.AddArg("-logsourcelocations", strprintf("Prepend debug output with name of the originating source location (source file, line number and function name) (default: %u)", DEFAULT_LOGSOURCELOCATIONS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-logtimemicros", strprintf("Add microsecond precision to debug timestamps (default: %u)", DEFAULT_LOGTIMEMICROS), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-mocktime=<n>", "Replace actual time with " + UNIX_EPOCH_TIME + " (default: 0)", ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-maxsigcachesize=<n>", strprintf("Limit sum of signature cache and script execution cache sizes to <n> MiB (default: %u)", DEFAULT_MAX_SIG_CACHE_SIZE), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-maxtipage=<n>", strprintf("Maximum tip age in seconds to consider node in initial block download (default: %u)", DEFAULT_MAX_TIP_AGE), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-printpriority", strprintf("Log transaction fee per kB when mining blocks (default: %u)", DEFAULT_PRINTPRIORITY), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
- argsman.AddArg("-shrinkdebugfile", "Shrink debug.log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
argsman.AddArg("-uacomment=<cmt>", "Append comment to the user agent string", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
SetupChainParamsBaseOptions(argsman);
@@ -646,7 +616,7 @@ static void CleanupBlockRevFiles()
// Remove the rev files immediately and insert the blk file paths into an
// ordered map keyed by block file index.
LogPrintf("Removing unusable blk?????.dat and rev?????.dat files for -reindex with -prune\n");
- fs::path blocksdir = GetBlocksDir();
+ fs::path blocksdir = gArgs.GetBlocksDirPath();
for (fs::directory_iterator it(blocksdir); it != fs::directory_iterator(); it++) {
if (fs::is_regular_file(*it) &&
it->path().filename().string().length() == 12 &&
@@ -684,30 +654,6 @@ static void StartupNotify(const ArgsManager& args)
}
#endif
-/** Sanity checks
- * Ensure that Bitcoin is running in a usable environment with all
- * necessary library support.
- */
-static bool InitSanityCheck()
-{
- if (!ECC_InitSanityCheck()) {
- return InitError(Untranslated("Elliptic curve cryptography sanity check failure. Aborting."));
- }
-
- if (!glibcxx_sanity_test())
- return false;
-
- if (!Random_SanityCheck()) {
- return InitError(Untranslated("OS cryptographic RNG sanity check failure. Aborting."));
- }
-
- if (!ChronoSanityCheck()) {
- return InitError(Untranslated("Clock epoch mismatch. Aborting."));
- }
-
- return true;
-}
-
static bool AppInitServers(NodeContext& node)
{
const ArgsManager& args = *Assert(node.args);
@@ -805,25 +751,8 @@ void InitParameterInteraction(ArgsManager& args)
*/
void InitLogging(const ArgsManager& args)
{
- LogInstance().m_print_to_file = !args.IsArgNegated("-debuglogfile");
- LogInstance().m_file_path = AbsPathForConfigVal(args.GetArg("-debuglogfile", DEFAULT_DEBUGLOGFILE));
- LogInstance().m_print_to_console = args.GetBoolArg("-printtoconsole", !args.GetBoolArg("-daemon", false));
- LogInstance().m_log_timestamps = args.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS);
- LogInstance().m_log_time_micros = args.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS);
-#ifdef HAVE_THREAD_LOCAL
- LogInstance().m_log_threadnames = args.GetBoolArg("-logthreadnames", DEFAULT_LOGTHREADNAMES);
-#endif
- LogInstance().m_log_sourcelocations = args.GetBoolArg("-logsourcelocations", DEFAULT_LOGSOURCELOCATIONS);
-
- fLogIPs = args.GetBoolArg("-logips", DEFAULT_LOGIPS);
-
- std::string version_string = FormatFullVersion();
-#ifdef DEBUG
- version_string += " (debug build)";
-#else
- version_string += " (release build)";
-#endif
- LogPrintf(PACKAGE_NAME " version %s\n", version_string);
+ init::SetLoggingOptions(args);
+ init::LogPackageVersion();
}
namespace { // Variables internal to initialization process only
@@ -928,7 +857,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
InitWarning(warnings);
}
- if (!fs::is_directory(GetBlocksDir())) {
+ if (!fs::is_directory(gArgs.GetBlocksDirPath())) {
return InitError(strprintf(_("Specified blocks directory \"%s\" does not exist."), args.GetArg("-blocksdir", "")));
}
@@ -993,26 +922,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
InitWarning(strprintf(_("Reducing -maxconnections from %d to %d, because of system limitations."), nUserMaxConnections, nMaxConnections));
// ********************************************************* Step 3: parameter-to-internal-flags
- if (args.IsArgSet("-debug")) {
- // Special-case: if -debug=0/-nodebug is set, turn off debugging messages
- const std::vector<std::string> categories = args.GetArgs("-debug");
-
- if (std::none_of(categories.begin(), categories.end(),
- [](std::string cat){return cat == "0" || cat == "none";})) {
- for (const auto& cat : categories) {
- if (!LogInstance().EnableCategory(cat)) {
- InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat));
- }
- }
- }
- }
-
- // Now remove the logging categories which were explicitly excluded
- for (const std::string& cat : args.GetArgs("-debugexclude")) {
- if (!LogInstance().DisableCategory(cat)) {
- InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat));
- }
- }
+ init::SetLoggingCategories(args);
fCheckBlockIndex = args.GetBoolArg("-checkblockindex", chainparams.DefaultConsistencyChecks());
fCheckpointsEnabled = args.GetBoolArg("-checkpoints", DEFAULT_CHECKPOINTS_ENABLED);
@@ -1159,16 +1069,11 @@ bool AppInitSanityChecks()
{
// ********************************************************* Step 4: sanity checks
- // Initialize elliptic curve code
- std::string sha256_algo = SHA256AutoDetect();
- LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);
- RandomInit();
- ECC_Start();
- globalVerifyHandle.reset(new ECCVerifyHandle());
+ init::SetGlobals();
- // Sanity check
- if (!InitSanityCheck())
+ if (!init::SanityChecks()) {
return InitError(strprintf(_("Initialization sanity check failed. %s is shutting down."), PACKAGE_NAME));
+ }
// Probe the data directory lock to give an early error message, if possible
// We cannot hold the data directory lock here, as the forking for daemon() hasn't yet happened,
@@ -1208,38 +1113,11 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// Detailed error printed inside CreatePidFile().
return false;
}
- if (LogInstance().m_print_to_file) {
- if (args.GetBoolArg("-shrinkdebugfile", LogInstance().DefaultShrinkDebugFile())) {
- // Do this first since it both loads a bunch of debug.log into memory,
- // and because this needs to happen before any other debug.log printing
- LogInstance().ShrinkDebugFile();
- }
- }
- if (!LogInstance().StartLogging()) {
- return InitError(strprintf(Untranslated("Could not open debug log file %s"),
- LogInstance().m_file_path.string()));
- }
-
- if (!LogInstance().m_log_timestamps)
- LogPrintf("Startup time: %s\n", FormatISO8601DateTime(GetTime()));
- LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
- LogPrintf("Using data directory %s\n", GetDataDir().string());
-
- // Only log conf file usage message if conf file actually exists.
- fs::path config_file_path = GetConfigFile(args.GetArg("-conf", BITCOIN_CONF_FILENAME));
- if (fs::exists(config_file_path)) {
- LogPrintf("Config file: %s\n", config_file_path.string());
- } else if (args.IsArgSet("-conf")) {
- // Warn if no conf file exists at path provided by user
- InitWarning(strprintf(_("The specified config file %s does not exist"), config_file_path.string()));
- } else {
- // Not categorizing as "Warning" because it's the default behavior
- LogPrintf("Config file: %s (not found, skipping)\n", config_file_path.string());
+ if (!init::StartLogging(args)) {
+ // Detailed error printed inside StartLogging().
+ return false;
}
- // Log the config arguments to debug.log
- args.LogArgs();
-
LogPrintf("Using at most %i automatic connections (%i file descriptors available)\n", nMaxConnections, nFD);
// Warn about relative -datadir path.
@@ -1503,7 +1381,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
bool fLoaded = false;
while (!fLoaded && !ShutdownRequested()) {
- bool fReset = fReindex;
+ const bool fReset = fReindex;
auto is_coinsview_empty = [&](CChainState* chainstate) EXCLUSIVE_LOCKS_REQUIRED(::cs_main) {
return fReset || fReindexChainState || chainstate->CoinsTip().GetBestBlock().IsNull();
};
@@ -1624,29 +1502,17 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
break;
}
- bool failed_rewind{false};
- // Can't hold cs_main while calling RewindBlockIndex, so retrieve the relevant
- // chainstates beforehand.
- for (CChainState* chainstate : WITH_LOCK(::cs_main, return chainman.GetAll())) {
- if (!fReset) {
- // Note that RewindBlockIndex MUST run even if we're about to -reindex-chainstate.
- // It both disconnects blocks based on the chainstate, and drops block data in
- // BlockIndex() based on lack of available witness data.
- uiInterface.InitMessage(_("Rewinding blocks...").translated);
- if (!chainstate->RewindBlockIndex(chainparams)) {
- strLoadError = _(
- "Unable to rewind the database to a pre-fork state. "
- "You will need to redownload the blockchain");
- failed_rewind = true;
- break; // out of the per-chainstate loop
- }
+ if (!fReset) {
+ LOCK(cs_main);
+ auto chainstates{chainman.GetAll()};
+ if (std::any_of(chainstates.begin(), chainstates.end(),
+ [&chainparams](const CChainState* cs) EXCLUSIVE_LOCKS_REQUIRED(cs_main) { return cs->NeedsRedownload(chainparams); })) {
+ strLoadError = strprintf(_("Witness data for blocks after height %d requires validation. Please restart with -reindex."),
+ chainparams.GetConsensus().SegwitHeight);
+ break;
}
}
- if (failed_rewind) {
- break; // out of the chainstate activation do-while
- }
-
bool failed_verification = false;
try {
@@ -1670,11 +1536,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
break;
}
- // Only verify the DB of the active chainstate. This is fixed in later
- // work when we allow VerifyDB to be parameterized by chainstate.
- if (&::ChainstateActive() == chainstate &&
- !CVerifyDB().VerifyDB(
- chainparams, *chainstate, &chainstate->CoinsDB(),
+ if (!CVerifyDB().VerifyDB(
+ *chainstate, chainparams, chainstate->CoinsDB(),
args.GetArg("-checklevel", DEFAULT_CHECKLEVEL),
args.GetArg("-checkblocks", DEFAULT_CHECKBLOCKS))) {
strLoadError = _("Corrupted block database detected");
@@ -1775,8 +1638,8 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
InitError(strprintf(_("Error: Disk space is low for %s"), GetDataDir()));
return false;
}
- if (!CheckDiskSpace(GetBlocksDir())) {
- InitError(strprintf(_("Error: Disk space is low for %s"), GetBlocksDir()));
+ if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) {
+ InitError(strprintf(_("Error: Disk space is low for %s"), gArgs.GetBlocksDirPath()));
return false;
}
diff --git a/src/init/bitcoin-node.cpp b/src/init/bitcoin-node.cpp
new file mode 100644
index 0000000000..49684ede83
--- /dev/null
+++ b/src/init/bitcoin-node.cpp
@@ -0,0 +1,45 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/echo.h>
+#include <interfaces/init.h>
+#include <interfaces/ipc.h>
+#include <node/context.h>
+
+#include <memory>
+
+namespace init {
+namespace {
+const char* EXE_NAME = "bitcoin-node";
+
+class BitcoinNodeInit : public interfaces::Init
+{
+public:
+ BitcoinNodeInit(NodeContext& node, const char* arg0)
+ : m_node(node),
+ m_ipc(interfaces::MakeIpc(EXE_NAME, arg0, *this))
+ {
+ m_node.init = this;
+ }
+ std::unique_ptr<interfaces::Echo> makeEcho() override { return interfaces::MakeEcho(); }
+ interfaces::Ipc* ipc() override { return m_ipc.get(); }
+ NodeContext& m_node;
+ std::unique_ptr<interfaces::Ipc> m_ipc;
+};
+} // namespace
+} // namespace init
+
+namespace interfaces {
+std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status)
+{
+ auto init = std::make_unique<init::BitcoinNodeInit>(node, argc > 0 ? argv[0] : "");
+ // Check if bitcoin-node is being invoked as an IPC server. If so, then
+ // bypass normal execution and just respond to requests over the IPC
+ // channel and return null.
+ if (init->m_ipc->startSpawnedProcess(argc, argv, exit_status)) {
+ return nullptr;
+ }
+ return init;
+}
+} // namespace interfaces
diff --git a/src/init/bitcoind.cpp b/src/init/bitcoind.cpp
new file mode 100644
index 0000000000..1e17ce4d3c
--- /dev/null
+++ b/src/init/bitcoind.cpp
@@ -0,0 +1,29 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/init.h>
+#include <node/context.h>
+
+#include <memory>
+
+namespace init {
+namespace {
+class BitcoindInit : public interfaces::Init
+{
+public:
+ BitcoindInit(NodeContext& node) : m_node(node)
+ {
+ m_node.init = this;
+ }
+ NodeContext& m_node;
+};
+} // namespace
+} // namespace init
+
+namespace interfaces {
+std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status)
+{
+ return std::make_unique<init::BitcoindInit>(node);
+}
+} // namespace interfaces
diff --git a/src/init/common.cpp b/src/init/common.cpp
new file mode 100644
index 0000000000..79e0c9da78
--- /dev/null
+++ b/src/init/common.cpp
@@ -0,0 +1,167 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#if defined(HAVE_CONFIG_H)
+#include <config/bitcoin-config.h>
+#endif
+
+#include <clientversion.h>
+#include <compat/sanity.h>
+#include <crypto/sha256.h>
+#include <key.h>
+#include <logging.h>
+#include <node/ui_interface.h>
+#include <pubkey.h>
+#include <random.h>
+#include <util/system.h>
+#include <util/time.h>
+#include <util/translation.h>
+
+#include <memory>
+
+static std::unique_ptr<ECCVerifyHandle> globalVerifyHandle;
+
+namespace init {
+void SetGlobals()
+{
+ std::string sha256_algo = SHA256AutoDetect();
+ LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);
+ RandomInit();
+ ECC_Start();
+ globalVerifyHandle.reset(new ECCVerifyHandle());
+}
+
+void UnsetGlobals()
+{
+ globalVerifyHandle.reset();
+ ECC_Stop();
+}
+
+bool SanityChecks()
+{
+ if (!ECC_InitSanityCheck()) {
+ return InitError(Untranslated("Elliptic curve cryptography sanity check failure. Aborting."));
+ }
+
+ if (!glibcxx_sanity_test())
+ return false;
+
+ if (!Random_SanityCheck()) {
+ return InitError(Untranslated("OS cryptographic RNG sanity check failure. Aborting."));
+ }
+
+ if (!ChronoSanityCheck()) {
+ return InitError(Untranslated("Clock epoch mismatch. Aborting."));
+ }
+
+ return true;
+}
+
+void AddLoggingArgs(ArgsManager& argsman)
+{
+ argsman.AddArg("-debuglogfile=<file>", strprintf("Specify location of debug log file. Relative paths will be prefixed by a net-specific datadir location. (-nodebuglogfile to disable; default: %s)", DEFAULT_DEBUGLOGFILE), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
+ argsman.AddArg("-debug=<category>", "Output debugging information (default: -nodebug, supplying <category> is optional). "
+ "If <category> is not supplied or if <category> = 1, output all debugging information. <category> can be: " + LogInstance().LogCategoriesString() + ". This option can be specified multiple times to output multiple categories.",
+ ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-debugexclude=<category>", strprintf("Exclude debugging information for a category. Can be used in conjunction with -debug=1 to output debug logs for all categories except the specified category. This option can be specified multiple times to exclude multiple categories."), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-logips", strprintf("Include IP addresses in debug output (default: %u)", DEFAULT_LOGIPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-logtimestamps", strprintf("Prepend debug output with timestamp (default: %u)", DEFAULT_LOGTIMESTAMPS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+#ifdef HAVE_THREAD_LOCAL
+ argsman.AddArg("-logthreadnames", strprintf("Prepend debug output with name of the originating thread (only available on platforms supporting thread_local) (default: %u)", DEFAULT_LOGTHREADNAMES), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+#else
+ argsman.AddHiddenArgs({"-logthreadnames"});
+#endif
+ argsman.AddArg("-logsourcelocations", strprintf("Prepend debug output with name of the originating source location (source file, line number and function name) (default: %u)", DEFAULT_LOGSOURCELOCATIONS), ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-logtimemicros", strprintf("Add microsecond precision to debug timestamps (default: %u)", DEFAULT_LOGTIMEMICROS), ArgsManager::ALLOW_ANY | ArgsManager::DEBUG_ONLY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-printtoconsole", "Send trace/debug info to console (default: 1 when no -daemon. To disable logging to file, set -nodebuglogfile)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+ argsman.AddArg("-shrinkdebugfile", "Shrink debug.log file on client startup (default: 1 when no -debug)", ArgsManager::ALLOW_ANY, OptionsCategory::DEBUG_TEST);
+}
+
+void SetLoggingOptions(const ArgsManager& args)
+{
+ LogInstance().m_print_to_file = !args.IsArgNegated("-debuglogfile");
+ LogInstance().m_file_path = AbsPathForConfigVal(args.GetArg("-debuglogfile", DEFAULT_DEBUGLOGFILE));
+ LogInstance().m_print_to_console = args.GetBoolArg("-printtoconsole", !args.GetBoolArg("-daemon", false));
+ LogInstance().m_log_timestamps = args.GetBoolArg("-logtimestamps", DEFAULT_LOGTIMESTAMPS);
+ LogInstance().m_log_time_micros = args.GetBoolArg("-logtimemicros", DEFAULT_LOGTIMEMICROS);
+#ifdef HAVE_THREAD_LOCAL
+ LogInstance().m_log_threadnames = args.GetBoolArg("-logthreadnames", DEFAULT_LOGTHREADNAMES);
+#endif
+ LogInstance().m_log_sourcelocations = args.GetBoolArg("-logsourcelocations", DEFAULT_LOGSOURCELOCATIONS);
+
+ fLogIPs = args.GetBoolArg("-logips", DEFAULT_LOGIPS);
+}
+
+void SetLoggingCategories(const ArgsManager& args)
+{
+ if (args.IsArgSet("-debug")) {
+ // Special-case: if -debug=0/-nodebug is set, turn off debugging messages
+ const std::vector<std::string> categories = args.GetArgs("-debug");
+
+ if (std::none_of(categories.begin(), categories.end(),
+ [](std::string cat){return cat == "0" || cat == "none";})) {
+ for (const auto& cat : categories) {
+ if (!LogInstance().EnableCategory(cat)) {
+ InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debug", cat));
+ }
+ }
+ }
+ }
+
+ // Now remove the logging categories which were explicitly excluded
+ for (const std::string& cat : args.GetArgs("-debugexclude")) {
+ if (!LogInstance().DisableCategory(cat)) {
+ InitWarning(strprintf(_("Unsupported logging category %s=%s."), "-debugexclude", cat));
+ }
+ }
+}
+
+bool StartLogging(const ArgsManager& args)
+{
+ if (LogInstance().m_print_to_file) {
+ if (args.GetBoolArg("-shrinkdebugfile", LogInstance().DefaultShrinkDebugFile())) {
+ // Do this first since it both loads a bunch of debug.log into memory,
+ // and because this needs to happen before any other debug.log printing
+ LogInstance().ShrinkDebugFile();
+ }
+ }
+ if (!LogInstance().StartLogging()) {
+ return InitError(strprintf(Untranslated("Could not open debug log file %s"),
+ LogInstance().m_file_path.string()));
+ }
+
+ if (!LogInstance().m_log_timestamps)
+ LogPrintf("Startup time: %s\n", FormatISO8601DateTime(GetTime()));
+ LogPrintf("Default data directory %s\n", GetDefaultDataDir().string());
+ LogPrintf("Using data directory %s\n", GetDataDir().string());
+
+ // Only log conf file usage message if conf file actually exists.
+ fs::path config_file_path = GetConfigFile(args.GetArg("-conf", BITCOIN_CONF_FILENAME));
+ if (fs::exists(config_file_path)) {
+ LogPrintf("Config file: %s\n", config_file_path.string());
+ } else if (args.IsArgSet("-conf")) {
+ // Warn if no conf file exists at path provided by user
+ InitWarning(strprintf(_("The specified config file %s does not exist"), config_file_path.string()));
+ } else {
+ // Not categorizing as "Warning" because it's the default behavior
+ LogPrintf("Config file: %s (not found, skipping)\n", config_file_path.string());
+ }
+
+ // Log the config arguments to debug.log
+ args.LogArgs();
+
+ return true;
+}
+
+void LogPackageVersion()
+{
+ std::string version_string = FormatFullVersion();
+#ifdef DEBUG
+ version_string += " (debug build)";
+#else
+ version_string += " (release build)";
+#endif
+ LogPrintf(PACKAGE_NAME " version %s\n", version_string);
+}
+} // namespace init
diff --git a/src/init/common.h b/src/init/common.h
new file mode 100644
index 0000000000..fc4bc1b280
--- /dev/null
+++ b/src/init/common.h
@@ -0,0 +1,28 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+//! @file
+//! @brief Common init functions shared by bitcoin-node, bitcoin-wallet, etc.
+
+#ifndef BITCOIN_INIT_COMMON_H
+#define BITCOIN_INIT_COMMON_H
+
+class ArgsManager;
+
+namespace init {
+void SetGlobals();
+void UnsetGlobals();
+/**
+ * Ensure a usable environment with all
+ * necessary library support.
+ */
+bool SanityChecks();
+void AddLoggingArgs(ArgsManager& args);
+void SetLoggingOptions(const ArgsManager& args);
+void SetLoggingCategories(const ArgsManager& args);
+bool StartLogging(const ArgsManager& args);
+void LogPackageVersion();
+} // namespace init
+
+#endif // BITCOIN_INIT_COMMON_H
diff --git a/src/interfaces/README.md b/src/interfaces/README.md
index f77d172153..97167d5298 100644
--- a/src/interfaces/README.md
+++ b/src/interfaces/README.md
@@ -12,6 +12,8 @@ The following interfaces are defined here:
* [`Handler`](handler.h) — returned by `handleEvent` methods on interfaces above and used to manage lifetimes of event handlers.
-* [`Init`](init.h) — used by multiprocess code to access interfaces above on startup. Added in [#10102](https://github.com/bitcoin/bitcoin/pull/10102).
+* [`Init`](init.h) — used by multiprocess code to access interfaces above on startup. Added in [#19160](https://github.com/bitcoin/bitcoin/pull/19160).
-The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in different processes, and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.
+* [`Ipc`](ipc.h) — used by multiprocess code to access `Init` interface across processes. Added in [#19160](https://github.com/bitcoin/bitcoin/pull/19160).
+
+The interfaces above define boundaries between major components of bitcoin code (node, wallet, and gui), making it possible for them to run in [different processes](../../doc/multiprocess.md), and be tested, developed, and understood independently. These interfaces are not currently designed to be stable or to be used externally.
diff --git a/src/interfaces/echo.cpp b/src/interfaces/echo.cpp
new file mode 100644
index 0000000000..9bbb42217b
--- /dev/null
+++ b/src/interfaces/echo.cpp
@@ -0,0 +1,18 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/echo.h>
+
+#include <memory>
+
+namespace interfaces {
+namespace {
+class EchoImpl : public Echo
+{
+public:
+ std::string echo(const std::string& echo) override { return echo; }
+};
+} // namespace
+std::unique_ptr<Echo> MakeEcho() { return std::make_unique<EchoImpl>(); }
+} // namespace interfaces
diff --git a/src/interfaces/echo.h b/src/interfaces/echo.h
new file mode 100644
index 0000000000..5578d9d9e6
--- /dev/null
+++ b/src/interfaces/echo.h
@@ -0,0 +1,26 @@
+// Copyright (c) 2021 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_INTERFACES_ECHO_H
+#define BITCOIN_INTERFACES_ECHO_H
+
+#include <memory>
+#include <string>
+
+namespace interfaces {
+//! Simple string echoing interface for testing.
+class Echo
+{
+public:
+ virtual ~Echo() {}
+
+ //! Echo provided string.
+ virtual std::string echo(const std::string& echo) = 0;
+};
+
+//! Return implementation of Echo interface.
+std::unique_ptr<Echo> MakeEcho();
+} // namespace interfaces
+
+#endif // BITCOIN_INTERFACES_ECHO_H
diff --git a/src/interfaces/init.cpp b/src/interfaces/init.cpp
new file mode 100644
index 0000000000..a3c949e616
--- /dev/null
+++ b/src/interfaces/init.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/chain.h>
+#include <interfaces/echo.h>
+#include <interfaces/init.h>
+#include <interfaces/node.h>
+#include <interfaces/wallet.h>
+
+namespace interfaces {
+std::unique_ptr<Node> Init::makeNode() { return {}; }
+std::unique_ptr<Chain> Init::makeChain() { return {}; }
+std::unique_ptr<WalletClient> Init::makeWalletClient(Chain& chain) { return {}; }
+std::unique_ptr<Echo> Init::makeEcho() { return {}; }
+Ipc* Init::ipc() { return nullptr; }
+} // namespace interfaces
diff --git a/src/interfaces/init.h b/src/interfaces/init.h
new file mode 100644
index 0000000000..2a38054a17
--- /dev/null
+++ b/src/interfaces/init.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2021 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_INTERFACES_INIT_H
+#define BITCOIN_INTERFACES_INIT_H
+
+#include <memory>
+
+struct NodeContext;
+
+namespace interfaces {
+class Chain;
+class Echo;
+class Ipc;
+class Node;
+class WalletClient;
+
+//! Initial interface created when a process is first started, and used to give
+//! and get access to other interfaces (Node, Chain, Wallet, etc).
+//!
+//! There is a different Init interface implementation for each process
+//! (bitcoin-gui, bitcoin-node, bitcoin-wallet, bitcoind, bitcoin-qt) and each
+//! implementation can implement the make methods for interfaces it supports.
+//! The default make methods all return null.
+class Init
+{
+public:
+ virtual ~Init() = default;
+ virtual std::unique_ptr<Node> makeNode();
+ virtual std::unique_ptr<Chain> makeChain();
+ virtual std::unique_ptr<WalletClient> makeWalletClient(Chain& chain);
+ virtual std::unique_ptr<Echo> makeEcho();
+ virtual Ipc* ipc();
+};
+
+//! Return implementation of Init interface for the node process. If the argv
+//! indicates that this is a child process spawned to handle requests from a
+//! parent process, this blocks and handles requests, then returns null and a
+//! status code to exit with. If this returns non-null, the caller can start up
+//! normally and use the Init object to spawn and connect to other processes
+//! while it is running.
+std::unique_ptr<Init> MakeNodeInit(NodeContext& node, int argc, char* argv[], int& exit_status);
+
+//! Return implementation of Init interface for the wallet process.
+std::unique_ptr<Init> MakeWalletInit(int argc, char* argv[], int& exit_status);
+
+//! Return implementation of Init interface for the gui process.
+std::unique_ptr<Init> MakeGuiInit(int argc, char* argv[]);
+} // namespace interfaces
+
+#endif // BITCOIN_INTERFACES_INIT_H
diff --git a/src/interfaces/ipc.h b/src/interfaces/ipc.h
new file mode 100644
index 0000000000..e9e6c78053
--- /dev/null
+++ b/src/interfaces/ipc.h
@@ -0,0 +1,71 @@
+// Copyright (c) 2021 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_INTERFACES_IPC_H
+#define BITCOIN_INTERFACES_IPC_H
+
+#include <functional>
+#include <memory>
+#include <typeindex>
+
+namespace interfaces {
+class Init;
+
+//! Interface providing access to interprocess-communication (IPC)
+//! functionality. The IPC implementation is responsible for establishing
+//! connections between a controlling process and a process being controlled.
+//! When a connection is established, the process being controlled returns an
+//! interfaces::Init pointer to the controlling process, which the controlling
+//! process can use to get access to other interfaces and functionality.
+//!
+//! When spawning a new process, the steps are:
+//!
+//! 1. The controlling process calls interfaces::Ipc::spawnProcess(), which
+//! calls ipc::Process::spawn(), which spawns a new process and returns a
+//! socketpair file descriptor for communicating with it.
+//! interfaces::Ipc::spawnProcess() then calls ipc::Protocol::connect()
+//! passing the socketpair descriptor, which returns a local proxy
+//! interfaces::Init implementation calling remote interfaces::Init methods.
+//! 2. The spawned process calls interfaces::Ipc::startSpawnProcess(), which
+//! calls ipc::Process::checkSpawned() to read command line arguments and
+//! determine whether it is a spawned process and what socketpair file
+//! descriptor it should use. It then calls ipc::Protocol::serve() to handle
+//! incoming requests from the socketpair and invoke interfaces::Init
+//! interface methods, and exit when the socket is closed.
+//! 3. The controlling process calls local proxy interfaces::Init object methods
+//! to make other proxy objects calling other remote interfaces. It can also
+//! destroy the initial interfaces::Init object to close the connection and
+//! shut down the spawned process.
+class Ipc
+{
+public:
+ virtual ~Ipc() = default;
+
+ //! Spawn a child process returning pointer to its Init interface.
+ virtual std::unique_ptr<Init> spawnProcess(const char* exe_name) = 0;
+
+ //! If this is a spawned process, block and handle requests from the parent
+ //! process by forwarding them to this process's Init interface, then return
+ //! true. If this is not a spawned child process, return false.
+ virtual bool startSpawnedProcess(int argc, char* argv[], int& exit_status) = 0;
+
+ //! Add cleanup callback to remote interface that will run when the
+ //! interface is deleted.
+ template<typename Interface>
+ void addCleanup(Interface& iface, std::function<void()> cleanup)
+ {
+ addCleanup(typeid(Interface), &iface, std::move(cleanup));
+ }
+
+protected:
+ //! Internal implementation of public addCleanup method (above) as a
+ //! type-erased virtual function, since template functions can't be virtual.
+ virtual void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) = 0;
+};
+
+//! Return implementation of Ipc interface.
+std::unique_ptr<Ipc> MakeIpc(const char* exe_name, const char* process_argv0, Init& init);
+} // namespace interfaces
+
+#endif // BITCOIN_INTERFACES_IPC_H
diff --git a/src/ipc/capnp/.gitignore b/src/ipc/capnp/.gitignore
new file mode 100644
index 0000000000..036df1430c
--- /dev/null
+++ b/src/ipc/capnp/.gitignore
@@ -0,0 +1,2 @@
+# capnp generated files
+*.capnp.*
diff --git a/src/ipc/capnp/echo.capnp b/src/ipc/capnp/echo.capnp
new file mode 100644
index 0000000000..df36ee0de3
--- /dev/null
+++ b/src/ipc/capnp/echo.capnp
@@ -0,0 +1,17 @@
+# Copyright (c) 2021 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+@0x888b4f7f51e691f7;
+
+using Cxx = import "/capnp/c++.capnp";
+$Cxx.namespace("ipc::capnp::messages");
+
+using Proxy = import "/mp/proxy.capnp";
+$Proxy.include("interfaces/echo.h");
+$Proxy.include("ipc/capnp/echo.capnp.h");
+
+interface Echo $Proxy.wrap("interfaces::Echo") {
+ destroy @0 (context :Proxy.Context) -> ();
+ echo @1 (context :Proxy.Context, echo: Text) -> (result :Text);
+}
diff --git a/src/ipc/capnp/init-types.h b/src/ipc/capnp/init-types.h
new file mode 100644
index 0000000000..42031441b5
--- /dev/null
+++ b/src/ipc/capnp/init-types.h
@@ -0,0 +1,10 @@
+// Copyright (c) 2021 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_IPC_CAPNP_INIT_TYPES_H
+#define BITCOIN_IPC_CAPNP_INIT_TYPES_H
+
+#include <ipc/capnp/echo.capnp.proxy-types.h>
+
+#endif // BITCOIN_IPC_CAPNP_INIT_TYPES_H
diff --git a/src/ipc/capnp/init.capnp b/src/ipc/capnp/init.capnp
new file mode 100644
index 0000000000..e6d358c665
--- /dev/null
+++ b/src/ipc/capnp/init.capnp
@@ -0,0 +1,20 @@
+# Copyright (c) 2021 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+@0xf2c5cfa319406aa6;
+
+using Cxx = import "/capnp/c++.capnp";
+$Cxx.namespace("ipc::capnp::messages");
+
+using Proxy = import "/mp/proxy.capnp";
+$Proxy.include("interfaces/echo.h");
+$Proxy.include("interfaces/init.h");
+$Proxy.includeTypes("ipc/capnp/init-types.h");
+
+using Echo = import "echo.capnp";
+
+interface Init $Proxy.wrap("interfaces::Init") {
+ construct @0 (threadMap: Proxy.ThreadMap) -> (threadMap :Proxy.ThreadMap);
+ makeEcho @1 (context :Proxy.Context) -> (result :Echo.Echo);
+}
diff --git a/src/ipc/capnp/protocol.cpp b/src/ipc/capnp/protocol.cpp
new file mode 100644
index 0000000000..74c66c899a
--- /dev/null
+++ b/src/ipc/capnp/protocol.cpp
@@ -0,0 +1,90 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <interfaces/init.h>
+#include <ipc/capnp/init.capnp.h>
+#include <ipc/capnp/init.capnp.proxy.h>
+#include <ipc/capnp/protocol.h>
+#include <ipc/exception.h>
+#include <ipc/protocol.h>
+#include <kj/async.h>
+#include <logging.h>
+#include <mp/proxy-io.h>
+#include <mp/proxy-types.h>
+#include <mp/util.h>
+#include <util/threadnames.h>
+
+#include <assert.h>
+#include <errno.h>
+#include <future>
+#include <memory>
+#include <mutex>
+#include <optional>
+#include <string>
+#include <thread>
+
+namespace ipc {
+namespace capnp {
+namespace {
+void IpcLogFn(bool raise, std::string message)
+{
+ LogPrint(BCLog::IPC, "%s\n", message);
+ if (raise) throw Exception(message);
+}
+
+class CapnpProtocol : public Protocol
+{
+public:
+ ~CapnpProtocol() noexcept(true)
+ {
+ if (m_loop) {
+ std::unique_lock<std::mutex> lock(m_loop->m_mutex);
+ m_loop->removeClient(lock);
+ }
+ if (m_loop_thread.joinable()) m_loop_thread.join();
+ assert(!m_loop);
+ };
+ std::unique_ptr<interfaces::Init> connect(int fd, const char* exe_name) override
+ {
+ startLoop(exe_name);
+ return mp::ConnectStream<messages::Init>(*m_loop, fd);
+ }
+ void serve(int fd, const char* exe_name, interfaces::Init& init) override
+ {
+ assert(!m_loop);
+ mp::g_thread_context.thread_name = mp::ThreadName(exe_name);
+ m_loop.emplace(exe_name, &IpcLogFn, nullptr);
+ mp::ServeStream<messages::Init>(*m_loop, fd, init);
+ m_loop->loop();
+ m_loop.reset();
+ }
+ void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) override
+ {
+ mp::ProxyTypeRegister::types().at(type)(iface).cleanup.emplace_back(std::move(cleanup));
+ }
+ void startLoop(const char* exe_name)
+ {
+ if (m_loop) return;
+ std::promise<void> promise;
+ m_loop_thread = std::thread([&] {
+ util::ThreadRename("capnp-loop");
+ m_loop.emplace(exe_name, &IpcLogFn, nullptr);
+ {
+ std::unique_lock<std::mutex> lock(m_loop->m_mutex);
+ m_loop->addClient(lock);
+ }
+ promise.set_value();
+ m_loop->loop();
+ m_loop.reset();
+ });
+ promise.get_future().wait();
+ }
+ std::thread m_loop_thread;
+ std::optional<mp::EventLoop> m_loop;
+};
+} // namespace
+
+std::unique_ptr<Protocol> MakeCapnpProtocol() { return std::make_unique<CapnpProtocol>(); }
+} // namespace capnp
+} // namespace ipc
diff --git a/src/ipc/capnp/protocol.h b/src/ipc/capnp/protocol.h
new file mode 100644
index 0000000000..eb057949d2
--- /dev/null
+++ b/src/ipc/capnp/protocol.h
@@ -0,0 +1,17 @@
+// Copyright (c) 2021 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_IPC_CAPNP_PROTOCOL_H
+#define BITCOIN_IPC_CAPNP_PROTOCOL_H
+
+#include <memory>
+
+namespace ipc {
+class Protocol;
+namespace capnp {
+std::unique_ptr<Protocol> MakeCapnpProtocol();
+} // namespace capnp
+} // namespace ipc
+
+#endif // BITCOIN_IPC_CAPNP_PROTOCOL_H
diff --git a/src/ipc/exception.h b/src/ipc/exception.h
new file mode 100644
index 0000000000..53dee8124a
--- /dev/null
+++ b/src/ipc/exception.h
@@ -0,0 +1,20 @@
+// Copyright (c) 2021 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_IPC_EXCEPTION_H
+#define BITCOIN_IPC_EXCEPTION_H
+
+#include <stdexcept>
+
+namespace ipc {
+//! Exception class thrown when a call to remote method fails due to an IPC
+//! error, like a socket getting disconnected.
+class Exception : public std::runtime_error
+{
+public:
+ using std::runtime_error::runtime_error;
+};
+} // namespace ipc
+
+#endif // BITCOIN_IPC_EXCEPTION_H
diff --git a/src/ipc/interfaces.cpp b/src/ipc/interfaces.cpp
new file mode 100644
index 0000000000..ad4b78ed81
--- /dev/null
+++ b/src/ipc/interfaces.cpp
@@ -0,0 +1,77 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <fs.h>
+#include <interfaces/init.h>
+#include <interfaces/ipc.h>
+#include <ipc/capnp/protocol.h>
+#include <ipc/process.h>
+#include <ipc/protocol.h>
+#include <logging.h>
+#include <tinyformat.h>
+#include <util/system.h>
+
+#include <functional>
+#include <memory>
+#include <stdexcept>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
+#include <unistd.h>
+#include <utility>
+#include <vector>
+
+namespace ipc {
+namespace {
+class IpcImpl : public interfaces::Ipc
+{
+public:
+ IpcImpl(const char* exe_name, const char* process_argv0, interfaces::Init& init)
+ : m_exe_name(exe_name), m_process_argv0(process_argv0), m_init(init),
+ m_protocol(ipc::capnp::MakeCapnpProtocol()), m_process(ipc::MakeProcess())
+ {
+ }
+ std::unique_ptr<interfaces::Init> spawnProcess(const char* new_exe_name) override
+ {
+ int pid;
+ int fd = m_process->spawn(new_exe_name, m_process_argv0, pid);
+ LogPrint(::BCLog::IPC, "Process %s pid %i launched\n", new_exe_name, pid);
+ auto init = m_protocol->connect(fd, m_exe_name);
+ Ipc::addCleanup(*init, [this, new_exe_name, pid] {
+ int status = m_process->waitSpawned(pid);
+ LogPrint(::BCLog::IPC, "Process %s pid %i exited with status %i\n", new_exe_name, pid, status);
+ });
+ return init;
+ }
+ bool startSpawnedProcess(int argc, char* argv[], int& exit_status) override
+ {
+ exit_status = EXIT_FAILURE;
+ int32_t fd = -1;
+ if (!m_process->checkSpawned(argc, argv, fd)) {
+ return false;
+ }
+ m_protocol->serve(fd, m_exe_name, m_init);
+ exit_status = EXIT_SUCCESS;
+ return true;
+ }
+ void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) override
+ {
+ m_protocol->addCleanup(type, iface, std::move(cleanup));
+ }
+ const char* m_exe_name;
+ const char* m_process_argv0;
+ interfaces::Init& m_init;
+ std::unique_ptr<Protocol> m_protocol;
+ std::unique_ptr<Process> m_process;
+};
+} // namespace
+} // namespace ipc
+
+namespace interfaces {
+std::unique_ptr<Ipc> MakeIpc(const char* exe_name, const char* process_argv0, Init& init)
+{
+ return std::make_unique<ipc::IpcImpl>(exe_name, process_argv0, init);
+}
+} // namespace interfaces
diff --git a/src/ipc/process.cpp b/src/ipc/process.cpp
new file mode 100644
index 0000000000..43ed1f1bae
--- /dev/null
+++ b/src/ipc/process.cpp
@@ -0,0 +1,61 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <fs.h>
+#include <ipc/process.h>
+#include <ipc/protocol.h>
+#include <mp/util.h>
+#include <tinyformat.h>
+#include <util/strencodings.h>
+
+#include <cstdint>
+#include <exception>
+#include <iostream>
+#include <stdexcept>
+#include <stdlib.h>
+#include <string.h>
+#include <system_error>
+#include <unistd.h>
+#include <utility>
+#include <vector>
+
+namespace ipc {
+namespace {
+class ProcessImpl : public Process
+{
+public:
+ int spawn(const std::string& new_exe_name, const fs::path& argv0_path, int& pid) override
+ {
+ return mp::SpawnProcess(pid, [&](int fd) {
+ fs::path path = argv0_path;
+ path.remove_filename();
+ path.append(new_exe_name);
+ return std::vector<std::string>{path.string(), "-ipcfd", strprintf("%i", fd)};
+ });
+ }
+ int waitSpawned(int pid) override { return mp::WaitProcess(pid); }
+ bool checkSpawned(int argc, char* argv[], int& fd) override
+ {
+ // If this process was not started with a single -ipcfd argument, it is
+ // not a process spawned by the spawn() call above, so return false and
+ // do not try to serve requests.
+ if (argc != 3 || strcmp(argv[1], "-ipcfd") != 0) {
+ return false;
+ }
+ // If a single -ipcfd argument was provided, return true and get the
+ // file descriptor so Protocol::serve() can be called to handle
+ // requests from the parent process. The -ipcfd argument is not valid
+ // in combination with other arguments because the parent process
+ // should be able to control the child process through the IPC protocol
+ // without passing information out of band.
+ if (!ParseInt32(argv[2], &fd)) {
+ throw std::runtime_error(strprintf("Invalid -ipcfd number '%s'", argv[2]));
+ }
+ return true;
+ }
+};
+} // namespace
+
+std::unique_ptr<Process> MakeProcess() { return std::make_unique<ProcessImpl>(); }
+} // namespace ipc
diff --git a/src/ipc/process.h b/src/ipc/process.h
new file mode 100644
index 0000000000..4bb2930d9c
--- /dev/null
+++ b/src/ipc/process.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2021 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_IPC_PROCESS_H
+#define BITCOIN_IPC_PROCESS_H
+
+#include <memory>
+#include <string>
+
+namespace ipc {
+class Protocol;
+
+//! IPC process interface for spawning bitcoin processes and serving requests
+//! in processes that have been spawned.
+//!
+//! There will be different implementations of this interface depending on the
+//! platform (e.g. unix, windows).
+class Process
+{
+public:
+ virtual ~Process() = default;
+
+ //! Spawn process and return socket file descriptor for communicating with
+ //! it.
+ virtual int spawn(const std::string& new_exe_name, const fs::path& argv0_path, int& pid) = 0;
+
+ //! Wait for spawned process to exit and return its exit code.
+ virtual int waitSpawned(int pid) = 0;
+
+ //! Parse command line and determine if current process is a spawned child
+ //! process. If so, return true and a file descriptor for communicating
+ //! with the parent process.
+ virtual bool checkSpawned(int argc, char* argv[], int& fd) = 0;
+};
+
+//! Constructor for Process interface. Implementation will vary depending on
+//! the platform (unix or windows).
+std::unique_ptr<Process> MakeProcess();
+} // namespace ipc
+
+#endif // BITCOIN_IPC_PROCESS_H
diff --git a/src/ipc/protocol.h b/src/ipc/protocol.h
new file mode 100644
index 0000000000..af955b0007
--- /dev/null
+++ b/src/ipc/protocol.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2021 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_IPC_PROTOCOL_H
+#define BITCOIN_IPC_PROTOCOL_H
+
+#include <interfaces/init.h>
+
+#include <functional>
+#include <memory>
+#include <typeindex>
+
+namespace ipc {
+//! IPC protocol interface for calling IPC methods over sockets.
+//!
+//! There may be different implementations of this interface for different IPC
+//! protocols (e.g. Cap'n Proto, gRPC, JSON-RPC, or custom protocols).
+class Protocol
+{
+public:
+ virtual ~Protocol() = default;
+
+ //! Return Init interface that forwards requests over given socket descriptor.
+ //! Socket communication is handled on a background thread.
+ virtual std::unique_ptr<interfaces::Init> connect(int fd, const char* exe_name) = 0;
+
+ //! Handle requests on provided socket descriptor, forwarding them to the
+ //! provided Init interface. Socket communication is handled on the
+ //! current thread, and this call blocks until the socket is closed.
+ virtual void serve(int fd, const char* exe_name, interfaces::Init& init) = 0;
+
+ //! Add cleanup callback to interface that will run when the interface is
+ //! deleted.
+ virtual void addCleanup(std::type_index type, void* iface, std::function<void()> cleanup) = 0;
+};
+} // namespace ipc
+
+#endif // BITCOIN_IPC_PROTOCOL_H
diff --git a/src/logging.cpp b/src/logging.cpp
index 866213786e..e5187fd596 100644
--- a/src/logging.cpp
+++ b/src/logging.cpp
@@ -157,6 +157,7 @@ const CLogCategoryDesc LogCategories[] =
{BCLog::LEVELDB, "leveldb"},
{BCLog::VALIDATION, "validation"},
{BCLog::I2P, "i2p"},
+ {BCLog::IPC, "ipc"},
{BCLog::ALL, "1"},
{BCLog::ALL, "all"},
};
diff --git a/src/logging.h b/src/logging.h
index 436f0cd12e..d04bc99268 100644
--- a/src/logging.h
+++ b/src/logging.h
@@ -58,6 +58,7 @@ namespace BCLog {
LEVELDB = (1 << 20),
VALIDATION = (1 << 21),
I2P = (1 << 22),
+ IPC = (1 << 23),
ALL = ~(uint32_t)0,
};
diff --git a/src/net.cpp b/src/net.cpp
index ae38acdc3c..fe1a0dfded 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -1732,7 +1732,7 @@ void CConnman::ProcessAddrFetch()
}
}
-bool CConnman::GetTryNewOutboundPeer()
+bool CConnman::GetTryNewOutboundPeer() const
{
return m_try_another_outbound_peer;
}
@@ -1749,7 +1749,7 @@ void CConnman::SetTryNewOutboundPeer(bool flag)
// Also exclude peers that haven't finished initial connection handshake yet
// (so that we don't decide we're over our desired connection limit, and then
// evict some peer that has finished the handshake)
-int CConnman::GetExtraFullOutboundCount()
+int CConnman::GetExtraFullOutboundCount() const
{
int full_outbound_peers = 0;
{
@@ -1763,7 +1763,7 @@ int CConnman::GetExtraFullOutboundCount()
return std::max(full_outbound_peers - m_max_outbound_full_relay, 0);
}
-int CConnman::GetExtraBlockRelayCount()
+int CConnman::GetExtraBlockRelayCount() const
{
int block_relay_peers = 0;
{
@@ -2061,7 +2061,7 @@ std::vector<CAddress> CConnman::GetCurrentBlockRelayOnlyConns() const
return ret;
}
-std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo()
+std::vector<AddedNodeInfo> CConnman::GetAddedNodeInfo() const
{
std::vector<AddedNodeInfo> ret;
@@ -2635,23 +2635,26 @@ void CConnman::StopNodes()
}
}
- // Close sockets
- LOCK(cs_vNodes);
- for (CNode* pnode : vNodes)
+ // Delete peer connections.
+ std::vector<CNode*> nodes;
+ WITH_LOCK(cs_vNodes, nodes.swap(vNodes));
+ for (CNode* pnode : nodes) {
pnode->CloseSocketDisconnect();
- for (ListenSocket& hListenSocket : vhListenSocket)
- if (hListenSocket.socket != INVALID_SOCKET)
- if (!CloseSocket(hListenSocket.socket))
- LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
-
- // clean up some globals (to help leak detection)
- for (CNode* pnode : vNodes) {
DeleteNode(pnode);
}
+
+ // Close listening sockets.
+ for (ListenSocket& hListenSocket : vhListenSocket) {
+ if (hListenSocket.socket != INVALID_SOCKET) {
+ if (!CloseSocket(hListenSocket.socket)) {
+ LogPrintf("CloseSocket(hListenSocket) failed with error %s\n", NetworkErrorString(WSAGetLastError()));
+ }
+ }
+ }
+
for (CNode* pnode : vNodesDisconnected) {
DeleteNode(pnode);
}
- vNodes.clear();
vNodesDisconnected.clear();
vhListenSocket.clear();
semOutbound.reset();
@@ -2671,7 +2674,7 @@ CConnman::~CConnman()
Stop();
}
-std::vector<CAddress> CConnman::GetAddresses(size_t max_addresses, size_t max_pct)
+std::vector<CAddress> CConnman::GetAddresses(size_t max_addresses, size_t max_pct) const
{
std::vector<CAddress> addresses = addrman.GetAddr(max_addresses, max_pct);
if (m_banman) {
@@ -2746,7 +2749,7 @@ bool CConnman::RemoveAddedNode(const std::string& strNode)
return false;
}
-size_t CConnman::GetNodeCount(ConnectionDirection flags)
+size_t CConnman::GetNodeCount(ConnectionDirection flags) const
{
LOCK(cs_vNodes);
if (flags == ConnectionDirection::Both) // Shortcut if we want total
@@ -2762,7 +2765,7 @@ size_t CConnman::GetNodeCount(ConnectionDirection flags)
return nNum;
}
-void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats)
+void CConnman::GetNodeStats(std::vector<CNodeStats>& vstats) const
{
vstats.clear();
LOCK(cs_vNodes);
@@ -2839,18 +2842,18 @@ void CConnman::RecordBytesSent(uint64_t bytes)
nMaxOutboundTotalBytesSentInCycle += bytes;
}
-uint64_t CConnman::GetMaxOutboundTarget()
+uint64_t CConnman::GetMaxOutboundTarget() const
{
LOCK(cs_totalBytesSent);
return nMaxOutboundLimit;
}
-std::chrono::seconds CConnman::GetMaxOutboundTimeframe()
+std::chrono::seconds CConnman::GetMaxOutboundTimeframe() const
{
return MAX_UPLOAD_TIMEFRAME;
}
-std::chrono::seconds CConnman::GetMaxOutboundTimeLeftInCycle()
+std::chrono::seconds CConnman::GetMaxOutboundTimeLeftInCycle() const
{
LOCK(cs_totalBytesSent);
if (nMaxOutboundLimit == 0)
@@ -2864,7 +2867,7 @@ std::chrono::seconds CConnman::GetMaxOutboundTimeLeftInCycle()
return (cycleEndTime < now) ? 0s : cycleEndTime - now;
}
-bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
+bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit) const
{
LOCK(cs_totalBytesSent);
if (nMaxOutboundLimit == 0)
@@ -2884,7 +2887,7 @@ bool CConnman::OutboundTargetReached(bool historicalBlockServingLimit)
return false;
}
-uint64_t CConnman::GetOutboundTargetBytesLeft()
+uint64_t CConnman::GetOutboundTargetBytesLeft() const
{
LOCK(cs_totalBytesSent);
if (nMaxOutboundLimit == 0)
@@ -2893,13 +2896,13 @@ uint64_t CConnman::GetOutboundTargetBytesLeft()
return (nMaxOutboundTotalBytesSentInCycle >= nMaxOutboundLimit) ? 0 : nMaxOutboundLimit - nMaxOutboundTotalBytesSentInCycle;
}
-uint64_t CConnman::GetTotalBytesRecv()
+uint64_t CConnman::GetTotalBytesRecv() const
{
LOCK(cs_totalBytesRecv);
return nTotalBytesRecv;
}
-uint64_t CConnman::GetTotalBytesSent()
+uint64_t CConnman::GetTotalBytesSent() const
{
LOCK(cs_totalBytesSent);
return nTotalBytesSent;
diff --git a/src/net.h b/src/net.h
index 13f86b6a91..6b9a7ef136 100644
--- a/src/net.h
+++ b/src/net.h
@@ -923,7 +923,7 @@ public:
};
// Addrman functions
- std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct);
+ std::vector<CAddress> GetAddresses(size_t max_addresses, size_t max_pct) const;
/**
* Cache is used to minimize topology leaks, so it should
* be used for all non-trusted calls, for example, p2p.
@@ -935,7 +935,7 @@ public:
// This allows temporarily exceeding m_max_outbound_full_relay, with the goal of finding
// a peer that is better than all our current peers.
void SetTryNewOutboundPeer(bool flag);
- bool GetTryNewOutboundPeer();
+ bool GetTryNewOutboundPeer() const;
void StartExtraBlockRelayPeers() {
LogPrint(BCLog::NET, "net: enabling extra block-relay-only peers\n");
@@ -948,13 +948,13 @@ public:
// return a value less than (num_outbound_connections - num_outbound_slots)
// in cases where some outbound connections are not yet fully connected, or
// not yet fully disconnected.
- int GetExtraFullOutboundCount();
+ int GetExtraFullOutboundCount() const;
// Count the number of block-relay-only peers we have over our limit.
- int GetExtraBlockRelayCount();
+ int GetExtraBlockRelayCount() const;
bool AddNode(const std::string& node);
bool RemoveAddedNode(const std::string& node);
- std::vector<AddedNodeInfo> GetAddedNodeInfo();
+ std::vector<AddedNodeInfo> GetAddedNodeInfo() const;
/**
* Attempts to open a connection. Currently only used from tests.
@@ -969,8 +969,8 @@ public:
*/
bool AddConnection(const std::string& address, ConnectionType conn_type);
- size_t GetNodeCount(ConnectionDirection);
- void GetNodeStats(std::vector<CNodeStats>& vstats);
+ size_t GetNodeCount(ConnectionDirection) const;
+ void GetNodeStats(std::vector<CNodeStats>& vstats) const;
bool DisconnectNode(const std::string& node);
bool DisconnectNode(const CSubNet& subnet);
bool DisconnectNode(const CNetAddr& addr);
@@ -984,24 +984,24 @@ public:
//! that peer during `net_processing.cpp:PushNodeVersion()`.
ServiceFlags GetLocalServices() const;
- uint64_t GetMaxOutboundTarget();
- std::chrono::seconds GetMaxOutboundTimeframe();
+ uint64_t GetMaxOutboundTarget() const;
+ std::chrono::seconds GetMaxOutboundTimeframe() const;
//! check if the outbound target is reached
//! if param historicalBlockServingLimit is set true, the function will
//! response true if the limit for serving historical blocks has been reached
- bool OutboundTargetReached(bool historicalBlockServingLimit);
+ bool OutboundTargetReached(bool historicalBlockServingLimit) const;
//! response the bytes left in the current max outbound cycle
//! in case of no limit, it will always response 0
- uint64_t GetOutboundTargetBytesLeft();
+ uint64_t GetOutboundTargetBytesLeft() const;
//! returns the time left in the current max outbound cycle
//! in case of no limit, it will always return 0
- std::chrono::seconds GetMaxOutboundTimeLeftInCycle();
+ std::chrono::seconds GetMaxOutboundTimeLeftInCycle() const;
- uint64_t GetTotalBytesRecv();
- uint64_t GetTotalBytesSent();
+ uint64_t GetTotalBytesRecv() const;
+ uint64_t GetTotalBytesSent() const;
/** Get a unique deterministic randomizer. */
CSipHasher GetDeterministicRandomizer(uint64_t id) const;
@@ -1106,8 +1106,8 @@ private:
static bool NodeFullyConnected(const CNode* pnode);
// Network usage totals
- RecursiveMutex cs_totalBytesRecv;
- RecursiveMutex cs_totalBytesSent;
+ mutable RecursiveMutex cs_totalBytesRecv;
+ mutable RecursiveMutex cs_totalBytesSent;
uint64_t nTotalBytesRecv GUARDED_BY(cs_totalBytesRecv) {0};
uint64_t nTotalBytesSent GUARDED_BY(cs_totalBytesSent) {0};
@@ -1133,7 +1133,7 @@ private:
std::deque<std::string> m_addr_fetches GUARDED_BY(m_addr_fetches_mutex);
RecursiveMutex m_addr_fetches_mutex;
std::vector<std::string> vAddedNodes GUARDED_BY(cs_vAddedNodes);
- RecursiveMutex cs_vAddedNodes;
+ mutable RecursiveMutex cs_vAddedNodes;
std::vector<CNode*> vNodes GUARDED_BY(cs_vNodes);
std::list<CNode*> vNodesDisconnected;
mutable RecursiveMutex cs_vNodes;
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index b3927b5ec5..2201caf7d2 100755..100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -246,7 +246,7 @@ public:
/** Implement PeerManager */
void CheckForStaleTipAndEvictPeers() override;
- bool GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) override;
+ bool GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) const override;
bool IgnoresIncomingTxs() override { return m_ignore_incoming_txs; }
void SendPings() override;
void RelayTransaction(const uint256& txid, const uint256& wtxid) override;
@@ -1103,7 +1103,7 @@ PeerRef PeerManagerImpl::RemovePeer(NodeId id)
return ret;
}
-bool PeerManagerImpl::GetNodeStateStats(NodeId nodeid, CNodeStateStats &stats)
+bool PeerManagerImpl::GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) const
{
{
LOCK(cs_main);
diff --git a/src/net_processing.h b/src/net_processing.h
index 4556d32377..67252acbb6 100644
--- a/src/net_processing.h
+++ b/src/net_processing.h
@@ -43,7 +43,7 @@ public:
virtual ~PeerManager() { }
/** Get statistics from node state */
- virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) = 0;
+ virtual bool GetNodeStateStats(NodeId nodeid, CNodeStateStats& stats) const = 0;
/** Whether this node ignores txs received over p2p. */
virtual bool IgnoresIncomingTxs() = 0;
diff --git a/src/netaddress.cpp b/src/netaddress.cpp
index 69edc15c66..d56ae78e92 100644
--- a/src/netaddress.cpp
+++ b/src/netaddress.cpp
@@ -551,6 +551,11 @@ enum Network CNetAddr::GetNetwork() const
return m_net;
}
+static std::string IPv4ToString(Span<const uint8_t> a)
+{
+ return strprintf("%u.%u.%u.%u", a[0], a[1], a[2], a[3]);
+}
+
static std::string IPv6ToString(Span<const uint8_t> a)
{
assert(a.size() == ADDR_IPV6_SIZE);
@@ -571,6 +576,7 @@ std::string CNetAddr::ToStringIP() const
{
switch (m_net) {
case NET_IPV4:
+ return IPv4ToString(m_addr);
case NET_IPV6: {
CService serv(*this, 0);
struct sockaddr_storage sockaddr;
@@ -581,9 +587,6 @@ std::string CNetAddr::ToStringIP() const
sizeof(name), nullptr, 0, NI_NUMERICHOST))
return std::string(name);
}
- if (m_net == NET_IPV4) {
- return strprintf("%u.%u.%u.%u", m_addr[0], m_addr[1], m_addr[2], m_addr[3]);
- }
return IPv6ToString(m_addr);
}
case NET_ONION:
diff --git a/src/node/context.h b/src/node/context.h
index 2be9a584e6..06adb33a80 100644
--- a/src/node/context.h
+++ b/src/node/context.h
@@ -22,6 +22,7 @@ class PeerManager;
namespace interfaces {
class Chain;
class ChainClient;
+class Init;
class WalletClient;
} // namespace interfaces
@@ -36,6 +37,8 @@ class WalletClient;
//! any member functions. It should just be a collection of references that can
//! be used without pulling in unwanted dependencies or functionality.
struct NodeContext {
+ //! Init interface for initializing current process and connecting to other processes.
+ interfaces::Init* init{nullptr};
std::unique_ptr<CAddrMan> addrman;
std::unique_ptr<CConnman> connman;
std::unique_ptr<CTxMemPool> mempool;
diff --git a/src/qt/addressbookpage.cpp b/src/qt/addressbookpage.cpp
index 9927e925ac..a816a0764c 100644
--- a/src/qt/addressbookpage.cpp
+++ b/src/qt/addressbookpage.cpp
@@ -112,29 +112,17 @@ AddressBookPage::AddressBookPage(const PlatformStyle *platformStyle, Mode _mode,
break;
}
- // Context menu actions
- QAction *copyAddressAction = new QAction(tr("&Copy Address"), this);
- QAction *copyLabelAction = new QAction(tr("Copy &Label"), this);
- QAction *editAction = new QAction(tr("&Edit"), this);
- deleteAction = new QAction(ui->deleteAddress->text(), this);
-
// Build context menu
contextMenu = new QMenu(this);
- contextMenu->addAction(copyAddressAction);
- contextMenu->addAction(copyLabelAction);
- contextMenu->addAction(editAction);
- if(tab == SendingTab)
- contextMenu->addAction(deleteAction);
- contextMenu->addSeparator();
-
- // Connect signals for context menu actions
- connect(copyAddressAction, &QAction::triggered, this, &AddressBookPage::on_copyAddress_clicked);
- connect(copyLabelAction, &QAction::triggered, this, &AddressBookPage::onCopyLabelAction);
- connect(editAction, &QAction::triggered, this, &AddressBookPage::onEditAction);
- connect(deleteAction, &QAction::triggered, this, &AddressBookPage::on_deleteAddress_clicked);
+ contextMenu->addAction(tr("Copy Address"), this, &AddressBookPage::on_copyAddress_clicked);
+ contextMenu->addAction(tr("Copy Label"), this, &AddressBookPage::onCopyLabelAction);
+ contextMenu->addAction(tr("Edit"), this, &AddressBookPage::onEditAction);
- connect(ui->tableView, &QWidget::customContextMenuRequested, this, &AddressBookPage::contextualMenu);
+ if (tab == SendingTab) {
+ contextMenu->addAction(tr("Delete"), this, &AddressBookPage::on_deleteAddress_clicked);
+ }
+ connect(ui->tableView, &QWidget::customContextMenuRequested, this, &AddressBookPage::contextualMenu);
connect(ui->closeButton, &QPushButton::clicked, this, &QDialog::accept);
GUIUtil::handleCloseWindowShortcut(this);
@@ -249,13 +237,11 @@ void AddressBookPage::selectionChanged()
// In sending tab, allow deletion of selection
ui->deleteAddress->setEnabled(true);
ui->deleteAddress->setVisible(true);
- deleteAction->setEnabled(true);
break;
case ReceivingTab:
// Deleting receiving addresses, however, is not allowed
ui->deleteAddress->setEnabled(false);
ui->deleteAddress->setVisible(false);
- deleteAction->setEnabled(false);
break;
}
ui->copyAddress->setEnabled(true);
@@ -309,7 +295,8 @@ void AddressBookPage::on_exportButton_clicked()
if(!writer.write()) {
QMessageBox::critical(this, tr("Exporting Failed"),
- tr("There was an error trying to save the address list to %1. Please try again.").arg(filename));
+ //: %1 is a name of the file (e.g., "addrbook.csv") that the bitcoin addresses were exported to.
+ tr("There was an error trying to save the address list to %1. Please try again.", "An error message.").arg(filename));
}
}
diff --git a/src/qt/addressbookpage.h b/src/qt/addressbookpage.h
index c6a364ccbd..93feac9e23 100644
--- a/src/qt/addressbookpage.h
+++ b/src/qt/addressbookpage.h
@@ -55,7 +55,6 @@ private:
QString returnValue;
AddressBookSortFilterProxyModel *proxyModel;
QMenu *contextMenu;
- QAction *deleteAction; // to be able to explicitly disable it
QString newAddressToSelect;
private Q_SLOTS:
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index de71b7dea7..a30cac3504 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -319,11 +319,9 @@ void BitcoinApplication::parameterSetup()
InitParameterInteraction(gArgs);
}
-void BitcoinApplication::InitializePruneSetting(bool prune)
+void BitcoinApplication::InitPruneSetting(int64_t prune_MiB)
{
- // If prune is set, intentionally override existing prune size with
- // the default size since this is called when choosing a new datadir.
- optionsModel->SetPruneTargetGB(prune ? DEFAULT_PRUNE_TARGET_GB : 0, true);
+ optionsModel->SetPruneTargetGB(PruneMiBtoGB(prune_MiB), true);
}
void BitcoinApplication::requestInitialize()
@@ -533,9 +531,9 @@ int GuiMain(int argc, char* argv[])
/// 5. Now that settings and translations are available, ask user for data directory
// User language is set up: pick a data directory
bool did_show_intro = false;
- bool prune = false; // Intro dialog prune check box
+ int64_t prune_MiB = 0; // Intro dialog prune configuration
// Gracefully exit if the user cancels
- if (!Intro::showIfNeeded(did_show_intro, prune)) return EXIT_SUCCESS;
+ if (!Intro::showIfNeeded(did_show_intro, prune_MiB)) return EXIT_SUCCESS;
/// 6. Determine availability of data directory and parse bitcoin.conf
/// - Do not call GetDataDir(true) before this step finishes
@@ -617,7 +615,7 @@ int GuiMain(int argc, char* argv[])
if (did_show_intro) {
// Store intro dialog settings other than datadir (network specific)
- app.InitializePruneSetting(prune);
+ app.InitPruneSetting(prune_MiB);
}
if (gArgs.GetBoolArg("-splash", DEFAULT_SPLASHSCREEN) && !gArgs.GetBoolArg("-min", false))
diff --git a/src/qt/bitcoin.h b/src/qt/bitcoin.h
index 5fd6bd607f..f9fab0534b 100644
--- a/src/qt/bitcoin.h
+++ b/src/qt/bitcoin.h
@@ -68,7 +68,7 @@ public:
/// Create options model
void createOptionsModel(bool resetSettings);
/// Initialize prune setting
- void InitializePruneSetting(bool prune);
+ void InitPruneSetting(int64_t prune_MiB);
/// Create main window
void createWindow(const NetworkStyle *networkStyle);
/// Create splash screen
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp
index 3abca7dcff..3e29d8e132 100644
--- a/src/qt/bitcoingui.cpp
+++ b/src/qt/bitcoingui.cpp
@@ -1468,11 +1468,8 @@ void UnitDisplayStatusBarControl::mousePressEvent(QMouseEvent *event)
void UnitDisplayStatusBarControl::createContextMenu()
{
menu = new QMenu(this);
- for (const BitcoinUnits::Unit u : BitcoinUnits::availableUnits())
- {
- QAction *menuAction = new QAction(QString(BitcoinUnits::longName(u)), this);
- menuAction->setData(QVariant(u));
- menu->addAction(menuAction);
+ for (const BitcoinUnits::Unit u : BitcoinUnits::availableUnits()) {
+ menu->addAction(BitcoinUnits::longName(u))->setData(QVariant(u));
}
connect(menu, &QMenu::triggered, this, &UnitDisplayStatusBarControl::onMenuSelection);
}
diff --git a/src/qt/bitcoinstrings.cpp b/src/qt/bitcoinstrings.cpp
index 27e512d075..ab631459fb 100644
--- a/src/qt/bitcoinstrings.cpp
+++ b/src/qt/bitcoinstrings.cpp
@@ -17,13 +17,17 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"-maxtxfee is set very high! Fees this large could be paid on a single "
"transaction."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Cannot downgrade wallet from version %i to version %i. Wallet version "
+"unchanged."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot obtain a lock on data directory %s. %s is probably already running."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Cannot provide specific connections and have addrman find outgoing "
"connections at the same."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Cannot upgrade a non HD split wallet without upgrading to support pre split "
-"keypool. Please use version 169900 or no version specified."),
+"Cannot upgrade a non HD split wallet from version %i to version %i without "
+"upgrading to support pre-split keypool. Please use version %i or no version "
+"specified."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Distributed under the MIT software license, see the accompanying file %s or "
"%s"),
@@ -31,17 +35,35 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error reading %s! All keys read correctly, but transaction data or address "
"book entries might be missing or incorrect."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Error: Dumpfile format record is incorrect. Got \"%s\", expected \"format\"."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Error: Dumpfile identifier record is incorrect. Got \"%s\", expected \"%s\"."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Error: Dumpfile version is not supported. This version of bitcoin-wallet "
+"only supports version 1 dumpfiles. Got dumpfile with version %s"),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Error: Listening for incoming connections failed (listen returned error %s)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -"
"fallbackfee."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"File %s already exists. If you are sure this is what you want, move it out "
+"of the way first."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Invalid amount for -maxtxfee=<amount>: '%s' (must be at least the minrelay "
"fee of %s to prevent stuck transactions)"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"More than one onion bind address is provided. Using %s for the automatically "
"created Tor onion service."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
+"No dump file provided. To use createfromdump, -dumpfile=<filename> must be "
+"provided."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"No dump file provided. To use dump, -dumpfile=<filename> must be provided."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"No wallet file format provided. To use createfromdump, -format=<format> must "
+"be provided."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
"Please check that your computer's date and time are correct! If your clock "
"is wrong, %s will not work properly."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
@@ -96,10 +118,13 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
"Unable to rewind the database to a pre-fork state. You will need to "
"redownload the blockchain"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Warning: Private keys detected in wallet {%s} with disabled private keys"),
+"Unknown wallet file format \"%s\" provided. Please provide one of \"bdb\" or "
+"\"sqlite\"."),
QT_TRANSLATE_NOOP("bitcoin-core", ""
-"Warning: The network does not appear to fully agree! Some miners appear to "
-"be experiencing issues."),
+"Warning: Dumpfile wallet format \"%s\" does not match command line specified "
+"format \"%s\"."),
+QT_TRANSLATE_NOOP("bitcoin-core", ""
+"Warning: Private keys detected in wallet {%s} with disabled private keys"),
QT_TRANSLATE_NOOP("bitcoin-core", ""
"Warning: We do not appear to fully agree with our peers! You may need to "
"upgrade, or other nodes may need to upgrade."),
@@ -109,7 +134,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", ""
QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high!"),
QT_TRANSLATE_NOOP("bitcoin-core", "-maxmempool must be at least %d MB"),
QT_TRANSLATE_NOOP("bitcoin-core", "A fatal internal error occurred, see debug.log for details"),
-QT_TRANSLATE_NOOP("bitcoin-core", "Cannot downgrade wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot resolve -%s address: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot set -peerblockfilters without -blockfilterindex."),
QT_TRANSLATE_NOOP("bitcoin-core", "Cannot write to data directory '%s'; check permissions."),
@@ -122,6 +146,8 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Could not parse asmap file %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Disk space is too low!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Do you want to rebuild the block database now?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Done loading"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Dump file %s does not exist."),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error creating %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error initializing wallet database environment %s!"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s"),
@@ -131,9 +157,17 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error loading %s: Wallet requires newer versi
QT_TRANSLATE_NOOP("bitcoin-core", "Error loading block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error opening block database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error reading from database, shutting down."),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error reading next record from wallet database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error upgrading chainstate database"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Couldn't create cursor into database"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: Disk space is low for %s"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Dumpfile checksum does not match. Computed %s, expected %s"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Got key that was not hex: %s"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Got value that was not hex: %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Error: Keypool ran out, please call keypoolrefill first"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Missing checksum"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unable to parse version %u as a uint32_t"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Error: Unable to write record to new wallet"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to listen on any port. Use -listen=0 if you want this."),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to rescan the wallet during initialization"),
QT_TRANSLATE_NOOP("bitcoin-core", "Failed to verify database"),
@@ -143,6 +177,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Importing..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Incorrect or no genesis block found. Wrong datadir for network?"),
QT_TRANSLATE_NOOP("bitcoin-core", "Initialization sanity check failed. %s is shutting down."),
QT_TRANSLATE_NOOP("bitcoin-core", "Insufficient funds"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -i2psam address or hostname: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -onion address or hostname: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid -proxy address or hostname: '%s'"),
QT_TRANSLATE_NOOP("bitcoin-core", "Invalid P2P permission: '%s'"),
@@ -159,7 +194,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Need to specify a port with -whitebind: '%s'"
QT_TRANSLATE_NOOP("bitcoin-core", "No proxy server specified. Use -proxy=<ip> or -proxy=<ip:port>."),
QT_TRANSLATE_NOOP("bitcoin-core", "Not enough file descriptors available."),
QT_TRANSLATE_NOOP("bitcoin-core", "Prune cannot be configured with a negative value."),
-QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -blockfilterindex."),
QT_TRANSLATE_NOOP("bitcoin-core", "Prune mode is incompatible with -txindex."),
QT_TRANSLATE_NOOP("bitcoin-core", "Pruning blockstore..."),
QT_TRANSLATE_NOOP("bitcoin-core", "Reducing -maxconnections from %d to %d, because of system limitations."),
@@ -180,7 +214,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Specified -walletdir \"%s\" is not a director
QT_TRANSLATE_NOOP("bitcoin-core", "Specified blocks directory \"%s\" does not exist."),
QT_TRANSLATE_NOOP("bitcoin-core", "Starting network threads..."),
QT_TRANSLATE_NOOP("bitcoin-core", "The source code is available from %s."),
-QT_TRANSLATE_NOOP("bitcoin-core", "The specified config file %s does not exist\n"),
+QT_TRANSLATE_NOOP("bitcoin-core", "The specified config file %s does not exist"),
QT_TRANSLATE_NOOP("bitcoin-core", "The transaction amount is too small to pay the fee"),
QT_TRANSLATE_NOOP("bitcoin-core", "The wallet will avoid paying less than the minimum relay fee."),
QT_TRANSLATE_NOOP("bitcoin-core", "This is experimental software."),
@@ -197,6 +231,7 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Unable to bind to %s on this computer. %s is
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to create the PID file '%s': %s"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to generate initial keys"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to generate keys"),
+QT_TRANSLATE_NOOP("bitcoin-core", "Unable to open %s for writing"),
QT_TRANSLATE_NOOP("bitcoin-core", "Unable to start HTTP server. See debug log for details."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown -blockfilterindex value %s."),
QT_TRANSLATE_NOOP("bitcoin-core", "Unknown address type '%s'"),
diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp
index b244bc94f2..04161020b2 100644
--- a/src/qt/clientmodel.cpp
+++ b/src/qt/clientmodel.cpp
@@ -8,6 +8,7 @@
#include <qt/guiconstants.h>
#include <qt/guiutil.h>
#include <qt/peertablemodel.h>
+#include <qt/peertablesortproxy.h>
#include <clientversion.h>
#include <interfaces/handler.h>
@@ -38,7 +39,11 @@ ClientModel::ClientModel(interfaces::Node& node, OptionsModel *_optionsModel, QO
{
cachedBestHeaderHeight = -1;
cachedBestHeaderTime = -1;
+
peerTableModel = new PeerTableModel(m_node, this);
+ m_peer_table_sort_proxy = new PeerTableSortProxy(this);
+ m_peer_table_sort_proxy->setSourceModel(peerTableModel);
+
banTableModel = new BanTableModel(m_node, this);
QTimer* timer = new QTimer;
@@ -184,6 +189,11 @@ PeerTableModel *ClientModel::getPeerTableModel()
return peerTableModel;
}
+PeerTableSortProxy* ClientModel::peerTableSortProxy()
+{
+ return m_peer_table_sort_proxy;
+}
+
BanTableModel *ClientModel::getBanTableModel()
{
return banTableModel;
@@ -216,7 +226,7 @@ QString ClientModel::dataDir() const
QString ClientModel::blocksDir() const
{
- return GUIUtil::boostPathToQString(GetBlocksDir());
+ return GUIUtil::boostPathToQString(gArgs.GetBlocksDirPath());
}
void ClientModel::updateBanlist()
diff --git a/src/qt/clientmodel.h b/src/qt/clientmodel.h
index 7ac4cc040b..7a199ef19c 100644
--- a/src/qt/clientmodel.h
+++ b/src/qt/clientmodel.h
@@ -17,6 +17,7 @@ class BanTableModel;
class CBlockIndex;
class OptionsModel;
class PeerTableModel;
+class PeerTableSortProxy;
enum class SynchronizationState;
namespace interfaces {
@@ -54,6 +55,7 @@ public:
interfaces::Node& node() const { return m_node; }
OptionsModel *getOptionsModel();
PeerTableModel *getPeerTableModel();
+ PeerTableSortProxy* peerTableSortProxy();
BanTableModel *getBanTableModel();
//! Return number of connections, default is in- and outbound (total)
@@ -96,6 +98,7 @@ private:
std::unique_ptr<interfaces::Handler> m_handler_notify_header_tip;
OptionsModel *optionsModel;
PeerTableModel *peerTableModel;
+ PeerTableSortProxy* m_peer_table_sort_proxy{nullptr};
BanTableModel *banTableModel;
//! A thread to interact with m_node asynchronously
diff --git a/src/qt/coincontroldialog.cpp b/src/qt/coincontroldialog.cpp
index ca78c96d70..daea2f9cab 100644
--- a/src/qt/coincontroldialog.cpp
+++ b/src/qt/coincontroldialog.cpp
@@ -50,32 +50,16 @@ CoinControlDialog::CoinControlDialog(CCoinControl& coin_control, WalletModel* _m
{
ui->setupUi(this);
- // context menu actions
- QAction *copyAddressAction = new QAction(tr("Copy address"), this);
- QAction *copyLabelAction = new QAction(tr("Copy label"), this);
- QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
- copyTransactionHashAction = new QAction(tr("Copy transaction ID"), this); // we need to enable/disable this
- lockAction = new QAction(tr("Lock unspent"), this); // we need to enable/disable this
- unlockAction = new QAction(tr("Unlock unspent"), this); // we need to enable/disable this
-
// context menu
contextMenu = new QMenu(this);
- contextMenu->addAction(copyAddressAction);
- contextMenu->addAction(copyLabelAction);
- contextMenu->addAction(copyAmountAction);
- contextMenu->addAction(copyTransactionHashAction);
+ contextMenu->addAction(tr("Copy address"), this, &CoinControlDialog::copyAddress);
+ contextMenu->addAction(tr("Copy label"), this, &CoinControlDialog::copyLabel);
+ contextMenu->addAction(tr("Copy amount"), this, &CoinControlDialog::copyAmount);
+ copyTransactionHashAction = contextMenu->addAction(tr("Copy transaction ID"), this, &CoinControlDialog::copyTransactionHash);
contextMenu->addSeparator();
- contextMenu->addAction(lockAction);
- contextMenu->addAction(unlockAction);
-
- // context menu signals
+ lockAction = contextMenu->addAction(tr("Lock unspent"), this, &CoinControlDialog::lockCoin);
+ unlockAction = contextMenu->addAction(tr("Unlock unspent"), this, &CoinControlDialog::unlockCoin);
connect(ui->treeWidget, &QWidget::customContextMenuRequested, this, &CoinControlDialog::showMenu);
- connect(copyAddressAction, &QAction::triggered, this, &CoinControlDialog::copyAddress);
- connect(copyLabelAction, &QAction::triggered, this, &CoinControlDialog::copyLabel);
- connect(copyAmountAction, &QAction::triggered, this, &CoinControlDialog::copyAmount);
- connect(copyTransactionHashAction, &QAction::triggered, this, &CoinControlDialog::copyTransactionHash);
- connect(lockAction, &QAction::triggered, this, &CoinControlDialog::lockCoin);
- connect(unlockAction, &QAction::triggered, this, &CoinControlDialog::unlockCoin);
// clipboard actions
QAction *clipboardQuantityAction = new QAction(tr("Copy quantity"), this);
diff --git a/src/qt/forms/intro.ui b/src/qt/forms/intro.ui
index f27a4ebe44..a1e94f99e6 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>415</height>
+ <height>447</height>
</rect>
</property>
<property name="windowTitle">
@@ -211,16 +211,6 @@
</widget>
</item>
<item>
- <widget class="QCheckBox" name="prune">
- <property name="toolTip">
- <string>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</string>
- </property>
- <property name="text">
- <string></string>
- </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>
@@ -241,6 +231,47 @@
</widget>
</item>
<item>
+ <layout class="QHBoxLayout" name="pruneOptLayout">
+ <item>
+ <widget class="QCheckBox" name="prune">
+ <property name="text">
+ <string>Limit block chain storage to</string>
+ </property>
+ <property name="toolTip">
+ <string>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="pruneGB">
+ <property name="suffix">
+ <string> GB</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="lblPruneSuffix">
+ <property name="buddy">
+ <cstring>pruneGB</cstring>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
diff --git a/src/qt/forms/modaloverlay.ui b/src/qt/forms/modaloverlay.ui
index d2e7ca8f06..83b6a59aa0 100644
--- a/src/qt/forms/modaloverlay.ui
+++ b/src/qt/forms/modaloverlay.ui
@@ -271,16 +271,6 @@ QLabel { color: rgb(40,40,40); }</string>
</property>
</widget>
</item>
- <item>
- <widget class="QProgressBar" name="progressBar">
- <property name="value">
- <number>24</number>
- </property>
- <property name="format">
- <string/>
- </property>
- </widget>
- </item>
</layout>
</item>
<item row="4" column="0">
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index aa6b2665fa..ed39307fd7 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -17,6 +17,7 @@
#include <interfaces/node.h>
#include <util/system.h>
+#include <validation.h>
#include <QFileDialog>
#include <QSettings>
@@ -139,17 +140,26 @@ Intro::Intro(QWidget *parent, int64_t blockchain_size_gb, int64_t chain_state_si
);
ui->lblExplanation2->setText(ui->lblExplanation2->text().arg(PACKAGE_NAME));
+ const int min_prune_target_GB = std::ceil(MIN_DISK_SPACE_FOR_BLOCK_FILES / 1e9);
+ ui->pruneGB->setRange(min_prune_target_GB, std::numeric_limits<int>::max());
if (gArgs.GetArg("-prune", 0) > 1) { // -prune=1 means enabled, above that it's a size in MiB
ui->prune->setChecked(true);
ui->prune->setEnabled(false);
}
- ui->prune->setText(tr("Discard blocks after verification, except most recent %1 GB (prune)").arg(m_prune_target_gb));
+ ui->pruneGB->setValue(m_prune_target_gb);
+ ui->pruneGB->setToolTip(ui->prune->toolTip());
+ ui->lblPruneSuffix->setToolTip(ui->prune->toolTip());
UpdatePruneLabels(ui->prune->isChecked());
connect(ui->prune, &QCheckBox::toggled, [this](bool prune_checked) {
UpdatePruneLabels(prune_checked);
UpdateFreeSpaceLabel();
});
+ connect(ui->pruneGB, QOverload<int>::of(&QSpinBox::valueChanged), [this](int prune_GB) {
+ m_prune_target_gb = prune_GB;
+ UpdatePruneLabels(ui->prune->isChecked());
+ UpdateFreeSpaceLabel();
+ });
startThread();
}
@@ -182,7 +192,17 @@ void Intro::setDataDirectory(const QString &dataDir)
}
}
-bool Intro::showIfNeeded(bool& did_show_intro, bool& prune)
+int64_t Intro::getPruneMiB() const
+{
+ switch (ui->prune->checkState()) {
+ case Qt::Checked:
+ return PruneGBtoMiB(m_prune_target_gb);
+ case Qt::Unchecked: default:
+ return 0;
+ }
+}
+
+bool Intro::showIfNeeded(bool& did_show_intro, int64_t& prune_MiB)
{
did_show_intro = false;
@@ -233,7 +253,7 @@ bool Intro::showIfNeeded(bool& did_show_intro, bool& prune)
}
// Additional preferences:
- prune = intro.ui->prune->isChecked();
+ prune_MiB = intro.getPruneMiB();
settings.setValue("strDataDir", dataDir);
settings.setValue("fReset", false);
@@ -361,6 +381,11 @@ void Intro::UpdatePruneLabels(bool prune_checked)
storageRequiresMsg = tr("Approximately %1 GB of data will be stored in this directory.");
}
ui->lblExplanation3->setVisible(prune_checked);
+ ui->pruneGB->setEnabled(prune_checked);
+ static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage
+ static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data
+ const uint64_t expected_backup_days = m_prune_target_gb * 1e9 / (uint64_t(expected_block_data_size) * 86400 / nPowTargetSpacing);
+ ui->lblPruneSuffix->setText(tr("(sufficient to restore backups %n day(s) old)", "block chain pruning", expected_backup_days));
ui->sizeWarningLabel->setText(
tr("%1 will download and store a copy of the Bitcoin block chain.").arg(PACKAGE_NAME) + " " +
storageRequiresMsg.arg(m_required_space_gb) + " " +
diff --git a/src/qt/intro.h b/src/qt/intro.h
index 51f42de7ac..88fe2b722d 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -36,6 +36,7 @@ public:
QString getDataDirectory();
void setDataDirectory(const QString &dataDir);
+ int64_t getPruneMiB() const;
/**
* Determine data directory. Let the user choose if the current one doesn't exist.
@@ -47,7 +48,7 @@ public:
* @note do NOT call global GetDataDir() before calling this function, this
* will cause the wrong path to be cached.
*/
- static bool showIfNeeded(bool& did_show_intro, bool& prune);
+ static bool showIfNeeded(bool& did_show_intro, int64_t& prune_MiB);
Q_SIGNALS:
void requestCheck();
@@ -72,7 +73,7 @@ private:
//! Total required space (in GB) depending on user choice (prune or not prune).
int64_t m_required_space_gb{0};
uint64_t m_bytes_available{0};
- const int64_t m_prune_target_gb;
+ int64_t m_prune_target_gb;
void startThread();
void checkPath(const QString &dataDir);
diff --git a/src/qt/locale/bitcoin_en.ts b/src/qt/locale/bitcoin_en.ts
index c55cc65b63..e2640c8884 100644
--- a/src/qt/locale/bitcoin_en.ts
+++ b/src/qt/locale/bitcoin_en.ts
@@ -116,17 +116,20 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+1"/>
- <source>Comma separated file (*.csv)</source>
+ <source>Comma separated file</source>
+ <comment>Name of CSV file format</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
- <source>Exporting Failed</source>
+ <location line="+15"/>
+ <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <comment>An error message.</comment>
+ <extracomment>%1 is a name of the file (e.g., &quot;addrbook.csv&quot;) that the bitcoin addresses were exported to.</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>There was an error trying to save the address list to %1. Please try again.</source>
+ <location line="-2"/>
+ <source>Exporting Failed</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -143,7 +146,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+36"/>
+ <location line="+38"/>
<source>(no label)</source>
<translation type="unfinished"></translation>
</message>
@@ -192,16 +195,6 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+3"/>
- <source>This operation needs your wallet passphrase to decrypt the wallet.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Decrypt wallet</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
<source>Change passphrase</source>
<translation type="unfinished"></translation>
</message>
@@ -221,18 +214,18 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
- <location line="+57"/>
+ <location line="+18"/>
+ <location line="+44"/>
<source>Wallet encrypted</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-147"/>
+ <location line="-125"/>
<source>Enter the new passphrase for the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+15"/>
<source>Enter the old passphrase and new passphrase for the wallet.</source>
<translation type="unfinished"></translation>
</message>
@@ -252,7 +245,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+7"/>
<source>Your wallet is now encrypted. </source>
<translation type="unfinished"></translation>
</message>
@@ -262,49 +255,43 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+6"/>
<location line="+8"/>
- <location line="+8"/>
- <location line="+43"/>
+ <location line="+32"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-56"/>
+ <location line="-45"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
- <location line="+49"/>
+ <location line="+38"/>
<source>The supplied passphrases do not match.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-38"/>
+ <location line="-27"/>
<location line="+6"/>
<source>Wallet unlock failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-5"/>
- <location line="+12"/>
- <location line="+19"/>
+ <location line="+20"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-20"/>
- <source>Wallet decryption failed</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
+ <location line="-6"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+47"/>
+ <location line="+46"/>
<location line="+33"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"></translation>
@@ -313,7 +300,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<context>
<name>BanTableModel</name>
<message>
- <location filename="../bantablemodel.cpp" line="+86"/>
+ <location filename="../bantablemodel.cpp" line="+85"/>
<source>IP/Netmask</source>
<translation type="unfinished"></translation>
</message>
@@ -324,19 +311,42 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
</context>
<context>
+ <name>BitcoinApplication</name>
+ <message>
+ <location filename="../bitcoin.cpp" line="+423"/>
+ <source>Runaway exception</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>A fatal error occurred. %1 can no longer continue safely and will quit.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Internal error</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>An internal error occurred. %1 will attempt to continue safely. This is an unexpected bug which can be reported as described below.</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>BitcoinGUI</name>
<message>
- <location filename="../bitcoingui.cpp" line="+322"/>
+ <location filename="../bitcoingui.cpp" line="+325"/>
<source>Sign &amp;message...</source>
<translation>Sign &amp;message...</translation>
</message>
<message>
- <location line="+669"/>
+ <location line="+668"/>
<source>Synchronizing with network...</source>
<translation>Synchronizing with network...</translation>
</message>
<message>
- <location line="-747"/>
+ <location line="-746"/>
<source>&amp;Overview</source>
<translation>&amp;Overview</translation>
</message>
@@ -426,7 +436,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+210"/>
+ <location line="+209"/>
<source>Wallet:</source>
<translation type="unfinished"></translation>
</message>
@@ -461,7 +471,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-1065"/>
+ <location line="-1064"/>
<source>Send coins to a Bitcoin address</source>
<translation>Send coins to a Bitcoin address</translation>
</message>
@@ -556,7 +566,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+556"/>
+ <location line="+555"/>
<source>%n active connection(s) to Bitcoin network</source>
<translation>
<numerusform>%n active connection to Bitcoin network</numerusform>
@@ -617,7 +627,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>Up to date</translation>
</message>
<message>
- <location line="-695"/>
+ <location line="-694"/>
<source>&amp;Load PSBT from file...</source>
<translation type="unfinished"></translation>
</message>
@@ -737,7 +747,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+246"/>
+ <location line="+245"/>
<source>%1 client</source>
<translation type="unfinished"></translation>
</message>
@@ -833,15 +843,10 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</translation>
</message>
<message>
- <location line="+129"/>
+ <location line="+121"/>
<source>Original message:</source>
<translation type="unfinished"></translation>
</message>
- <message>
- <location filename="../bitcoin.cpp" line="+418"/>
- <source>A fatal error occurred. %1 can no longer continue safely and will quit.</source>
- <translation type="unfinished"></translation>
- </message>
</context>
<context>
<name>CoinControlDialog</name>
@@ -1036,7 +1041,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<context>
<name>CreateWalletActivity</name>
<message>
- <location filename="../walletcontroller.cpp" line="+241"/>
+ <location filename="../walletcontroller.cpp" line="+250"/>
<source>Creating Wallet &lt;b&gt;%1&lt;/b&gt;...</source>
<translation type="unfinished"></translation>
</message>
@@ -1059,12 +1064,17 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+38"/>
+ <location line="+11"/>
<source>Wallet Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+13"/>
+ <source>Wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
<source>Encrypt the wallet. The wallet will be encrypted with a passphrase of your choice.</source>
<translation type="unfinished"></translation>
</message>
@@ -1074,7 +1084,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
+ <location line="+26"/>
+ <source>Advanced Options</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
<source>Disable private keys for this wallet. Wallets with private keys disabled will have no private keys and cannot have an HD seed or imported private keys. This is ideal for watch-only wallets.</source>
<translation type="unfinished"></translation>
</message>
@@ -1084,7 +1099,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+7"/>
<source>Make a blank wallet. Blank wallets do not initially have private keys or scripts. Private keys and addresses can be imported, or an HD seed can be set, at a later time.</source>
<translation type="unfinished"></translation>
</message>
@@ -1094,7 +1109,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
+ <location line="+7"/>
<source>Use descriptors for scriptPubKey management</source>
<translation type="unfinished"></translation>
</message>
@@ -1104,12 +1119,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../createwalletdialog.cpp" line="+19"/>
+ <location filename="../createwalletdialog.cpp" line="+21"/>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
+ <location line="+42"/>
<source>Compiled without sqlite support (required for descriptor wallets)</source>
<translation type="unfinished"></translation>
</message>
@@ -1475,7 +1490,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+72"/>
+ <location line="+22"/>
+ <source>Enabling pruning significantly reduces the disk space required to store transactions. All blocks are still fully validated. Reverting this setting requires re-downloading the entire blockchain.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+50"/>
<source>Size of &amp;database cache</source>
<translation type="unfinished"></translation>
</message>
@@ -1485,7 +1505,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+161"/>
+ <location line="+171"/>
<location line="+187"/>
<source>IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
<translation type="unfinished"></translation>
@@ -1498,17 +1518,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+146"/>
- <source>Hide the icon from the system tray.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
- <source>&amp;Hide tray icon</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+17"/>
+ <location line="+169"/>
<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 type="unfinished"></translation>
</message>
@@ -1519,7 +1529,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+79"/>
+ <location line="+179"/>
<source>Open the %1 configuration file from the working directory.</source>
<translation type="unfinished"></translation>
</message>
@@ -1539,17 +1549,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>&amp;Reset Options</translation>
</message>
<message>
- <location line="-532"/>
+ <location line="-645"/>
<source>&amp;Network</source>
<translation>&amp;Network</translation>
</message>
<message>
- <location line="-191"/>
- <source>Disables some advanced features but all blocks will still be fully validated. Reverting this setting requires re-downloading the entire blockchain. Actual disk usage may be somewhat higher.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="-188"/>
<source>Prune &amp;block storage to</source>
<translation type="unfinished"></translation>
</message>
@@ -1610,6 +1615,16 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+7"/>
+ <source>Automatically open the Bitcoin client port on the router. This only works when your router supports NAT-PMP and it is enabled. The external port could be random.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Map port using NA&amp;T-PMP</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+7"/>
<source>Accept connections from outside.</source>
<translation type="unfinished"></translation>
</message>
@@ -1672,7 +1687,17 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>&amp;Window</translation>
</message>
<message>
- <location line="+16"/>
+ <location line="+6"/>
+ <source>Show the icon in the system tray.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>&amp;Show tray icon</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Show only a tray icon after minimizing the window.</translation>
</message>
@@ -1712,12 +1737,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>Choose the default subdivision unit to show in the interface and when sending coins.</translation>
</message>
<message>
- <location line="-450"/>
+ <location line="-463"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+250"/>
+ <location line="+260"/>
<source>Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor onion services.</source>
<translation type="unfinished"></translation>
</message>
@@ -1727,12 +1752,39 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+211"/>
+ <location line="+214"/>
<source>&amp;Third party transaction URLs</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+44"/>
+ <location line="+22"/>
+ <source>Monospaced font in the Overview tab:</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>embedded &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+22"/>
+ <location line="+49"/>
+ <source>111.11111111 BTC</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-42"/>
+ <location line="+49"/>
+ <source>909.09090909 BTC</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="-29"/>
+ <source>closest matching &quot;%1&quot;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+65"/>
<source>Options set in this dialog are overridden by the command line or in the configuration file:</source>
<translation type="unfinished"></translation>
</message>
@@ -1747,28 +1799,28 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>&amp;Cancel</translation>
</message>
<message>
- <location filename="../optionsdialog.cpp" line="+96"/>
+ <location filename="../optionsdialog.cpp" line="+104"/>
<source>default</source>
<translation>default</translation>
</message>
<message>
- <location line="+67"/>
+ <location line="+81"/>
<source>none</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+89"/>
+ <location line="+91"/>
<source>Confirm options reset</source>
<translation>Confirm options reset</translation>
</message>
<message>
<location line="+1"/>
- <location line="+60"/>
+ <location line="+57"/>
<source>Client restart required to activate changes.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-60"/>
+ <location line="-57"/>
<source>Client will be shut down. Do you want to proceed?</source>
<translation type="unfinished"></translation>
</message>
@@ -1793,7 +1845,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+43"/>
+ <location line="+40"/>
<source>This change would require a client restart.</source>
<translation type="unfinished"></translation>
</message>
@@ -1812,12 +1864,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+62"/>
- <location line="+394"/>
+ <location line="+335"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</source>
<translation>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</translation>
</message>
<message>
- <location line="-141"/>
+ <location line="-127"/>
<source>Watch-only:</source>
<translation type="unfinished"></translation>
</message>
@@ -1827,22 +1879,22 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+17"/>
+ <location line="+10"/>
<source>Your current spendable balance</source>
<translation>Your current spendable balance</translation>
</message>
<message>
- <location line="+42"/>
+ <location line="+35"/>
<source>Pending:</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-242"/>
+ <location line="-200"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
<translation>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</translation>
</message>
<message>
- <location line="+114"/>
+ <location line="+100"/>
<source>Immature:</source>
<translation>Immature:</translation>
</message>
@@ -1852,22 +1904,22 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>Mined balance that has not yet matured</translation>
</message>
<message>
- <location line="-181"/>
+ <location line="-150"/>
<source>Balances</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+164"/>
+ <location line="+140"/>
<source>Total:</source>
<translation>Total:</translation>
</message>
<message>
- <location line="+63"/>
+ <location line="+49"/>
<source>Your current total balance</source>
<translation>Your current total balance</translation>
</message>
<message>
- <location line="+95"/>
+ <location line="+74"/>
<source>Your current balance in watch-only addresses</source>
<translation type="unfinished"></translation>
</message>
@@ -1882,22 +1934,22 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-324"/>
+ <location line="-275"/>
<source>Unconfirmed transactions to watch-only addresses</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+52"/>
+ <location line="+38"/>
<source>Mined balance in watch-only addresses that has not yet matured</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+131"/>
+ <location line="+110"/>
<source>Current total balance in watch-only addresses</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../overviewpage.cpp" line="+166"/>
+ <location filename="../overviewpage.cpp" line="+191"/>
<source>Privacy mode activated for the Overview tab. To unmask the values, uncheck Settings-&gt;Mask values.</source>
<translation type="unfinished"></translation>
</message>
@@ -1986,7 +2038,8 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+1"/>
- <source>Partially Signed Transaction (Binary) (*.psbt)</source>
+ <source>Partially Signed Transaction (Binary)</source>
+ <comment>Name of binary PSBT file format</comment>
<translation type="unfinished"></translation>
</message>
<message>
@@ -2058,7 +2111,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<context>
<name>PaymentServer</name>
<message>
- <location filename="../paymentserver.cpp" line="+174"/>
+ <location filename="../paymentserver.cpp" line="+173"/>
<source>Payment request error</source>
<translation type="unfinished"></translation>
</message>
@@ -2083,23 +2136,13 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<message>
<location line="+14"/>
<location line="+23"/>
- <source>Cannot process payment request because BIP70 is not supported.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-22"/>
- <location line="+23"/>
- <source>Due to widespread security flaws in BIP70 it&apos;s strongly recommended that any merchant instructions to switch wallets be ignored.</source>
+ <source>Cannot process payment request because BIP70 is not supported.
+Due to widespread security flaws in BIP70 it&apos;s strongly recommended that any merchant instructions to switch wallets be ignored.
+If you are receiving this error you should request the merchant provide a BIP21 compatible URI.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-22"/>
- <location line="+23"/>
- <source>If you are receiving this error you should request the merchant provide a BIP21 compatible URI.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-20"/>
+ <location line="-18"/>
<source>Invalid payment address %1</source>
<translation type="unfinished"></translation>
</message>
@@ -2117,50 +2160,105 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<context>
<name>PeerTableModel</name>
<message>
- <location filename="../peertablemodel.cpp" line="+107"/>
+ <location filename="../peertablemodel.h" line="+91"/>
<source>User Agent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
- <source>Node/Service</source>
+ <source>Ping</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
- <source>NodeId</source>
+ <source>Sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
- <source>Ping</source>
+ <source>Received</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
- <source>Sent</source>
+ <source>Peer Id</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
- <source>Received</source>
+ <source>Address</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location line="+0"/>
+ <source>Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Network</source>
+ <translation type="unfinished">Network</translation>
+ </message>
</context>
<context>
<name>QObject</name>
<message>
- <location filename="../bitcoinunits.cpp" line="+209"/>
+ <location filename="../bitcoinunits.cpp" line="+213"/>
<source>Amount</source>
<translation type="unfinished">Amount</translation>
</message>
<message>
- <location filename="../guiutil.cpp" line="+108"/>
+ <location filename="../guiutil.cpp" line="+118"/>
<source>Enter a Bitcoin address (e.g. %1)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+652"/>
+ <location line="+532"/>
+ <source>Unroutable</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Internal</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Inbound</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>Outbound</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Full Relay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Block Relay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Manual</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Feeler</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Address Fetch</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+14"/>
<source>%1 d</source>
<translation type="unfinished"></translation>
</message>
@@ -2176,22 +2274,22 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+2"/>
- <location line="+26"/>
+ <location line="+28"/>
<source>%1 s</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-10"/>
+ <location line="-12"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+6"/>
<source>N/A</source>
<translation type="unfinished">N/A</translation>
</message>
<message>
- <location line="+0"/>
+ <location line="+1"/>
<source>%1 ms</source>
<translation type="unfinished"></translation>
</message>
@@ -2256,7 +2354,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+2"/>
- <source>%1 KB</source>
+ <source>%1 kB</source>
<translation type="unfinished"></translation>
</message>
<message>
@@ -2270,7 +2368,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../bitcoin.cpp" line="+105"/>
+ <location filename="../bitcoin.cpp" line="+111"/>
<source>Error: Specified data directory &quot;%1&quot; does not exist.</source>
<translation type="unfinished"></translation>
</message>
@@ -2328,13 +2426,14 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+32"/>
+ <location line="+30"/>
<source>Save QR Code</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+0"/>
- <source>PNG Image (*.png)</source>
+ <location line="+1"/>
+ <source>PNG Image</source>
+ <comment>Name of PNG file format</comment>
<translation type="unfinished"></translation>
</message>
</context>
@@ -2344,7 +2443,6 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<location filename="../forms/debugwindow.ui" line="+75"/>
<location line="+26"/>
<location line="+26"/>
- <location line="+26"/>
<location line="+29"/>
<location line="+26"/>
<location line="+36"/>
@@ -2354,14 +2452,19 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<location line="+36"/>
<location line="+23"/>
<location line="+710"/>
+ <location line="+26"/>
+ <location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
+ <location line="+26"/>
+ <location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
- <location line="+23"/>
+ <location line="+26"/>
+ <location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
@@ -2371,13 +2474,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<location line="+23"/>
<location line="+23"/>
<location line="+26"/>
- <location filename="../rpcconsole.cpp" line="+1127"/>
- <location line="+8"/>
+ <location filename="../rpcconsole.h" line="+141"/>
<source>N/A</source>
<translation>N/A</translation>
</message>
<message>
- <location line="-1427"/>
+ <location line="-1534"/>
<source>Client version</source>
<translation>Client version</translation>
</message>
@@ -2393,11 +2495,6 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+56"/>
- <source>Using BerkeleyDB version</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+26"/>
<source>Datadir</source>
<translation type="unfinished"></translation>
</message>
@@ -2423,11 +2520,12 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+29"/>
+ <location line="+910"/>
<source>Network</source>
<translation>Network</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="-903"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
@@ -2473,18 +2571,18 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+80"/>
- <location line="+560"/>
+ <location line="+693"/>
<source>Received</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-480"/>
- <location line="+457"/>
+ <location line="-613"/>
+ <location line="+590"/>
<source>Sent</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-416"/>
+ <location line="-549"/>
<source>&amp;Peers</source>
<translation type="unfinished"></translation>
</message>
@@ -2495,23 +2593,17 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
</message>
<message>
<location line="+65"/>
- <location filename="../rpcconsole.cpp" line="-637"/>
- <location line="+766"/>
+ <location filename="../rpcconsole.cpp" line="+1104"/>
<source>Select a peer to view detailed information.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+54"/>
- <source>Direction</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+23"/>
+ <location line="+106"/>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+69"/>
+ <location line="+121"/>
<source>Starting Block</source>
<translation type="unfinished"></translation>
</message>
@@ -2526,7 +2618,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+233"/>
+ <location line="+285"/>
<source>The mapped Autonomous System used for diversifying peer selection.</source>
<translation type="unfinished"></translation>
</message>
@@ -2536,18 +2628,18 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-1394"/>
- <location line="+1066"/>
+ <location line="-1501"/>
+ <location line="+1069"/>
<source>User Agent</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-1140"/>
+ <location line="-1143"/>
<source>Node window</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+279"/>
+ <location line="+253"/>
<source>Current block height</source>
<translation type="unfinished"></translation>
</message>
@@ -2572,17 +2664,72 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+92"/>
+ <location line="+23"/>
+ <source>The direction and type of peer connection: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Direction/Type</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+72"/>
<source>Services</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location line="+23"/>
+ <source>Whether the peer requested us to relay transactions.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Wants Tx Relay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>High bandwidth BIP152 compact block relay: %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>High Bandwidth</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+92"/>
<source>Connection Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
+ <source>Elapsed time since a novel block passing initial validity checks was received from this peer.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Last Block</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Elapsed time since a novel transaction accepted into our mempool was received from this peer.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Last Tx</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+23"/>
<source>Last Send</source>
<translation type="unfinished"></translation>
</message>
@@ -2617,7 +2764,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-1140"/>
+ <location line="-1273"/>
<source>Last block time</source>
<translation>Last block time</translation>
</message>
@@ -2642,7 +2789,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../rpcconsole.cpp" line="-416"/>
+ <location filename="../rpcconsole.cpp" line="-242"/>
<source>In:</source>
<translation type="unfinished"></translation>
</message>
@@ -2662,7 +2809,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation>Clear console</translation>
</message>
<message>
- <location filename="../rpcconsole.cpp" line="-243"/>
+ <location filename="../rpcconsole.cpp" line="-242"/>
<source>1 &amp;hour</source>
<translation type="unfinished"></translation>
</message>
@@ -2687,15 +2834,82 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
+ <location filename="../rpcconsole.h" line="-1"/>
+ <source>Yes</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>No</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>To</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+0"/>
+ <source>From</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+1"/>
+ <source>Ban for</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>Never</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="../rpcconsole.cpp" line="-155"/>
+ <source>Inbound: initiated by peer</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+1"/>
+ <source>Outbound Full Relay: default</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+1"/>
+ <source>Outbound Block Relay: does not relay transactions or addresses</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<location line="+1"/>
- <source>Ban for</source>
+ <source>Outbound Manual: added using RPC %1 or %2/%3 configuration options</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+38"/>
+ <location line="+4"/>
+ <source>Outbound Feeler: short-lived, for testing addresses</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Outbound Address Fetch: short-lived, for soliciting addresses</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>we selected the peer for high bandwidth relay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>the peer selected us for high bandwidth relay</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>no high bandwidth relay selected</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+182"/>
<source>&amp;Unban</source>
<translation type="unfinished"></translation>
</message>
@@ -2735,39 +2949,22 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-2"/>
- <source>Executing command using &quot;%1&quot; wallet</source>
+ <location line="+178"/>
+ <source>(peer id: %1)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+192"/>
- <source>(node id: %1)</source>
+ <location line="-180"/>
+ <source>Executing command using &quot;%1&quot; wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+182"/>
<source>via %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <location line="+1"/>
- <source>never</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>Inbound</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+0"/>
- <source>Outbound</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+20"/>
- <location line="+6"/>
+ <location filename="../rpcconsole.h" line="-37"/>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
@@ -2871,12 +3068,17 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location filename="../receivecoinsdialog.cpp" line="+45"/>
+ <location filename="../receivecoinsdialog.cpp" line="+46"/>
<source>Copy URI</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
+ <source>Copy address</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"></translation>
</message>
@@ -2891,7 +3093,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+131"/>
+ <location line="+140"/>
<source>Could not unlock wallet.</source>
<translation type="unfinished"></translation>
</message>
@@ -2977,7 +3179,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+39"/>
+ <location line="+41"/>
<source>(no label)</source>
<translation type="unfinished"></translation>
</message>
@@ -3001,7 +3203,7 @@ Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
- <location filename="../sendcoinsdialog.cpp" line="+664"/>
+ <location filename="../sendcoinsdialog.cpp" line="+673"/>
<source>Send Coins</source>
<translation>Send Coins</translation>
</message>
@@ -3188,7 +3390,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation>S&amp;end</translation>
</message>
<message>
- <location filename="../sendcoinsdialog.cpp" line="-572"/>
+ <location filename="../sendcoinsdialog.cpp" line="-581"/>
<source>Copy quantity</source>
<translation type="unfinished"></translation>
</message>
@@ -3223,12 +3425,12 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+74"/>
+ <location line="+76"/>
<source>%1 (%2 blocks)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+22"/>
+ <location line="+29"/>
<source>Cr&amp;eate Unsigned</source>
<translation type="unfinished"></translation>
</message>
@@ -3273,12 +3475,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Partially Signed Transaction (Binary) (*.psbt)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
+ <location line="+8"/>
<source>PSBT saved</source>
<translation type="unfinished"></translation>
</message>
@@ -3338,7 +3535,13 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+228"/>
+ <location line="+45"/>
+ <source>Partially Signed Transaction (Binary)</source>
+ <comment>Name of binary PSBT file format</comment>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+183"/>
<source>Watch-only balance:</source>
<translation type="unfinished"></translation>
</message>
@@ -3743,7 +3946,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+82"/>
- <source>KB/s</source>
+ <source>kB/s</source>
<translation type="unfinished"></translation>
</message>
</context>
@@ -3996,7 +4199,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<context>
<name>TransactionTableModel</name>
<message>
- <location filename="../transactiontablemodel.cpp" line="+251"/>
+ <location filename="../transactiontablemodel.cpp" line="+252"/>
<source>Date</source>
<translation type="unfinished">Date</translation>
</message>
@@ -4011,7 +4214,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
- <location line="+58"/>
+ <location line="+62"/>
<source>Open for %n more block(s)</source>
<translation>
<numerusform>Open for %n more block</numerusform>
@@ -4094,7 +4297,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+208"/>
+ <location line="+210"/>
<source>(no label)</source>
<translation type="unfinished"></translation>
</message>
@@ -4132,7 +4335,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<context>
<name>TransactionView</name>
<message>
- <location filename="../transactionview.cpp" line="+69"/>
+ <location filename="../transactionview.cpp" line="+70"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"></translation>
@@ -4203,7 +4406,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+51"/>
+ <location line="+63"/>
<source>Abandon transaction</source>
<translation type="unfinished"></translation>
</message>
@@ -4244,26 +4447,27 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
</message>
<message>
<location line="+1"/>
- <source>Edit label</source>
+ <source>Edit address label</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Show transaction details</source>
+ <location line="+186"/>
+ <source>Comma separated file</source>
+ <comment>Name of CSV file format</comment>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+194"/>
- <source>Export Transaction History</source>
+ <location line="-185"/>
+ <source>Show transaction details</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Comma separated file (*.csv)</source>
+ <location line="+184"/>
+ <source>Export Transaction History</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+10"/>
<source>Confirmed</source>
<translation type="unfinished">Confirmed</translation>
</message>
@@ -4339,7 +4543,7 @@ Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satos
<context>
<name>WalletController</name>
<message>
- <location filename="../walletcontroller.cpp" line="-238"/>
+ <location filename="../walletcontroller.cpp" line="-247"/>
<source>Close wallet</source>
<translation type="unfinished"></translation>
</message>
@@ -4382,20 +4586,20 @@ Go to File &gt; Open Wallet to load a wallet.
<context>
<name>WalletModel</name>
<message>
- <location filename="../walletmodel.cpp" line="+214"/>
+ <location filename="../walletmodel.cpp" line="+218"/>
<source>Send Coins</source>
<translation type="unfinished">Send Coins</translation>
</message>
<message>
- <location line="+282"/>
- <location line="+45"/>
+ <location line="+279"/>
+ <location line="+52"/>
<location line="+13"/>
<location line="+5"/>
<source>Fee bump error</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-63"/>
+ <location line="-70"/>
<source>Increasing transaction fee failed</source>
<translation type="unfinished"></translation>
</message>
@@ -4425,7 +4629,12 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+8"/>
+ <source>Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These changes may potentially leak privacy.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
<source>Confirm fee bump</source>
<translation type="unfinished"></translation>
</message>
@@ -4506,7 +4715,8 @@ Go to File &gt; Open Wallet to load a wallet.
</message>
<message>
<location line="+1"/>
- <source>Wallet Data (*.dat)</source>
+ <source>Wallet Data</source>
+ <comment>Name of wallet data file format</comment>
<translation type="unfinished"></translation>
</message>
<message>
@@ -4538,12 +4748,12 @@ Go to File &gt; Open Wallet to load a wallet.
<context>
<name>bitcoin-core</name>
<message>
- <location filename="../bitcoinstrings.cpp" line="+27"/>
+ <location filename="../bitcoinstrings.cpp" line="+31"/>
<source>Distributed under the MIT software license, see the accompanying file %s or %s</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+41"/>
<source>Prune configured below the minimum of %d MiB. Please use a higher number.</source>
<translation type="unfinished"></translation>
</message>
@@ -4553,22 +4763,22 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+112"/>
+ <location line="+124"/>
<source>Pruning blockstore...</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+36"/>
+ <location line="+37"/>
<source>Unable to start HTTP server. See debug log for details.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-188"/>
+ <location line="-223"/>
<source>The %s developers</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+10"/>
<source>Cannot obtain a lock on data directory %s. %s is probably already running.</source>
<translation type="unfinished"></translation>
</message>
@@ -4578,17 +4788,17 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
+ <location line="+10"/>
<source>Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+21"/>
<source>More than one onion bind address is provided. Using %s for the automatically created Tor onion service.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+11"/>
<source>Please check that your computer&apos;s date and time are correct! If your clock is wrong, %s will not work properly.</source>
<translation type="unfinished"></translation>
</message>
@@ -4638,12 +4848,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
- <source>Warning: The network does not appear to fully agree! Some miners appear to be experiencing issues.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="+11"/>
<source>Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"></translation>
</message>
@@ -4653,7 +4858,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+2"/>
<source>Cannot resolve -%s address: &apos;%s&apos;</source>
<translation type="unfinished"></translation>
</message>
@@ -4694,6 +4899,16 @@ Go to File &gt; Open Wallet to load a wallet.
</message>
<message>
<location line="+2"/>
+ <source>Dump file %s does not exist.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Error creating %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Error initializing block database</source>
<translation>Error initializing block database</translation>
</message>
@@ -4733,7 +4948,47 @@ Go to File &gt; Open Wallet to load a wallet.
<translation>Error opening block database</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+2"/>
+ <source>Error reading next record from wallet database</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error: Couldn&apos;t create cursor into database</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error: Dumpfile checksum does not match. Computed %s, expected %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Error: Got key that was not hex: %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Error: Got value that was not hex: %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error: Missing checksum</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Error: Unable to parse version %u as a uint32_t</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
+ <source>Error: Unable to write record to new wallet</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Failed to listen on any port. Use -listen=0 if you want this.</translation>
</message>
@@ -4768,7 +5023,12 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+2"/>
+ <source>Invalid -i2psam address or hostname: &apos;%s&apos;</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
<source>Invalid P2P permission: &apos;%s&apos;</source>
<translation type="unfinished"></translation>
</message>
@@ -4788,7 +5048,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+18"/>
+ <location line="+17"/>
<source>SQLiteDatabase: Failed to execute statement to verify database: %s</source>
<translation type="unfinished"></translation>
</message>
@@ -4823,7 +5083,17 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+22"/>
+ <location line="+3"/>
+ <source>The specified config file %s does not exist</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Unable to open %s for writing</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
<source>Unknown address type &apos;%s&apos;</source>
<translation type="unfinished"></translation>
</message>
@@ -4843,7 +5113,62 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="-170"/>
+ <source>Cannot downgrade wallet from version %i to version %i. Wallet version unchanged.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Cannot upgrade a non HD split wallet from version %i to version %i without upgrading to support pre-split keypool. Please use version %i or no version specified.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Error: Dumpfile format record is incorrect. Got &quot;%s&quot;, expected &quot;format&quot;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error: Dumpfile identifier record is incorrect. Got &quot;%s&quot;, expected &quot;%s&quot;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Error: Dumpfile version is not supported. This version of bitcoin-wallet only supports version 1 dumpfiles. Got dumpfile with version %s</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>File %s already exists. If you are sure this is what you want, move it out of the way first.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>No dump file provided. To use createfromdump, -dumpfile=&lt;filename&gt; must be provided.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>No dump file provided. To use dump, -dumpfile=&lt;filename&gt; must be provided.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>No wallet file format provided. To use createfromdump, -format=&lt;format&gt; must be provided.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Unknown wallet file format &quot;%s&quot; provided. Please provide one of &quot;bdb&quot; or &quot;sqlite&quot;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Warning: Dumpfile wallet format &quot;%s&quot; does not match command line specified format &quot;%s&quot;.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location line="+67"/>
<source>Loading banlist...</source>
<translation type="unfinished"></translation>
</message>
@@ -4858,7 +5183,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+1"/>
<source>Prune mode is incompatible with -txindex.</source>
<translation type="unfinished"></translation>
</message>
@@ -4893,7 +5218,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+7"/>
<source>Unsupported logging category %s=%s.</source>
<translation type="unfinished"></translation>
</message>
@@ -4918,27 +5243,22 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-178"/>
+ <location line="-202"/>
<source>Error: Listening for incoming connections failed (listen returned error %s)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-20"/>
+ <location line="-31"/>
<source>%s corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
- <source>Cannot upgrade a non HD split wallet without upgrading to support pre split keypool. Please use version 169900 or no version specified.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
+ <location line="+39"/>
<source>Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+31"/>
+ <location line="+39"/>
<source>The transaction amount is too small to send after the fee has been deducted</source>
<translation type="unfinished"></translation>
</message>
@@ -4958,7 +5278,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+17"/>
+ <location line="+20"/>
<source>You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
<translation type="unfinished"></translation>
</message>
@@ -4968,7 +5288,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+2"/>
<source>Cannot set -peerblockfilters without -blockfilterindex.</source>
<translation type="unfinished"></translation>
</message>
@@ -4978,32 +5298,32 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+13"/>
<source>Error reading from database, shutting down.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>Error upgrading chainstate database</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+2"/>
<source>Error: Disk space is low for %s</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+4"/>
<source>Error: Keypool ran out, please call keypoolrefill first</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
+ <location line="+7"/>
<source>Fee rate (%s) is lower than the minimum fee rate setting (%s)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
+ <location line="+7"/>
<source>Invalid -onion address or hostname: &apos;%s&apos;</source>
<translation type="unfinished"></translation>
</message>
@@ -5033,12 +5353,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <source>Prune mode is incompatible with -blockfilterindex.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
+ <location line="+5"/>
<source>Reducing -maxconnections from %d to %d, because of system limitations.</source>
<translation type="unfinished"></translation>
</message>
@@ -5068,13 +5383,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+4"/>
- <source>The specified config file %s does not exist
-</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
+ <location line="+5"/>
<source>The transaction amount is too small to pay the fee</source>
<translation type="unfinished"></translation>
</message>
@@ -5109,7 +5418,7 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
+ <location line="+4"/>
<source>Unknown -blockfilterindex value %s.</source>
<translation type="unfinished"></translation>
</message>
@@ -5124,12 +5433,12 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-196"/>
+ <location line="-231"/>
<source>-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+68"/>
+ <location line="+90"/>
<source>This is the transaction fee you may pay when fee estimates are not available.</source>
<translation type="unfinished"></translation>
</message>
@@ -5139,12 +5448,12 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+26"/>
<source>%s is set very high!</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+72"/>
+ <location line="+81"/>
<source>Starting network threads...</source>
<translation type="unfinished"></translation>
</message>
@@ -5179,32 +5488,32 @@ Go to File &gt; Open Wallet to load a wallet.
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+11"/>
+ <location line="+12"/>
<source>Unknown network specified in -onlynet: &apos;%s&apos;</source>
<translation>Unknown network specified in -onlynet: &apos;%s&apos;</translation>
</message>
<message>
- <location line="-59"/>
+ <location line="-60"/>
<source>Insufficient funds</source>
<translation>Insufficient funds</translation>
</message>
<message>
- <location line="-110"/>
+ <location line="-133"/>
<source>Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+63"/>
+ <location line="+80"/>
<source>Warning: Private keys detected in wallet {%s} with disabled private keys</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+17"/>
+ <location line="+13"/>
<source>Cannot write to data directory &apos;%s&apos;; check permissions.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+41"/>
+ <location line="+52"/>
<source>Loading block index...</source>
<translation>Loading block index...</translation>
</message>
@@ -5214,17 +5523,12 @@ Go to File &gt; Open Wallet to load a wallet.
<translation>Loading wallet...</translation>
</message>
<message>
- <location line="-45"/>
- <source>Cannot downgrade wallet</source>
- <translation>Cannot downgrade wallet</translation>
- </message>
- <message>
- <location line="+55"/>
+ <location line="+9"/>
<source>Rescanning...</source>
<translation>Rescanning...</translation>
</message>
<message>
- <location line="-43"/>
+ <location line="-53"/>
<source>Done loading</source>
<translation>Done loading</translation>
</message>
diff --git a/src/qt/locale/bitcoin_en.xlf b/src/qt/locale/bitcoin_en.xlf
new file mode 100644
index 0000000000..a8a5f57f15
--- /dev/null
+++ b/src/qt/locale/bitcoin_en.xlf
@@ -0,0 +1,5688 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:trolltech="urn:trolltech:names:ts:document:1.0">
+ <file original="../forms/addressbookpage.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="AddressBookPage">
+ <trans-unit id="_msg1">
+ <source xml:space="preserve">Right-click to edit address or label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">37</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg2" approved="yes">
+ <source xml:space="preserve">Create a new address</source>
+ <target xml:space="preserve">Create a new address</target>
+ <context-group purpose="location"><context context-type="linenumber">64</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg3">
+ <source xml:space="preserve">&amp;New</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">67</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg4" approved="yes">
+ <source xml:space="preserve">Copy the currently selected address to the system clipboard</source>
+ <target xml:space="preserve">Copy the currently selected address to the system clipboard</target>
+ <context-group purpose="location"><context context-type="linenumber">81</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg5">
+ <source xml:space="preserve">&amp;Copy</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">84</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg6">
+ <source xml:space="preserve">C&amp;lose</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">151</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg7" approved="yes">
+ <source xml:space="preserve">Delete the currently selected address from the list</source>
+ <target xml:space="preserve">Delete the currently selected address from the list</target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg8">
+ <source xml:space="preserve">Enter address or label to search</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg9" approved="yes">
+ <source xml:space="preserve">Export the data in the current tab to a file</source>
+ <target xml:space="preserve">Export the data in the current tab to a file</target>
+ <context-group purpose="location"><context context-type="linenumber">128</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg10" approved="yes">
+ <source xml:space="preserve">&amp;Export</source>
+ <target xml:space="preserve">&amp;Export</target>
+ <context-group purpose="location"><context context-type="linenumber">131</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg11" approved="yes">
+ <source xml:space="preserve">&amp;Delete</source>
+ <target xml:space="preserve">&amp;Delete</target>
+ <context-group purpose="location"><context context-type="linenumber">101</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../addressbookpage.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="AddressBookPage">
+ <trans-unit id="_msg12">
+ <source xml:space="preserve">Choose the address to send coins to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">84</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg13">
+ <source xml:space="preserve">Choose the address to receive coins with</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg14">
+ <source xml:space="preserve">C&amp;hoose</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">90</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg15">
+ <source xml:space="preserve">Sending addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">96</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg16">
+ <source xml:space="preserve">Receiving addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">97</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg17">
+ <source xml:space="preserve">These are your Bitcoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">104</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg18">
+ <source xml:space="preserve">These are your Bitcoin addresses for receiving payments. Use the &apos;Create new receiving address&apos; button in the receive tab to create new addresses.
+Signing is only possible with addresses of the type &apos;legacy&apos;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">109</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg19">
+ <source xml:space="preserve">&amp;Copy Address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">116</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg20">
+ <source xml:space="preserve">Copy &amp;Label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">117</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg21">
+ <source xml:space="preserve">&amp;Edit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">118</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg22">
+ <source xml:space="preserve">Export Address List</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">297</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg23">
+ <source xml:space="preserve">Comma separated file</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">298</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of CSV file format</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg24">
+ <source xml:space="preserve">There was an error trying to save the address list to %1. Please try again.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">313</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">An error message.</context></context-group>
+ <note annotates="source" from="developer">%1 is a name of the file (e.g., &quot;addrbook.csv&quot;) that the bitcoin addresses were exported to.</note>
+ </trans-unit>
+ <trans-unit id="_msg25">
+ <source xml:space="preserve">Exporting Failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">311</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../addresstablemodel.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="AddressTableModel">
+ <trans-unit id="_msg26">
+ <source xml:space="preserve">Label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">168</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg27">
+ <source xml:space="preserve">Address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">168</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg28">
+ <source xml:space="preserve">(no label)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">206</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/askpassphrasedialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="AskPassphraseDialog">
+ <trans-unit id="_msg29" approved="yes">
+ <source xml:space="preserve">Passphrase Dialog</source>
+ <target xml:space="preserve">Passphrase Dialog</target>
+ <context-group purpose="location"><context context-type="linenumber">26</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg30" approved="yes">
+ <source xml:space="preserve">Enter passphrase</source>
+ <target xml:space="preserve">Enter passphrase</target>
+ <context-group purpose="location"><context context-type="linenumber">56</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg31" approved="yes">
+ <source xml:space="preserve">New passphrase</source>
+ <target xml:space="preserve">New passphrase</target>
+ <context-group purpose="location"><context context-type="linenumber">70</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg32" approved="yes">
+ <source xml:space="preserve">Repeat new passphrase</source>
+ <target xml:space="preserve">Repeat new passphrase</target>
+ <context-group purpose="location"><context context-type="linenumber">84</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg33">
+ <source xml:space="preserve">Show passphrase</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../askpassphrasedialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="AskPassphraseDialog">
+ <trans-unit id="_msg34">
+ <source xml:space="preserve">Encrypt wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">51</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg35">
+ <source xml:space="preserve">This operation needs your wallet passphrase to unlock the wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">54</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg36">
+ <source xml:space="preserve">Unlock wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">59</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg37">
+ <source xml:space="preserve">Change passphrase</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">62</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg38">
+ <source xml:space="preserve">Confirm wallet encryption</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">110</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg39">
+ <source xml:space="preserve">Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR BITCOINS&lt;/b&gt;!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg40">
+ <source xml:space="preserve">Are you sure you wish to encrypt your wallet?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg41">
+ <source xml:space="preserve">Wallet encrypted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">129</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">173</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg42">
+ <source xml:space="preserve">Enter the new passphrase for the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;ten or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">48</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg43">
+ <source xml:space="preserve">Enter the old passphrase and new passphrase for the wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">63</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg44">
+ <source xml:space="preserve">Remember that encrypting your wallet cannot fully protect your bitcoins from being stolen by malware infecting your computer.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">118</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg45">
+ <source xml:space="preserve">Wallet to be encrypted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">122</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg46">
+ <source xml:space="preserve">Your wallet is about to be encrypted. </source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">124</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg47">
+ <source xml:space="preserve">Your wallet is now encrypted. </source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">131</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg48">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">133</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg49">
+ <source xml:space="preserve">Wallet encryption failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">139</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">147</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">179</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">185</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg50">
+ <source xml:space="preserve">Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg51">
+ <source xml:space="preserve">The supplied passphrases do not match.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">148</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">186</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg52">
+ <source xml:space="preserve">Wallet unlock failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">159</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">165</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg53">
+ <source xml:space="preserve">The passphrase entered for the wallet decryption was incorrect.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">160</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">180</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg54">
+ <source xml:space="preserve">Wallet passphrase was successfully changed.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">174</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg55">
+ <source xml:space="preserve">Warning: The Caps Lock key is on!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">220</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">253</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../bantablemodel.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="BanTableModel">
+ <trans-unit id="_msg56">
+ <source xml:space="preserve">IP/Netmask</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg57">
+ <source xml:space="preserve">Banned Until</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../bitcoin.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="BitcoinApplication">
+ <trans-unit id="_msg58">
+ <source xml:space="preserve">Runaway exception</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">423</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg59">
+ <source xml:space="preserve">A fatal error occurred. %1 can no longer continue safely and will quit.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">424</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg60">
+ <source xml:space="preserve">Internal error</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">433</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg61">
+ <source xml:space="preserve">An internal error occurred. %1 will attempt to continue safely. This is an unexpected bug which can be reported as described below.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">434</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="QObject">
+ <trans-unit id="_msg62">
+ <source xml:space="preserve">Error: Specified data directory &quot;%1&quot; does not exist.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">545</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg63">
+ <source xml:space="preserve">Error: Cannot parse configuration file: %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">551</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg64">
+ <source xml:space="preserve">Error: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">566</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg65">
+ <source xml:space="preserve">Error initializing settings: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">575</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg66">
+ <source xml:space="preserve">%1 didn&apos;t yet exit safely...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">638</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../bitcoingui.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="BitcoinGUI">
+ <trans-unit id="_msg67" approved="yes">
+ <source xml:space="preserve">Sign &amp;message...</source>
+ <target xml:space="preserve">Sign &amp;message...</target>
+ <context-group purpose="location"><context context-type="linenumber">325</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg68" approved="yes">
+ <source xml:space="preserve">Synchronizing with network...</source>
+ <target xml:space="preserve">Synchronizing with network...</target>
+ <context-group purpose="location"><context context-type="linenumber">993</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg69" approved="yes">
+ <source xml:space="preserve">&amp;Overview</source>
+ <target xml:space="preserve">&amp;Overview</target>
+ <context-group purpose="location"><context context-type="linenumber">247</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg70" approved="yes">
+ <source xml:space="preserve">Show general overview of wallet</source>
+ <target xml:space="preserve">Show general overview of wallet</target>
+ <context-group purpose="location"><context context-type="linenumber">248</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg71" approved="yes">
+ <source xml:space="preserve">&amp;Transactions</source>
+ <target xml:space="preserve">&amp;Transactions</target>
+ <context-group purpose="location"><context context-type="linenumber">276</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg72" approved="yes">
+ <source xml:space="preserve">Browse transaction history</source>
+ <target xml:space="preserve">Browse transaction history</target>
+ <context-group purpose="location"><context context-type="linenumber">277</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg73" approved="yes">
+ <source xml:space="preserve">E&amp;xit</source>
+ <target xml:space="preserve">E&amp;xit</target>
+ <context-group purpose="location"><context context-type="linenumber">300</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg74" approved="yes">
+ <source xml:space="preserve">Quit application</source>
+ <target xml:space="preserve">Quit application</target>
+ <context-group purpose="location"><context context-type="linenumber">301</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg75">
+ <source xml:space="preserve">&amp;About %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">304</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg76">
+ <source xml:space="preserve">Show information about %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">305</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg77" approved="yes">
+ <source xml:space="preserve">About &amp;Qt</source>
+ <target xml:space="preserve">About &amp;Qt</target>
+ <context-group purpose="location"><context context-type="linenumber">308</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg78" approved="yes">
+ <source xml:space="preserve">Show information about Qt</source>
+ <target xml:space="preserve">Show information about Qt</target>
+ <context-group purpose="location"><context context-type="linenumber">309</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg79" approved="yes">
+ <source xml:space="preserve">&amp;Options...</source>
+ <target xml:space="preserve">&amp;Options...</target>
+ <context-group purpose="location"><context context-type="linenumber">311</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg80">
+ <source xml:space="preserve">Modify configuration options for %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">312</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg81" approved="yes">
+ <source xml:space="preserve">&amp;Encrypt Wallet...</source>
+ <target xml:space="preserve">&amp;Encrypt Wallet...</target>
+ <context-group purpose="location"><context context-type="linenumber">318</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg82" approved="yes">
+ <source xml:space="preserve">&amp;Backup Wallet...</source>
+ <target xml:space="preserve">&amp;Backup Wallet...</target>
+ <context-group purpose="location"><context context-type="linenumber">321</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg83" approved="yes">
+ <source xml:space="preserve">&amp;Change Passphrase...</source>
+ <target xml:space="preserve">&amp;Change Passphrase...</target>
+ <context-group purpose="location"><context context-type="linenumber">323</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg84">
+ <source xml:space="preserve">Open &amp;URI...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">345</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg85">
+ <source xml:space="preserve">Create Wallet...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">356</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg86">
+ <source xml:space="preserve">Create a new wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">358</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg87">
+ <source xml:space="preserve">Wallet:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">567</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg88">
+ <source xml:space="preserve">Click to disable network activity.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">918</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg89">
+ <source xml:space="preserve">Network activity disabled.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">920</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg90">
+ <source xml:space="preserve">Click to enable network activity again.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">920</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg91">
+ <source xml:space="preserve">Syncing Headers (%1%)...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">947</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg92" approved="yes">
+ <source xml:space="preserve">Reindexing blocks on disk...</source>
+ <target xml:space="preserve">Reindexing blocks on disk...</target>
+ <context-group purpose="location"><context context-type="linenumber">1004</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg93">
+ <source xml:space="preserve">Proxy is &lt;b&gt;enabled&lt;/b&gt;: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1319</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg94" approved="yes">
+ <source xml:space="preserve">Send coins to a Bitcoin address</source>
+ <target xml:space="preserve">Send coins to a Bitcoin address</target>
+ <context-group purpose="location"><context context-type="linenumber">255</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg95" approved="yes">
+ <source xml:space="preserve">Backup wallet to another location</source>
+ <target xml:space="preserve">Backup wallet to another location</target>
+ <context-group purpose="location"><context context-type="linenumber">322</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg96" approved="yes">
+ <source xml:space="preserve">Change the passphrase used for wallet encryption</source>
+ <target xml:space="preserve">Change the passphrase used for wallet encryption</target>
+ <context-group purpose="location"><context context-type="linenumber">324</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg97" approved="yes">
+ <source xml:space="preserve">&amp;Verify message...</source>
+ <target xml:space="preserve">&amp;Verify message...</target>
+ <context-group purpose="location"><context context-type="linenumber">327</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg98" approved="yes">
+ <source xml:space="preserve">&amp;Send</source>
+ <target xml:space="preserve">&amp;Send</target>
+ <context-group purpose="location"><context context-type="linenumber">254</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg99" approved="yes">
+ <source xml:space="preserve">&amp;Receive</source>
+ <target xml:space="preserve">&amp;Receive</target>
+ <context-group purpose="location"><context context-type="linenumber">265</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg100" approved="yes">
+ <source xml:space="preserve">&amp;Show / Hide</source>
+ <target xml:space="preserve">&amp;Show / Hide</target>
+ <context-group purpose="location"><context context-type="linenumber">315</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg101" approved="yes">
+ <source xml:space="preserve">Show or hide the main Window</source>
+ <target xml:space="preserve">Show or hide the main Window</target>
+ <context-group purpose="location"><context context-type="linenumber">316</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg102" approved="yes">
+ <source xml:space="preserve">Encrypt the private keys that belong to your wallet</source>
+ <target xml:space="preserve">Encrypt the private keys that belong to your wallet</target>
+ <context-group purpose="location"><context context-type="linenumber">319</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg103" approved="yes">
+ <source xml:space="preserve">Sign messages with your Bitcoin addresses to prove you own them</source>
+ <target xml:space="preserve">Sign messages with your Bitcoin addresses to prove you own them</target>
+ <context-group purpose="location"><context context-type="linenumber">326</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg104" approved="yes">
+ <source xml:space="preserve">Verify messages to ensure they were signed with specified Bitcoin addresses</source>
+ <target xml:space="preserve">Verify messages to ensure they were signed with specified Bitcoin addresses</target>
+ <context-group purpose="location"><context context-type="linenumber">328</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg105" approved="yes">
+ <source xml:space="preserve">&amp;File</source>
+ <target xml:space="preserve">&amp;File</target>
+ <context-group purpose="location"><context context-type="linenumber">457</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg106" approved="yes">
+ <source xml:space="preserve">&amp;Settings</source>
+ <target xml:space="preserve">&amp;Settings</target>
+ <context-group purpose="location"><context context-type="linenumber">475</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg107" approved="yes">
+ <source xml:space="preserve">&amp;Help</source>
+ <target xml:space="preserve">&amp;Help</target>
+ <context-group purpose="location"><context context-type="linenumber">536</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg108" approved="yes">
+ <source xml:space="preserve">Tabs toolbar</source>
+ <target xml:space="preserve">Tabs toolbar</target>
+ <context-group purpose="location"><context context-type="linenumber">547</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg109">
+ <source xml:space="preserve">Request payments (generates QR codes and bitcoin: URIs)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">266</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg110">
+ <source xml:space="preserve">Show the list of used sending addresses and labels</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">341</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg111">
+ <source xml:space="preserve">Show the list of used receiving addresses and labels</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">343</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg112">
+ <source xml:space="preserve">&amp;Command-line options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">363</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">918</context></context-group>
+ <trans-unit id="_msg113[0]" approved="yes">
+ <source xml:space="preserve">%n active connection(s) to Bitcoin network</source>
+ <target xml:space="preserve">%n active connection to Bitcoin network</target>
+ </trans-unit>
+ <trans-unit id="_msg113[1]" approved="yes">
+ <source xml:space="preserve">%n active connection(s) to Bitcoin network</source>
+ <target xml:space="preserve">%n active connections to Bitcoin network</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg114">
+ <source xml:space="preserve">Indexing blocks on disk...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">998</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg115">
+ <source xml:space="preserve">Processing blocks on disk...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1000</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">1019</context></context-group>
+ <trans-unit id="_msg116[0]" approved="yes">
+ <source xml:space="preserve">Processed %n block(s) of transaction history.</source>
+ <target xml:space="preserve">Processed %n block of transaction history.</target>
+ </trans-unit>
+ <trans-unit id="_msg116[1]" approved="yes">
+ <source xml:space="preserve">Processed %n block(s) of transaction history.</source>
+ <target xml:space="preserve">Processed %n blocks of transaction history.</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg117" approved="yes">
+ <source xml:space="preserve">%1 behind</source>
+ <target xml:space="preserve">%1 behind</target>
+ <context-group purpose="location"><context context-type="linenumber">1042</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg118" approved="yes">
+ <source xml:space="preserve">Last received block was generated %1 ago.</source>
+ <target xml:space="preserve">Last received block was generated %1 ago.</target>
+ <context-group purpose="location"><context context-type="linenumber">1066</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg119" approved="yes">
+ <source xml:space="preserve">Transactions after this will not yet be visible.</source>
+ <target xml:space="preserve">Transactions after this will not yet be visible.</target>
+ <context-group purpose="location"><context context-type="linenumber">1068</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg120" approved="yes">
+ <source xml:space="preserve">Error</source>
+ <target xml:space="preserve">Error</target>
+ <context-group purpose="location"><context context-type="linenumber">1093</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg121" approved="yes">
+ <source xml:space="preserve">Warning</source>
+ <target xml:space="preserve">Warning</target>
+ <context-group purpose="location"><context context-type="linenumber">1097</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg122" approved="yes">
+ <source xml:space="preserve">Information</source>
+ <target xml:space="preserve">Information</target>
+ <context-group purpose="location"><context context-type="linenumber">1101</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg123" approved="yes">
+ <source xml:space="preserve">Up to date</source>
+ <target xml:space="preserve">Up to date</target>
+ <context-group purpose="location"><context context-type="linenumber">1023</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg124">
+ <source xml:space="preserve">&amp;Load PSBT from file...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">329</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg125">
+ <source xml:space="preserve">Load Partially Signed Bitcoin Transaction</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">330</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg126">
+ <source xml:space="preserve">Load PSBT from clipboard...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">331</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg127">
+ <source xml:space="preserve">Load Partially Signed Bitcoin Transaction from clipboard</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">332</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg128">
+ <source xml:space="preserve">Node window</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">334</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg129">
+ <source xml:space="preserve">Open node debugging and diagnostic console</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">335</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg130">
+ <source xml:space="preserve">&amp;Sending addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">340</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg131">
+ <source xml:space="preserve">&amp;Receiving addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">342</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg132">
+ <source xml:space="preserve">Open a bitcoin: URI</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">346</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg133">
+ <source xml:space="preserve">Open Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">348</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg134">
+ <source xml:space="preserve">Open a wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">350</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg135">
+ <source xml:space="preserve">Close Wallet...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">353</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg136">
+ <source xml:space="preserve">Close wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">354</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg137">
+ <source xml:space="preserve">Close All Wallets...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">360</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg138">
+ <source xml:space="preserve">Close all wallets</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">361</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg139">
+ <source xml:space="preserve">Show the %1 help message to get a list with possible Bitcoin command-line options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">365</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg140">
+ <source xml:space="preserve">&amp;Mask values</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">367</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg141">
+ <source xml:space="preserve">Mask the values in the Overview tab</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">369</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg142">
+ <source xml:space="preserve">default wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">401</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg143">
+ <source xml:space="preserve">No wallets available</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">422</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg144">
+ <source xml:space="preserve">&amp;Window</source>
+ <target xml:space="preserve" state="needs-review-translation">&amp;Window</target>
+ <context-group purpose="location"><context context-type="linenumber">486</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg145">
+ <source xml:space="preserve">Minimize</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">488</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg146">
+ <source xml:space="preserve">Zoom</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">498</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg147">
+ <source xml:space="preserve">Main Window</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">516</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg148">
+ <source xml:space="preserve">%1 client</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">761</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg149">
+ <source xml:space="preserve">Connecting to peers...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1010</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg150" approved="yes">
+ <source xml:space="preserve">Catching up...</source>
+ <target xml:space="preserve">Catching up...</target>
+ <context-group purpose="location"><context context-type="linenumber">1047</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg151">
+ <source xml:space="preserve">Error: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1094</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg152">
+ <source xml:space="preserve">Warning: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1098</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg153">
+ <source xml:space="preserve">Date: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1198</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg154">
+ <source xml:space="preserve">Amount: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1199</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg155">
+ <source xml:space="preserve">Wallet: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1201</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg156">
+ <source xml:space="preserve">Type: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1203</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg157">
+ <source xml:space="preserve">Label: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1205</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg158">
+ <source xml:space="preserve">Address: %1
+</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1207</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg159" approved="yes">
+ <source xml:space="preserve">Sent transaction</source>
+ <target xml:space="preserve">Sent transaction</target>
+ <context-group purpose="location"><context context-type="linenumber">1208</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg160" approved="yes">
+ <source xml:space="preserve">Incoming transaction</source>
+ <target xml:space="preserve">Incoming transaction</target>
+ <context-group purpose="location"><context context-type="linenumber">1208</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg161">
+ <source xml:space="preserve">HD key generation is &lt;b&gt;enabled&lt;/b&gt;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg162">
+ <source xml:space="preserve">HD key generation is &lt;b&gt;disabled&lt;/b&gt;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg163">
+ <source xml:space="preserve">Private key &lt;b&gt;disabled&lt;/b&gt;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg164" approved="yes">
+ <source xml:space="preserve">Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source>
+ <target xml:space="preserve">Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</target>
+ <context-group purpose="location"><context context-type="linenumber">1279</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg165" approved="yes">
+ <source xml:space="preserve">Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source>
+ <target xml:space="preserve">Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</target>
+ <context-group purpose="location"><context context-type="linenumber">1287</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg166">
+ <source xml:space="preserve">Original message:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1408</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="UnitDisplayStatusBarControl">
+ <trans-unit id="_msg167">
+ <source xml:space="preserve">Unit to show amounts in. Click to select another unit.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1448</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/coincontroldialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="CoinControlDialog">
+ <trans-unit id="_msg168">
+ <source xml:space="preserve">Coin Selection</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg169">
+ <source xml:space="preserve">Quantity:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">48</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg170">
+ <source xml:space="preserve">Bytes:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">77</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg171">
+ <source xml:space="preserve">Amount:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">122</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg172">
+ <source xml:space="preserve">Fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">202</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg173">
+ <source xml:space="preserve">Dust:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">154</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg174">
+ <source xml:space="preserve">After Fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">247</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg175">
+ <source xml:space="preserve">Change:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">279</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg176">
+ <source xml:space="preserve">(un)select all</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">335</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg177">
+ <source xml:space="preserve">Tree mode</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">351</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg178">
+ <source xml:space="preserve">List mode</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">364</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg179">
+ <source xml:space="preserve">Amount</source>
+ <target xml:space="preserve" state="needs-review-translation">Amount</target>
+ <context-group purpose="location"><context context-type="linenumber">420</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg180">
+ <source xml:space="preserve">Received with label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">425</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg181">
+ <source xml:space="preserve">Received with address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">430</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg182">
+ <source xml:space="preserve">Date</source>
+ <target xml:space="preserve" state="needs-review-translation">Date</target>
+ <context-group purpose="location"><context context-type="linenumber">435</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg183">
+ <source xml:space="preserve">Confirmations</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">440</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg184">
+ <source xml:space="preserve">Confirmed</source>
+ <target xml:space="preserve" state="needs-review-translation">Confirmed</target>
+ <context-group purpose="location"><context context-type="linenumber">443</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../coincontroldialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="CoinControlDialog">
+ <trans-unit id="_msg185">
+ <source xml:space="preserve">Copy address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">54</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg186">
+ <source xml:space="preserve">Copy label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">55</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg187">
+ <source xml:space="preserve">Copy amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">56</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">82</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg188">
+ <source xml:space="preserve">Copy transaction ID</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">57</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg189">
+ <source xml:space="preserve">Lock unspent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">58</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg190">
+ <source xml:space="preserve">Unlock unspent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">59</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg191">
+ <source xml:space="preserve">Copy quantity</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">81</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg192">
+ <source xml:space="preserve">Copy fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">83</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg193">
+ <source xml:space="preserve">Copy after fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">84</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg194">
+ <source xml:space="preserve">Copy bytes</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg195">
+ <source xml:space="preserve">Copy dust</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg196">
+ <source xml:space="preserve">Copy change</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">87</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg197">
+ <source xml:space="preserve">(%1 locked)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">389</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg198">
+ <source xml:space="preserve">yes</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">544</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg199">
+ <source xml:space="preserve">no</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">544</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg200">
+ <source xml:space="preserve">This label turns red if any recipient receives an amount smaller than the current dust threshold.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">558</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg201">
+ <source xml:space="preserve">Can vary +/- %1 satoshi(s) per input.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">563</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg202">
+ <source xml:space="preserve">(no label)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">601</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">655</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg203">
+ <source xml:space="preserve">change from %1 (%2)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">648</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg204">
+ <source xml:space="preserve">(change)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">649</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../walletcontroller.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="CreateWalletActivity">
+ <trans-unit id="_msg205">
+ <source xml:space="preserve">Creating Wallet &lt;b&gt;%1&lt;/b&gt;...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">250</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg206">
+ <source xml:space="preserve">Create wallet failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">278</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg207">
+ <source xml:space="preserve">Create wallet warning</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">280</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="OpenWalletActivity">
+ <trans-unit id="_msg208">
+ <source xml:space="preserve">Open wallet failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">319</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg209">
+ <source xml:space="preserve">Open wallet warning</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">321</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg210">
+ <source xml:space="preserve">default wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">331</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg211">
+ <source xml:space="preserve">Opening Wallet &lt;b&gt;%1&lt;/b&gt;...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">333</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="WalletController">
+ <trans-unit id="_msg212">
+ <source xml:space="preserve">Close wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg213">
+ <source xml:space="preserve">Are you sure you wish to close the wallet &lt;i&gt;%1&lt;/i&gt;?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">87</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg214">
+ <source xml:space="preserve">Closing the wallet for too long can result in having to resync the entire chain if pruning is enabled.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">88</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg215">
+ <source xml:space="preserve">Close all wallets</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">101</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg216">
+ <source xml:space="preserve">Are you sure you wish to close all wallets?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">102</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/createwalletdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="CreateWalletDialog">
+ <trans-unit id="_msg217">
+ <source xml:space="preserve">Create Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg218">
+ <source xml:space="preserve">Wallet Name</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">25</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg219">
+ <source xml:space="preserve">Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">38</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg220">
+ <source xml:space="preserve">Encrypt the wallet. The wallet will be encrypted with a passphrase of your choice.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">47</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg221">
+ <source xml:space="preserve">Encrypt Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">50</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg222">
+ <source xml:space="preserve">Advanced Options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">76</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg223">
+ <source xml:space="preserve">Disable private keys for this wallet. Wallets with private keys disabled will have no private keys and cannot have an HD seed or imported private keys. This is ideal for watch-only wallets.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg224">
+ <source xml:space="preserve">Disable Private Keys</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">88</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg225">
+ <source xml:space="preserve">Make a blank wallet. Blank wallets do not initially have private keys or scripts. Private keys and addresses can be imported, or an HD seed can be set, at a later time.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">95</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg226">
+ <source xml:space="preserve">Make Blank Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg227">
+ <source xml:space="preserve">Use descriptors for scriptPubKey management</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">105</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg228">
+ <source xml:space="preserve">Descriptor Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../createwalletdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="CreateWalletDialog">
+ <trans-unit id="_msg229">
+ <source xml:space="preserve">Create</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">21</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg230">
+ <source xml:space="preserve">Compiled without sqlite support (required for descriptor wallets)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">63</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/editaddressdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="EditAddressDialog">
+ <trans-unit id="_msg231" approved="yes">
+ <source xml:space="preserve">Edit Address</source>
+ <target xml:space="preserve">Edit Address</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg232" approved="yes">
+ <source xml:space="preserve">&amp;Label</source>
+ <target xml:space="preserve">&amp;Label</target>
+ <context-group purpose="location"><context context-type="linenumber">25</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg233">
+ <source xml:space="preserve">The label associated with this address list entry</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">35</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg234">
+ <source xml:space="preserve">The address associated with this address list entry. This can only be modified for sending addresses.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">52</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg235" approved="yes">
+ <source xml:space="preserve">&amp;Address</source>
+ <target xml:space="preserve">&amp;Address</target>
+ <context-group purpose="location"><context context-type="linenumber">42</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../editaddressdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="EditAddressDialog">
+ <trans-unit id="_msg236">
+ <source xml:space="preserve">New sending address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">29</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg237">
+ <source xml:space="preserve">Edit receiving address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">32</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg238">
+ <source xml:space="preserve">Edit sending address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">36</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg239">
+ <source xml:space="preserve">The entered address &quot;%1&quot; is not a valid Bitcoin address.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">113</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg240">
+ <source xml:space="preserve">Address &quot;%1&quot; already exists as a receiving address with label &quot;%2&quot; and so cannot be added as a sending address.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">146</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg241">
+ <source xml:space="preserve">The entered address &quot;%1&quot; is already in the address book with label &quot;%2&quot;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">151</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg242">
+ <source xml:space="preserve">Could not unlock wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">123</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg243">
+ <source xml:space="preserve">New key generation failed.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">128</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../intro.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="FreespaceChecker">
+ <trans-unit id="_msg244" approved="yes">
+ <source xml:space="preserve">A new data directory will be created.</source>
+ <target xml:space="preserve">A new data directory will be created.</target>
+ <context-group purpose="location"><context context-type="linenumber">72</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg245" approved="yes">
+ <source xml:space="preserve">name</source>
+ <target xml:space="preserve">name</target>
+ <context-group purpose="location"><context context-type="linenumber">94</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg246" approved="yes">
+ <source xml:space="preserve">Directory already exists. Add %1 if you intend to create a new directory here.</source>
+ <target xml:space="preserve">Directory already exists. Add %1 if you intend to create a new directory here.</target>
+ <context-group purpose="location"><context context-type="linenumber">96</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg247" approved="yes">
+ <source xml:space="preserve">Path already exists, and is not a directory.</source>
+ <target xml:space="preserve">Path already exists, and is not a directory.</target>
+ <context-group purpose="location"><context context-type="linenumber">99</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg248" approved="yes">
+ <source xml:space="preserve">Cannot create data directory here.</source>
+ <target xml:space="preserve">Cannot create data directory here.</target>
+ <context-group purpose="location"><context context-type="linenumber">106</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="Intro">
+ <trans-unit id="_msg249">
+ <source xml:space="preserve">Bitcoin</source>
+ <target xml:space="preserve" state="needs-review-translation">Bitcoin</target>
+ <context-group purpose="location"><context context-type="linenumber">138</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg250">
+ <source xml:space="preserve">Discard blocks after verification, except most recent %1 GB (prune)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">146</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg251">
+ <source xml:space="preserve">At least %1 GB of data will be stored in this directory, and it will grow over time.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">358</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg252">
+ <source xml:space="preserve">Approximately %1 GB of data will be stored in this directory.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">361</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg253">
+ <source xml:space="preserve">%1 will download and store a copy of the Bitcoin block chain.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">365</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg254">
+ <source xml:space="preserve">The wallet will also be stored in this directory.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">367</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg255">
+ <source xml:space="preserve">Error: Specified data directory &quot;%1&quot; cannot be created.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">230</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg256" approved="yes">
+ <source xml:space="preserve">Error</source>
+ <target xml:space="preserve">Error</target>
+ <context-group purpose="location"><context context-type="linenumber">260</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">281</context></context-group>
+ <trans-unit id="_msg257[0]" approved="yes">
+ <source xml:space="preserve">%n GB of free space available</source>
+ <target xml:space="preserve">%n GB of free space available</target>
+ </trans-unit>
+ <trans-unit id="_msg257[1]" approved="yes">
+ <source xml:space="preserve">%n GB of free space available</source>
+ <target xml:space="preserve">%n GB of free space available</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">283</context></context-group>
+ <trans-unit id="_msg258[0]" approved="yes">
+ <source xml:space="preserve">(of %n GB needed)</source>
+ <target xml:space="preserve">(of %n GB needed)</target>
+ </trans-unit>
+ <trans-unit id="_msg258[1]" approved="yes">
+ <source xml:space="preserve">(of %n GB needed)</source>
+ <target xml:space="preserve">(of %n GB needed)</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">286</context></context-group>
+ <trans-unit id="_msg259[0]">
+ <source xml:space="preserve">(%n GB needed for full chain)</source>
+ <target xml:space="preserve"></target>
+ </trans-unit>
+ <trans-unit id="_msg259[1]">
+ <source xml:space="preserve">(%n GB needed for full chain)</source>
+ <target xml:space="preserve"></target>
+ </trans-unit>
+ </group>
+ </group>
+ </body></file>
+ <file original="../utilitydialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="HelpMessageDialog">
+ <trans-unit id="_msg260">
+ <source xml:space="preserve">version</source>
+ <target xml:space="preserve" state="needs-review-translation">version</target>
+ <context-group purpose="location"><context context-type="linenumber">37</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg261">
+ <source xml:space="preserve">About %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">41</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg262">
+ <source xml:space="preserve">Command-line options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">60</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="ShutdownWindow">
+ <trans-unit id="_msg263">
+ <source xml:space="preserve">%1 is shutting down...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">145</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg264">
+ <source xml:space="preserve">Do not shut down the computer until this window disappears.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">146</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/intro.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="Intro">
+ <trans-unit id="_msg265" approved="yes">
+ <source xml:space="preserve">Welcome</source>
+ <target xml:space="preserve">Welcome</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg266">
+ <source xml:space="preserve">Welcome to %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">23</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg267">
+ <source xml:space="preserve">As this is the first time the program is launched, you can choose where %1 will store its data.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">49</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg268">
+ <source xml:space="preserve">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.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">206</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg269">
+ <source xml:space="preserve">Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">216</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg270">
+ <source xml:space="preserve">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.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">226</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg271">
+ <source xml:space="preserve">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.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">236</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg272" approved="yes">
+ <source xml:space="preserve">Use the default data directory</source>
+ <target xml:space="preserve">Use the default data directory</target>
+ <context-group purpose="location"><context context-type="linenumber">66</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg273" approved="yes">
+ <source xml:space="preserve">Use a custom data directory:</source>
+ <target xml:space="preserve">Use a custom data directory:</target>
+ <context-group purpose="location"><context context-type="linenumber">73</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/modaloverlay.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ModalOverlay">
+ <trans-unit id="_msg274">
+ <source xml:space="preserve">Form</source>
+ <target xml:space="preserve" state="needs-review-translation">Form</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg275">
+ <source xml:space="preserve">Recent transactions may not yet be visible, and therefore your wallet&apos;s balance might be incorrect. This information will be correct once your wallet has finished synchronizing with the bitcoin network, as detailed below.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">133</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg276">
+ <source xml:space="preserve">Attempting to spend bitcoins that are affected by not-yet-displayed transactions will not be accepted by the network.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">152</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg277">
+ <source xml:space="preserve">Number of blocks left</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">215</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg278">
+ <source xml:space="preserve">Unknown...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">222</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">248</context></context-group>
+ <context-group purpose="location"><context context-type="sourcefile">../modaloverlay.cpp</context><context context-type="linenumber">153</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg279">
+ <source xml:space="preserve">Last block time</source>
+ <target xml:space="preserve" state="needs-review-translation">Last block time</target>
+ <context-group purpose="location"><context context-type="linenumber">235</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg280">
+ <source xml:space="preserve">Progress</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">261</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg281">
+ <source xml:space="preserve">Progress increase per hour</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">295</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg282">
+ <source xml:space="preserve">calculating...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">302</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">322</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg283">
+ <source xml:space="preserve">Estimated time left until synced</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">315</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg284">
+ <source xml:space="preserve">Hide</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">352</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg285">
+ <source xml:space="preserve">Esc</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">355</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../modaloverlay.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ModalOverlay">
+ <trans-unit id="_msg286">
+ <source xml:space="preserve">%1 is currently syncing. It will download headers and blocks from peers and validate them until reaching the tip of the block chain.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">34</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg287">
+ <source xml:space="preserve">Unknown. Syncing Headers (%1, %2%)...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">159</context></context-group>
+ </trans-unit>
+ </group>
+ <group restype="x-trolltech-linguist-context" resname="QObject">
+ <trans-unit id="_msg288">
+ <source xml:space="preserve">unknown</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">123</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/openuridialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="OpenURIDialog">
+ <trans-unit id="_msg289">
+ <source xml:space="preserve">Open bitcoin URI</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg290">
+ <source xml:space="preserve">URI:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">22</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/optionsdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="OptionsDialog">
+ <trans-unit id="_msg291" approved="yes">
+ <source xml:space="preserve">Options</source>
+ <target xml:space="preserve">Options</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg292" approved="yes">
+ <source xml:space="preserve">&amp;Main</source>
+ <target xml:space="preserve">&amp;Main</target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg293">
+ <source xml:space="preserve">Automatically start %1 after logging in to the system.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">33</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg294">
+ <source xml:space="preserve">&amp;Start %1 on system login</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">36</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg295">
+ <source xml:space="preserve">Enabling pruning significantly reduces the disk space required to store transactions. All blocks are still fully validated. Reverting this setting requires re-downloading the entire blockchain.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">58</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg296">
+ <source xml:space="preserve">Size of &amp;database cache</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg297">
+ <source xml:space="preserve">Number of script &amp;verification threads</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">151</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg298">
+ <source xml:space="preserve">IP address of the proxy (e.g. IPv4: 127.0.0.1 / IPv6: ::1)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">322</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">509</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg299">
+ <source xml:space="preserve">Shows if the supplied default SOCKS5 proxy is used to reach peers via this network type.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">391</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">414</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">437</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg300">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">606</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg301">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">686</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">699</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg302">
+ <source xml:space="preserve">Open the %1 configuration file from the working directory.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">878</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg303">
+ <source xml:space="preserve">Open Configuration File</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">881</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg304" approved="yes">
+ <source xml:space="preserve">Reset all client options to default.</source>
+ <target xml:space="preserve">Reset all client options to default.</target>
+ <context-group purpose="location"><context context-type="linenumber">891</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg305" approved="yes">
+ <source xml:space="preserve">&amp;Reset Options</source>
+ <target xml:space="preserve">&amp;Reset Options</target>
+ <context-group purpose="location"><context context-type="linenumber">894</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg306" approved="yes">
+ <source xml:space="preserve">&amp;Network</source>
+ <target xml:space="preserve">&amp;Network</target>
+ <context-group purpose="location"><context context-type="linenumber">249</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg307">
+ <source xml:space="preserve">Prune &amp;block storage to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">61</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg308">
+ <source xml:space="preserve">GB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">71</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg309">
+ <source xml:space="preserve">Reverting this setting requires re-downloading the entire blockchain.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">96</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg310">
+ <source xml:space="preserve">MiB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">124</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg311">
+ <source xml:space="preserve">(0 = auto, &lt;0 = leave that many cores free)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">164</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg312">
+ <source xml:space="preserve">W&amp;allet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">200</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg313">
+ <source xml:space="preserve">Expert</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">206</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg314">
+ <source xml:space="preserve">Enable coin &amp;control features</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">215</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg315">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">222</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg316">
+ <source xml:space="preserve">&amp;Spend unconfirmed change</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">225</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg317" approved="yes">
+ <source xml:space="preserve">Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
+ <target xml:space="preserve">Automatically open the Bitcoin client port on the router. This only works when your router supports UPnP and it is enabled.</target>
+ <context-group purpose="location"><context context-type="linenumber">255</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg318" approved="yes">
+ <source xml:space="preserve">Map port using &amp;UPnP</source>
+ <target xml:space="preserve">Map port using &amp;UPnP</target>
+ <context-group purpose="location"><context context-type="linenumber">258</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg319">
+ <source xml:space="preserve">Automatically open the Bitcoin client port on the router. This only works when your router supports NAT-PMP and it is enabled. The external port could be random.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">265</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg320">
+ <source xml:space="preserve">Map port using NA&amp;T-PMP</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">268</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg321">
+ <source xml:space="preserve">Accept connections from outside.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">275</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg322">
+ <source xml:space="preserve">Allow incomin&amp;g connections</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">278</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg323">
+ <source xml:space="preserve">Connect to the Bitcoin network through a SOCKS5 proxy.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">285</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg324">
+ <source xml:space="preserve">&amp;Connect through SOCKS5 proxy (default proxy):</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">288</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg325" approved="yes">
+ <source xml:space="preserve">Proxy &amp;IP:</source>
+ <target xml:space="preserve">Proxy &amp;IP:</target>
+ <context-group purpose="location"><context context-type="linenumber">297</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">484</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg326" approved="yes">
+ <source xml:space="preserve">&amp;Port:</source>
+ <target xml:space="preserve">&amp;Port:</target>
+ <context-group purpose="location"><context context-type="linenumber">329</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">516</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg327" approved="yes">
+ <source xml:space="preserve">Port of the proxy (e.g. 9050)</source>
+ <target xml:space="preserve">Port of the proxy (e.g. 9050)</target>
+ <context-group purpose="location"><context context-type="linenumber">354</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">541</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg328">
+ <source xml:space="preserve">Used for reaching peers via:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">378</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg329">
+ <source xml:space="preserve">IPv4</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">401</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg330">
+ <source xml:space="preserve">IPv6</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">424</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg331">
+ <source xml:space="preserve">Tor</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">447</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg332" approved="yes">
+ <source xml:space="preserve">&amp;Window</source>
+ <target xml:space="preserve">&amp;Window</target>
+ <context-group purpose="location"><context context-type="linenumber">577</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg333">
+ <source xml:space="preserve">Show the icon in the system tray.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">583</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg334">
+ <source xml:space="preserve">&amp;Show tray icon</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">586</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg335" approved="yes">
+ <source xml:space="preserve">Show only a tray icon after minimizing the window.</source>
+ <target xml:space="preserve">Show only a tray icon after minimizing the window.</target>
+ <context-group purpose="location"><context context-type="linenumber">596</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg336" approved="yes">
+ <source xml:space="preserve">&amp;Minimize to the tray instead of the taskbar</source>
+ <target xml:space="preserve">&amp;Minimize to the tray instead of the taskbar</target>
+ <context-group purpose="location"><context context-type="linenumber">599</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg337" approved="yes">
+ <source xml:space="preserve">M&amp;inimize on close</source>
+ <target xml:space="preserve">M&amp;inimize on close</target>
+ <context-group purpose="location"><context context-type="linenumber">609</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg338" approved="yes">
+ <source xml:space="preserve">&amp;Display</source>
+ <target xml:space="preserve">&amp;Display</target>
+ <context-group purpose="location"><context context-type="linenumber">630</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg339" approved="yes">
+ <source xml:space="preserve">User Interface &amp;language:</source>
+ <target xml:space="preserve">User Interface &amp;language:</target>
+ <context-group purpose="location"><context context-type="linenumber">638</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg340">
+ <source xml:space="preserve">The user interface language can be set here. This setting will take effect after restarting %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">651</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg341" approved="yes">
+ <source xml:space="preserve">&amp;Unit to show amounts in:</source>
+ <target xml:space="preserve">&amp;Unit to show amounts in:</target>
+ <context-group purpose="location"><context context-type="linenumber">662</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg342" approved="yes">
+ <source xml:space="preserve">Choose the default subdivision unit to show in the interface and when sending coins.</source>
+ <target xml:space="preserve">Choose the default subdivision unit to show in the interface and when sending coins.</target>
+ <context-group purpose="location"><context context-type="linenumber">675</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg343">
+ <source xml:space="preserve">Whether to show coin control features or not.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">212</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg344">
+ <source xml:space="preserve">Connect to the Bitcoin network through a separate SOCKS5 proxy for Tor onion services.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">472</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg345">
+ <source xml:space="preserve">Use separate SOCKS&amp;5 proxy to reach peers via Tor onion services:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">475</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg346">
+ <source xml:space="preserve">&amp;Third party transaction URLs</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">689</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg347">
+ <source xml:space="preserve">Monospaced font in the Overview tab:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">711</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg348">
+ <source xml:space="preserve">embedded &quot;%1&quot;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">719</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg349">
+ <source xml:space="preserve">111.11111111 BTC</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">741</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">790</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg350">
+ <source xml:space="preserve">909.09090909 BTC</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">748</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">797</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg351">
+ <source xml:space="preserve">closest matching &quot;%1&quot;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">768</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg352">
+ <source xml:space="preserve">Options set in this dialog are overridden by the command line or in the configuration file:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">833</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg353" approved="yes">
+ <source xml:space="preserve">&amp;OK</source>
+ <target xml:space="preserve">&amp;OK</target>
+ <context-group purpose="location"><context context-type="linenumber">974</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg354" approved="yes">
+ <source xml:space="preserve">&amp;Cancel</source>
+ <target xml:space="preserve">&amp;Cancel</target>
+ <context-group purpose="location"><context context-type="linenumber">987</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../optionsdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="OptionsDialog">
+ <trans-unit id="_msg355" approved="yes">
+ <source xml:space="preserve">default</source>
+ <target xml:space="preserve">default</target>
+ <context-group purpose="location"><context context-type="linenumber">104</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg356">
+ <source xml:space="preserve">none</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">185</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg357" approved="yes">
+ <source xml:space="preserve">Confirm options reset</source>
+ <target xml:space="preserve">Confirm options reset</target>
+ <context-group purpose="location"><context context-type="linenumber">276</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg358">
+ <source xml:space="preserve">Client restart required to activate changes.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">277</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">334</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg359">
+ <source xml:space="preserve">Client will be shut down. Do you want to proceed?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">277</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg360">
+ <source xml:space="preserve">Configuration options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">292</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg361">
+ <source xml:space="preserve">The configuration file is used to specify advanced user options which override GUI settings. Additionally, any command-line options will override this configuration file.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">293</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg362">
+ <source xml:space="preserve">Error</source>
+ <target xml:space="preserve" state="needs-review-translation">Error</target>
+ <context-group purpose="location"><context context-type="linenumber">298</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg363">
+ <source xml:space="preserve">The configuration file could not be opened.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">298</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg364">
+ <source xml:space="preserve">This change would require a client restart.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">338</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg365" approved="yes">
+ <source xml:space="preserve">The supplied proxy address is invalid.</source>
+ <target xml:space="preserve">The supplied proxy address is invalid.</target>
+ <context-group purpose="location"><context context-type="linenumber">366</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/overviewpage.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="OverviewPage">
+ <trans-unit id="_msg366" approved="yes">
+ <source xml:space="preserve">Form</source>
+ <target xml:space="preserve">Form</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg367" approved="yes">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve">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.</target>
+ <context-group purpose="location"><context context-type="linenumber">76</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">411</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg368">
+ <source xml:space="preserve">Watch-only:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">284</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg369">
+ <source xml:space="preserve">Available:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">294</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg370" approved="yes">
+ <source xml:space="preserve">Your current spendable balance</source>
+ <target xml:space="preserve">Your current spendable balance</target>
+ <context-group purpose="location"><context context-type="linenumber">304</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg371">
+ <source xml:space="preserve">Pending:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">339</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg372" approved="yes">
+ <source xml:space="preserve">Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</source>
+ <target xml:space="preserve">Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</target>
+ <context-group purpose="location"><context context-type="linenumber">139</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg373" approved="yes">
+ <source xml:space="preserve">Immature:</source>
+ <target xml:space="preserve">Immature:</target>
+ <context-group purpose="location"><context context-type="linenumber">239</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg374" approved="yes">
+ <source xml:space="preserve">Mined balance that has not yet matured</source>
+ <target xml:space="preserve">Mined balance that has not yet matured</target>
+ <context-group purpose="location"><context context-type="linenumber">210</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg375">
+ <source xml:space="preserve">Balances</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">60</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg376" approved="yes">
+ <source xml:space="preserve">Total:</source>
+ <target xml:space="preserve">Total:</target>
+ <context-group purpose="location"><context context-type="linenumber">200</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg377" approved="yes">
+ <source xml:space="preserve">Your current total balance</source>
+ <target xml:space="preserve">Your current total balance</target>
+ <context-group purpose="location"><context context-type="linenumber">249</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg378">
+ <source xml:space="preserve">Your current balance in watch-only addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">323</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg379">
+ <source xml:space="preserve">Spendable:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">346</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg380">
+ <source xml:space="preserve">Recent transactions</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">395</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg381">
+ <source xml:space="preserve">Unconfirmed transactions to watch-only addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg382">
+ <source xml:space="preserve">Mined balance in watch-only addresses that has not yet matured</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">158</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg383">
+ <source xml:space="preserve">Current total balance in watch-only addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">268</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../overviewpage.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="OverviewPage">
+ <trans-unit id="_msg384">
+ <source xml:space="preserve">Privacy mode activated for the Overview tab. To unmask the values, uncheck Settings-&gt;Mask values.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">191</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/psbtoperationsdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="PSBTOperationsDialog">
+ <trans-unit id="_msg385">
+ <source xml:space="preserve">Dialog</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg386">
+ <source xml:space="preserve">Sign Tx</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg387">
+ <source xml:space="preserve">Broadcast Tx</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">102</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg388">
+ <source xml:space="preserve">Copy to Clipboard</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">122</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg389">
+ <source xml:space="preserve">Save...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">129</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg390">
+ <source xml:space="preserve">Close</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">136</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../psbtoperationsdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="PSBTOperationsDialog">
+ <trans-unit id="_msg391">
+ <source xml:space="preserve">Failed to load transaction: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">55</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg392">
+ <source xml:space="preserve">Failed to sign transaction: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">73</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg393">
+ <source xml:space="preserve">Could not sign any more inputs.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">81</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg394">
+ <source xml:space="preserve">Signed %1 inputs, but more signatures are still required.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">83</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg395">
+ <source xml:space="preserve">Signed transaction successfully. Transaction is ready to broadcast.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg396">
+ <source xml:space="preserve">Unknown error processing transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg397">
+ <source xml:space="preserve">Transaction broadcast successfully! Transaction ID: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg398">
+ <source xml:space="preserve">Transaction broadcast failed: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg399">
+ <source xml:space="preserve">PSBT copied to clipboard.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg400">
+ <source xml:space="preserve">Save Transaction Data</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">143</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg401">
+ <source xml:space="preserve">Partially Signed Transaction (Binary)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">144</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of binary PSBT file format</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg402">
+ <source xml:space="preserve">PSBT saved to disk.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">151</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg403">
+ <source xml:space="preserve"> * Sends %1 to %2</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">167</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg404">
+ <source xml:space="preserve">Unable to calculate transaction fee or total transaction amount.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">177</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg405">
+ <source xml:space="preserve">Pays transaction fee: </source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">179</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg406">
+ <source xml:space="preserve">Total Amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">191</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg407">
+ <source xml:space="preserve">or</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">194</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg408">
+ <source xml:space="preserve">Transaction has %1 unsigned inputs.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">200</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg409">
+ <source xml:space="preserve">Transaction is missing some information about inputs.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">242</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg410">
+ <source xml:space="preserve">Transaction still needs signature(s).</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">246</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg411">
+ <source xml:space="preserve">(But this wallet cannot sign transactions.)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">249</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg412">
+ <source xml:space="preserve">(But this wallet does not have the right keys.)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">252</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg413">
+ <source xml:space="preserve">Transaction is fully signed and ready for broadcast.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg414">
+ <source xml:space="preserve">Transaction status is unknown.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">264</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../paymentserver.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="PaymentServer">
+ <trans-unit id="_msg415">
+ <source xml:space="preserve">Payment request error</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">173</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg416">
+ <source xml:space="preserve">Cannot start bitcoin: click-to-pay handler</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">174</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg417">
+ <source xml:space="preserve">URI handling</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">224</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">237</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">243</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">250</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg418">
+ <source xml:space="preserve">&apos;bitcoin://&apos; is not a valid URI. Use &apos;bitcoin:&apos; instead.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">224</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg419">
+ <source xml:space="preserve">Cannot process payment request because BIP70 is not supported.
+Due to widespread security flaws in BIP70 it&apos;s strongly recommended that any merchant instructions to switch wallets be ignored.
+If you are receiving this error you should request the merchant provide a BIP21 compatible URI.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">238</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">261</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg420">
+ <source xml:space="preserve">Invalid payment address %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">243</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg421">
+ <source xml:space="preserve">URI cannot be parsed! This can be caused by an invalid Bitcoin address or malformed URI parameters.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">251</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg422">
+ <source xml:space="preserve">Payment request file handling</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">260</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../peertablemodel.h" datatype="c" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="PeerTableModel">
+ <trans-unit id="_msg423">
+ <source xml:space="preserve">User Agent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg424">
+ <source xml:space="preserve">Ping</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg425">
+ <source xml:space="preserve">Sent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg426">
+ <source xml:space="preserve">Received</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg427">
+ <source xml:space="preserve">Peer Id</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg428">
+ <source xml:space="preserve">Address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg429">
+ <source xml:space="preserve">Type</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg430">
+ <source xml:space="preserve">Network</source>
+ <target xml:space="preserve" state="needs-review-translation">Network</target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../bitcoinunits.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="QObject">
+ <trans-unit id="_msg431">
+ <source xml:space="preserve">Amount</source>
+ <target xml:space="preserve" state="needs-review-translation">Amount</target>
+ <context-group purpose="location"><context context-type="linenumber">213</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../guiutil.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="QObject">
+ <trans-unit id="_msg432">
+ <source xml:space="preserve">Enter a Bitcoin address (e.g. %1)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">118</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg433">
+ <source xml:space="preserve">Unroutable</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">650</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg434">
+ <source xml:space="preserve">Internal</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">656</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg435">
+ <source xml:space="preserve">Inbound</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">666</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg436">
+ <source xml:space="preserve">Outbound</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">666</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg437">
+ <source xml:space="preserve">Full Relay</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">670</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg438">
+ <source xml:space="preserve">Block Relay</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">671</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg439">
+ <source xml:space="preserve">Manual</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">672</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg440">
+ <source xml:space="preserve">Feeler</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">673</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg441">
+ <source xml:space="preserve">Address Fetch</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">674</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg442">
+ <source xml:space="preserve">%1 d</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">688</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg443">
+ <source xml:space="preserve">%1 h</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">690</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg444">
+ <source xml:space="preserve">%1 m</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">692</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg445">
+ <source xml:space="preserve">%1 s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">694</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">722</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg446">
+ <source xml:space="preserve">None</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">710</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg447">
+ <source xml:space="preserve">N/A</source>
+ <target xml:space="preserve" state="needs-review-translation">N/A</target>
+ <context-group purpose="location"><context context-type="linenumber">716</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg448">
+ <source xml:space="preserve">%1 ms</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">717</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">735</context></context-group>
+ <trans-unit id="_msg449[0]" approved="yes">
+ <source xml:space="preserve">%n second(s)</source>
+ <target xml:space="preserve">%n second</target>
+ </trans-unit>
+ <trans-unit id="_msg449[1]" approved="yes">
+ <source xml:space="preserve">%n second(s)</source>
+ <target xml:space="preserve">%n seconds</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">739</context></context-group>
+ <trans-unit id="_msg450[0]" approved="yes">
+ <source xml:space="preserve">%n minute(s)</source>
+ <target xml:space="preserve">%n minute</target>
+ </trans-unit>
+ <trans-unit id="_msg450[1]" approved="yes">
+ <source xml:space="preserve">%n minute(s)</source>
+ <target xml:space="preserve">%n minutes</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">743</context></context-group>
+ <trans-unit id="_msg451[0]">
+ <source xml:space="preserve">%n hour(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n hour</target>
+ </trans-unit>
+ <trans-unit id="_msg451[1]">
+ <source xml:space="preserve">%n hour(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n hours</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">747</context></context-group>
+ <trans-unit id="_msg452[0]">
+ <source xml:space="preserve">%n day(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n day</target>
+ </trans-unit>
+ <trans-unit id="_msg452[1]">
+ <source xml:space="preserve">%n day(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n days</target>
+ </trans-unit>
+ </group>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">751</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">757</context></context-group>
+ <trans-unit id="_msg453[0]">
+ <source xml:space="preserve">%n week(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n week</target>
+ </trans-unit>
+ <trans-unit id="_msg453[1]">
+ <source xml:space="preserve">%n week(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n weeks</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg454">
+ <source xml:space="preserve">%1 and %2</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">757</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">757</context></context-group>
+ <trans-unit id="_msg455[0]">
+ <source xml:space="preserve">%n year(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n year</target>
+ </trans-unit>
+ <trans-unit id="_msg455[1]">
+ <source xml:space="preserve">%n year(s)</source>
+ <target xml:space="preserve" state="needs-review-translation">%n years</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg456">
+ <source xml:space="preserve">%1 B</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">765</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg457">
+ <source xml:space="preserve">%1 kB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">767</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg458">
+ <source xml:space="preserve">%1 MB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">769</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg459">
+ <source xml:space="preserve">%1 GB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">771</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../qrimagewidget.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="QRImageWidget">
+ <trans-unit id="_msg460">
+ <source xml:space="preserve">&amp;Save Image...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">30</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg461">
+ <source xml:space="preserve">&amp;Copy Image</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">33</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg462">
+ <source xml:space="preserve">Resulting URI too long, try to reduce the text for label / message.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">46</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg463">
+ <source xml:space="preserve">Error encoding URI into QR Code.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">53</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg464">
+ <source xml:space="preserve">QR code support not available.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">94</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg465">
+ <source xml:space="preserve">Save QR Code</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">124</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg466">
+ <source xml:space="preserve">PNG Image</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">125</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of PNG file format</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/debugwindow.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="RPCConsole">
+ <trans-unit id="_msg467" approved="yes">
+ <source xml:space="preserve">N/A</source>
+ <target xml:space="preserve">N/A</target>
+ <context-group purpose="location"><context context-type="linenumber">75</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">101</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">156</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">182</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">218</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">241</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">277</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">300</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">336</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">359</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1069</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1095</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1121</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1144</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1167</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1190</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1216</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1242</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1265</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1288</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1311</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1334</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1360</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1386</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1409</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1432</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1455</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1478</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1501</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1527</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1550</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1573</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1599</context></context-group>
+ <context-group purpose="location"><context context-type="sourcefile">../rpcconsole.h</context><context context-type="linenumber">141</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg468" approved="yes">
+ <source xml:space="preserve">Client version</source>
+ <target xml:space="preserve">Client version</target>
+ <context-group purpose="location"><context context-type="linenumber">65</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg469" approved="yes">
+ <source xml:space="preserve">&amp;Information</source>
+ <target xml:space="preserve">&amp;Information</target>
+ <context-group purpose="location"><context context-type="linenumber">43</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg470">
+ <source xml:space="preserve">General</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">58</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg471">
+ <source xml:space="preserve">Datadir</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">114</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg472">
+ <source xml:space="preserve">To specify a non-default location of the data directory use the &apos;%1&apos; option.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">124</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg473">
+ <source xml:space="preserve">Blocksdir</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">143</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg474">
+ <source xml:space="preserve">To specify a non-default location of the blocks directory use the &apos;%1&apos; option.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">153</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg475" approved="yes">
+ <source xml:space="preserve">Startup time</source>
+ <target xml:space="preserve">Startup time</target>
+ <context-group purpose="location"><context context-type="linenumber">172</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg476" approved="yes">
+ <source xml:space="preserve">Network</source>
+ <target xml:space="preserve">Network</target>
+ <context-group purpose="location"><context context-type="linenumber">201</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg477">
+ <source xml:space="preserve">Name</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">208</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg478" approved="yes">
+ <source xml:space="preserve">Number of connections</source>
+ <target xml:space="preserve">Number of connections</target>
+ <context-group purpose="location"><context context-type="linenumber">231</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg479" approved="yes">
+ <source xml:space="preserve">Block chain</source>
+ <target xml:space="preserve">Block chain</target>
+ <context-group purpose="location"><context context-type="linenumber">260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg480">
+ <source xml:space="preserve">Memory Pool</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">319</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg481">
+ <source xml:space="preserve">Current number of transactions</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">326</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg482">
+ <source xml:space="preserve">Memory usage</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">349</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg483">
+ <source xml:space="preserve">Wallet: </source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">443</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg484">
+ <source xml:space="preserve">(none)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">454</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg485">
+ <source xml:space="preserve">&amp;Reset</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">695</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg486">
+ <source xml:space="preserve">Received</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">775</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1468</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg487">
+ <source xml:space="preserve">Sent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">855</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1445</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg488">
+ <source xml:space="preserve">&amp;Peers</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">896</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg489">
+ <source xml:space="preserve">Banned peers</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">963</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg490">
+ <source xml:space="preserve">Select a peer to view detailed information.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1028</context></context-group>
+ <context-group purpose="location"><context context-type="sourcefile">../rpcconsole.cpp</context><context context-type="linenumber">1104</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg491">
+ <source xml:space="preserve">Version</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1134</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg492">
+ <source xml:space="preserve">Starting Block</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1255</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg493">
+ <source xml:space="preserve">Synced Headers</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1278</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg494">
+ <source xml:space="preserve">Synced Blocks</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1301</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg495">
+ <source xml:space="preserve">The mapped Autonomous System used for diversifying peer selection.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1586</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg496">
+ <source xml:space="preserve">Mapped AS</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1589</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg497">
+ <source xml:space="preserve">User Agent</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">88</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1157</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg498">
+ <source xml:space="preserve">Node window</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg499">
+ <source xml:space="preserve">Current block height</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">267</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg500">
+ <source xml:space="preserve">Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">397</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg501">
+ <source xml:space="preserve">Decrease font size</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">481</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg502">
+ <source xml:space="preserve">Increase font size</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">513</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg503">
+ <source xml:space="preserve">Permissions</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1059</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg504">
+ <source xml:space="preserve">The direction and type of peer connection: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1082</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg505">
+ <source xml:space="preserve">Direction/Type</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1085</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg506">
+ <source xml:space="preserve">The network protocol this peer is connected through: IPv4, IPv6, Onion, I2P, or CJDNS.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg507">
+ <source xml:space="preserve">Services</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1180</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg508">
+ <source xml:space="preserve">Whether the peer requested us to relay transactions.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1203</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg509">
+ <source xml:space="preserve">Wants Tx Relay</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1206</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg510">
+ <source xml:space="preserve">High bandwidth BIP152 compact block relay: %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1229</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg511">
+ <source xml:space="preserve">High Bandwidth</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1232</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg512">
+ <source xml:space="preserve">Connection Time</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1324</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg513">
+ <source xml:space="preserve">Elapsed time since a novel block passing initial validity checks was received from this peer.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1347</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg514">
+ <source xml:space="preserve">Last Block</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1350</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg515">
+ <source xml:space="preserve">Elapsed time since a novel transaction accepted into our mempool was received from this peer.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1373</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg516">
+ <source xml:space="preserve">Last Tx</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1376</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg517">
+ <source xml:space="preserve">Last Send</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1399</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg518">
+ <source xml:space="preserve">Last Receive</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1422</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg519">
+ <source xml:space="preserve">Ping Time</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1491</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg520">
+ <source xml:space="preserve">The duration of a currently outstanding ping.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1514</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg521">
+ <source xml:space="preserve">Ping Wait</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1517</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg522">
+ <source xml:space="preserve">Min Ping</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1540</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg523">
+ <source xml:space="preserve">Time Offset</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1563</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg524" approved="yes">
+ <source xml:space="preserve">Last block time</source>
+ <target xml:space="preserve">Last block time</target>
+ <context-group purpose="location"><context context-type="linenumber">290</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg525" approved="yes">
+ <source xml:space="preserve">&amp;Open</source>
+ <target xml:space="preserve">&amp;Open</target>
+ <context-group purpose="location"><context context-type="linenumber">400</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg526" approved="yes">
+ <source xml:space="preserve">&amp;Console</source>
+ <target xml:space="preserve">&amp;Console</target>
+ <context-group purpose="location"><context context-type="linenumber">426</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg527">
+ <source xml:space="preserve">&amp;Network Traffic</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">643</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg528">
+ <source xml:space="preserve">Totals</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">711</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg529" approved="yes">
+ <source xml:space="preserve">Debug log file</source>
+ <target xml:space="preserve">Debug log file</target>
+ <context-group purpose="location"><context context-type="linenumber">390</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg530" approved="yes">
+ <source xml:space="preserve">Clear console</source>
+ <target xml:space="preserve">Clear console</target>
+ <context-group purpose="location"><context context-type="linenumber">545</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../rpcconsole.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="RPCConsole">
+ <trans-unit id="_msg531">
+ <source xml:space="preserve">In:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">862</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg532">
+ <source xml:space="preserve">Out:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">863</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg533">
+ <source xml:space="preserve">1 &amp;hour</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">621</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg534">
+ <source xml:space="preserve">1 &amp;day</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">622</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg535">
+ <source xml:space="preserve">1 &amp;week</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">623</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg536">
+ <source xml:space="preserve">1 &amp;year</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">624</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg537">
+ <source xml:space="preserve">&amp;Disconnect</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">620</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg538">
+ <source xml:space="preserve">Inbound: initiated by peer</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">465</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg539">
+ <source xml:space="preserve">Outbound Full Relay: default</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">466</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg540">
+ <source xml:space="preserve">Outbound Block Relay: does not relay transactions or addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">467</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg541">
+ <source xml:space="preserve">Outbound Manual: added using RPC %1 or %2/%3 configuration options</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">468</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg542">
+ <source xml:space="preserve">Outbound Feeler: short-lived, for testing addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">472</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg543">
+ <source xml:space="preserve">Outbound Address Fetch: short-lived, for soliciting addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">473</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg544">
+ <source xml:space="preserve">we selected the peer for high bandwidth relay</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">477</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg545">
+ <source xml:space="preserve">the peer selected us for high bandwidth relay</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">478</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg546">
+ <source xml:space="preserve">no high bandwidth relay selected</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">479</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg547">
+ <source xml:space="preserve">&amp;Unban</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">661</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg548">
+ <source xml:space="preserve">Welcome to the %1 RPC console.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">825</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg549">
+ <source xml:space="preserve">Use up and down arrows to navigate history, and %1 to clear screen.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">826</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg550">
+ <source xml:space="preserve">Type %1 for an overview of available commands.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">827</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg551">
+ <source xml:space="preserve">For more information on using this console type %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">828</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg552">
+ <source xml:space="preserve">WARNING: Scammers have been active, telling users to type commands here, stealing their wallet contents. Do not use this console without fully understanding the ramifications of a command.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">830</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg553">
+ <source xml:space="preserve">Network activity disabled</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">866</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg554">
+ <source xml:space="preserve">Executing command without any wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">932</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg555">
+ <source xml:space="preserve">(peer id: %1)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1110</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg556">
+ <source xml:space="preserve">Executing command using &quot;%1&quot; wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">930</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg557">
+ <source xml:space="preserve">via %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1112</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../rpcconsole.h" datatype="c" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="RPCConsole">
+ <trans-unit id="_msg558">
+ <source xml:space="preserve">Yes</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg559">
+ <source xml:space="preserve">No</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg560">
+ <source xml:space="preserve">To</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg561">
+ <source xml:space="preserve">From</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg562">
+ <source xml:space="preserve">Ban for</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">141</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg563">
+ <source xml:space="preserve">Never</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">178</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg564">
+ <source xml:space="preserve">Unknown</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">141</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/receivecoinsdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ReceiveCoinsDialog">
+ <trans-unit id="_msg565">
+ <source xml:space="preserve">&amp;Amount:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">37</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg566">
+ <source xml:space="preserve">&amp;Label:</source>
+ <target xml:space="preserve" state="needs-review-translation">&amp;Label:</target>
+ <context-group purpose="location"><context context-type="linenumber">83</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg567">
+ <source xml:space="preserve">&amp;Message:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">53</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg568">
+ <source xml:space="preserve">An optional message to attach to the payment request, which will be displayed when the request is opened. Note: The message will not be sent with the payment over the Bitcoin network.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">50</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg569">
+ <source xml:space="preserve">An optional label to associate with the new receiving address.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">80</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg570">
+ <source xml:space="preserve">Use this form to request payments. All fields are &lt;b&gt;optional&lt;/b&gt;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">73</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg571">
+ <source xml:space="preserve">An optional amount to request. Leave this empty or zero to not request a specific amount.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">34</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">193</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg572">
+ <source xml:space="preserve">An optional label to associate with the new receiving address (used by you to identify an invoice). It is also attached to the payment request.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">66</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg573">
+ <source xml:space="preserve">An optional message that is attached to the payment request and may be displayed to the sender.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">96</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg574">
+ <source xml:space="preserve">&amp;Create new receiving address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg575">
+ <source xml:space="preserve">Clear all fields of the form.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">134</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg576">
+ <source xml:space="preserve">Clear</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">137</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg577">
+ <source xml:space="preserve">Native segwit addresses (aka Bech32 or BIP-173) reduce your transaction fees later on and offer better protection against typos, but old wallets don&apos;t support them. When unchecked, an address compatible with older wallets will be created instead.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">215</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg578">
+ <source xml:space="preserve">Generate native segwit (Bech32) address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">218</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg579">
+ <source xml:space="preserve">Requested payments history</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">279</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg580">
+ <source xml:space="preserve">Show the selected request (does the same as double clicking an entry)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">304</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg581">
+ <source xml:space="preserve">Show</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">307</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg582">
+ <source xml:space="preserve">Remove the selected entries from the list</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">324</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg583">
+ <source xml:space="preserve">Remove</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">327</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../receivecoinsdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ReceiveCoinsDialog">
+ <trans-unit id="_msg584">
+ <source xml:space="preserve">Copy URI</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">46</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg585">
+ <source xml:space="preserve">Copy address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">47</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg586">
+ <source xml:space="preserve">Copy label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">48</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg587">
+ <source xml:space="preserve">Copy message</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">49</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg588">
+ <source xml:space="preserve">Copy amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">50</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg589">
+ <source xml:space="preserve">Could not unlock wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">190</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg590">
+ <source xml:space="preserve">Could not generate new %1 address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">195</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/receiverequestdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ReceiveRequestDialog">
+ <trans-unit id="_msg591">
+ <source xml:space="preserve">Request payment to ...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg592">
+ <source xml:space="preserve">Address:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">90</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg593">
+ <source xml:space="preserve">Amount:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">119</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg594">
+ <source xml:space="preserve">Label:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">148</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg595">
+ <source xml:space="preserve">Message:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">180</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg596">
+ <source xml:space="preserve">Wallet:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">212</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg597">
+ <source xml:space="preserve">Copy &amp;URI</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">240</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg598">
+ <source xml:space="preserve">Copy &amp;Address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">250</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg599">
+ <source xml:space="preserve">&amp;Save Image...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">260</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg600">
+ <source xml:space="preserve">Payment information</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">39</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../receiverequestdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="ReceiveRequestDialog">
+ <trans-unit id="_msg601">
+ <source xml:space="preserve">Request payment to %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">49</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../recentrequeststablemodel.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="RecentRequestsTableModel">
+ <trans-unit id="_msg602">
+ <source xml:space="preserve">Date</source>
+ <target xml:space="preserve" state="needs-review-translation">Date</target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg603">
+ <source xml:space="preserve">Label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg604">
+ <source xml:space="preserve">Message</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg605">
+ <source xml:space="preserve">(no label)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">68</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg606">
+ <source xml:space="preserve">(no message)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">77</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg607">
+ <source xml:space="preserve">(no amount requested)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">85</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg608">
+ <source xml:space="preserve">Requested</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/sendcoinsdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="SendCoinsDialog">
+ <trans-unit id="_msg609" approved="yes">
+ <source xml:space="preserve">Send Coins</source>
+ <target xml:space="preserve">Send Coins</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ <context-group purpose="location"><context context-type="sourcefile">../sendcoinsdialog.cpp</context><context context-type="linenumber">673</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg610">
+ <source xml:space="preserve">Coin Control Features</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">90</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg611">
+ <source xml:space="preserve">Inputs...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">110</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg612">
+ <source xml:space="preserve">automatically selected</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg613">
+ <source xml:space="preserve">Insufficient funds!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">139</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg614">
+ <source xml:space="preserve">Quantity:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">228</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg615">
+ <source xml:space="preserve">Bytes:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">263</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg616">
+ <source xml:space="preserve">Amount:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">311</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg617">
+ <source xml:space="preserve">Fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">391</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg618">
+ <source xml:space="preserve">After Fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">442</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg619">
+ <source xml:space="preserve">Change:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">474</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg620">
+ <source xml:space="preserve">If this is activated, but the change address is empty or invalid, change will be sent to a newly generated address.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">518</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg621">
+ <source xml:space="preserve">Custom change address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">521</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg622">
+ <source xml:space="preserve">Transaction Fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">727</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg623">
+ <source xml:space="preserve">Choose...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">741</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg624">
+ <source xml:space="preserve">Using the fallbackfee can result in sending a transaction that will take several hours or days (or never) to confirm. Consider choosing your fee manually or wait until you have validated the complete chain.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">765</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg625">
+ <source xml:space="preserve">Warning: Fee estimation is currently not possible.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">774</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg626">
+ <source xml:space="preserve">Specify a custom fee per kB (1,000 bytes) of the transaction&apos;s virtual size.
+
+Note: Since the fee is calculated on a per-byte basis, a fee of &quot;100 satoshis per kB&quot; for a transaction size of 500 bytes (half of 1 kB) would ultimately yield a fee of only 50 satoshis.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">851</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg627">
+ <source xml:space="preserve">per kilobyte</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">856</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg628">
+ <source xml:space="preserve">Hide</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">803</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg629">
+ <source xml:space="preserve">Recommended:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">915</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg630">
+ <source xml:space="preserve">Custom:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">945</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg631">
+ <source xml:space="preserve">(Smart fee not initialized yet. This usually takes a few blocks...)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">994</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg632" approved="yes">
+ <source xml:space="preserve">Send to multiple recipients at once</source>
+ <target xml:space="preserve">Send to multiple recipients at once</target>
+ <context-group purpose="location"><context context-type="linenumber">1160</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg633" approved="yes">
+ <source xml:space="preserve">Add &amp;Recipient</source>
+ <target xml:space="preserve">Add &amp;Recipient</target>
+ <context-group purpose="location"><context context-type="linenumber">1163</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg634">
+ <source xml:space="preserve">Clear all fields of the form.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1143</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg635">
+ <source xml:space="preserve">Dust:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">343</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg636">
+ <source xml:space="preserve">Hide transaction fee settings</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">800</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg637">
+ <source xml:space="preserve">When there is less transaction volume than space in the blocks, miners as well as relaying nodes may enforce a minimum fee. Paying only this minimum fee is just fine, but be aware that this can result in a never confirming transaction once there is more demand for bitcoin transactions than the network can process.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">886</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg638">
+ <source xml:space="preserve">A too low fee might result in a never confirming transaction (read the tooltip)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">889</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg639">
+ <source xml:space="preserve">Confirmation time target:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1020</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg640">
+ <source xml:space="preserve">Enable Replace-By-Fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1078</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg641">
+ <source xml:space="preserve">With Replace-By-Fee (BIP-125) you can increase a transaction&apos;s fee after it is sent. Without this, a higher fee may be recommended to compensate for increased transaction delay risk.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1081</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg642" approved="yes">
+ <source xml:space="preserve">Clear &amp;All</source>
+ <target xml:space="preserve">Clear &amp;All</target>
+ <context-group purpose="location"><context context-type="linenumber">1146</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg643" approved="yes">
+ <source xml:space="preserve">Balance:</source>
+ <target xml:space="preserve">Balance:</target>
+ <context-group purpose="location"><context context-type="linenumber">1201</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg644" approved="yes">
+ <source xml:space="preserve">Confirm the send action</source>
+ <target xml:space="preserve">Confirm the send action</target>
+ <context-group purpose="location"><context context-type="linenumber">1117</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg645" approved="yes">
+ <source xml:space="preserve">S&amp;end</source>
+ <target xml:space="preserve">S&amp;end</target>
+ <context-group purpose="location"><context context-type="linenumber">1120</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../sendcoinsdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="SendCoinsDialog">
+ <trans-unit id="_msg646">
+ <source xml:space="preserve">Copy quantity</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">92</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg647">
+ <source xml:space="preserve">Copy amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">93</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg648">
+ <source xml:space="preserve">Copy fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">94</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg649">
+ <source xml:space="preserve">Copy after fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">95</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg650">
+ <source xml:space="preserve">Copy bytes</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">96</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg651">
+ <source xml:space="preserve">Copy dust</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">97</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg652">
+ <source xml:space="preserve">Copy change</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg653">
+ <source xml:space="preserve">%1 (%2 blocks)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">174</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg654">
+ <source xml:space="preserve">Cr&amp;eate Unsigned</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">203</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg655">
+ <source xml:space="preserve">Creates a Partially Signed Bitcoin Transaction (PSBT) for use with e.g. an offline %1 wallet, or a PSBT-compatible hardware wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">204</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg656">
+ <source xml:space="preserve"> from wallet &apos;%1&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">294</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg657">
+ <source xml:space="preserve">%1 to &apos;%2&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">305</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg658">
+ <source xml:space="preserve">%1 to %2</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">310</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg659">
+ <source xml:space="preserve">Do you want to draft this transaction?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">317</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg660">
+ <source xml:space="preserve">Are you sure you want to send?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">319</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg661">
+ <source xml:space="preserve">Create Unsigned</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">390</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg662">
+ <source xml:space="preserve">Save Transaction Data</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">434</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg663">
+ <source xml:space="preserve">PSBT saved</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">442</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg664">
+ <source xml:space="preserve">or</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">367</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg665">
+ <source xml:space="preserve">You can increase the fee later (signals Replace-By-Fee, BIP-125).</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">348</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg666">
+ <source xml:space="preserve">Please, review your transaction proposal. This will produce a Partially Signed Bitcoin Transaction (PSBT) which you can save or copy and then sign with e.g. an offline %1 wallet, or a PSBT-compatible hardware wallet.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">324</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg667">
+ <source xml:space="preserve">Please, review your transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">326</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg668">
+ <source xml:space="preserve">Transaction fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">334</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg669">
+ <source xml:space="preserve">Not signalling Replace-By-Fee, BIP-125.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">350</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg670">
+ <source xml:space="preserve">Total Amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">364</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg671">
+ <source xml:space="preserve">To review recipient list click &quot;Show Details...&quot;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">371</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg672">
+ <source xml:space="preserve">Confirm send coins</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">389</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg673">
+ <source xml:space="preserve">Confirm transaction proposal</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">389</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg674">
+ <source xml:space="preserve">Send</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">390</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg675">
+ <source xml:space="preserve">Partially Signed Transaction (Binary)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">435</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of binary PSBT file format</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg676">
+ <source xml:space="preserve">Watch-only balance:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">618</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg677">
+ <source xml:space="preserve">The recipient address is not valid. Please recheck.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">642</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg678">
+ <source xml:space="preserve">The amount to pay must be larger than 0.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">645</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg679">
+ <source xml:space="preserve">The amount exceeds your balance.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">648</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg680">
+ <source xml:space="preserve">The total exceeds your balance when the %1 transaction fee is included.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">651</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg681">
+ <source xml:space="preserve">Duplicate address found: addresses should only be used once each.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">654</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg682">
+ <source xml:space="preserve">Transaction creation failed!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">657</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg683">
+ <source xml:space="preserve">A fee higher than %1 is considered an absurdly high fee.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">661</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg684">
+ <source xml:space="preserve">Payment request expired.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">664</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">788</context></context-group>
+ <trans-unit id="_msg685[0]" approved="yes">
+ <source xml:space="preserve">Estimated to begin confirmation within %n block(s).</source>
+ <target xml:space="preserve">Estimated to begin confirmation within %n block.</target>
+ </trans-unit>
+ <trans-unit id="_msg685[1]" approved="yes">
+ <source xml:space="preserve">Estimated to begin confirmation within %n block(s).</source>
+ <target xml:space="preserve">Estimated to begin confirmation within %n blocks.</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg686">
+ <source xml:space="preserve">Warning: Invalid Bitcoin address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">888</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg687">
+ <source xml:space="preserve">Warning: Unknown change address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">893</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg688">
+ <source xml:space="preserve">Confirm custom change address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">896</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg689">
+ <source xml:space="preserve">The address you selected for change is not part of this wallet. Any or all funds in your wallet may be sent to this address. Are you sure?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">896</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg690">
+ <source xml:space="preserve">(no label)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">917</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/sendcoinsentry.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="SendCoinsEntry">
+ <trans-unit id="_msg691" approved="yes">
+ <source xml:space="preserve">A&amp;mount:</source>
+ <target xml:space="preserve">A&amp;mount:</target>
+ <context-group purpose="location"><context context-type="linenumber">155</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">705</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1238</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg692" approved="yes">
+ <source xml:space="preserve">Pay &amp;To:</source>
+ <target xml:space="preserve">Pay &amp;To:</target>
+ <context-group purpose="location"><context context-type="linenumber">39</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg693" approved="yes">
+ <source xml:space="preserve">&amp;Label:</source>
+ <target xml:space="preserve">&amp;Label:</target>
+ <context-group purpose="location"><context context-type="linenumber">132</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg694">
+ <source xml:space="preserve">Choose previously used address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">64</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg695">
+ <source xml:space="preserve">The Bitcoin address to send the payment to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">57</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg696" approved="yes">
+ <source xml:space="preserve">Alt+A</source>
+ <target xml:space="preserve">Alt+A</target>
+ <context-group purpose="location"><context context-type="linenumber">80</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg697" approved="yes">
+ <source xml:space="preserve">Paste address from clipboard</source>
+ <target xml:space="preserve">Paste address from clipboard</target>
+ <context-group purpose="location"><context context-type="linenumber">87</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg698" approved="yes">
+ <source xml:space="preserve">Alt+P</source>
+ <target xml:space="preserve">Alt+P</target>
+ <context-group purpose="location"><context context-type="linenumber">103</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg699">
+ <source xml:space="preserve">Remove this entry</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">110</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">672</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1205</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg700">
+ <source xml:space="preserve">The amount to send in the selected unit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">170</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg701">
+ <source xml:space="preserve">The fee will be deducted from the amount being sent. The recipient will receive less bitcoins than you enter in the amount field. If multiple recipients are selected, the fee is split equally.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">177</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg702">
+ <source xml:space="preserve">S&amp;ubtract fee from amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">180</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg703">
+ <source xml:space="preserve">Use available balance</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">187</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg704">
+ <source xml:space="preserve">Message:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">196</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg705">
+ <source xml:space="preserve">This is an unauthenticated payment request.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">639</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg706">
+ <source xml:space="preserve">This is an authenticated payment request.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">1168</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg707">
+ <source xml:space="preserve">Enter a label for this address to add it to the list of used addresses</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">145</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">148</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg708">
+ <source xml:space="preserve">A message that was attached to the bitcoin: URI which will be stored with the transaction for your reference. Note: This message will not be sent over the Bitcoin network.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">206</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg709">
+ <source xml:space="preserve">Pay To:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">654</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1183</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg710">
+ <source xml:space="preserve">Memo:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">688</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">1221</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/signverifymessagedialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="SignVerifyMessageDialog">
+ <trans-unit id="_msg711" approved="yes">
+ <source xml:space="preserve">Signatures - Sign / Verify a Message</source>
+ <target xml:space="preserve">Signatures - Sign / Verify a Message</target>
+ <context-group purpose="location"><context context-type="linenumber">14</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg712" approved="yes">
+ <source xml:space="preserve">&amp;Sign Message</source>
+ <target xml:space="preserve">&amp;Sign Message</target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg713">
+ <source xml:space="preserve">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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">33</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg714">
+ <source xml:space="preserve">The Bitcoin address to sign the message with</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">51</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg715">
+ <source xml:space="preserve">Choose previously used address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">58</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">274</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg716" approved="yes">
+ <source xml:space="preserve">Alt+A</source>
+ <target xml:space="preserve">Alt+A</target>
+ <context-group purpose="location"><context context-type="linenumber">68</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">284</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg717" approved="yes">
+ <source xml:space="preserve">Paste address from clipboard</source>
+ <target xml:space="preserve">Paste address from clipboard</target>
+ <context-group purpose="location"><context context-type="linenumber">78</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg718" approved="yes">
+ <source xml:space="preserve">Alt+P</source>
+ <target xml:space="preserve">Alt+P</target>
+ <context-group purpose="location"><context context-type="linenumber">88</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg719" approved="yes">
+ <source xml:space="preserve">Enter the message you want to sign here</source>
+ <target xml:space="preserve">Enter the message you want to sign here</target>
+ <context-group purpose="location"><context context-type="linenumber">100</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">103</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg720" approved="yes">
+ <source xml:space="preserve">Signature</source>
+ <target xml:space="preserve">Signature</target>
+ <context-group purpose="location"><context context-type="linenumber">110</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg721" approved="yes">
+ <source xml:space="preserve">Copy the current signature to the system clipboard</source>
+ <target xml:space="preserve">Copy the current signature to the system clipboard</target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg722" approved="yes">
+ <source xml:space="preserve">Sign the message to prove you own this Bitcoin address</source>
+ <target xml:space="preserve">Sign the message to prove you own this Bitcoin address</target>
+ <context-group purpose="location"><context context-type="linenumber">161</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg723" approved="yes">
+ <source xml:space="preserve">Sign &amp;Message</source>
+ <target xml:space="preserve">Sign &amp;Message</target>
+ <context-group purpose="location"><context context-type="linenumber">164</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg724" approved="yes">
+ <source xml:space="preserve">Reset all sign message fields</source>
+ <target xml:space="preserve">Reset all sign message fields</target>
+ <context-group purpose="location"><context context-type="linenumber">178</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg725" approved="yes">
+ <source xml:space="preserve">Clear &amp;All</source>
+ <target xml:space="preserve">Clear &amp;All</target>
+ <context-group purpose="location"><context context-type="linenumber">181</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">338</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg726" approved="yes">
+ <source xml:space="preserve">&amp;Verify Message</source>
+ <target xml:space="preserve">&amp;Verify Message</target>
+ <context-group purpose="location"><context context-type="linenumber">240</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg727">
+ <source xml:space="preserve">Enter the receiver&apos;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>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">246</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg728">
+ <source xml:space="preserve">The Bitcoin address the message was signed with</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">267</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg729">
+ <source xml:space="preserve">The signed message to verify</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">296</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">299</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg730">
+ <source xml:space="preserve">The signature given when the message was signed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">306</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">309</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg731" approved="yes">
+ <source xml:space="preserve">Verify the message to ensure it was signed with the specified Bitcoin address</source>
+ <target xml:space="preserve">Verify the message to ensure it was signed with the specified Bitcoin address</target>
+ <context-group purpose="location"><context context-type="linenumber">318</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg732" approved="yes">
+ <source xml:space="preserve">Verify &amp;Message</source>
+ <target xml:space="preserve">Verify &amp;Message</target>
+ <context-group purpose="location"><context context-type="linenumber">321</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg733" approved="yes">
+ <source xml:space="preserve">Reset all verify message fields</source>
+ <target xml:space="preserve">Reset all verify message fields</target>
+ <context-group purpose="location"><context context-type="linenumber">335</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg734">
+ <source xml:space="preserve">Click &quot;Sign Message&quot; to generate signature</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">125</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../signverifymessagedialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="SignVerifyMessageDialog">
+ <trans-unit id="_msg735">
+ <source xml:space="preserve">The entered address is invalid.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">219</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg736">
+ <source xml:space="preserve">Please check the address and try again.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">220</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">227</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg737">
+ <source xml:space="preserve">The entered address does not refer to a key.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">226</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg738">
+ <source xml:space="preserve">Wallet unlock was cancelled.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">135</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg739">
+ <source xml:space="preserve">No error</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">146</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg740">
+ <source xml:space="preserve">Private key for the entered address is not available.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">149</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg741">
+ <source xml:space="preserve">Message signing failed.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">152</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg742">
+ <source xml:space="preserve">Message signed.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">164</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg743">
+ <source xml:space="preserve">The signature could not be decoded.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">233</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg744">
+ <source xml:space="preserve">Please check the signature and try again.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">234</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">241</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg745">
+ <source xml:space="preserve">The signature did not match the message digest.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">240</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg746">
+ <source xml:space="preserve">Message verification failed.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">246</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg747">
+ <source xml:space="preserve">Message verified.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">214</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../trafficgraphwidget.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TrafficGraphWidget">
+ <trans-unit id="_msg748">
+ <source xml:space="preserve">kB/s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">82</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../transactiondesc.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TransactionDesc">
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">34</context></context-group>
+ <trans-unit id="_msg749[0]" approved="yes">
+ <source xml:space="preserve">Open for %n more block(s)</source>
+ <target xml:space="preserve">Open for %n more block</target>
+ </trans-unit>
+ <trans-unit id="_msg749[1]" approved="yes">
+ <source xml:space="preserve">Open for %n more block(s)</source>
+ <target xml:space="preserve">Open for %n more blocks</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg750">
+ <source xml:space="preserve">Open until %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">36</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg751">
+ <source xml:space="preserve">conflicted with a transaction with %1 confirmations</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">42</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg752">
+ <source xml:space="preserve">0/unconfirmed, %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg753">
+ <source xml:space="preserve">in memory pool</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg754">
+ <source xml:space="preserve">not in memory pool</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg755">
+ <source xml:space="preserve">abandoned</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg756">
+ <source xml:space="preserve">%1/unconfirmed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">46</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg757">
+ <source xml:space="preserve">%1 confirmations</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">48</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg758">
+ <source xml:space="preserve">Status</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg759">
+ <source xml:space="preserve">Date</source>
+ <target xml:space="preserve" state="needs-review-translation">Date</target>
+ <context-group purpose="location"><context context-type="linenumber">101</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg760">
+ <source xml:space="preserve">Source</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg761">
+ <source xml:space="preserve">Generated</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg762">
+ <source xml:space="preserve">From</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">113</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">199</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg763">
+ <source xml:space="preserve">unknown</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">127</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg764">
+ <source xml:space="preserve">To</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">128</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">148</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">218</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg765">
+ <source xml:space="preserve">own address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">130</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg766">
+ <source xml:space="preserve">watch-only</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">130</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">199</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg767">
+ <source xml:space="preserve">label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">132</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg768">
+ <source xml:space="preserve">Credit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">168</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">180</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">234</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">264</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">324</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">170</context></context-group>
+ <trans-unit id="_msg769[0]" approved="yes">
+ <source xml:space="preserve">matures in %n more block(s)</source>
+ <target xml:space="preserve">matures in %n more block</target>
+ </trans-unit>
+ <trans-unit id="_msg769[1]" approved="yes">
+ <source xml:space="preserve">matures in %n more block(s)</source>
+ <target xml:space="preserve">matures in %n more blocks</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg770">
+ <source xml:space="preserve">not accepted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">172</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg771">
+ <source xml:space="preserve">Debit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">232</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">258</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">321</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg772">
+ <source xml:space="preserve">Total debit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">242</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg773">
+ <source xml:space="preserve">Total credit</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">243</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg774">
+ <source xml:space="preserve">Transaction fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">248</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg775">
+ <source xml:space="preserve">Net amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">270</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg776">
+ <source xml:space="preserve">Message</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">276</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">288</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg777">
+ <source xml:space="preserve">Comment</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">278</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg778">
+ <source xml:space="preserve">Transaction ID</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">280</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg779">
+ <source xml:space="preserve">Transaction total size</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">281</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg780">
+ <source xml:space="preserve">Transaction virtual size</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">282</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg781">
+ <source xml:space="preserve">Output index</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">283</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg782">
+ <source xml:space="preserve"> (Certificate was not verified)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">299</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg783">
+ <source xml:space="preserve">Merchant</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">302</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg784">
+ <source xml:space="preserve">Generated coins must mature %1 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">310</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg785">
+ <source xml:space="preserve">Debug information</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">318</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg786">
+ <source xml:space="preserve">Transaction</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">326</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg787">
+ <source xml:space="preserve">Inputs</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">329</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg788">
+ <source xml:space="preserve">Amount</source>
+ <target xml:space="preserve" state="needs-review-translation">Amount</target>
+ <context-group purpose="location"><context context-type="linenumber">350</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg789">
+ <source xml:space="preserve">true</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">351</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">352</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg790">
+ <source xml:space="preserve">false</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">351</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">352</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../forms/transactiondescdialog.ui" datatype="x-trolltech-designer-ui" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TransactionDescDialog">
+ <trans-unit id="_msg791" approved="yes">
+ <source xml:space="preserve">This pane shows a detailed description of the transaction</source>
+ <target xml:space="preserve">This pane shows a detailed description of the transaction</target>
+ <context-group purpose="location"><context context-type="linenumber">20</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../transactiondescdialog.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TransactionDescDialog">
+ <trans-unit id="_msg792">
+ <source xml:space="preserve">Details for %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">18</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../transactiontablemodel.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TransactionTableModel">
+ <trans-unit id="_msg793">
+ <source xml:space="preserve">Date</source>
+ <target xml:space="preserve" state="needs-review-translation">Date</target>
+ <context-group purpose="location"><context context-type="linenumber">252</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg794">
+ <source xml:space="preserve">Type</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">252</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg795">
+ <source xml:space="preserve">Label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">252</context></context-group>
+ </trans-unit>
+ <group restype="x-gettext-plurals">
+ <context-group purpose="location"><context context-type="linenumber">314</context></context-group>
+ <trans-unit id="_msg796[0]" approved="yes">
+ <source xml:space="preserve">Open for %n more block(s)</source>
+ <target xml:space="preserve">Open for %n more block</target>
+ </trans-unit>
+ <trans-unit id="_msg796[1]" approved="yes">
+ <source xml:space="preserve">Open for %n more block(s)</source>
+ <target xml:space="preserve">Open for %n more blocks</target>
+ </trans-unit>
+ </group>
+ <trans-unit id="_msg797">
+ <source xml:space="preserve">Open until %1</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">317</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg798">
+ <source xml:space="preserve">Unconfirmed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">320</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg799">
+ <source xml:space="preserve">Abandoned</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">323</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg800">
+ <source xml:space="preserve">Confirming (%1 of %2 recommended confirmations)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">326</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg801">
+ <source xml:space="preserve">Confirmed (%1 confirmations)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">329</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg802">
+ <source xml:space="preserve">Conflicted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">332</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg803">
+ <source xml:space="preserve">Immature (%1 confirmations, will be available after %2)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">335</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg804">
+ <source xml:space="preserve">Generated but not accepted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">338</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg805">
+ <source xml:space="preserve">Received with</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">377</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg806">
+ <source xml:space="preserve">Received from</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">379</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg807">
+ <source xml:space="preserve">Sent to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">382</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg808">
+ <source xml:space="preserve">Payment to yourself</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">384</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg809">
+ <source xml:space="preserve">Mined</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">386</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg810">
+ <source xml:space="preserve">watch-only</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">414</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg811">
+ <source xml:space="preserve">(n/a)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">430</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg812">
+ <source xml:space="preserve">(no label)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">640</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg813">
+ <source xml:space="preserve">Transaction status. Hover over this field to show number of confirmations.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">679</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg814">
+ <source xml:space="preserve">Date and time that the transaction was received.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">681</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg815">
+ <source xml:space="preserve">Type of transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">683</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg816">
+ <source xml:space="preserve">Whether or not a watch-only address is involved in this transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">685</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg817">
+ <source xml:space="preserve">User-defined intent/purpose of the transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">687</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg818">
+ <source xml:space="preserve">Amount removed from or added to balance.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">689</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../transactionview.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="TransactionView">
+ <trans-unit id="_msg819">
+ <source xml:space="preserve">All</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">70</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg820">
+ <source xml:space="preserve">Today</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">71</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg821">
+ <source xml:space="preserve">This week</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">72</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg822">
+ <source xml:space="preserve">This month</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">73</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg823">
+ <source xml:space="preserve">Last month</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">74</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg824">
+ <source xml:space="preserve">This year</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">75</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg825">
+ <source xml:space="preserve">Range...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">76</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg826">
+ <source xml:space="preserve">Received with</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">87</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg827">
+ <source xml:space="preserve">Sent to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">89</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg828">
+ <source xml:space="preserve">To yourself</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg829">
+ <source xml:space="preserve">Mined</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">92</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg830">
+ <source xml:space="preserve">Other</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">93</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg831">
+ <source xml:space="preserve">Enter address, transaction id, or label to search</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">98</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg832">
+ <source xml:space="preserve">Min amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">102</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg833">
+ <source xml:space="preserve">Abandon transaction</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">165</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg834">
+ <source xml:space="preserve">Increase transaction fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">166</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg835">
+ <source xml:space="preserve">Copy address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">168</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg836">
+ <source xml:space="preserve">Copy label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">169</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg837">
+ <source xml:space="preserve">Copy amount</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">170</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg838">
+ <source xml:space="preserve">Copy transaction ID</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">171</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg839">
+ <source xml:space="preserve">Copy raw transaction</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">172</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg840">
+ <source xml:space="preserve">Copy full transaction details</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">173</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg841">
+ <source xml:space="preserve">Edit address label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">174</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg842">
+ <source xml:space="preserve">Comma separated file</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">360</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of CSV file format</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg843">
+ <source xml:space="preserve">Show transaction details</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">175</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg844">
+ <source xml:space="preserve">Export Transaction History</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">359</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg845">
+ <source xml:space="preserve">Confirmed</source>
+ <target xml:space="preserve" state="needs-review-translation">Confirmed</target>
+ <context-group purpose="location"><context context-type="linenumber">369</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg846">
+ <source xml:space="preserve">Watch-only</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">371</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg847">
+ <source xml:space="preserve">Date</source>
+ <target xml:space="preserve" state="needs-review-translation">Date</target>
+ <context-group purpose="location"><context context-type="linenumber">372</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg848">
+ <source xml:space="preserve">Type</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">373</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg849">
+ <source xml:space="preserve">Label</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">374</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg850">
+ <source xml:space="preserve">Address</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">375</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg851">
+ <source xml:space="preserve">ID</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">377</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg852">
+ <source xml:space="preserve">Exporting Failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">380</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg853">
+ <source xml:space="preserve">There was an error trying to save the transaction history to %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">380</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg854">
+ <source xml:space="preserve">Exporting Successful</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">384</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg855">
+ <source xml:space="preserve">The transaction history was successfully saved to %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">384</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg856">
+ <source xml:space="preserve">Range:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">556</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg857">
+ <source xml:space="preserve">to</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">564</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../walletframe.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="WalletFrame">
+ <trans-unit id="_msg858">
+ <source xml:space="preserve">No wallet has been loaded.
+Go to File &gt; Open Wallet to load a wallet.
+- OR -</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">39</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg859">
+ <source xml:space="preserve">Create a new wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../walletmodel.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="WalletModel">
+ <trans-unit id="_msg860">
+ <source xml:space="preserve">Send Coins</source>
+ <target xml:space="preserve" state="needs-review-translation">Send Coins</target>
+ <context-group purpose="location"><context context-type="linenumber">218</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg861">
+ <source xml:space="preserve">Fee bump error</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">497</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">549</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">562</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">567</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg862">
+ <source xml:space="preserve">Increasing transaction fee failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">497</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg863">
+ <source xml:space="preserve">Do you want to increase the fee?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">505</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg864">
+ <source xml:space="preserve">Do you want to draft a transaction with fee increase?</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">505</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg865">
+ <source xml:space="preserve">Current fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">509</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg866">
+ <source xml:space="preserve">Increase:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">513</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg867">
+ <source xml:space="preserve">New fee:</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">517</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg868">
+ <source xml:space="preserve">Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These changes may potentially leak privacy.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">525</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg869">
+ <source xml:space="preserve">Confirm fee bump</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">528</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg870">
+ <source xml:space="preserve">Can&apos;t draft transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">549</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg871">
+ <source xml:space="preserve">PSBT copied</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">556</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg872">
+ <source xml:space="preserve">Can&apos;t sign transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">562</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg873">
+ <source xml:space="preserve">Could not commit transaction</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">567</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg874">
+ <source xml:space="preserve">default wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">587</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../walletview.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="WalletView">
+ <trans-unit id="_msg875">
+ <source xml:space="preserve">&amp;Export</source>
+ <target xml:space="preserve" state="needs-review-translation">&amp;Export</target>
+ <context-group purpose="location"><context context-type="linenumber">51</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg876">
+ <source xml:space="preserve">Export the data in the current tab to a file</source>
+ <target xml:space="preserve" state="needs-review-translation">Export the data in the current tab to a file</target>
+ <context-group purpose="location"><context context-type="linenumber">52</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg877">
+ <source xml:space="preserve">Error</source>
+ <target xml:space="preserve" state="needs-review-translation">Error</target>
+ <context-group purpose="location"><context context-type="linenumber">217</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">226</context></context-group>
+ <context-group purpose="location"><context context-type="linenumber">236</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg878">
+ <source xml:space="preserve">Unable to decode PSBT from clipboard (invalid base64)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">217</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg879">
+ <source xml:space="preserve">Load Transaction Data</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">222</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg880">
+ <source xml:space="preserve">Partially Signed Transaction (*.psbt)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">223</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg881">
+ <source xml:space="preserve">PSBT file must be smaller than 100 MiB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">226</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg882">
+ <source xml:space="preserve">Unable to decode PSBT</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">236</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg883">
+ <source xml:space="preserve">Backup Wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">275</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg884">
+ <source xml:space="preserve">Wallet Data</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">276</context></context-group>
+ <context-group><context context-type="x-gettext-msgctxt">Name of wallet data file format</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg885">
+ <source xml:space="preserve">Backup Failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">282</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg886">
+ <source xml:space="preserve">There was an error trying to save the wallet data to %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">282</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg887">
+ <source xml:space="preserve">Backup Successful</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">286</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg888">
+ <source xml:space="preserve">The wallet data was successfully saved to %1.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">286</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg889">
+ <source xml:space="preserve">Cancel</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">330</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+ <file original="../bitcoinstrings.cpp" datatype="cpp" source-language="en" target-language="en"><body>
+ <group restype="x-trolltech-linguist-context" resname="bitcoin-core">
+ <trans-unit id="_msg890">
+ <source xml:space="preserve">Distributed under the MIT software license, see the accompanying file %s or %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">31</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg891">
+ <source xml:space="preserve">Prune configured below the minimum of %d MiB. Please use a higher number.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">72</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg892">
+ <source xml:space="preserve">Prune: last wallet synchronisation goes beyond pruned data. You need to -reindex (download the whole blockchain again in case of pruned node)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">74</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg893">
+ <source xml:space="preserve">Pruning blockstore...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">198</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg894">
+ <source xml:space="preserve">Unable to start HTTP server. See debug log for details.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">235</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg895">
+ <source xml:space="preserve">The %s developers</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">12</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg896">
+ <source xml:space="preserve">Cannot obtain a lock on data directory %s. %s is probably already running.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">22</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg897">
+ <source xml:space="preserve">Cannot provide specific connections and have addrman find outgoing connections at the same.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">24</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg898">
+ <source xml:space="preserve">Error reading %s! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">34</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg899">
+ <source xml:space="preserve">More than one onion bind address is provided. Using %s for the automatically created Tor onion service.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">55</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg900">
+ <source xml:space="preserve">Please check that your computer&apos;s date and time are correct! If your clock is wrong, %s will not work properly.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">66</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg901">
+ <source xml:space="preserve">Please contribute if you find %s useful. Visit %s for further information about the software.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">69</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg902">
+ <source xml:space="preserve">SQLiteDatabase: Failed to prepare the statement to fetch sqlite wallet schema version: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">77</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg903">
+ <source xml:space="preserve">SQLiteDatabase: Failed to prepare the statement to fetch the application id: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">80</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg904">
+ <source xml:space="preserve">SQLiteDatabase: Unknown sqlite wallet schema version %d. Only version %d is supported</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">83</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg905">
+ <source xml:space="preserve">The block database contains a block which appears to be from the future. This may be due to your computer&apos;s date and time being set incorrectly. Only rebuild the block database if you are sure that your computer&apos;s date and time are correct</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">86</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg906">
+ <source xml:space="preserve">This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">97</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg907">
+ <source xml:space="preserve">This is the transaction fee you may discard if change is smaller than dust at this level</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">103</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg908">
+ <source xml:space="preserve">Unable to replay blocks. You will need to rebuild the database using -reindex-chainstate.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">114</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg909">
+ <source xml:space="preserve">Unable to rewind the database to a pre-fork state. You will need to redownload the blockchain</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">117</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg910">
+ <source xml:space="preserve">Warning: We do not appear to fully agree with our peers! You may need to upgrade, or other nodes may need to upgrade.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">128</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg911">
+ <source xml:space="preserve">-maxmempool must be at least %d MB</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">135</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg912">
+ <source xml:space="preserve">Cannot resolve -%s address: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">137</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg913">
+ <source xml:space="preserve">Change index out of range</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">140</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg914">
+ <source xml:space="preserve">Config setting for %s only applied on %s network when in [%s] section.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">141</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg915">
+ <source xml:space="preserve">Copyright (C) %i-%i</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">142</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg916" approved="yes">
+ <source xml:space="preserve">Corrupted block database detected</source>
+ <target xml:space="preserve">Corrupted block database detected</target>
+ <context-group purpose="location"><context context-type="linenumber">143</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg917">
+ <source xml:space="preserve">Could not find asmap file %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">144</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg918">
+ <source xml:space="preserve">Could not parse asmap file %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">145</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg919" approved="yes">
+ <source xml:space="preserve">Do you want to rebuild the block database now?</source>
+ <target xml:space="preserve">Do you want to rebuild the block database now?</target>
+ <context-group purpose="location"><context context-type="linenumber">147</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg920">
+ <source xml:space="preserve">Dump file %s does not exist.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">149</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg921">
+ <source xml:space="preserve">Error creating %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">150</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg922" approved="yes">
+ <source xml:space="preserve">Error initializing block database</source>
+ <target xml:space="preserve">Error initializing block database</target>
+ <context-group purpose="location"><context context-type="linenumber">151</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg923" approved="yes">
+ <source xml:space="preserve">Error initializing wallet database environment %s!</source>
+ <target xml:space="preserve">Error initializing wallet database environment %s!</target>
+ <context-group purpose="location"><context context-type="linenumber">152</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg924">
+ <source xml:space="preserve">Error loading %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">153</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg925">
+ <source xml:space="preserve">Error loading %s: Private keys can only be disabled during creation</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">154</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg926">
+ <source xml:space="preserve">Error loading %s: Wallet corrupted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">155</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg927">
+ <source xml:space="preserve">Error loading %s: Wallet requires newer version of %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">156</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg928" approved="yes">
+ <source xml:space="preserve">Error loading block database</source>
+ <target xml:space="preserve">Error loading block database</target>
+ <context-group purpose="location"><context context-type="linenumber">157</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg929" approved="yes">
+ <source xml:space="preserve">Error opening block database</source>
+ <target xml:space="preserve">Error opening block database</target>
+ <context-group purpose="location"><context context-type="linenumber">158</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg930">
+ <source xml:space="preserve">Error reading next record from wallet database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">160</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg931">
+ <source xml:space="preserve">Error: Couldn&apos;t create cursor into database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">162</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg932">
+ <source xml:space="preserve">Error: Dumpfile checksum does not match. Computed %s, expected %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">164</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg933">
+ <source xml:space="preserve">Error: Got key that was not hex: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">165</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg934">
+ <source xml:space="preserve">Error: Got value that was not hex: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">166</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg935">
+ <source xml:space="preserve">Error: Missing checksum</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">168</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg936">
+ <source xml:space="preserve">Error: Unable to parse version %u as a uint32_t</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">169</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg937">
+ <source xml:space="preserve">Error: Unable to write record to new wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">170</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg938" approved="yes">
+ <source xml:space="preserve">Failed to listen on any port. Use -listen=0 if you want this.</source>
+ <target xml:space="preserve">Failed to listen on any port. Use -listen=0 if you want this.</target>
+ <context-group purpose="location"><context context-type="linenumber">171</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg939">
+ <source xml:space="preserve">Failed to rescan the wallet during initialization</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">172</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg940">
+ <source xml:space="preserve">Failed to verify database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">173</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg941">
+ <source xml:space="preserve">Ignoring duplicate -wallet %s.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">175</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg942">
+ <source xml:space="preserve">Importing...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">176</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg943" approved="yes">
+ <source xml:space="preserve">Incorrect or no genesis block found. Wrong datadir for network?</source>
+ <target xml:space="preserve">Incorrect or no genesis block found. Wrong datadir for network?</target>
+ <context-group purpose="location"><context context-type="linenumber">177</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg944">
+ <source xml:space="preserve">Initialization sanity check failed. %s is shutting down.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">178</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg945">
+ <source xml:space="preserve">Invalid -i2psam address or hostname: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">180</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg946">
+ <source xml:space="preserve">Invalid P2P permission: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">183</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg947">
+ <source xml:space="preserve">Invalid amount for -%s=&lt;amount&gt;: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">184</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg948">
+ <source xml:space="preserve">Invalid amount for -discardfee=&lt;amount&gt;: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">185</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg949">
+ <source xml:space="preserve">Invalid amount for -fallbackfee=&lt;amount&gt;: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">186</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg950">
+ <source xml:space="preserve">SQLiteDatabase: Failed to execute statement to verify database: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">203</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg951">
+ <source xml:space="preserve">SQLiteDatabase: Failed to fetch sqlite wallet schema version: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">204</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg952">
+ <source xml:space="preserve">SQLiteDatabase: Failed to fetch the application id: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">205</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg953">
+ <source xml:space="preserve">SQLiteDatabase: Failed to prepare statement to verify database: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">206</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg954">
+ <source xml:space="preserve">SQLiteDatabase: Failed to read database verification error: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">207</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg955">
+ <source xml:space="preserve">SQLiteDatabase: Unexpected application id. Expected %u, got %u</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">208</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg956">
+ <source xml:space="preserve">Specified blocks directory &quot;%s&quot; does not exist.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">214</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg957">
+ <source xml:space="preserve">The specified config file %s does not exist</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">217</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg958">
+ <source xml:space="preserve">Unable to open %s for writing</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">234</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg959">
+ <source xml:space="preserve">Unknown address type &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">237</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg960">
+ <source xml:space="preserve">Unknown change type &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">238</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg961">
+ <source xml:space="preserve">Upgrading txindex database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">242</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg962">
+ <source xml:space="preserve">Loading P2P addresses...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">189</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg963">
+ <source xml:space="preserve">Cannot downgrade wallet from version %i to version %i. Wallet version unchanged.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">19</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg964">
+ <source xml:space="preserve">Cannot upgrade a non HD split wallet from version %i to version %i without upgrading to support pre-split keypool. Please use version %i or no version specified.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">27</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg965">
+ <source xml:space="preserve">Error: Dumpfile format record is incorrect. Got &quot;%s&quot;, expected &quot;format&quot;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">37</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg966">
+ <source xml:space="preserve">Error: Dumpfile identifier record is incorrect. Got &quot;%s&quot;, expected &quot;%s&quot;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">39</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg967">
+ <source xml:space="preserve">Error: Dumpfile version is not supported. This version of bitcoin-wallet only supports version 1 dumpfiles. Got dumpfile with version %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">41</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg968">
+ <source xml:space="preserve">File %s already exists. If you are sure this is what you want, move it out of the way first.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">49</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg969">
+ <source xml:space="preserve">No dump file provided. To use createfromdump, -dumpfile=&lt;filename&gt; must be provided.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">58</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg970">
+ <source xml:space="preserve">No dump file provided. To use dump, -dumpfile=&lt;filename&gt; must be provided.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">61</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg971">
+ <source xml:space="preserve">No wallet file format provided. To use createfromdump, -format=&lt;format&gt; must be provided.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">63</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg972">
+ <source xml:space="preserve">Unknown wallet file format &quot;%s&quot; provided. Please provide one of &quot;bdb&quot; or &quot;sqlite&quot;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">120</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg973">
+ <source xml:space="preserve">Warning: Dumpfile wallet format &quot;%s&quot; does not match command line specified format &quot;%s&quot;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">123</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg974">
+ <source xml:space="preserve">Loading banlist...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">190</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg975" approved="yes">
+ <source xml:space="preserve">Not enough file descriptors available.</source>
+ <target xml:space="preserve">Not enough file descriptors available.</target>
+ <context-group purpose="location"><context context-type="linenumber">195</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg976">
+ <source xml:space="preserve">Prune cannot be configured with a negative value.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">196</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg977">
+ <source xml:space="preserve">Prune mode is incompatible with -txindex.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">197</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg978">
+ <source xml:space="preserve">Replaying blocks...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">200</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg979">
+ <source xml:space="preserve">Rewinding blocks...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">202</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg980">
+ <source xml:space="preserve">The source code is available from %s.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">216</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg981">
+ <source xml:space="preserve">Transaction fee and change calculation failed</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">225</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg982">
+ <source xml:space="preserve">Unable to bind to %s on this computer. %s is probably already running.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">230</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg983">
+ <source xml:space="preserve">Unable to generate keys</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">233</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg984">
+ <source xml:space="preserve">Unsupported logging category %s=%s.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">240</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg985">
+ <source xml:space="preserve">Upgrading UTXO database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">241</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg986">
+ <source xml:space="preserve">User Agent comment (%s) contains unsafe characters.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">243</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg987" approved="yes">
+ <source xml:space="preserve">Verifying blocks...</source>
+ <target xml:space="preserve">Verifying blocks...</target>
+ <context-group purpose="location"><context context-type="linenumber">244</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg988">
+ <source xml:space="preserve">Wallet needed to be rewritten: restart %s to complete</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">246</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg989">
+ <source xml:space="preserve">Error: Listening for incoming connections failed (listen returned error %s)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">44</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg990">
+ <source xml:space="preserve">%s corrupt. Try using the wallet tool bitcoin-wallet to salvage or restoring a backup.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">13</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg991">
+ <source xml:space="preserve">Invalid amount for -maxtxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least the minrelay fee of %s to prevent stuck transactions)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">52</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg992">
+ <source xml:space="preserve">The transaction amount is too small to send after the fee has been deducted</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">91</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg993">
+ <source xml:space="preserve">This error could occur if this wallet was not shutdown cleanly and was last loaded using a build with a newer version of Berkeley DB. If so, please use the software that last loaded this wallet</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">93</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg994">
+ <source xml:space="preserve">This is the maximum transaction fee you pay (in addition to the normal fee) to prioritize partial spend avoidance over regular coin selection.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">100</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg995">
+ <source xml:space="preserve">Transaction needs a change address, but we can&apos;t generate it. Please call keypoolrefill first.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">111</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg996">
+ <source xml:space="preserve">You need to rebuild the database using -reindex to go back to unpruned mode. This will redownload the entire blockchain</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">131</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg997">
+ <source xml:space="preserve">A fatal internal error occurred, see debug.log for details</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">136</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg998">
+ <source xml:space="preserve">Cannot set -peerblockfilters without -blockfilterindex.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">138</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg999">
+ <source xml:space="preserve">Disk space is too low!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">146</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1000">
+ <source xml:space="preserve">Error reading from database, shutting down.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">159</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1001">
+ <source xml:space="preserve">Error upgrading chainstate database</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">161</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1002">
+ <source xml:space="preserve">Error: Disk space is low for %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">163</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1003">
+ <source xml:space="preserve">Error: Keypool ran out, please call keypoolrefill first</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">167</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1004">
+ <source xml:space="preserve">Fee rate (%s) is lower than the minimum fee rate setting (%s)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">174</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1005">
+ <source xml:space="preserve">Invalid -onion address or hostname: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">181</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1006">
+ <source xml:space="preserve">Invalid -proxy address or hostname: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">182</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1007">
+ <source xml:space="preserve">Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos; (must be at least %s)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">187</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1008">
+ <source xml:space="preserve">Invalid netmask specified in -whitelist: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">188</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1009">
+ <source xml:space="preserve">Need to specify a port with -whitebind: &apos;%s&apos;</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">193</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1010">
+ <source xml:space="preserve">No proxy server specified. Use -proxy=&lt;ip&gt; or -proxy=&lt;ip:port&gt;.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">194</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1011">
+ <source xml:space="preserve">Reducing -maxconnections from %d to %d, because of system limitations.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">199</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1012">
+ <source xml:space="preserve">Section [%s] is not recognized.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">209</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1013" approved="yes">
+ <source xml:space="preserve">Signing transaction failed</source>
+ <target xml:space="preserve">Signing transaction failed</target>
+ <context-group purpose="location"><context context-type="linenumber">210</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1014">
+ <source xml:space="preserve">Specified -walletdir &quot;%s&quot; does not exist</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">211</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1015">
+ <source xml:space="preserve">Specified -walletdir &quot;%s&quot; is a relative path</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">212</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1016">
+ <source xml:space="preserve">Specified -walletdir &quot;%s&quot; is not a directory</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">213</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1017">
+ <source xml:space="preserve">The transaction amount is too small to pay the fee</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">218</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1018">
+ <source xml:space="preserve">This is experimental software.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">220</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1019" approved="yes">
+ <source xml:space="preserve">Transaction amount too small</source>
+ <target xml:space="preserve">Transaction amount too small</target>
+ <context-group purpose="location"><context context-type="linenumber">223</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1020" approved="yes">
+ <source xml:space="preserve">Transaction too large</source>
+ <target xml:space="preserve">Transaction too large</target>
+ <context-group purpose="location"><context context-type="linenumber">228</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1021">
+ <source xml:space="preserve">Unable to bind to %s on this computer (bind returned error %s)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">229</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1022">
+ <source xml:space="preserve">Unable to create the PID file &apos;%s&apos;: %s</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">231</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1023">
+ <source xml:space="preserve">Unable to generate initial keys</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">232</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1024">
+ <source xml:space="preserve">Unknown -blockfilterindex value %s.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">236</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1025">
+ <source xml:space="preserve">Verifying wallet(s)...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">245</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1026">
+ <source xml:space="preserve">Warning: unknown new rules activated (versionbit %i)</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">247</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1027">
+ <source xml:space="preserve">-maxtxfee is set very high! Fees this large could be paid on a single transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">16</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1028">
+ <source xml:space="preserve">This is the transaction fee you may pay when fee estimates are not available.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">106</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1029">
+ <source xml:space="preserve">Total length of network version string (%i) exceeds maximum length (%i). Reduce the number or size of uacomments.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">108</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1030">
+ <source xml:space="preserve">%s is set very high!</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">134</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1031">
+ <source xml:space="preserve">Starting network threads...</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">215</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1032">
+ <source xml:space="preserve">The wallet will avoid paying less than the minimum relay fee.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">219</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1033">
+ <source xml:space="preserve">This is the minimum transaction fee you pay on every transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">221</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1034">
+ <source xml:space="preserve">This is the transaction fee you will pay if you send a transaction.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">222</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1035">
+ <source xml:space="preserve">Transaction amounts must not be negative</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">224</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1036">
+ <source xml:space="preserve">Transaction has too long of a mempool chain</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">226</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1037">
+ <source xml:space="preserve">Transaction must have at least one recipient</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">227</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1038" approved="yes">
+ <source xml:space="preserve">Unknown network specified in -onlynet: &apos;%s&apos;</source>
+ <target xml:space="preserve">Unknown network specified in -onlynet: &apos;%s&apos;</target>
+ <context-group purpose="location"><context context-type="linenumber">239</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1039" approved="yes">
+ <source xml:space="preserve">Insufficient funds</source>
+ <target xml:space="preserve">Insufficient funds</target>
+ <context-group purpose="location"><context context-type="linenumber">179</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1040">
+ <source xml:space="preserve">Fee estimation failed. Fallbackfee is disabled. Wait a few blocks or enable -fallbackfee.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">46</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1041">
+ <source xml:space="preserve">Warning: Private keys detected in wallet {%s} with disabled private keys</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">126</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1042">
+ <source xml:space="preserve">Cannot write to data directory &apos;%s&apos;; check permissions.</source>
+ <target xml:space="preserve"></target>
+ <context-group purpose="location"><context context-type="linenumber">139</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1043" approved="yes">
+ <source xml:space="preserve">Loading block index...</source>
+ <target xml:space="preserve">Loading block index...</target>
+ <context-group purpose="location"><context context-type="linenumber">191</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1044" approved="yes">
+ <source xml:space="preserve">Loading wallet...</source>
+ <target xml:space="preserve">Loading wallet...</target>
+ <context-group purpose="location"><context context-type="linenumber">192</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1045" approved="yes">
+ <source xml:space="preserve">Rescanning...</source>
+ <target xml:space="preserve">Rescanning...</target>
+ <context-group purpose="location"><context context-type="linenumber">201</context></context-group>
+ </trans-unit>
+ <trans-unit id="_msg1046" approved="yes">
+ <source xml:space="preserve">Done loading</source>
+ <target xml:space="preserve">Done loading</target>
+ <context-group purpose="location"><context context-type="linenumber">148</context></context-group>
+ </trans-unit>
+ </group>
+ </body></file>
+</xliff>
diff --git a/src/qt/modaloverlay.cpp b/src/qt/modaloverlay.cpp
index 8070aa627c..6363fe2edf 100644
--- a/src/qt/modaloverlay.cpp
+++ b/src/qt/modaloverlay.cpp
@@ -134,7 +134,6 @@ void ModalOverlay::tipUpdate(int count, const QDateTime& blockDate, double nVeri
// show the percentage done according to nVerificationProgress
ui->percentageProgress->setText(QString::number(nVerificationProgress*100, 'f', 2)+"%");
- ui->progressBar->setValue(nVerificationProgress*100);
if (!bestHeaderDate.isValid())
// not syncing
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 3459bf4cf8..6c4e326011 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -11,56 +11,19 @@
#include <utility>
-#include <QDebug>
#include <QList>
#include <QTimer>
-bool NodeLessThan::operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const
-{
- const CNodeStats *pLeft = &(left.nodeStats);
- const CNodeStats *pRight = &(right.nodeStats);
-
- if (order == Qt::DescendingOrder)
- std::swap(pLeft, pRight);
-
- switch (static_cast<PeerTableModel::ColumnIndex>(column)) {
- case PeerTableModel::NetNodeId:
- return pLeft->nodeid < pRight->nodeid;
- case PeerTableModel::Address:
- return pLeft->addrName.compare(pRight->addrName) < 0;
- case PeerTableModel::ConnectionType:
- return pLeft->m_conn_type < pRight->m_conn_type;
- case PeerTableModel::Network:
- return pLeft->m_network < pRight->m_network;
- case PeerTableModel::Ping:
- return pLeft->m_min_ping_time < pRight->m_min_ping_time;
- case PeerTableModel::Sent:
- return pLeft->nSendBytes < pRight->nSendBytes;
- case PeerTableModel::Received:
- return pLeft->nRecvBytes < pRight->nRecvBytes;
- case PeerTableModel::Subversion:
- return pLeft->cleanSubVer.compare(pRight->cleanSubVer) < 0;
- } // no default case, so the compiler can warn about missing cases
- assert(false);
-}
-
// private implementation
class PeerTablePriv
{
public:
/** Local cache of peer information */
QList<CNodeCombinedStats> cachedNodeStats;
- /** Column to sort nodes by (default to unsorted) */
- int sortColumn{-1};
- /** Order (ascending or descending) to sort nodes by */
- Qt::SortOrder sortOrder;
- /** Index of rows by node ID */
- std::map<NodeId, int> mapNodeRows;
/** Pull a full list of peers from vNodes into our cache */
void refreshPeers(interfaces::Node& node)
{
- {
cachedNodeStats.clear();
interfaces::Node::NodesStats nodes_stats;
@@ -74,17 +37,6 @@ public:
stats.nodeStateStats = std::get<2>(node_stats);
cachedNodeStats.append(stats);
}
- }
-
- if (sortColumn >= 0)
- // sort cacheNodeStats (use stable sort to prevent rows jumping around unnecessarily)
- std::stable_sort(cachedNodeStats.begin(), cachedNodeStats.end(), NodeLessThan(sortColumn, sortOrder));
-
- // build index map
- mapNodeRows.clear();
- int row = 0;
- for (const CNodeCombinedStats& stats : cachedNodeStats)
- mapNodeRows.insert(std::pair<NodeId, int>(stats.nodeStats.nodeid, row++));
}
int size() const
@@ -194,10 +146,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
} // no default case, so the compiler can warn about missing cases
assert(false);
} else if (role == StatsRole) {
- switch (index.column()) {
- case NetNodeId: return QVariant::fromValue(rec);
- default: return QVariant();
- }
+ return QVariant::fromValue(rec);
}
return QVariant();
@@ -239,19 +188,3 @@ void PeerTableModel::refresh()
priv->refreshPeers(m_node);
Q_EMIT layoutChanged();
}
-
-int PeerTableModel::getRowByNodeId(NodeId nodeid)
-{
- std::map<NodeId, int>::iterator it = priv->mapNodeRows.find(nodeid);
- if (it == priv->mapNodeRows.end())
- return -1;
-
- return it->second;
-}
-
-void PeerTableModel::sort(int column, Qt::SortOrder order)
-{
- priv->sortColumn = column;
- priv->sortOrder = order;
- refresh();
-}
diff --git a/src/qt/peertablemodel.h b/src/qt/peertablemodel.h
index 0823235ec0..9c7bc25da2 100644
--- a/src/qt/peertablemodel.h
+++ b/src/qt/peertablemodel.h
@@ -30,18 +30,6 @@ struct CNodeCombinedStats {
};
Q_DECLARE_METATYPE(CNodeCombinedStats*)
-class NodeLessThan
-{
-public:
- NodeLessThan(int nColumn, Qt::SortOrder fOrder) :
- column(nColumn), order(fOrder) {}
- bool operator()(const CNodeCombinedStats &left, const CNodeCombinedStats &right) const;
-
-private:
- int column;
- Qt::SortOrder order;
-};
-
/**
Qt model providing information about connected peers, similar to the
"getpeerinfo" RPC call. Used by the rpc console UI.
@@ -53,7 +41,6 @@ class PeerTableModel : public QAbstractTableModel
public:
explicit PeerTableModel(interfaces::Node& node, QObject* parent);
~PeerTableModel();
- int getRowByNodeId(NodeId nodeid);
void startAutoRefresh();
void stopAutoRefresh();
@@ -80,7 +67,6 @@ public:
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
QModelIndex index(int row, int column, const QModelIndex &parent) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
- void sort(int column, Qt::SortOrder order) override;
/*@}*/
public Q_SLOTS:
diff --git a/src/qt/peertablesortproxy.cpp b/src/qt/peertablesortproxy.cpp
new file mode 100644
index 0000000000..78932da8d4
--- /dev/null
+++ b/src/qt/peertablesortproxy.cpp
@@ -0,0 +1,43 @@
+// Copyright (c) 2020 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <qt/peertablesortproxy.h>
+
+#include <qt/peertablemodel.h>
+#include <util/check.h>
+
+#include <QModelIndex>
+#include <QString>
+#include <QVariant>
+
+PeerTableSortProxy::PeerTableSortProxy(QObject* parent)
+ : QSortFilterProxyModel(parent)
+{
+}
+
+bool PeerTableSortProxy::lessThan(const QModelIndex& left_index, const QModelIndex& right_index) const
+{
+ const CNodeStats left_stats = Assert(sourceModel()->data(left_index, PeerTableModel::StatsRole).value<CNodeCombinedStats*>())->nodeStats;
+ const CNodeStats right_stats = Assert(sourceModel()->data(right_index, PeerTableModel::StatsRole).value<CNodeCombinedStats*>())->nodeStats;
+
+ switch (static_cast<PeerTableModel::ColumnIndex>(left_index.column())) {
+ case PeerTableModel::NetNodeId:
+ return left_stats.nodeid < right_stats.nodeid;
+ case PeerTableModel::Address:
+ return left_stats.addrName.compare(right_stats.addrName) < 0;
+ case PeerTableModel::ConnectionType:
+ return left_stats.m_conn_type < right_stats.m_conn_type;
+ case PeerTableModel::Network:
+ return left_stats.m_network < right_stats.m_network;
+ case PeerTableModel::Ping:
+ return left_stats.m_min_ping_time < right_stats.m_min_ping_time;
+ case PeerTableModel::Sent:
+ return left_stats.nSendBytes < right_stats.nSendBytes;
+ case PeerTableModel::Received:
+ return left_stats.nRecvBytes < right_stats.nRecvBytes;
+ case PeerTableModel::Subversion:
+ return left_stats.cleanSubVer.compare(right_stats.cleanSubVer) < 0;
+ } // no default case, so the compiler can warn about missing cases
+ assert(false);
+}
diff --git a/src/qt/peertablesortproxy.h b/src/qt/peertablesortproxy.h
new file mode 100644
index 0000000000..1879f6b400
--- /dev/null
+++ b/src/qt/peertablesortproxy.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2020 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#ifndef BITCOIN_QT_PEERTABLESORTPROXY_H
+#define BITCOIN_QT_PEERTABLESORTPROXY_H
+
+#include <QSortFilterProxyModel>
+
+QT_BEGIN_NAMESPACE
+class QModelIndex;
+QT_END_NAMESPACE
+
+class PeerTableSortProxy : public QSortFilterProxyModel
+{
+ Q_OBJECT
+
+public:
+ explicit PeerTableSortProxy(QObject* parent = nullptr);
+
+protected:
+ bool lessThan(const QModelIndex& left_index, const QModelIndex& right_index) const override;
+};
+
+#endif // BITCOIN_QT_PEERTABLESORTPROXY_H
diff --git a/src/qt/qrimagewidget.cpp b/src/qt/qrimagewidget.cpp
index a71c8831e9..df6757ffd6 100644
--- a/src/qt/qrimagewidget.cpp
+++ b/src/qt/qrimagewidget.cpp
@@ -27,12 +27,8 @@ QRImageWidget::QRImageWidget(QWidget *parent):
QLabel(parent), contextMenu(nullptr)
{
contextMenu = new QMenu(this);
- QAction *saveImageAction = new QAction(tr("&Save Image..."), this);
- connect(saveImageAction, &QAction::triggered, this, &QRImageWidget::saveImage);
- contextMenu->addAction(saveImageAction);
- QAction *copyImageAction = new QAction(tr("&Copy Image"), this);
- connect(copyImageAction, &QAction::triggered, this, &QRImageWidget::copyImage);
- contextMenu->addAction(copyImageAction);
+ contextMenu->addAction(tr("Save Image..."), this, &QRImageWidget::saveImage);
+ contextMenu->addAction(tr("Copy Image"), this, &QRImageWidget::copyImage);
}
bool QRImageWidget::setQR(const QString& data, const QString& text)
diff --git a/src/qt/receivecoinsdialog.cpp b/src/qt/receivecoinsdialog.cpp
index 61cb89d75a..3f4d7f85e6 100644
--- a/src/qt/receivecoinsdialog.cpp
+++ b/src/qt/receivecoinsdialog.cpp
@@ -42,28 +42,14 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(const PlatformStyle *_platformStyle, QWid
ui->removeRequestButton->setIcon(_platformStyle->SingleColorIcon(":/icons/remove"));
}
- // context menu actions
- QAction *copyURIAction = new QAction(tr("Copy URI"), this);
- QAction* copyAddressAction = new QAction(tr("Copy address"), this);
- copyLabelAction = new QAction(tr("Copy label"), this);
- copyMessageAction = new QAction(tr("Copy message"), this);
- copyAmountAction = new QAction(tr("Copy amount"), this);
-
// context menu
contextMenu = new QMenu(this);
- contextMenu->addAction(copyURIAction);
- contextMenu->addAction(copyAddressAction);
- contextMenu->addAction(copyLabelAction);
- contextMenu->addAction(copyMessageAction);
- contextMenu->addAction(copyAmountAction);
-
- // context menu signals
+ contextMenu->addAction(tr("Copy URI"), this, &ReceiveCoinsDialog::copyURI);
+ contextMenu->addAction(tr("Copy address"), this, &ReceiveCoinsDialog::copyAddress);
+ copyLabelAction = contextMenu->addAction(tr("Copy label"), this, &ReceiveCoinsDialog::copyLabel);
+ copyMessageAction = contextMenu->addAction(tr("Copy message"), this, &ReceiveCoinsDialog::copyMessage);
+ copyAmountAction = contextMenu->addAction(tr("Copy amount"), this, &ReceiveCoinsDialog::copyAmount);
connect(ui->recentRequestsView, &QWidget::customContextMenuRequested, this, &ReceiveCoinsDialog::showMenu);
- connect(copyURIAction, &QAction::triggered, this, &ReceiveCoinsDialog::copyURI);
- connect(copyAddressAction, &QAction::triggered, this, &ReceiveCoinsDialog::copyAddress);
- connect(copyLabelAction, &QAction::triggered, this, &ReceiveCoinsDialog::copyLabel);
- connect(copyMessageAction, &QAction::triggered, this, &ReceiveCoinsDialog::copyMessage);
- connect(copyAmountAction, &QAction::triggered, this, &ReceiveCoinsDialog::copyAmount);
connect(ui->clearButton, &QPushButton::clicked, this, &ReceiveCoinsDialog::clear);
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 34d055e5a5..006f60e7a1 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -9,13 +9,14 @@
#include <qt/rpcconsole.h>
#include <qt/forms/ui_debugwindow.h>
+#include <chainparams.h>
+#include <interfaces/node.h>
+#include <netbase.h>
#include <qt/bantablemodel.h>
#include <qt/clientmodel.h>
+#include <qt/peertablesortproxy.h>
#include <qt/platformstyle.h>
#include <qt/walletmodel.h>
-#include <chainparams.h>
-#include <interfaces/node.h>
-#include <netbase.h>
#include <rpc/client.h>
#include <rpc/server.h>
#include <util/strencodings.h>
@@ -606,7 +607,7 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
connect(model, &ClientModel::mempoolSizeChanged, this, &RPCConsole::setMempoolSize);
// set up peer table
- ui->peerWidget->setModel(model->getPeerTableModel());
+ ui->peerWidget->setModel(model->peerTableSortProxy());
ui->peerWidget->verticalHeader()->hide();
ui->peerWidget->setSelectionBehavior(QAbstractItemView::SelectRows);
ui->peerWidget->setSelectionMode(QAbstractItemView::ExtendedSelection);
@@ -616,36 +617,18 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
ui->peerWidget->setColumnWidth(PeerTableModel::Ping, PING_COLUMN_WIDTH);
ui->peerWidget->horizontalHeader()->setStretchLastSection(true);
- // create peer table context menu actions
- QAction* disconnectAction = new QAction(tr("&Disconnect"), this);
- QAction* banAction1h = new QAction(ts.ban_for + " " + tr("1 &hour"), this);
- QAction* banAction24h = new QAction(ts.ban_for + " " + tr("1 &day"), this);
- QAction* banAction7d = new QAction(ts.ban_for + " " + tr("1 &week"), this);
- QAction* banAction365d = new QAction(ts.ban_for + " " + tr("1 &year"), this);
-
// create peer table context menu
peersTableContextMenu = new QMenu(this);
- peersTableContextMenu->addAction(disconnectAction);
- peersTableContextMenu->addAction(banAction1h);
- peersTableContextMenu->addAction(banAction24h);
- peersTableContextMenu->addAction(banAction7d);
- peersTableContextMenu->addAction(banAction365d);
-
- connect(banAction1h, &QAction::triggered, [this] { banSelectedNode(60 * 60); });
- connect(banAction24h, &QAction::triggered, [this] { banSelectedNode(60 * 60 * 24); });
- connect(banAction7d, &QAction::triggered, [this] { banSelectedNode(60 * 60 * 24 * 7); });
- connect(banAction365d, &QAction::triggered, [this] { banSelectedNode(60 * 60 * 24 * 365); });
-
- // peer table context menu signals
+ peersTableContextMenu->addAction(tr("Disconnect"), this, &RPCConsole::disconnectSelectedNode);
+ peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 hour"), [this] { banSelectedNode(60 * 60); });
+ peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 day"), [this] { banSelectedNode(60 * 60 * 24); });
+ peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 week"), [this] { banSelectedNode(60 * 60 * 24 * 7); });
+ peersTableContextMenu->addAction(ts.ban_for + " " + tr("1 year"), [this] { banSelectedNode(60 * 60 * 24 * 365); });
connect(ui->peerWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showPeersTableContextMenu);
- connect(disconnectAction, &QAction::triggered, this, &RPCConsole::disconnectSelectedNode);
// peer table signal handling - update peer details when selecting new node
connect(ui->peerWidget->selectionModel(), &QItemSelectionModel::selectionChanged, this, &RPCConsole::updateDetailWidget);
- // peer table signal handling - update peer details when new nodes are added to the model
- connect(model->getPeerTableModel(), &PeerTableModel::layoutChanged, this, &RPCConsole::peerLayoutChanged);
- // peer table signal handling - cache selected node ids
- connect(model->getPeerTableModel(), &PeerTableModel::layoutAboutToBeChanged, this, &RPCConsole::peerLayoutAboutToChange);
+ connect(model->getPeerTableModel(), &PeerTableModel::layoutChanged, this, &RPCConsole::updateDetailWidget);
// set up ban table
ui->banlistWidget->setModel(model->getBanTableModel());
@@ -657,16 +640,10 @@ void RPCConsole::setClientModel(ClientModel *model, int bestblock_height, int64_
ui->banlistWidget->setColumnWidth(BanTableModel::Bantime, BANTIME_COLUMN_WIDTH);
ui->banlistWidget->horizontalHeader()->setStretchLastSection(true);
- // create ban table context menu action
- QAction* unbanAction = new QAction(tr("&Unban"), this);
-
// create ban table context menu
banTableContextMenu = new QMenu(this);
- banTableContextMenu->addAction(unbanAction);
-
- // ban table context menu signals
+ banTableContextMenu->addAction(tr("Unban"), this, &RPCConsole::unbanSelectedNode);
connect(ui->banlistWidget, &QTableView::customContextMenuRequested, this, &RPCConsole::showBanTableContextMenu);
- connect(unbanAction, &QAction::triggered, this, &RPCConsole::unbanSelectedNode);
// ban table signal handling - clear peer details when clicking a peer in the ban table
connect(ui->banlistWidget, &QTableView::clicked, this, &RPCConsole::clearSelectedNode);
@@ -1035,67 +1012,6 @@ void RPCConsole::updateTrafficStats(quint64 totalBytesIn, quint64 totalBytesOut)
ui->lblBytesOut->setText(GUIUtil::formatBytes(totalBytesOut));
}
-void RPCConsole::peerLayoutAboutToChange()
-{
- cachedNodeids.clear();
- for (const QModelIndex& peer : GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId)) {
- const auto stats = peer.data(PeerTableModel::StatsRole).value<CNodeCombinedStats*>();
- cachedNodeids.append(stats->nodeStats.nodeid);
- }
-}
-
-void RPCConsole::peerLayoutChanged()
-{
- if (!clientModel || !clientModel->getPeerTableModel())
- return;
-
- bool fUnselect = false;
- bool fReselect = false;
-
- if (cachedNodeids.empty()) // no node selected yet
- return;
-
- // find the currently selected row
- int selectedRow = -1;
- QModelIndexList selectedModelIndex = ui->peerWidget->selectionModel()->selectedIndexes();
- if (!selectedModelIndex.isEmpty()) {
- selectedRow = selectedModelIndex.first().row();
- }
-
- // check if our detail node has a row in the table (it may not necessarily
- // be at selectedRow since its position can change after a layout change)
- int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeids.first());
-
- if (detailNodeRow < 0)
- {
- // detail node disappeared from table (node disconnected)
- fUnselect = true;
- }
- else
- {
- if (detailNodeRow != selectedRow)
- {
- // detail node moved position
- fUnselect = true;
- fReselect = true;
- }
- }
-
- if (fUnselect && selectedRow >= 0) {
- clearSelectedNode();
- }
-
- if (fReselect)
- {
- for(int i = 0; i < cachedNodeids.size(); i++)
- {
- ui->peerWidget->selectRow(clientModel->getPeerTableModel()->getRowByNodeId(cachedNodeids.at(i)));
- }
- }
-
- updateDetailWidget();
-}
-
void RPCConsole::updateDetailWidget()
{
const QList<QModelIndex> selected_peers = GUIUtil::getEntryData(ui->peerWidget, PeerTableModel::NetNodeId);
diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h
index b9806e40c9..5182d60a0d 100644
--- a/src/qt/rpcconsole.h
+++ b/src/qt/rpcconsole.h
@@ -118,10 +118,6 @@ public Q_SLOTS:
void browseHistory(int offset);
/** Scroll console view to end */
void scrollToEnd();
- /** Handle selection caching before update */
- void peerLayoutAboutToChange();
- /** Handle updated peer information */
- void peerLayoutChanged();
/** Disconnect a selected node on the Peers tab */
void disconnectSelectedNode();
/** Ban a selected node on the Peers tab */
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index f0e720617c..e1a4faa266 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -271,7 +271,7 @@ bool SendCoinsDialog::PrepareSendText(QString& question_string, QString& informa
m_current_transaction = std::make_unique<WalletModelTransaction>(recipients);
WalletModel::SendCoinsReturn prepareStatus;
- updateCoinControlState(*m_coin_control);
+ updateCoinControlState();
prepareStatus = model->prepareTransaction(*m_current_transaction, *m_coin_control);
@@ -740,19 +740,19 @@ void SendCoinsDialog::updateFeeMinimizedLabel()
}
}
-void SendCoinsDialog::updateCoinControlState(CCoinControl& ctrl)
+void SendCoinsDialog::updateCoinControlState()
{
if (ui->radioCustomFee->isChecked()) {
- ctrl.m_feerate = CFeeRate(ui->customFee->value());
+ m_coin_control->m_feerate = CFeeRate(ui->customFee->value());
} else {
- ctrl.m_feerate.reset();
+ m_coin_control->m_feerate.reset();
}
// Avoid using global defaults when sending money from the GUI
// Either custom fee will be used or if not selected, the confirmation target from dropdown box
- ctrl.m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
- ctrl.m_signal_bip125_rbf = ui->optInRBF->isChecked();
+ m_coin_control->m_confirm_target = getConfTargetForIndex(ui->confTargetSelector->currentIndex());
+ m_coin_control->m_signal_bip125_rbf = ui->optInRBF->isChecked();
// Include watch-only for wallets without private key
- ctrl.fAllowWatchOnly = model->wallet().privateKeysDisabled();
+ m_coin_control->fAllowWatchOnly = model->wallet().privateKeysDisabled();
}
void SendCoinsDialog::updateNumberOfBlocks(int count, const QDateTime& blockDate, double nVerificationProgress, bool headers, SynchronizationState sync_state) {
@@ -765,7 +765,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
{
if(!model || !model->getOptionsModel())
return;
- updateCoinControlState(*m_coin_control);
+ updateCoinControlState();
m_coin_control->m_feerate.reset(); // Explicitly use only fee estimation rate for smart fee labels
int returned_target;
FeeReason reason;
@@ -839,8 +839,9 @@ void SendCoinsDialog::coinControlFeatureChanged(bool checked)
{
ui->frameCoinControl->setVisible(checked);
- if (!checked && model) // coin control features disabled
- m_coin_control->SetNull();
+ if (!checked && model) { // coin control features disabled
+ m_coin_control = std::make_unique<CCoinControl>();
+ }
coinControlUpdateLabels();
}
@@ -928,7 +929,7 @@ void SendCoinsDialog::coinControlUpdateLabels()
if (!model || !model->getOptionsModel())
return;
- updateCoinControlState(*m_coin_control);
+ updateCoinControlState();
// set pay amounts
CoinControlDialog::payAmounts.clear();
diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h
index 3e276201ba..33736f8095 100644
--- a/src/qt/sendcoinsdialog.h
+++ b/src/qt/sendcoinsdialog.h
@@ -76,8 +76,7 @@ private:
// Format confirmation message
bool PrepareSendText(QString& question_string, QString& informative_text, QString& detailed_text);
void updateFeeMinimizedLabel();
- // Update the passed in CCoinControl with state from the GUI
- void updateCoinControlState(CCoinControl& ctrl);
+ void updateCoinControlState();
private Q_SLOTS:
void sendButtonClicked(bool checked);
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index 1511410129..890d1a1740 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -161,32 +161,21 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
transactionView->horizontalHeader()->setStretchLastSection(true);
}
- // Actions
- abandonAction = new QAction(tr("Abandon transaction"), this);
- bumpFeeAction = new QAction(tr("Increase transaction fee"), this);
- bumpFeeAction->setObjectName("bumpFeeAction");
- copyAddressAction = new QAction(tr("Copy address"), this);
- copyLabelAction = new QAction(tr("Copy label"), this);
- QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
- QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
- QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
- QAction *copyTxPlainText = new QAction(tr("Copy full transaction details"), this);
- QAction *editLabelAction = new QAction(tr("Edit address label"), this);
- QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
-
contextMenu = new QMenu(this);
contextMenu->setObjectName("contextMenu");
- contextMenu->addAction(copyAddressAction);
- contextMenu->addAction(copyLabelAction);
- contextMenu->addAction(copyAmountAction);
- contextMenu->addAction(copyTxIDAction);
- contextMenu->addAction(copyTxHexAction);
- contextMenu->addAction(copyTxPlainText);
- contextMenu->addAction(showDetailsAction);
+ copyAddressAction = contextMenu->addAction(tr("Copy address"), this, &TransactionView::copyAddress);
+ copyLabelAction = contextMenu->addAction(tr("Copy label"), this, &TransactionView::copyLabel);
+ contextMenu->addAction(tr("Copy amount"), this, &TransactionView::copyAmount);
+ contextMenu->addAction(tr("Copy transaction ID"), this, &TransactionView::copyTxID);
+ contextMenu->addAction(tr("Copy raw transaction"), this, &TransactionView::copyTxHex);
+ contextMenu->addAction(tr("Copy full transaction details"), this, &TransactionView::copyTxPlainText);
+ contextMenu->addAction(tr("Show transaction details"), this, &TransactionView::showDetails);
contextMenu->addSeparator();
- contextMenu->addAction(bumpFeeAction);
- contextMenu->addAction(abandonAction);
- contextMenu->addAction(editLabelAction);
+ bumpFeeAction = contextMenu->addAction(tr("Increase transaction fee"));
+ GUIUtil::ExceptionSafeConnect(bumpFeeAction, &QAction::triggered, this, &TransactionView::bumpFee);
+ bumpFeeAction->setObjectName("bumpFeeAction");
+ abandonAction = contextMenu->addAction(tr("Abandon transaction"), this, &TransactionView::abandonTx);
+ contextMenu->addAction(tr("Edit address label"), this, &TransactionView::editLabel);
connect(dateWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseDate);
connect(typeWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseType);
@@ -199,16 +188,6 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
connect(transactionView, &QTableView::doubleClicked, this, &TransactionView::doubleClicked);
connect(transactionView, &QTableView::customContextMenuRequested, this, &TransactionView::contextualMenu);
- GUIUtil::ExceptionSafeConnect(bumpFeeAction, &QAction::triggered, this, &TransactionView::bumpFee);
- connect(abandonAction, &QAction::triggered, this, &TransactionView::abandonTx);
- connect(copyAddressAction, &QAction::triggered, this, &TransactionView::copyAddress);
- connect(copyLabelAction, &QAction::triggered, this, &TransactionView::copyLabel);
- connect(copyAmountAction, &QAction::triggered, this, &TransactionView::copyAmount);
- connect(copyTxIDAction, &QAction::triggered, this, &TransactionView::copyTxID);
- connect(copyTxHexAction, &QAction::triggered, this, &TransactionView::copyTxHex);
- connect(copyTxPlainText, &QAction::triggered, this, &TransactionView::copyTxPlainText);
- connect(editLabelAction, &QAction::triggered, this, &TransactionView::editLabel);
- connect(showDetailsAction, &QAction::triggered, this, &TransactionView::showDetails);
// Double-clicking on a transaction on the transaction history page shows details
connect(this, &TransactionView::doubleClicked, this, &TransactionView::showDetails);
// Highlight transaction after fee bump
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 438b6ce6e6..59f7657c0e 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1338,7 +1338,8 @@ static RPCHelpMan verifychain()
LOCK(cs_main);
CChainState& active_chainstate = chainman.ActiveChainstate();
- return CVerifyDB().VerifyDB(Params(), active_chainstate, &active_chainstate.CoinsTip(), check_level, check_depth);
+ return CVerifyDB().VerifyDB(
+ active_chainstate, Params(), active_chainstate.CoinsTip(), check_level, check_depth);
},
};
}
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 32318dd484..f7cf1a7851 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -18,6 +18,7 @@
#include <pow.h>
#include <rpc/blockchain.h>
#include <rpc/mining.h>
+#include <rpc/net.h>
#include <rpc/server.h>
#include <rpc/util.h>
#include <script/descriptor.h>
@@ -671,11 +672,9 @@ static RPCHelpMan getblocktemplate()
if (strMode != "template")
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
-
if (!Params().IsTestChain()) {
- if (node.connman->GetNodeCount(ConnectionDirection::Both) == 0) {
+ const CConnman& connman = EnsureConnman(node);
+ if (connman.GetNodeCount(ConnectionDirection::Both) == 0) {
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, PACKAGE_NAME " is not connected!");
}
diff --git a/src/rpc/misc.cpp b/src/rpc/misc.cpp
index dd495850d3..0e0da8f22b 100644
--- a/src/rpc/misc.cpp
+++ b/src/rpc/misc.cpp
@@ -8,6 +8,9 @@
#include <index/coinstatsindex.h>
#include <index/txindex.h>
#include <interfaces/chain.h>
+#include <interfaces/echo.h>
+#include <interfaces/init.h>
+#include <interfaces/ipc.h>
#include <key_io.h>
#include <node/context.h>
#include <outputtype.h>
@@ -645,6 +648,43 @@ static RPCHelpMan echo(const std::string& name)
static RPCHelpMan echo() { return echo("echo"); }
static RPCHelpMan echojson() { return echo("echojson"); }
+static RPCHelpMan echoipc()
+{
+ return RPCHelpMan{
+ "echoipc",
+ "\nEcho back the input argument, passing it through a spawned process in a multiprocess build.\n"
+ "This command is for testing.\n",
+ {{"arg", RPCArg::Type::STR, RPCArg::Optional::NO, "The string to echo",}},
+ RPCResult{RPCResult::Type::STR, "echo", "The echoed string."},
+ RPCExamples{HelpExampleCli("echo", "\"Hello world\"") +
+ HelpExampleRpc("echo", "\"Hello world\"")},
+ [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
+ std::unique_ptr<interfaces::Echo> echo;
+ if (interfaces::Ipc* ipc = Assert(EnsureAnyNodeContext(request.context).init)->ipc()) {
+ // Spawn a new bitcoin-node process and call makeEcho to get a
+ // client pointer to a interfaces::Echo instance running in
+ // that process. This is just for testing. A slightly more
+ // realistic test spawning a different executable instead of
+ // the same executable would add a new bitcoin-echo executable,
+ // and spawn bitcoin-echo below instead of bitcoin-node. But
+ // using bitcoin-node avoids the need to build and install a
+ // new executable just for this one test.
+ auto init = ipc->spawnProcess("bitcoin-node");
+ echo = init->makeEcho();
+ ipc->addCleanup(*echo, [init = init.release()] { delete init; });
+ } else {
+ // IPC support is not available because this is a bitcoind
+ // process not a bitcoind-node process, so just create a local
+ // interfaces::Echo object and return it so the `echoipc` RPC
+ // method will work, and the python test calling `echoipc`
+ // can expect the same result.
+ echo = interfaces::MakeEcho();
+ }
+ return echo->echo(request.params[0].get_str());
+ },
+ };
+}
+
static UniValue SummaryToJSON(const IndexSummary&& summary, std::string index_name)
{
UniValue ret_summary(UniValue::VOBJ);
@@ -724,6 +764,7 @@ static const CRPCCommand commands[] =
{ "hidden", &mockscheduler, },
{ "hidden", &echo, },
{ "hidden", &echojson, },
+ { "hidden", &echoipc, },
};
// clang-format on
for (const auto& c : commands) {
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index be068edf68..2bfcaeafc9 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -39,6 +39,22 @@ const std::vector<std::string> CONNECTION_TYPE_DOC{
"feeler (short-lived automatic connection for testing addresses)"
};
+CConnman& EnsureConnman(const NodeContext& node)
+{
+ if (!node.connman) {
+ throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ }
+ return *node.connman;
+}
+
+PeerManager& EnsurePeerman(const NodeContext& node)
+{
+ if (!node.peerman) {
+ throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ }
+ return *node.peerman;
+}
+
static RPCHelpMan getconnectioncount()
{
return RPCHelpMan{"getconnectioncount",
@@ -54,10 +70,9 @@ static RPCHelpMan getconnectioncount()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ const CConnman& connman = EnsureConnman(node);
- return (int)node.connman->GetNodeCount(ConnectionDirection::Both);
+ return (int)connman.GetNodeCount(ConnectionDirection::Both);
},
};
}
@@ -77,12 +92,10 @@ static RPCHelpMan ping()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if (!node.peerman) {
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
- }
+ PeerManager& peerman = EnsurePeerman(node);
// Request that each node send a ping during next message processing pass
- node.peerman->SendPings();
+ peerman.SendPings();
return NullUniValue;
},
};
@@ -166,19 +179,18 @@ static RPCHelpMan getpeerinfo()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman || !node.peerman) {
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
- }
+ const CConnman& connman = EnsureConnman(node);
+ const PeerManager& peerman = EnsurePeerman(node);
std::vector<CNodeStats> vstats;
- node.connman->GetNodeStats(vstats);
+ connman.GetNodeStats(vstats);
UniValue ret(UniValue::VARR);
for (const CNodeStats& stats : vstats) {
UniValue obj(UniValue::VOBJ);
CNodeStateStats statestats;
- bool fStateStats = node.peerman->GetNodeStateStats(stats.nodeid, statestats);
+ bool fStateStats = peerman.GetNodeStateStats(stats.nodeid, statestats);
obj.pushKV("id", stats.nodeid);
obj.pushKV("addr", stats.addrName);
if (stats.addrBind.IsValid()) {
@@ -286,27 +298,28 @@ static RPCHelpMan addnode()
}
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ CConnman& connman = EnsureConnman(node);
std::string strNode = request.params[0].get_str();
if (strCommand == "onetry")
{
CAddress addr;
- node.connman->OpenNetworkConnection(addr, false, nullptr, strNode.c_str(), ConnectionType::MANUAL);
+ connman.OpenNetworkConnection(addr, false, nullptr, strNode.c_str(), ConnectionType::MANUAL);
return NullUniValue;
}
if (strCommand == "add")
{
- if(!node.connman->AddNode(strNode))
+ if (!connman.AddNode(strNode)) {
throw JSONRPCError(RPC_CLIENT_NODE_ALREADY_ADDED, "Error: Node already added");
+ }
}
else if(strCommand == "remove")
{
- if(!node.connman->RemoveAddedNode(strNode))
+ if (!connman.RemoveAddedNode(strNode)) {
throw JSONRPCError(RPC_CLIENT_NODE_NOT_ADDED, "Error: Node could not be removed. It has not been added previously.");
+ }
}
return NullUniValue;
@@ -351,11 +364,9 @@ static RPCHelpMan addconnection()
}
NodeContext& node = EnsureAnyNodeContext(request.context);
- if (!node.connman) {
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled.");
- }
+ CConnman& connman = EnsureConnman(node);
- const bool success = node.connman->AddConnection(address, conn_type);
+ const bool success = connman.AddConnection(address, conn_type);
if (!success) {
throw JSONRPCError(RPC_CLIENT_NODE_CAPACITY_REACHED, "Error: Already at capacity for specified connection type.");
}
@@ -389,8 +400,7 @@ static RPCHelpMan disconnectnode()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ CConnman& connman = EnsureConnman(node);
bool success;
const UniValue &address_arg = request.params[0];
@@ -398,11 +408,11 @@ static RPCHelpMan disconnectnode()
if (!address_arg.isNull() && id_arg.isNull()) {
/* handle disconnect-by-address */
- success = node.connman->DisconnectNode(address_arg.get_str());
+ success = connman.DisconnectNode(address_arg.get_str());
} else if (!id_arg.isNull() && (address_arg.isNull() || (address_arg.isStr() && address_arg.get_str().empty()))) {
/* handle disconnect-by-id */
NodeId nodeid = (NodeId) id_arg.get_int64();
- success = node.connman->DisconnectNode(nodeid);
+ success = connman.DisconnectNode(nodeid);
} else {
throw JSONRPCError(RPC_INVALID_PARAMS, "Only one of address and nodeid should be provided.");
}
@@ -449,10 +459,9 @@ static RPCHelpMan getaddednodeinfo()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ const CConnman& connman = EnsureConnman(node);
- std::vector<AddedNodeInfo> vInfo = node.connman->GetAddedNodeInfo();
+ std::vector<AddedNodeInfo> vInfo = connman.GetAddedNodeInfo();
if (!request.params[0].isNull()) {
bool found = false;
@@ -520,21 +529,20 @@ static RPCHelpMan getnettotals()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if(!node.connman)
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
+ const CConnman& connman = EnsureConnman(node);
UniValue obj(UniValue::VOBJ);
- obj.pushKV("totalbytesrecv", node.connman->GetTotalBytesRecv());
- obj.pushKV("totalbytessent", node.connman->GetTotalBytesSent());
+ obj.pushKV("totalbytesrecv", connman.GetTotalBytesRecv());
+ obj.pushKV("totalbytessent", connman.GetTotalBytesSent());
obj.pushKV("timemillis", GetTimeMillis());
UniValue outboundLimit(UniValue::VOBJ);
- outboundLimit.pushKV("timeframe", count_seconds(node.connman->GetMaxOutboundTimeframe()));
- outboundLimit.pushKV("target", node.connman->GetMaxOutboundTarget());
- outboundLimit.pushKV("target_reached", node.connman->OutboundTargetReached(false));
- outboundLimit.pushKV("serve_historical_blocks", !node.connman->OutboundTargetReached(true));
- outboundLimit.pushKV("bytes_left_in_cycle", node.connman->GetOutboundTargetBytesLeft());
- outboundLimit.pushKV("time_left_in_cycle", count_seconds(node.connman->GetMaxOutboundTimeLeftInCycle()));
+ outboundLimit.pushKV("timeframe", count_seconds(connman.GetMaxOutboundTimeframe()));
+ outboundLimit.pushKV("target", connman.GetMaxOutboundTarget());
+ outboundLimit.pushKV("target_reached", connman.OutboundTargetReached(false));
+ outboundLimit.pushKV("serve_historical_blocks", !connman.OutboundTargetReached(true));
+ outboundLimit.pushKV("bytes_left_in_cycle", connman.GetOutboundTargetBytesLeft());
+ outboundLimit.pushKV("time_left_in_cycle", count_seconds(connman.GetMaxOutboundTimeLeftInCycle()));
obj.pushKV("uploadtarget", outboundLimit);
return obj;
},
@@ -826,13 +834,11 @@ static RPCHelpMan setnetworkactive()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if (!node.connman) {
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
- }
+ CConnman& connman = EnsureConnman(node);
- node.connman->SetNetworkActive(request.params[0].get_bool());
+ connman.SetNetworkActive(request.params[0].get_bool());
- return node.connman->GetNetworkActive();
+ return connman.GetNetworkActive();
},
};
}
@@ -864,15 +870,13 @@ static RPCHelpMan getnodeaddresses()
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
NodeContext& node = EnsureAnyNodeContext(request.context);
- if (!node.connman) {
- throw JSONRPCError(RPC_CLIENT_P2P_DISABLED, "Error: Peer-to-peer functionality missing or disabled");
- }
+ const CConnman& connman = EnsureConnman(node);
const int count{request.params[0].isNull() ? 1 : request.params[0].get_int()};
if (count < 0) throw JSONRPCError(RPC_INVALID_PARAMETER, "Address count out of range");
// returns a shuffled list of CAddress
- const std::vector<CAddress> vAddr{node.connman->GetAddresses(count, /* max_pct */ 0)};
+ const std::vector<CAddress> vAddr{connman.GetAddresses(count, /* max_pct */ 0)};
UniValue ret(UniValue::VARR);
for (const CAddress& addr : vAddr) {
diff --git a/src/rpc/net.h b/src/rpc/net.h
new file mode 100644
index 0000000000..7a4d8440ba
--- /dev/null
+++ b/src/rpc/net.h
@@ -0,0 +1,15 @@
+// Copyright (c) 2021 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_RPC_NET_H
+#define BITCOIN_RPC_NET_H
+
+class CConnman;
+class PeerManager;
+struct NodeContext;
+
+CConnman& EnsureConnman(const NodeContext& node);
+PeerManager& EnsurePeerman(const NodeContext& node);
+
+#endif // BITCOIN_RPC_NET_H
diff --git a/src/script/descriptor.cpp b/src/script/descriptor.cpp
index 30399dca51..f1433553bc 100644
--- a/src/script/descriptor.cpp
+++ b/src/script/descriptor.cpp
@@ -481,34 +481,35 @@ class DescriptorImpl : public Descriptor
const std::string m_name;
protected:
- //! The sub-descriptor argument (nullptr for everything but SH and WSH).
+ //! The sub-descriptor arguments (empty for everything but SH and WSH).
//! In doc/descriptors.m this is referred to as SCRIPT expressions sh(SCRIPT)
//! and wsh(SCRIPT), and distinct from KEY expressions and ADDR expressions.
- const std::unique_ptr<DescriptorImpl> m_subdescriptor_arg;
+ //! Subdescriptors can only ever generate a single script.
+ const std::vector<std::unique_ptr<DescriptorImpl>> m_subdescriptor_args;
//! Return a serialization of anything except pubkey and script arguments, to be prepended to those.
virtual std::string ToStringExtra() const { return ""; }
/** A helper function to construct the scripts for this descriptor.
*
- * This function is invoked once for every CScript produced by evaluating
- * m_subdescriptor_arg, or just once in case m_subdescriptor_arg is nullptr.
-
+ * This function is invoked once by ExpandHelper.
+ *
* @param pubkeys The evaluations of the m_pubkey_args field.
- * @param script The evaluation of m_subdescriptor_arg (or nullptr when m_subdescriptor_arg is nullptr).
+ * @param scripts The evaluations of m_subdescriptor_args (one for each m_subdescriptor_args element).
* @param out A FlatSigningProvider to put scripts or public keys in that are necessary to the solver.
- * The script arguments to this function are automatically added, as is the origin info of the provided pubkeys.
+ * The origin info of the provided pubkeys is automatically added.
* @return A vector with scriptPubKeys for this descriptor.
*/
- virtual std::vector<CScript> MakeScripts(const std::vector<CPubKey>& pubkeys, const CScript* script, FlatSigningProvider& out) const = 0;
+ virtual std::vector<CScript> MakeScripts(const std::vector<CPubKey>& pubkeys, Span<const CScript> scripts, FlatSigningProvider& out) const = 0;
public:
- DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::unique_ptr<DescriptorImpl> script, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_arg(std::move(script)) {}
+ DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_args() {}
+ DescriptorImpl(std::vector<std::unique_ptr<PubkeyProvider>> pubkeys, std::unique_ptr<DescriptorImpl> script, const std::string& name) : m_pubkey_args(std::move(pubkeys)), m_name(name), m_subdescriptor_args(Vector(std::move(script))) {}
bool IsSolvable() const override
{
- if (m_subdescriptor_arg) {
- if (!m_subdescriptor_arg->IsSolvable()) return false;
+ for (const auto& arg : m_subdescriptor_args) {
+ if (!arg->IsSolvable()) return false;
}
return true;
}
@@ -518,12 +519,24 @@ public:
for (const auto& pubkey : m_pubkey_args) {
if (pubkey->IsRange()) return true;
}
- if (m_subdescriptor_arg) {
- if (m_subdescriptor_arg->IsRange()) return true;
+ for (const auto& arg : m_subdescriptor_args) {
+ if (arg->IsRange()) return true;
}
return false;
}
+ virtual bool ToStringSubScriptHelper(const SigningProvider* arg, std::string& ret, bool priv, bool normalized) const
+ {
+ size_t pos = 0;
+ for (const auto& scriptarg : m_subdescriptor_args) {
+ if (pos++) ret += ",";
+ std::string tmp;
+ if (!scriptarg->ToStringHelper(arg, tmp, priv, normalized)) return false;
+ ret += std::move(tmp);
+ }
+ return true;
+ }
+
bool ToStringHelper(const SigningProvider* arg, std::string& out, bool priv, bool normalized) const
{
std::string extra = ToStringExtra();
@@ -541,13 +554,10 @@ public:
}
ret += std::move(tmp);
}
- if (m_subdescriptor_arg) {
- if (pos++) ret += ",";
- std::string tmp;
- if (!m_subdescriptor_arg->ToStringHelper(arg, tmp, priv, normalized)) return false;
- ret += std::move(tmp);
- }
- out = std::move(ret) + ")";
+ std::string subscript;
+ if (!ToStringSubScriptHelper(arg, subscript, priv, normalized)) return false;
+ if (pos && subscript.size()) ret += ',';
+ out = std::move(ret) + std::move(subscript) + ")";
return true;
}
@@ -577,17 +587,20 @@ public:
std::vector<std::pair<CPubKey, KeyOriginInfo>> entries;
entries.reserve(m_pubkey_args.size());
- // Construct temporary data in `entries` and `subscripts`, to avoid producing output in case of failure.
+ // Construct temporary data in `entries`, `subscripts`, and `subprovider` to avoid producing output in case of failure.
for (const auto& p : m_pubkey_args) {
entries.emplace_back();
if (!p->GetPubKey(pos, arg, entries.back().first, entries.back().second, read_cache, write_cache)) return false;
}
std::vector<CScript> subscripts;
- if (m_subdescriptor_arg) {
- FlatSigningProvider subprovider;
- if (!m_subdescriptor_arg->ExpandHelper(pos, arg, read_cache, subscripts, subprovider, write_cache)) return false;
- out = Merge(out, subprovider);
+ FlatSigningProvider subprovider;
+ for (const auto& subarg : m_subdescriptor_args) {
+ std::vector<CScript> outscripts;
+ if (!subarg->ExpandHelper(pos, arg, read_cache, outscripts, subprovider, write_cache)) return false;
+ assert(outscripts.size() == 1);
+ subscripts.emplace_back(std::move(outscripts[0]));
}
+ out = Merge(std::move(out), std::move(subprovider));
std::vector<CPubKey> pubkeys;
pubkeys.reserve(entries.size());
@@ -595,17 +608,8 @@ public:
pubkeys.push_back(entry.first);
out.origins.emplace(entry.first.GetID(), std::make_pair<CPubKey, KeyOriginInfo>(CPubKey(entry.first), std::move(entry.second)));
}
- if (m_subdescriptor_arg) {
- for (const auto& subscript : subscripts) {
- out.scripts.emplace(CScriptID(subscript), subscript);
- std::vector<CScript> addscripts = MakeScripts(pubkeys, &subscript, out);
- for (auto& addscript : addscripts) {
- output_scripts.push_back(std::move(addscript));
- }
- }
- } else {
- output_scripts = MakeScripts(pubkeys, nullptr, out);
- }
+
+ output_scripts = MakeScripts(pubkeys, MakeSpan(subscripts), out);
return true;
}
@@ -626,10 +630,8 @@ public:
if (!p->GetPrivKey(pos, provider, key)) continue;
out.keys.emplace(key.GetPubKey().GetID(), key);
}
- if (m_subdescriptor_arg) {
- FlatSigningProvider subprovider;
- m_subdescriptor_arg->ExpandPrivate(pos, provider, subprovider);
- out = Merge(out, subprovider);
+ for (const auto& arg : m_subdescriptor_args) {
+ arg->ExpandPrivate(pos, provider, out);
}
}
@@ -642,9 +644,9 @@ class AddressDescriptor final : public DescriptorImpl
const CTxDestination m_destination;
protected:
std::string ToStringExtra() const override { return EncodeDestination(m_destination); }
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, const CScript*, FlatSigningProvider&) const override { return Vector(GetScriptForDestination(m_destination)); }
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript>, FlatSigningProvider&) const override { return Vector(GetScriptForDestination(m_destination)); }
public:
- AddressDescriptor(CTxDestination destination) : DescriptorImpl({}, {}, "addr"), m_destination(std::move(destination)) {}
+ AddressDescriptor(CTxDestination destination) : DescriptorImpl({}, "addr"), m_destination(std::move(destination)) {}
bool IsSolvable() const final { return false; }
std::optional<OutputType> GetOutputType() const override
@@ -668,9 +670,9 @@ class RawDescriptor final : public DescriptorImpl
const CScript m_script;
protected:
std::string ToStringExtra() const override { return HexStr(m_script); }
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, const CScript*, FlatSigningProvider&) const override { return Vector(m_script); }
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript>, FlatSigningProvider&) const override { return Vector(m_script); }
public:
- RawDescriptor(CScript script) : DescriptorImpl({}, {}, "raw"), m_script(std::move(script)) {}
+ RawDescriptor(CScript script) : DescriptorImpl({}, "raw"), m_script(std::move(script)) {}
bool IsSolvable() const final { return false; }
std::optional<OutputType> GetOutputType() const override
@@ -694,9 +696,9 @@ public:
class PKDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, const CScript*, FlatSigningProvider&) const override { return Vector(GetScriptForRawPubKey(keys[0])); }
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override { return Vector(GetScriptForRawPubKey(keys[0])); }
public:
- PKDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), {}, "pk") {}
+ PKDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "pk") {}
bool IsSingleType() const final { return true; }
};
@@ -704,14 +706,14 @@ public:
class PKHDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, const CScript*, FlatSigningProvider& out) const override
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider& out) const override
{
CKeyID id = keys[0].GetID();
out.pubkeys.emplace(id, keys[0]);
return Vector(GetScriptForDestination(PKHash(id)));
}
public:
- PKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), {}, "pkh") {}
+ PKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "pkh") {}
std::optional<OutputType> GetOutputType() const override { return OutputType::LEGACY; }
bool IsSingleType() const final { return true; }
};
@@ -720,14 +722,14 @@ public:
class WPKHDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, const CScript*, FlatSigningProvider& out) const override
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider& out) const override
{
CKeyID id = keys[0].GetID();
out.pubkeys.emplace(id, keys[0]);
return Vector(GetScriptForDestination(WitnessV0KeyHash(id)));
}
public:
- WPKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), {}, "wpkh") {}
+ WPKHDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "wpkh") {}
std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32; }
bool IsSingleType() const final { return true; }
};
@@ -736,7 +738,7 @@ public:
class ComboDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, const CScript*, FlatSigningProvider& out) const override
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider& out) const override
{
std::vector<CScript> ret;
CKeyID id = keys[0].GetID();
@@ -752,7 +754,7 @@ protected:
return ret;
}
public:
- ComboDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), {}, "combo") {}
+ ComboDescriptor(std::unique_ptr<PubkeyProvider> prov) : DescriptorImpl(Vector(std::move(prov)), "combo") {}
bool IsSingleType() const final { return false; }
};
@@ -763,7 +765,7 @@ class MultisigDescriptor final : public DescriptorImpl
const bool m_sorted;
protected:
std::string ToStringExtra() const override { return strprintf("%i", m_threshold); }
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, const CScript*, FlatSigningProvider&) const override {
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>& keys, Span<const CScript>, FlatSigningProvider&) const override {
if (m_sorted) {
std::vector<CPubKey> sorted_keys(keys);
std::sort(sorted_keys.begin(), sorted_keys.end());
@@ -772,7 +774,7 @@ protected:
return Vector(GetScriptForMultisig(m_threshold, keys));
}
public:
- MultisigDescriptor(int threshold, std::vector<std::unique_ptr<PubkeyProvider>> providers, bool sorted = false) : DescriptorImpl(std::move(providers), {}, sorted ? "sortedmulti" : "multi"), m_threshold(threshold), m_sorted(sorted) {}
+ MultisigDescriptor(int threshold, std::vector<std::unique_ptr<PubkeyProvider>> providers, bool sorted = false) : DescriptorImpl(std::move(providers), sorted ? "sortedmulti" : "multi"), m_threshold(threshold), m_sorted(sorted) {}
bool IsSingleType() const final { return true; }
};
@@ -780,14 +782,19 @@ public:
class SHDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, const CScript* script, FlatSigningProvider&) const override { return Vector(GetScriptForDestination(ScriptHash(*script))); }
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript> scripts, FlatSigningProvider& out) const override
+ {
+ auto ret = Vector(GetScriptForDestination(ScriptHash(scripts[0])));
+ if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
+ return ret;
+ }
public:
SHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "sh") {}
std::optional<OutputType> GetOutputType() const override
{
- assert(m_subdescriptor_arg);
- if (m_subdescriptor_arg->GetOutputType() == OutputType::BECH32) return OutputType::P2SH_SEGWIT;
+ assert(m_subdescriptor_args.size() == 1);
+ if (m_subdescriptor_args[0]->GetOutputType() == OutputType::BECH32) return OutputType::P2SH_SEGWIT;
return OutputType::LEGACY;
}
bool IsSingleType() const final { return true; }
@@ -797,7 +804,12 @@ public:
class WSHDescriptor final : public DescriptorImpl
{
protected:
- std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, const CScript* script, FlatSigningProvider&) const override { return Vector(GetScriptForDestination(WitnessV0ScriptHash(*script))); }
+ std::vector<CScript> MakeScripts(const std::vector<CPubKey>&, Span<const CScript> scripts, FlatSigningProvider& out) const override
+ {
+ auto ret = Vector(GetScriptForDestination(WitnessV0ScriptHash(scripts[0])));
+ if (ret.size()) out.scripts.emplace(CScriptID(scripts[0]), scripts[0]);
+ return ret;
+ }
public:
WSHDescriptor(std::unique_ptr<DescriptorImpl> desc) : DescriptorImpl({}, std::move(desc), "wsh") {}
std::optional<OutputType> GetOutputType() const override { return OutputType::BECH32; }
@@ -809,9 +821,10 @@ public:
////////////////////////////////////////////////////////////////////////////
enum class ParseScriptContext {
- TOP,
- P2SH,
- P2WSH,
+ TOP, //!< Top-level context (script goes directly in scriptPubKey)
+ P2SH, //!< Inside sh() (script becomes P2SH redeemScript)
+ P2WPKH, //!< Inside wpkh() (no script, pubkey only)
+ P2WSH, //!< Inside wsh() (script becomes v0 witness script)
};
/** Parse a key path, being passed a split list of elements (the first element is ignored). */
@@ -838,10 +851,11 @@ enum class ParseScriptContext {
}
/** Parse a public key that excludes origin information. */
-std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const Span<const char>& sp, bool permit_uncompressed, FlatSigningProvider& out, std::string& error)
+std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
{
using namespace spanparsing;
+ bool permit_uncompressed = ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH;
auto split = Split(sp, '/');
std::string str(split[0].begin(), split[0].end());
if (str.size() == 0) {
@@ -899,7 +913,7 @@ std::unique_ptr<PubkeyProvider> ParsePubkeyInner(uint32_t key_exp_index, const S
}
/** Parse a public key including origin information (if enabled). */
-std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<const char>& sp, bool permit_uncompressed, FlatSigningProvider& out, std::string& error)
+std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
{
using namespace spanparsing;
@@ -908,7 +922,7 @@ std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<c
error = "Multiple ']' characters found for a single pubkey";
return nullptr;
}
- if (origin_split.size() == 1) return ParsePubkeyInner(key_exp_index, origin_split[0], permit_uncompressed, out, error);
+ if (origin_split.size() == 1) return ParsePubkeyInner(key_exp_index, origin_split[0], ctx, out, error);
if (origin_split[0].empty() || origin_split[0][0] != '[') {
error = strprintf("Key origin start '[ character expected but not found, got '%c' instead",
origin_split[0].empty() ? /** empty, implies split char */ ']' : origin_split[0][0]);
@@ -930,34 +944,37 @@ std::unique_ptr<PubkeyProvider> ParsePubkey(uint32_t key_exp_index, const Span<c
assert(fpr_bytes.size() == 4);
std::copy(fpr_bytes.begin(), fpr_bytes.end(), info.fingerprint);
if (!ParseKeyPath(slash_split, info.path, error)) return nullptr;
- auto provider = ParsePubkeyInner(key_exp_index, origin_split[1], permit_uncompressed, out, error);
+ auto provider = ParsePubkeyInner(key_exp_index, origin_split[1], ctx, out, error);
if (!provider) return nullptr;
return std::make_unique<OriginPubkeyProvider>(key_exp_index, std::move(info), std::move(provider));
}
/** Parse a script in a particular context. */
-std::unique_ptr<DescriptorImpl> ParseScript(uint32_t key_exp_index, Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
+std::unique_ptr<DescriptorImpl> ParseScript(uint32_t& key_exp_index, Span<const char>& sp, ParseScriptContext ctx, FlatSigningProvider& out, std::string& error)
{
using namespace spanparsing;
auto expr = Expr(sp);
bool sorted_multi = false;
if (Func("pk", expr)) {
- auto pubkey = ParsePubkey(key_exp_index, expr, ctx != ParseScriptContext::P2WSH, out, error);
+ auto pubkey = ParsePubkey(key_exp_index, expr, ctx, out, error);
if (!pubkey) return nullptr;
+ ++key_exp_index;
return std::make_unique<PKDescriptor>(std::move(pubkey));
}
if (Func("pkh", expr)) {
- auto pubkey = ParsePubkey(key_exp_index, expr, ctx != ParseScriptContext::P2WSH, out, error);
+ auto pubkey = ParsePubkey(key_exp_index, expr, ctx, out, error);
if (!pubkey) return nullptr;
+ ++key_exp_index;
return std::make_unique<PKHDescriptor>(std::move(pubkey));
}
if (ctx == ParseScriptContext::TOP && Func("combo", expr)) {
- auto pubkey = ParsePubkey(key_exp_index, expr, true, out, error);
+ auto pubkey = ParsePubkey(key_exp_index, expr, ctx, out, error);
if (!pubkey) return nullptr;
+ ++key_exp_index;
return std::make_unique<ComboDescriptor>(std::move(pubkey));
- } else if (ctx != ParseScriptContext::TOP && Func("combo", expr)) {
- error = "Cannot have combo in non-top level";
+ } else if (Func("combo", expr)) {
+ error = "Can only have combo() at top level";
return nullptr;
}
if ((sorted_multi = Func("sortedmulti", expr)) || Func("multi", expr)) {
@@ -975,7 +992,7 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t key_exp_index, Span<const c
return nullptr;
}
auto arg = Expr(expr);
- auto pk = ParsePubkey(key_exp_index, arg, ctx != ParseScriptContext::P2WSH, out, error);
+ auto pk = ParsePubkey(key_exp_index, arg, ctx, out, error);
if (!pk) return nullptr;
script_size += pk->GetSize() + 1;
providers.emplace_back(std::move(pk));
@@ -1005,28 +1022,29 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t key_exp_index, Span<const c
}
return std::make_unique<MultisigDescriptor>(thres, std::move(providers), sorted_multi);
}
- if (ctx != ParseScriptContext::P2WSH && Func("wpkh", expr)) {
- auto pubkey = ParsePubkey(key_exp_index, expr, false, out, error);
+ if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wpkh", expr)) {
+ auto pubkey = ParsePubkey(key_exp_index, expr, ParseScriptContext::P2WPKH, out, error);
if (!pubkey) return nullptr;
+ key_exp_index++;
return std::make_unique<WPKHDescriptor>(std::move(pubkey));
- } else if (ctx == ParseScriptContext::P2WSH && Func("wpkh", expr)) {
- error = "Cannot have wpkh within wsh";
+ } else if (Func("wpkh", expr)) {
+ error = "Can only have wpkh() at top level or inside sh()";
return nullptr;
}
if (ctx == ParseScriptContext::TOP && Func("sh", expr)) {
auto desc = ParseScript(key_exp_index, expr, ParseScriptContext::P2SH, out, error);
if (!desc || expr.size()) return nullptr;
return std::make_unique<SHDescriptor>(std::move(desc));
- } else if (ctx != ParseScriptContext::TOP && Func("sh", expr)) {
- error = "Cannot have sh in non-top level";
+ } else if (Func("sh", expr)) {
+ error = "Can only have sh() at top level";
return nullptr;
}
- if (ctx != ParseScriptContext::P2WSH && Func("wsh", expr)) {
+ if ((ctx == ParseScriptContext::TOP || ctx == ParseScriptContext::P2SH) && Func("wsh", expr)) {
auto desc = ParseScript(key_exp_index, expr, ParseScriptContext::P2WSH, out, error);
if (!desc || expr.size()) return nullptr;
return std::make_unique<WSHDescriptor>(std::move(desc));
- } else if (ctx == ParseScriptContext::P2WSH && Func("wsh", expr)) {
- error = "Cannot have wsh within wsh";
+ } else if (Func("wsh", expr)) {
+ error = "Can only have wsh() at top level or inside sh()";
return nullptr;
}
if (ctx == ParseScriptContext::TOP && Func("addr", expr)) {
@@ -1036,6 +1054,9 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t key_exp_index, Span<const c
return nullptr;
}
return std::make_unique<AddressDescriptor>(std::move(dest));
+ } else if (Func("addr", expr)) {
+ error = "Can only have addr() at top level";
+ return nullptr;
}
if (ctx == ParseScriptContext::TOP && Func("raw", expr)) {
std::string str(expr.begin(), expr.end());
@@ -1045,6 +1066,9 @@ std::unique_ptr<DescriptorImpl> ParseScript(uint32_t key_exp_index, Span<const c
}
auto bytes = ParseHex(str);
return std::make_unique<RawDescriptor>(CScript(bytes.begin(), bytes.end()));
+ } else if (Func("raw", expr)) {
+ error = "Can only have raw() at top level";
+ return nullptr;
}
if (ctx == ParseScriptContext::P2SH) {
error = "A function is needed within P2SH";
@@ -1174,7 +1198,8 @@ std::unique_ptr<Descriptor> Parse(const std::string& descriptor, FlatSigningProv
{
Span<const char> sp{descriptor};
if (!CheckChecksum(sp, require_checksum, error)) return nullptr;
- auto ret = ParseScript(0, sp, ParseScriptContext::TOP, out, error);
+ uint32_t key_exp_index = 0;
+ auto ret = ParseScript(key_exp_index, sp, ParseScriptContext::TOP, out, error);
if (sp.size() == 0 && ret) return std::unique_ptr<Descriptor>(std::move(ret));
return nullptr;
}
diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp
index 4ddbc8338e..7b661a0d1d 100644
--- a/src/test/compress_tests.cpp
+++ b/src/test/compress_tests.cpp
@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE(compress_script_to_ckey_id)
CScript script = CScript() << OP_DUP << OP_HASH160 << ToByteVector(pubkey.GetID()) << OP_EQUALVERIFY << OP_CHECKSIG;
BOOST_CHECK_EQUAL(script.size(), 25U);
- std::vector<unsigned char> out;
+ CompressedScript out;
bool done = CompressScript(script, out);
BOOST_CHECK_EQUAL(done, true);
@@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE(compress_script_to_cscript_id)
script << OP_HASH160 << ToByteVector(CScriptID(redeemScript)) << OP_EQUAL;
BOOST_CHECK_EQUAL(script.size(), 23U);
- std::vector<unsigned char> out;
+ CompressedScript out;
bool done = CompressScript(script, out);
BOOST_CHECK_EQUAL(done, true);
@@ -107,7 +107,7 @@ BOOST_AUTO_TEST_CASE(compress_script_to_compressed_pubkey_id)
CScript script = CScript() << ToByteVector(key.GetPubKey()) << OP_CHECKSIG; // COMPRESSED_PUBLIC_KEY_SIZE (33)
BOOST_CHECK_EQUAL(script.size(), 35U);
- std::vector<unsigned char> out;
+ CompressedScript out;
bool done = CompressScript(script, out);
BOOST_CHECK_EQUAL(done, true);
@@ -124,7 +124,7 @@ BOOST_AUTO_TEST_CASE(compress_script_to_uncompressed_pubkey_id)
CScript script = CScript() << ToByteVector(key.GetPubKey()) << OP_CHECKSIG; // PUBLIC_KEY_SIZE (65)
BOOST_CHECK_EQUAL(script.size(), 67U); // 1 char code + 65 char pubkey + OP_CHECKSIG
- std::vector<unsigned char> out;
+ CompressedScript out;
bool done = CompressScript(script, out);
BOOST_CHECK_EQUAL(done, true);
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp
index a6080ad3dd..b5f3bb2fa4 100644
--- a/src/test/dbwrapper_tests.cpp
+++ b/src/test/dbwrapper_tests.cpp
@@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
{
// Perform tests both obfuscated and non-obfuscated.
for (const bool obfuscate : {false, true}) {
- fs::path ph = GetDataDir() / (obfuscate ? "dbwrapper_obfuscate_true" : "dbwrapper_obfuscate_false");
+ fs::path ph = m_args.GetDataDirPath() / (obfuscate ? "dbwrapper_obfuscate_true" : "dbwrapper_obfuscate_false");
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
char key = 'k';
uint256 in = InsecureRand256();
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_basic_data)
{
// Perform tests both obfuscated and non-obfuscated.
for (bool obfuscate : {false, true}) {
- fs::path ph = GetDataDir() / (obfuscate ? "dbwrapper_1_obfuscate_true" : "dbwrapper_1_obfuscate_false");
+ fs::path ph = m_args.GetDataDirPath() / (obfuscate ? "dbwrapper_1_obfuscate_true" : "dbwrapper_1_obfuscate_false");
CDBWrapper dbw(ph, (1 << 20), false, true, obfuscate);
uint256 res;
@@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
{
// Perform tests both obfuscated and non-obfuscated.
for (const bool obfuscate : {false, true}) {
- fs::path ph = GetDataDir() / (obfuscate ? "dbwrapper_batch_obfuscate_true" : "dbwrapper_batch_obfuscate_false");
+ fs::path ph = m_args.GetDataDirPath() / (obfuscate ? "dbwrapper_batch_obfuscate_true" : "dbwrapper_batch_obfuscate_false");
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
char key = 'i';
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
{
// Perform tests both obfuscated and non-obfuscated.
for (const bool obfuscate : {false, true}) {
- fs::path ph = GetDataDir() / (obfuscate ? "dbwrapper_iterator_obfuscate_true" : "dbwrapper_iterator_obfuscate_false");
+ fs::path ph = m_args.GetDataDirPath() / (obfuscate ? "dbwrapper_iterator_obfuscate_true" : "dbwrapper_iterator_obfuscate_false");
CDBWrapper dbw(ph, (1 << 20), true, false, obfuscate);
// The two keys are intentionally chosen for ordering
@@ -202,7 +202,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_iterator)
BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
{
// We're going to share this fs::path between two wrappers
- fs::path ph = GetDataDir() / "existing_data_no_obfuscate";
+ fs::path ph = m_args.GetDataDirPath() / "existing_data_no_obfuscate";
create_directories(ph);
// Set up a non-obfuscated wrapper to write some initial data.
@@ -243,7 +243,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
BOOST_AUTO_TEST_CASE(existing_data_reindex)
{
// We're going to share this fs::path between two wrappers
- fs::path ph = GetDataDir() / "existing_data_reindex";
+ fs::path ph = m_args.GetDataDirPath() / "existing_data_reindex";
create_directories(ph);
// Set up a non-obfuscated wrapper to write some initial data.
@@ -278,7 +278,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
BOOST_AUTO_TEST_CASE(iterator_ordering)
{
- fs::path ph = GetDataDir() / "iterator_ordering";
+ fs::path ph = m_args.GetDataDirPath() / "iterator_ordering";
CDBWrapper dbw(ph, (1 << 20), true, false, false);
for (int x=0x00; x<256; ++x) {
uint8_t key = x;
@@ -358,7 +358,7 @@ BOOST_AUTO_TEST_CASE(iterator_string_ordering)
{
char buf[10];
- fs::path ph = GetDataDir() / "iterator_string_ordering";
+ fs::path ph = m_args.GetDataDirPath() / "iterator_string_ordering";
CDBWrapper dbw(ph, (1 << 20), true, false, false);
for (int x=0x00; x<10; ++x) {
for (int y = 0; y < 10; y++) {
@@ -404,7 +404,7 @@ BOOST_AUTO_TEST_CASE(unicodepath)
// On Windows this test will fail if the directory is created using
// the ANSI CreateDirectoryA call and the code page isn't UTF8.
// It will succeed if created with CreateDirectoryW.
- fs::path ph = GetDataDir() / "test_runner_₿_🏃_20191128_104644";
+ fs::path ph = m_args.GetDataDirPath() / "test_runner_₿_🏃_20191128_104644";
CDBWrapper dbw(ph, (1 << 20));
fs::path lockPath = ph / "LOCK";
diff --git a/src/test/denialofservice_tests.cpp b/src/test/denialofservice_tests.cpp
index 599e628685..ddf0e0ca90 100644
--- a/src/test/denialofservice_tests.cpp
+++ b/src/test/denialofservice_tests.cpp
@@ -208,7 +208,7 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
BOOST_AUTO_TEST_CASE(peer_discouragement)
{
const CChainParams& chainparams = Params();
- auto banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
+ auto banman = std::make_unique<BanMan>(m_args.GetDataDirPath() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
auto connman = std::make_unique<CConnmanTest>(0x1337, 0x1337, *m_node.addrman);
auto peerLogic = PeerManager::make(chainparams, *connman, *m_node.addrman, banman.get(),
*m_node.scheduler, *m_node.chainman, *m_node.mempool, false);
@@ -302,7 +302,7 @@ BOOST_AUTO_TEST_CASE(peer_discouragement)
BOOST_AUTO_TEST_CASE(DoS_bantime)
{
const CChainParams& chainparams = Params();
- auto banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
+ auto banman = std::make_unique<BanMan>(m_args.GetDataDirPath() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
auto connman = std::make_unique<CConnman>(0x1337, 0x1337, *m_node.addrman);
auto peerLogic = PeerManager::make(chainparams, *connman, *m_node.addrman, banman.get(),
*m_node.scheduler, *m_node.chainman, *m_node.mempool, false);
diff --git a/src/test/descriptor_tests.cpp b/src/test/descriptor_tests.cpp
index aecf955fee..ea41a03728 100644
--- a/src/test/descriptor_tests.cpp
+++ b/src/test/descriptor_tests.cpp
@@ -24,7 +24,7 @@ void CheckUnparsable(const std::string& prv, const std::string& pub, const std::
auto parse_pub = Parse(pub, keys_pub, error);
BOOST_CHECK_MESSAGE(!parse_priv, prv);
BOOST_CHECK_MESSAGE(!parse_pub, pub);
- BOOST_CHECK(error == expected_error);
+ BOOST_CHECK_EQUAL(error, expected_error);
}
constexpr int DEFAULT = 0;
@@ -355,12 +355,12 @@ BOOST_AUTO_TEST_CASE(descriptor_test)
// Check for invalid nesting of structures
CheckUnparsable("sh(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)", "sh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)", "A function is needed within P2SH"); // P2SH needs a script, not a key
- CheckUnparsable("sh(combo(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1))", "sh(combo(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))", "Cannot have combo in non-top level"); // Old must be top level
+ CheckUnparsable("sh(combo(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1))", "sh(combo(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))", "Can only have combo() at top level"); // Old must be top level
CheckUnparsable("wsh(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)", "wsh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)", "A function is needed within P2WSH"); // P2WSH needs a script, not a key
- CheckUnparsable("wsh(wpkh(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1))", "wsh(wpkh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))", "Cannot have wpkh within wsh"); // Cannot embed witness inside witness
- CheckUnparsable("wsh(sh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "wsh(sh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Cannot have sh in non-top level"); // Cannot embed P2SH inside P2WSH
- CheckUnparsable("sh(sh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "sh(sh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Cannot have sh in non-top level"); // Cannot embed P2SH inside P2SH
- CheckUnparsable("wsh(wsh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "wsh(wsh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Cannot have wsh within wsh"); // Cannot embed P2WSH inside P2WSH
+ CheckUnparsable("wsh(wpkh(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1))", "wsh(wpkh(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd))", "Can only have wpkh() at top level or inside sh()"); // Cannot embed witness inside witness
+ CheckUnparsable("wsh(sh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "wsh(sh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Can only have sh() at top level"); // Cannot embed P2SH inside P2WSH
+ CheckUnparsable("sh(sh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "sh(sh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Can only have sh() at top level"); // Cannot embed P2SH inside P2SH
+ CheckUnparsable("wsh(wsh(pk(L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1)))", "wsh(wsh(pk(03a34b99f22c790c4e36b2b3c2c35a36db06226e41c692fc82b8b56ac1c540c5bd)))", "Can only have wsh() at top level or inside sh()"); // Cannot embed P2WSH inside P2WSH
// Checksums
Check("sh(multi(2,[00000000/111'/222]xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc,xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WACViL4L/0))#ggrsrxfy", "sh(multi(2,[00000000/111'/222]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y/0))#tjg09x5t", "sh(multi(2,[00000000/111'/222]xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc,xprv9uPDJpEQgRQfDcW7BkF7eTya6RPxXeJCqCJGHuCJ4GiRVLzkTXBAJMu2qaMWPrS7AANYqdq6vcBcBUdJCVVFceUvJFjaPdGZ2y9WACViL4L/0))#ggrsrxfy", "sh(multi(2,[00000000/111'/222]xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL,xpub68NZiKmJWnxxS6aaHmn81bvJeTESw724CRDs6HbuccFQN9Ku14VQrADWgqbhhTHBaohPX4CjNLf9fq9MYo6oDaPPLPxSb7gwQN3ih19Zm4Y/0))#tjg09x5t", DEFAULT, {{"a91445a9a622a8b0a1269944be477640eedc447bbd8487"}}, OutputType::LEGACY, {{0x8000006FUL,222},{0}});
diff --git a/src/test/flatfile_tests.cpp b/src/test/flatfile_tests.cpp
index 0c5c19113d..9194ed8130 100644
--- a/src/test/flatfile_tests.cpp
+++ b/src/test/flatfile_tests.cpp
@@ -14,7 +14,7 @@ BOOST_FIXTURE_TEST_SUITE(flatfile_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(flatfile_filename)
{
- const auto data_dir = GetDataDir();
+ const auto data_dir = m_args.GetDataDirPath();
FlatFilePos pos(456, 789);
@@ -27,7 +27,7 @@ BOOST_AUTO_TEST_CASE(flatfile_filename)
BOOST_AUTO_TEST_CASE(flatfile_open)
{
- const auto data_dir = GetDataDir();
+ const auto data_dir = m_args.GetDataDirPath();
FlatFileSeq seq(data_dir, "a", 16 * 1024);
std::string line1("A purely peer-to-peer version of electronic cash would allow online "
@@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE(flatfile_open)
BOOST_AUTO_TEST_CASE(flatfile_allocate)
{
- const auto data_dir = GetDataDir();
+ const auto data_dir = m_args.GetDataDirPath();
FlatFileSeq seq(data_dir, "a", 100);
bool out_of_space;
@@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE(flatfile_allocate)
BOOST_AUTO_TEST_CASE(flatfile_flush)
{
- const auto data_dir = GetDataDir();
+ const auto data_dir = m_args.GetDataDirPath();
FlatFileSeq seq(data_dir, "a", 100);
bool out_of_space;
diff --git a/src/test/fs_tests.cpp b/src/test/fs_tests.cpp
index e52cd5230c..452bc06bbb 100644
--- a/src/test/fs_tests.cpp
+++ b/src/test/fs_tests.cpp
@@ -13,7 +13,7 @@ BOOST_FIXTURE_TEST_SUITE(fs_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(fsbridge_fstream)
{
- fs::path tmpfolder = GetDataDir();
+ fs::path tmpfolder = m_args.GetDataDirPath();
// tmpfile1 should be the same as tmpfile2
fs::path tmpfile1 = tmpfolder / "fs_tests_₿_🏃";
fs::path tmpfile2 = tmpfolder / "fs_tests_₿_🏃";
diff --git a/src/test/fuzz/process_message.cpp b/src/test/fuzz/process_message.cpp
index 96e1cfa08f..7b99193ad0 100644
--- a/src/test/fuzz/process_message.cpp
+++ b/src/test/fuzz/process_message.cpp
@@ -100,7 +100,6 @@ void fuzz_target(FuzzBufferType buffer, const std::string& LIMIT_TO_MESSAGE_TYPE
g_setup->m_node.peerman->SendMessages(&p2p_node);
}
SyncWithValidationInterfaceQueue();
- LOCK2(::cs_main, g_cs_orphans); // See init.cpp for rationale for implicit locking order requirement
g_setup->m_node.connman->StopNodes();
}
diff --git a/src/test/fuzz/process_messages.cpp b/src/test/fuzz/process_messages.cpp
index 203c0ef8e1..11b236c9bd 100644
--- a/src/test/fuzz/process_messages.cpp
+++ b/src/test/fuzz/process_messages.cpp
@@ -80,6 +80,5 @@ FUZZ_TARGET_INIT(process_messages, initialize_process_messages)
}
}
SyncWithValidationInterfaceQueue();
- LOCK2(::cs_main, g_cs_orphans); // See init.cpp for rationale for implicit locking order requirement
g_setup->m_node.connman->StopNodes();
}
diff --git a/src/test/fuzz/rpc.cpp b/src/test/fuzz/rpc.cpp
new file mode 100644
index 0000000000..dae6f6b6a7
--- /dev/null
+++ b/src/test/fuzz/rpc.cpp
@@ -0,0 +1,378 @@
+// Copyright (c) 2021 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <base58.h>
+#include <chainparamsbase.h>
+#include <core_io.h>
+#include <interfaces/chain.h>
+#include <key.h>
+#include <key_io.h>
+#include <node/context.h>
+#include <primitives/block.h>
+#include <primitives/transaction.h>
+#include <psbt.h>
+#include <rpc/blockchain.h>
+#include <rpc/client.h>
+#include <rpc/request.h>
+#include <rpc/server.h>
+#include <rpc/util.h>
+#include <span.h>
+#include <streams.h>
+#include <test/fuzz/FuzzedDataProvider.h>
+#include <test/fuzz/fuzz.h>
+#include <test/fuzz/util.h>
+#include <test/util/setup_common.h>
+#include <tinyformat.h>
+#include <univalue.h>
+#include <util/strencodings.h>
+#include <util/string.h>
+#include <util/time.h>
+
+#include <cstdint>
+#include <iostream>
+#include <memory>
+#include <optional>
+#include <stdexcept>
+#include <string>
+#include <vector>
+
+namespace {
+struct RPCFuzzTestingSetup : public TestingSetup {
+ RPCFuzzTestingSetup(const std::string& chain_name, const std::vector<const char*>& extra_args) : TestingSetup{chain_name, extra_args}
+ {
+ }
+
+ UniValue CallRPC(const std::string& rpc_method, const std::vector<std::string>& arguments)
+ {
+ JSONRPCRequest request;
+ request.context = &m_node;
+ request.strMethod = rpc_method;
+ request.params = RPCConvertValues(rpc_method, arguments);
+ return tableRPC.execute(request);
+ }
+
+ std::vector<std::string> GetRPCCommands() const
+ {
+ return tableRPC.listCommands();
+ }
+};
+
+RPCFuzzTestingSetup* rpc_testing_setup = nullptr;
+std::string g_limit_to_rpc_command;
+
+// RPC commands which are not appropriate for fuzzing: such as RPC commands
+// reading or writing to a filename passed as an RPC parameter, RPC commands
+// resulting in network activity, etc.
+const std::vector<std::string> RPC_COMMANDS_NOT_SAFE_FOR_FUZZING{
+ "addconnection", // avoid DNS lookups
+ "addnode", // avoid DNS lookups
+ "addpeeraddress", // avoid DNS lookups
+ "analyzepsbt", // avoid signed integer overflow in CFeeRate::GetFee(unsigned long) (https://github.com/bitcoin/bitcoin/issues/20607)
+ "dumptxoutset", // avoid writing to disk
+#ifdef ENABLE_WALLET
+ "dumpwallet", // avoid writing to disk
+#endif
+ "echoipc", // avoid assertion failure (Assertion `"EnsureAnyNodeContext(request.context).init" && check' failed.)
+ "generatetoaddress", // avoid timeout
+ "gettxoutproof", // avoid slow execution
+#ifdef ENABLE_WALLET
+ "importwallet", // avoid reading from disk
+ "loadwallet", // avoid reading from disk
+#endif
+ "mockscheduler", // avoid assertion failure (Assertion `delta_seconds.count() > 0 && delta_seconds < std::chrono::hours{1}' failed.)
+ "prioritisetransaction", // avoid signed integer overflow in CTxMemPool::PrioritiseTransaction(uint256 const&, long const&) (https://github.com/bitcoin/bitcoin/issues/20626)
+ "setban", // avoid DNS lookups
+ "stop", // avoid shutdown state
+};
+
+// RPC commands which are safe for fuzzing.
+const std::vector<std::string> RPC_COMMANDS_SAFE_FOR_FUZZING{
+ "clearbanned",
+ "combinepsbt",
+ "combinerawtransaction",
+ "converttopsbt",
+ "createmultisig",
+ "createpsbt",
+ "createrawtransaction",
+ "decodepsbt",
+ "decoderawtransaction",
+ "decodescript",
+ "deriveaddresses",
+ "disconnectnode",
+ "echo",
+ "echojson",
+ "estimaterawfee",
+ "estimatesmartfee",
+ "finalizepsbt",
+ "generate",
+ "generateblock",
+ "generatetodescriptor",
+ "getaddednodeinfo",
+ "getbestblockhash",
+ "getblock",
+ "getblockchaininfo",
+ "getblockcount",
+ "getblockfilter",
+ "getblockhash",
+ "getblockheader",
+ "getblockstats",
+ "getblocktemplate",
+ "getchaintips",
+ "getchaintxstats",
+ "getconnectioncount",
+ "getdescriptorinfo",
+ "getdifficulty",
+ "getindexinfo",
+ "getmemoryinfo",
+ "getmempoolancestors",
+ "getmempooldescendants",
+ "getmempoolentry",
+ "getmempoolinfo",
+ "getmininginfo",
+ "getnettotals",
+ "getnetworkhashps",
+ "getnetworkinfo",
+ "getnodeaddresses",
+ "getpeerinfo",
+ "getrawmempool",
+ "getrawtransaction",
+ "getrpcinfo",
+ "gettxout",
+ "gettxoutsetinfo",
+ "help",
+ "invalidateblock",
+ "joinpsbts",
+ "listbanned",
+ "logging",
+ "ping",
+ "preciousblock",
+ "pruneblockchain",
+ "reconsiderblock",
+ "savemempool",
+ "scantxoutset",
+ "sendrawtransaction",
+ "setmocktime",
+ "setnetworkactive",
+ "signmessagewithprivkey",
+ "signrawtransactionwithkey",
+ "submitblock",
+ "submitheader",
+ "syncwithvalidationinterfacequeue",
+ "testmempoolaccept",
+ "uptime",
+ "utxoupdatepsbt",
+ "validateaddress",
+ "verifychain",
+ "verifymessage",
+ "verifytxoutproof",
+ "waitforblock",
+ "waitforblockheight",
+ "waitfornewblock",
+};
+
+std::string ConsumeScalarRPCArgument(FuzzedDataProvider& fuzzed_data_provider)
+{
+ const size_t max_string_length = 4096;
+ std::string r;
+ CallOneOf(
+ fuzzed_data_provider,
+ [&] {
+ // string argument
+ r = fuzzed_data_provider.ConsumeRandomLengthString(max_string_length);
+ },
+ [&] {
+ // base64 argument
+ r = EncodeBase64(fuzzed_data_provider.ConsumeRandomLengthString(max_string_length));
+ },
+ [&] {
+ // hex argument
+ r = HexStr(fuzzed_data_provider.ConsumeRandomLengthString(max_string_length));
+ },
+ [&] {
+ // bool argument
+ r = fuzzed_data_provider.ConsumeBool() ? "true" : "false";
+ },
+ [&] {
+ // range argument
+ r = "[" + ToString(fuzzed_data_provider.ConsumeIntegral<int64_t>()) + "," + ToString(fuzzed_data_provider.ConsumeIntegral<int64_t>()) + "]";
+ },
+ [&] {
+ // integral argument (int64_t)
+ r = ToString(fuzzed_data_provider.ConsumeIntegral<int64_t>());
+ },
+ [&] {
+ // integral argument (uint64_t)
+ r = ToString(fuzzed_data_provider.ConsumeIntegral<uint64_t>());
+ },
+ [&] {
+ // floating point argument
+ r = strprintf("%f", fuzzed_data_provider.ConsumeFloatingPoint<double>());
+ },
+ [&] {
+ // tx destination argument
+ r = EncodeDestination(ConsumeTxDestination(fuzzed_data_provider));
+ },
+ [&] {
+ // uint160 argument
+ r = ConsumeUInt160(fuzzed_data_provider).ToString();
+ },
+ [&] {
+ // uint256 argument
+ r = ConsumeUInt256(fuzzed_data_provider).ToString();
+ },
+ [&] {
+ // base32 argument
+ r = EncodeBase32(fuzzed_data_provider.ConsumeRandomLengthString(max_string_length));
+ },
+ [&] {
+ // base58 argument
+ r = EncodeBase58(MakeUCharSpan(fuzzed_data_provider.ConsumeRandomLengthString(max_string_length)));
+ },
+ [&] {
+ // base58 argument with checksum
+ r = EncodeBase58Check(MakeUCharSpan(fuzzed_data_provider.ConsumeRandomLengthString(max_string_length)));
+ },
+ [&] {
+ // hex encoded block
+ std::optional<CBlock> opt_block = ConsumeDeserializable<CBlock>(fuzzed_data_provider);
+ if (!opt_block) {
+ return;
+ }
+ CDataStream data_stream{SER_NETWORK, PROTOCOL_VERSION};
+ data_stream << *opt_block;
+ r = HexStr(data_stream);
+ },
+ [&] {
+ // hex encoded block header
+ std::optional<CBlockHeader> opt_block_header = ConsumeDeserializable<CBlockHeader>(fuzzed_data_provider);
+ if (!opt_block_header) {
+ return;
+ }
+ CDataStream data_stream{SER_NETWORK, PROTOCOL_VERSION};
+ data_stream << *opt_block_header;
+ r = HexStr(data_stream);
+ },
+ [&] {
+ // hex encoded tx
+ std::optional<CMutableTransaction> opt_tx = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider);
+ if (!opt_tx) {
+ return;
+ }
+ CDataStream data_stream{SER_NETWORK, fuzzed_data_provider.ConsumeBool() ? PROTOCOL_VERSION : (PROTOCOL_VERSION | SERIALIZE_TRANSACTION_NO_WITNESS)};
+ data_stream << *opt_tx;
+ r = HexStr(data_stream);
+ },
+ [&] {
+ // base64 encoded psbt
+ std::optional<PartiallySignedTransaction> opt_psbt = ConsumeDeserializable<PartiallySignedTransaction>(fuzzed_data_provider);
+ if (!opt_psbt) {
+ return;
+ }
+ CDataStream data_stream{SER_NETWORK, PROTOCOL_VERSION};
+ data_stream << *opt_psbt;
+ r = EncodeBase64({data_stream.begin(), data_stream.end()});
+ },
+ [&] {
+ // base58 encoded key
+ const std::vector<uint8_t> random_bytes = fuzzed_data_provider.ConsumeBytes<uint8_t>(32);
+ CKey key;
+ key.Set(random_bytes.begin(), random_bytes.end(), fuzzed_data_provider.ConsumeBool());
+ if (!key.IsValid()) {
+ return;
+ }
+ r = EncodeSecret(key);
+ },
+ [&] {
+ // hex encoded pubkey
+ const std::vector<uint8_t> random_bytes = fuzzed_data_provider.ConsumeBytes<uint8_t>(32);
+ CKey key;
+ key.Set(random_bytes.begin(), random_bytes.end(), fuzzed_data_provider.ConsumeBool());
+ if (!key.IsValid()) {
+ return;
+ }
+ r = HexStr(key.GetPubKey());
+ });
+ return r;
+}
+
+std::string ConsumeArrayRPCArgument(FuzzedDataProvider& fuzzed_data_provider)
+{
+ std::vector<std::string> scalar_arguments;
+ while (fuzzed_data_provider.ConsumeBool()) {
+ scalar_arguments.push_back(ConsumeScalarRPCArgument(fuzzed_data_provider));
+ }
+ return "[\"" + Join(scalar_arguments, "\",\"") + "\"]";
+}
+
+std::string ConsumeRPCArgument(FuzzedDataProvider& fuzzed_data_provider)
+{
+ return fuzzed_data_provider.ConsumeBool() ? ConsumeScalarRPCArgument(fuzzed_data_provider) : ConsumeArrayRPCArgument(fuzzed_data_provider);
+}
+
+RPCFuzzTestingSetup* InitializeRPCFuzzTestingSetup()
+{
+ static const auto setup = MakeNoLogFileContext<RPCFuzzTestingSetup>();
+ SetRPCWarmupFinished();
+ return setup.get();
+}
+}; // namespace
+
+void initialize_rpc()
+{
+ rpc_testing_setup = InitializeRPCFuzzTestingSetup();
+ const std::vector<std::string> supported_rpc_commands = rpc_testing_setup->GetRPCCommands();
+ for (const std::string& rpc_command : supported_rpc_commands) {
+ const bool safe_for_fuzzing = std::find(RPC_COMMANDS_SAFE_FOR_FUZZING.begin(), RPC_COMMANDS_SAFE_FOR_FUZZING.end(), rpc_command) != RPC_COMMANDS_SAFE_FOR_FUZZING.end();
+ const bool not_safe_for_fuzzing = std::find(RPC_COMMANDS_NOT_SAFE_FOR_FUZZING.begin(), RPC_COMMANDS_NOT_SAFE_FOR_FUZZING.end(), rpc_command) != RPC_COMMANDS_NOT_SAFE_FOR_FUZZING.end();
+ if (!(safe_for_fuzzing || not_safe_for_fuzzing)) {
+ std::cerr << "Error: RPC command \"" << rpc_command << "\" not found in RPC_COMMANDS_SAFE_FOR_FUZZING or RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update " << __FILE__ << ".\n";
+ std::terminate();
+ }
+ if (safe_for_fuzzing && not_safe_for_fuzzing) {
+ std::cerr << "Error: RPC command \"" << rpc_command << "\" found in *both* RPC_COMMANDS_SAFE_FOR_FUZZING and RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update " << __FILE__ << ".\n";
+ std::terminate();
+ }
+ }
+ for (const std::string& rpc_command : RPC_COMMANDS_SAFE_FOR_FUZZING) {
+ const bool supported_rpc_command = std::find(supported_rpc_commands.begin(), supported_rpc_commands.end(), rpc_command) != supported_rpc_commands.end();
+ if (!supported_rpc_command) {
+ std::cerr << "Error: Unknown RPC command \"" << rpc_command << "\" found in RPC_COMMANDS_SAFE_FOR_FUZZING. Please update " << __FILE__ << ".\n";
+ std::terminate();
+ }
+ }
+ for (const std::string& rpc_command : RPC_COMMANDS_NOT_SAFE_FOR_FUZZING) {
+ const bool supported_rpc_command = std::find(supported_rpc_commands.begin(), supported_rpc_commands.end(), rpc_command) != supported_rpc_commands.end();
+ if (!supported_rpc_command) {
+ std::cerr << "Error: Unknown RPC command \"" << rpc_command << "\" found in RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update " << __FILE__ << ".\n";
+ std::terminate();
+ }
+ }
+ const char* limit_to_rpc_command_env = std::getenv("LIMIT_TO_RPC_COMMAND");
+ if (limit_to_rpc_command_env != nullptr) {
+ g_limit_to_rpc_command = std::string{limit_to_rpc_command_env};
+ }
+}
+
+FUZZ_TARGET_INIT(rpc, initialize_rpc)
+{
+ FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
+ SetMockTime(ConsumeTime(fuzzed_data_provider));
+ const std::string rpc_command = fuzzed_data_provider.ConsumeRandomLengthString(64);
+ if (!g_limit_to_rpc_command.empty() && rpc_command != g_limit_to_rpc_command) {
+ return;
+ }
+ const bool safe_for_fuzzing = std::find(RPC_COMMANDS_SAFE_FOR_FUZZING.begin(), RPC_COMMANDS_SAFE_FOR_FUZZING.end(), rpc_command) != RPC_COMMANDS_SAFE_FOR_FUZZING.end();
+ if (!safe_for_fuzzing) {
+ return;
+ }
+ std::vector<std::string> arguments;
+ while (fuzzed_data_provider.ConsumeBool()) {
+ arguments.push_back(ConsumeRPCArgument(fuzzed_data_provider));
+ }
+ try {
+ rpc_testing_setup->CallRPC(rpc_command, arguments);
+ } catch (const UniValue&) {
+ } catch (const std::runtime_error&) {
+ }
+}
diff --git a/src/test/fuzz/script.cpp b/src/test/fuzz/script.cpp
index e87ae5b04b..b87bcf2ef5 100644
--- a/src/test/fuzz/script.cpp
+++ b/src/test/fuzz/script.cpp
@@ -43,7 +43,7 @@ FUZZ_TARGET_INIT(script, initialize_script)
if (!script_opt) return;
const CScript script{*script_opt};
- std::vector<unsigned char> compressed;
+ CompressedScript compressed;
if (CompressScript(script, compressed)) {
const unsigned int size = compressed[0];
compressed.erase(compressed.begin());
@@ -55,22 +55,45 @@ FUZZ_TARGET_INIT(script, initialize_script)
}
CTxDestination address;
- (void)ExtractDestination(script, address);
-
TxoutType type_ret;
std::vector<CTxDestination> addresses;
int required_ret;
- (void)ExtractDestinations(script, type_ret, addresses, required_ret);
-
- const FlatSigningProvider signing_provider;
- (void)InferDescriptor(script, signing_provider);
-
- (void)IsSegWitOutput(signing_provider, script);
-
- (void)IsSolvable(signing_provider, script);
+ bool extract_destinations_ret = ExtractDestinations(script, type_ret, addresses, required_ret);
+ bool extract_destination_ret = ExtractDestination(script, address);
+ if (!extract_destinations_ret) {
+ assert(!extract_destination_ret);
+ if (type_ret == TxoutType::MULTISIG) {
+ assert(addresses.empty() && required_ret == 0);
+ } else {
+ assert(type_ret == TxoutType::PUBKEY ||
+ type_ret == TxoutType::NONSTANDARD ||
+ type_ret == TxoutType::NULL_DATA);
+ }
+ } else {
+ assert(required_ret >= 1 && required_ret <= 16);
+ assert((unsigned long)required_ret == addresses.size());
+ assert(type_ret == TxoutType::MULTISIG || required_ret == 1);
+ }
+ if (type_ret == TxoutType::NONSTANDARD || type_ret == TxoutType::NULL_DATA) {
+ assert(!extract_destinations_ret);
+ }
+ if (!extract_destination_ret) {
+ assert(type_ret == TxoutType::PUBKEY ||
+ type_ret == TxoutType::NONSTANDARD ||
+ type_ret == TxoutType::NULL_DATA ||
+ type_ret == TxoutType::MULTISIG);
+ } else {
+ assert(address == addresses[0]);
+ }
+ if (type_ret == TxoutType::NONSTANDARD ||
+ type_ret == TxoutType::NULL_DATA ||
+ type_ret == TxoutType::MULTISIG) {
+ assert(!extract_destination_ret);
+ }
TxoutType which_type;
bool is_standard_ret = IsStandard(script, which_type);
+ assert(type_ret == which_type);
if (!is_standard_ret) {
assert(which_type == TxoutType::NONSTANDARD ||
which_type == TxoutType::NULL_DATA ||
@@ -87,6 +110,11 @@ FUZZ_TARGET_INIT(script, initialize_script)
which_type == TxoutType::NONSTANDARD);
}
+ const FlatSigningProvider signing_provider;
+ (void)InferDescriptor(script, signing_provider);
+ (void)IsSegWitOutput(signing_provider, script);
+ (void)IsSolvable(signing_provider, script);
+
(void)RecursiveDynamicUsage(script);
std::vector<std::vector<unsigned char>> solutions;
@@ -115,10 +143,12 @@ FUZZ_TARGET_INIT(script, initialize_script)
{
const std::vector<uint8_t> bytes = ConsumeRandomLengthByteVector(fuzzed_data_provider);
+ CompressedScript compressed_script;
+ compressed_script.assign(bytes.begin(), bytes.end());
// DecompressScript(..., ..., bytes) is not guaranteed to be defined if the bytes vector is too short
- if (bytes.size() >= 32) {
+ if (compressed_script.size() >= 32) {
CScript decompressed_script;
- DecompressScript(decompressed_script, fuzzed_data_provider.ConsumeIntegral<unsigned int>(), bytes);
+ DecompressScript(decompressed_script, fuzzed_data_provider.ConsumeIntegral<unsigned int>(), compressed_script);
}
}
diff --git a/src/test/fuzz/script_flags.cpp b/src/test/fuzz/script_flags.cpp
index aa911cdeda..1278dc87d4 100644
--- a/src/test/fuzz/script_flags.cpp
+++ b/src/test/fuzz/script_flags.cpp
@@ -41,6 +41,10 @@ FUZZ_TARGET_INIT(script_flags, initialize_script_flags)
for (unsigned i = 0; i < tx.vin.size(); ++i) {
CTxOut prevout;
ds >> prevout;
+ if (!MoneyRange(prevout.nValue)) {
+ // prevouts should be consensus-valid
+ prevout.nValue = 1;
+ }
spent_outputs.push_back(prevout);
}
PrecomputedTransactionData txdata;
diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp
index 45c9b90ee9..2a217f3455 100644
--- a/src/test/getarg_tests.cpp
+++ b/src/test/getarg_tests.cpp
@@ -18,7 +18,7 @@ namespace getarg_tests{
protected:
void SetupArgs(const std::vector<std::pair<std::string, unsigned int>>& args);
void ResetArgs(const std::string& strArg);
- ArgsManager m_args;
+ ArgsManager m_local_args;
};
}
@@ -39,14 +39,14 @@ void LocalTestingSetup :: ResetArgs(const std::string& strArg)
vecChar.push_back(s.c_str());
std::string error;
- BOOST_CHECK(m_args.ParseParameters(vecChar.size(), vecChar.data(), error));
+ BOOST_CHECK(m_local_args.ParseParameters(vecChar.size(), vecChar.data(), error));
}
void LocalTestingSetup :: SetupArgs(const std::vector<std::pair<std::string, unsigned int>>& args)
{
- m_args.ClearArgs();
+ m_local_args.ClearArgs();
for (const auto& arg : args) {
- m_args.AddArg(arg.first, "", arg.second, OptionsCategory::OPTIONS);
+ m_local_args.AddArg(arg.first, "", arg.second, OptionsCategory::OPTIONS);
}
}
@@ -55,52 +55,52 @@ BOOST_AUTO_TEST_CASE(boolarg)
const auto foo = std::make_pair("-foo", ArgsManager::ALLOW_ANY);
SetupArgs({foo});
ResetArgs("-foo");
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
- BOOST_CHECK(!m_args.GetBoolArg("-fo", false));
- BOOST_CHECK(m_args.GetBoolArg("-fo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-fo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-fo", true));
- BOOST_CHECK(!m_args.GetBoolArg("-fooo", false));
- BOOST_CHECK(m_args.GetBoolArg("-fooo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-fooo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-fooo", true));
ResetArgs("-foo=0");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
ResetArgs("-foo=1");
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
// New 0.6 feature: auto-map -nosomething to !-something:
ResetArgs("-nofoo");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
ResetArgs("-nofoo=1");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
ResetArgs("-foo -nofoo"); // -nofoo should win
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
ResetArgs("-foo=1 -nofoo=1"); // -nofoo should win
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
ResetArgs("-foo=0 -nofoo=0"); // -nofoo=0 should win
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
// New 0.6 feature: treat -- same as -:
ResetArgs("--foo=1");
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
ResetArgs("--nofoo=1");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
}
@@ -110,24 +110,24 @@ BOOST_AUTO_TEST_CASE(stringarg)
const auto bar = std::make_pair("-bar", ArgsManager::ALLOW_ANY);
SetupArgs({foo, bar});
ResetArgs("");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", "eleven"), "eleven");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", "eleven"), "eleven");
ResetArgs("-foo -bar");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", "eleven"), "");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", "eleven"), "");
ResetArgs("-foo=");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", "eleven"), "");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", "eleven"), "");
ResetArgs("-foo=11");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "11");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", "eleven"), "11");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "11");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", "eleven"), "11");
ResetArgs("-foo=eleven");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "eleven");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", "eleven"), "eleven");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "eleven");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", "eleven"), "eleven");
}
@@ -137,20 +137,20 @@ BOOST_AUTO_TEST_CASE(intarg)
const auto bar = std::make_pair("-bar", ArgsManager::ALLOW_ANY);
SetupArgs({foo, bar});
ResetArgs("");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", 11), 11);
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", 0), 0);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", 11), 11);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", 0), 0);
ResetArgs("-foo -bar");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", 11), 0);
- BOOST_CHECK_EQUAL(m_args.GetArg("-bar", 11), 0);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", 11), 0);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-bar", 11), 0);
ResetArgs("-foo=11 -bar=12");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", 0), 11);
- BOOST_CHECK_EQUAL(m_args.GetArg("-bar", 11), 12);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", 0), 11);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-bar", 11), 12);
ResetArgs("-foo=NaN -bar=NotANumber");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", 1), 0);
- BOOST_CHECK_EQUAL(m_args.GetArg("-bar", 11), 0);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", 1), 0);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-bar", 11), 0);
}
BOOST_AUTO_TEST_CASE(doubledash)
@@ -159,11 +159,11 @@ BOOST_AUTO_TEST_CASE(doubledash)
const auto bar = std::make_pair("-bar", ArgsManager::ALLOW_ANY);
SetupArgs({foo, bar});
ResetArgs("--foo");
- BOOST_CHECK_EQUAL(m_args.GetBoolArg("-foo", false), true);
+ BOOST_CHECK_EQUAL(m_local_args.GetBoolArg("-foo", false), true);
ResetArgs("--foo=verbose --bar=1");
- BOOST_CHECK_EQUAL(m_args.GetArg("-foo", ""), "verbose");
- BOOST_CHECK_EQUAL(m_args.GetArg("-bar", 0), 1);
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-foo", ""), "verbose");
+ BOOST_CHECK_EQUAL(m_local_args.GetArg("-bar", 0), 1);
}
BOOST_AUTO_TEST_CASE(boolargno)
@@ -172,24 +172,24 @@ BOOST_AUTO_TEST_CASE(boolargno)
const auto bar = std::make_pair("-bar", ArgsManager::ALLOW_ANY);
SetupArgs({foo, bar});
ResetArgs("-nofoo");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
ResetArgs("-nofoo=1");
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
ResetArgs("-nofoo=0");
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
ResetArgs("-foo --nofoo"); // --nofoo should win
- BOOST_CHECK(!m_args.GetBoolArg("-foo", true));
- BOOST_CHECK(!m_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(!m_local_args.GetBoolArg("-foo", false));
ResetArgs("-nofoo -foo"); // foo always wins:
- BOOST_CHECK(m_args.GetBoolArg("-foo", true));
- BOOST_CHECK(m_args.GetBoolArg("-foo", false));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", true));
+ BOOST_CHECK(m_local_args.GetBoolArg("-foo", false));
}
BOOST_AUTO_TEST_CASE(logargs)
@@ -209,7 +209,7 @@ BOOST_AUTO_TEST_CASE(logargs)
});
// Log the arguments
- m_args.LogArgs();
+ m_local_args.LogArgs();
LogInstance().DeleteCallback(print_connection);
// Check that what should appear does, and what shouldn't doesn't.
diff --git a/src/test/settings_tests.cpp b/src/test/settings_tests.cpp
index 548fd020a6..f5ae9f86d1 100644
--- a/src/test/settings_tests.cpp
+++ b/src/test/settings_tests.cpp
@@ -45,7 +45,7 @@ BOOST_FIXTURE_TEST_SUITE(settings_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(ReadWrite)
{
- fs::path path = GetDataDir() / "settings.json";
+ fs::path path = m_args.GetDataDirPath() / "settings.json";
WriteText(path, R"({
"string": "string",
diff --git a/src/test/util/setup_common.cpp b/src/test/util/setup_common.cpp
index 2e7f64a444..ffc5115145 100644
--- a/src/test/util/setup_common.cpp
+++ b/src/test/util/setup_common.cpp
@@ -71,7 +71,8 @@ std::ostream& operator<<(std::ostream& os, const uint256& num)
}
BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::vector<const char*>& extra_args)
- : m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256().ToString()}
+ : m_path_root{fs::temp_directory_path() / "test_common_" PACKAGE_NAME / g_insecure_rand_ctx_temp_path.rand256().ToString()},
+ m_args{}
{
const std::vector<const char*> arguments = Cat(
{
@@ -87,8 +88,9 @@ BasicTestingSetup::BasicTestingSetup(const std::string& chainName, const std::ve
extra_args);
util::ThreadRename("test");
fs::create_directories(m_path_root);
+ m_args.ForceSetArg("-datadir", m_path_root.string());
gArgs.ForceSetArg("-datadir", m_path_root.string());
- ClearDatadirCache();
+ gArgs.ClearPathCache();
{
SetupServerArgs(m_node);
std::string error;
@@ -191,7 +193,7 @@ TestingSetup::TestingSetup(const std::string& chainName, const std::vector<const
}
m_node.addrman = std::make_unique<CAddrMan>();
- m_node.banman = std::make_unique<BanMan>(GetDataDir() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
+ m_node.banman = std::make_unique<BanMan>(m_args.GetDataDirPath() / "banlist.dat", nullptr, DEFAULT_MISBEHAVING_BANTIME);
m_node.connman = std::make_unique<CConnman>(0x1337, 0x1337, *m_node.addrman); // Deterministic randomness for tests.
m_node.peerman = PeerManager::make(chainparams, *m_node.connman, *m_node.addrman,
m_node.banman.get(), *m_node.scheduler, *m_node.chainman,
diff --git a/src/test/util/setup_common.h b/src/test/util/setup_common.h
index a32f1f3805..b19dd75765 100644
--- a/src/test/util/setup_common.h
+++ b/src/test/util/setup_common.h
@@ -8,6 +8,7 @@
#include <chainparamsbase.h>
#include <fs.h>
#include <key.h>
+#include <util/system.h>
#include <node/context.h>
#include <pubkey.h>
#include <random.h>
@@ -80,6 +81,7 @@ struct BasicTestingSetup {
~BasicTestingSetup();
const fs::path m_path_root;
+ ArgsManager m_args;
};
/** Testing setup that performs all steps up until right before
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index a1ac9ead69..04b908829b 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -49,24 +49,27 @@ BOOST_FIXTURE_TEST_SUITE(util_tests, BasicTestingSetup)
BOOST_AUTO_TEST_CASE(util_datadir)
{
- ClearDatadirCache();
- const fs::path dd_norm = GetDataDir();
+ // Use local args variable instead of m_args to avoid making assumptions about test setup
+ ArgsManager args;
+ args.ForceSetArg("-datadir", m_path_root.string());
- gArgs.ForceSetArg("-datadir", dd_norm.string() + "/");
- ClearDatadirCache();
- BOOST_CHECK_EQUAL(dd_norm, GetDataDir());
+ const fs::path dd_norm = args.GetDataDirPath();
- gArgs.ForceSetArg("-datadir", dd_norm.string() + "/.");
- ClearDatadirCache();
- BOOST_CHECK_EQUAL(dd_norm, GetDataDir());
+ args.ForceSetArg("-datadir", dd_norm.string() + "/");
+ args.ClearPathCache();
+ BOOST_CHECK_EQUAL(dd_norm, args.GetDataDirPath());
- gArgs.ForceSetArg("-datadir", dd_norm.string() + "/./");
- ClearDatadirCache();
- BOOST_CHECK_EQUAL(dd_norm, GetDataDir());
+ args.ForceSetArg("-datadir", dd_norm.string() + "/.");
+ args.ClearPathCache();
+ BOOST_CHECK_EQUAL(dd_norm, args.GetDataDirPath());
- gArgs.ForceSetArg("-datadir", dd_norm.string() + "/.//");
- ClearDatadirCache();
- BOOST_CHECK_EQUAL(dd_norm, GetDataDir());
+ args.ForceSetArg("-datadir", dd_norm.string() + "/./");
+ args.ClearPathCache();
+ BOOST_CHECK_EQUAL(dd_norm, args.GetDataDirPath());
+
+ args.ForceSetArg("-datadir", dd_norm.string() + "/.//");
+ args.ClearPathCache();
+ BOOST_CHECK_EQUAL(dd_norm, args.GetDataDirPath());
}
BOOST_AUTO_TEST_CASE(util_check)
@@ -1143,21 +1146,23 @@ BOOST_AUTO_TEST_CASE(util_ReadWriteSettings)
{
// Test writing setting.
TestArgsManager args1;
+ args1.ForceSetArg("-datadir", m_path_root.string());
args1.LockSettings([&](util::Settings& settings) { settings.rw_settings["name"] = "value"; });
args1.WriteSettingsFile();
// Test reading setting.
TestArgsManager args2;
+ args2.ForceSetArg("-datadir", m_path_root.string());
args2.ReadSettingsFile();
args2.LockSettings([&](util::Settings& settings) { BOOST_CHECK_EQUAL(settings.rw_settings["name"].get_str(), "value"); });
// Test error logging, and remove previously written setting.
{
ASSERT_DEBUG_LOG("Failed renaming settings file");
- fs::remove(GetDataDir() / "settings.json");
- fs::create_directory(GetDataDir() / "settings.json");
+ fs::remove(args1.GetDataDirPath() / "settings.json");
+ fs::create_directory(args1.GetDataDirPath() / "settings.json");
args2.WriteSettingsFile();
- fs::remove(GetDataDir() / "settings.json");
+ fs::remove(args1.GetDataDirPath() / "settings.json");
}
}
@@ -1796,7 +1801,7 @@ static constexpr char ExitCommand = 'X';
BOOST_AUTO_TEST_CASE(test_LockDirectory)
{
- fs::path dirname = GetDataDir() / "lock_dir";
+ fs::path dirname = m_args.GetDataDirPath() / "lock_dir";
const std::string lockname = ".lock";
#ifndef WIN32
// Revert SIGCHLD to default, otherwise boost.test will catch and fail on
@@ -1885,7 +1890,7 @@ BOOST_AUTO_TEST_CASE(test_LockDirectory)
BOOST_AUTO_TEST_CASE(test_DirIsWritable)
{
// Should be able to write to the data dir.
- fs::path tmpdirname = GetDataDir();
+ fs::path tmpdirname = m_args.GetDataDirPath();
BOOST_CHECK_EQUAL(DirIsWritable(tmpdirname), true);
// Should not be able to write to a non-existent dir.
diff --git a/src/test/versionbits_tests.cpp b/src/test/versionbits_tests.cpp
index 05838ec19a..304cd8feb0 100644
--- a/src/test/versionbits_tests.cpp
+++ b/src/test/versionbits_tests.cpp
@@ -81,11 +81,9 @@ class VersionBitsTester
TestNeverActiveConditionChecker checker_never[CHECKERS];
// Test counter (to identify failures)
- int num;
+ int num{1000};
public:
- VersionBitsTester() : num(1000) {}
-
VersionBitsTester& Reset() {
// Have each group of tests be counted by the 1000s part, starting at 1000
num = num - (num % 1000) + 1000;
@@ -257,39 +255,6 @@ BOOST_AUTO_TEST_CASE(versionbits_test)
}
}
-BOOST_AUTO_TEST_CASE(versionbits_sanity)
-{
- // Sanity checks of version bit deployments
- const auto chainParams = CreateChainParams(*m_node.args, CBaseChainParams::MAIN);
- const Consensus::Params &mainnetParams = chainParams->GetConsensus();
- for (int i=0; i<(int) Consensus::MAX_VERSION_BITS_DEPLOYMENTS; i++) {
- uint32_t bitmask = VersionBitsMask(mainnetParams, static_cast<Consensus::DeploymentPos>(i));
- // Make sure that no deployment tries to set an invalid bit.
- BOOST_CHECK_EQUAL(bitmask & ~(uint32_t)VERSIONBITS_TOP_MASK, bitmask);
-
- // Check min_activation_height is on a retarget boundary
- BOOST_CHECK_EQUAL(mainnetParams.vDeployments[i].min_activation_height % mainnetParams.nMinerConfirmationWindow, 0);
- // Check min_activation_height is 0 for ALWAYS_ACTIVE and never active deployments
- if (mainnetParams.vDeployments[i].nStartTime == Consensus::BIP9Deployment::ALWAYS_ACTIVE || mainnetParams.vDeployments[i].nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE) {
- BOOST_CHECK_EQUAL(mainnetParams.vDeployments[i].min_activation_height, 0);
- }
-
- // Verify that the deployment windows of different deployment using the
- // same bit are disjoint.
- // This test may need modification at such time as a new deployment
- // is proposed that reuses the bit of an activated soft fork, before the
- // end time of that soft fork. (Alternatively, the end time of that
- // activated soft fork could be later changed to be earlier to avoid
- // overlap.)
- for (int j=i+1; j<(int) Consensus::MAX_VERSION_BITS_DEPLOYMENTS; j++) {
- if (VersionBitsMask(mainnetParams, static_cast<Consensus::DeploymentPos>(j)) == bitmask) {
- BOOST_CHECK(mainnetParams.vDeployments[j].nStartTime > mainnetParams.vDeployments[i].nTimeout ||
- mainnetParams.vDeployments[i].nStartTime > mainnetParams.vDeployments[j].nTimeout);
- }
- }
- }
-}
-
/** Check that ComputeBlockVersion will set the appropriate bit correctly */
static void check_computeblockversion(const Consensus::Params& params, Consensus::DeploymentPos dep)
{
@@ -305,16 +270,25 @@ static void check_computeblockversion(const Consensus::Params& params, Consensus
BOOST_CHECK_EQUAL(ComputeBlockVersion(nullptr, params), VERSIONBITS_TOP_BITS);
// always/never active deployments shouldn't need to be tested further
- if (nStartTime == Consensus::BIP9Deployment::ALWAYS_ACTIVE) return;
- if (nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE) return;
+ if (nStartTime == Consensus::BIP9Deployment::ALWAYS_ACTIVE ||
+ nStartTime == Consensus::BIP9Deployment::NEVER_ACTIVE)
+ {
+ BOOST_CHECK_EQUAL(min_activation_height, 0);
+ return;
+ }
BOOST_REQUIRE(nStartTime < nTimeout);
BOOST_REQUIRE(nStartTime >= 0);
BOOST_REQUIRE(nTimeout <= std::numeric_limits<uint32_t>::max() || nTimeout == Consensus::BIP9Deployment::NO_TIMEOUT);
BOOST_REQUIRE(0 <= bit && bit < 32);
+ // Make sure that no deployment tries to set an invalid bit.
BOOST_REQUIRE(((1 << bit) & VERSIONBITS_TOP_MASK) == 0);
BOOST_REQUIRE(min_activation_height >= 0);
- BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0);
+ // Check min_activation_height is on a retarget boundary
+ BOOST_REQUIRE_EQUAL(min_activation_height % params.nMinerConfirmationWindow, 0U);
+
+ const uint32_t bitmask{VersionBitsMask(params, dep)};
+ BOOST_CHECK_EQUAL(bitmask, uint32_t{1} << bit);
// In the first chain, test that the bit is set by CBV until it has failed.
// In the second chain, test the bit is set by CBV while STARTED and
@@ -443,8 +417,18 @@ BOOST_AUTO_TEST_CASE(versionbits_computeblockversion)
// ACTIVE and FAILED states in roughly the way we expect
for (const auto& chain_name : {CBaseChainParams::MAIN, CBaseChainParams::TESTNET, CBaseChainParams::SIGNET, CBaseChainParams::REGTEST}) {
const auto chainParams = CreateChainParams(*m_node.args, chain_name);
+ uint32_t chain_all_vbits{0};
for (int i = 0; i < (int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++i) {
- check_computeblockversion(chainParams->GetConsensus(), static_cast<Consensus::DeploymentPos>(i));
+ const auto dep = static_cast<Consensus::DeploymentPos>(i);
+ // Check that no bits are re-used (within the same chain). This is
+ // disallowed because the transition to FAILED (on timeout) does
+ // not take precedence over STARTED/LOCKED_IN. So all softforks on
+ // the same bit might overlap, even when non-overlapping start-end
+ // times are picked.
+ const uint32_t dep_mask{VersionBitsMask(chainParams->GetConsensus(), dep)};
+ BOOST_CHECK(!(chain_all_vbits & dep_mask));
+ chain_all_vbits |= dep_mask;
+ check_computeblockversion(chainParams->GetConsensus(), dep);
}
}
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 0b83a76504..9b3bd46b38 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -235,6 +235,19 @@ static bool CheckValid(const std::string& key, const util::SettingsValue& val, u
return true;
}
+namespace {
+fs::path StripRedundantLastElementsOfPath(const fs::path& path)
+{
+ auto result = path;
+ while (result.filename().string() == ".") {
+ result = result.parent_path();
+ }
+
+ assert(fs::equivalent(result, path));
+ return result;
+}
+} // namespace
+
// Define default constructor and destructor that are not inline, so code instantiating this class doesn't need to
// #include class definitions for all members.
// For example, m_settings has an internal dependency on univalue.
@@ -375,6 +388,72 @@ std::optional<unsigned int> ArgsManager::GetArgFlags(const std::string& name) co
return std::nullopt;
}
+const fs::path& ArgsManager::GetBlocksDirPath()
+{
+ LOCK(cs_args);
+ fs::path& path = m_cached_blocks_path;
+
+ // Cache the path to avoid calling fs::create_directories on every call of
+ // this function
+ if (!path.empty()) return path;
+
+ if (IsArgSet("-blocksdir")) {
+ path = fs::system_complete(GetArg("-blocksdir", ""));
+ if (!fs::is_directory(path)) {
+ path = "";
+ return path;
+ }
+ } else {
+ path = GetDataDirPath(false);
+ }
+
+ path /= BaseParams().DataDir();
+ path /= "blocks";
+ fs::create_directories(path);
+ path = StripRedundantLastElementsOfPath(path);
+ return path;
+}
+
+const fs::path& ArgsManager::GetDataDirPath(bool net_specific) const
+{
+ LOCK(cs_args);
+ fs::path& path = net_specific ? m_cached_network_datadir_path : m_cached_datadir_path;
+
+ // Cache the path to avoid calling fs::create_directories on every call of
+ // this function
+ if (!path.empty()) return path;
+
+ std::string datadir = GetArg("-datadir", "");
+ if (!datadir.empty()) {
+ path = fs::system_complete(datadir);
+ if (!fs::is_directory(path)) {
+ path = "";
+ return path;
+ }
+ } else {
+ path = GetDefaultDataDir();
+ }
+ if (net_specific)
+ path /= BaseParams().DataDir();
+
+ if (fs::create_directories(path)) {
+ // This is the first run, create wallets subdirectory too
+ fs::create_directories(path / "wallets");
+ }
+
+ path = StripRedundantLastElementsOfPath(path);
+ return path;
+}
+
+void ArgsManager::ClearPathCache()
+{
+ LOCK(cs_args);
+
+ m_cached_datadir_path = fs::path();
+ m_cached_network_datadir_path = fs::path();
+ m_cached_blocks_path = fs::path();
+}
+
std::optional<const ArgsManager::Command> ArgsManager::GetCommand() const
{
Command ret;
@@ -434,7 +513,7 @@ bool ArgsManager::GetSettingsPath(fs::path* filepath, bool temp) const
}
if (filepath) {
std::string settings = GetArg("-settings", BITCOIN_SETTINGS_FILENAME);
- *filepath = fsbridge::AbsPathJoin(GetDataDir(/* net_specific= */ true), temp ? settings + ".tmp" : settings);
+ *filepath = fsbridge::AbsPathJoin(GetDataDirPath(/* net_specific= */ true), temp ? settings + ".tmp" : settings);
}
return true;
}
@@ -723,79 +802,9 @@ fs::path GetDefaultDataDir()
#endif
}
-namespace {
-fs::path StripRedundantLastElementsOfPath(const fs::path& path)
-{
- auto result = path;
- while (result.filename().string() == ".") {
- result = result.parent_path();
- }
-
- assert(fs::equivalent(result, path));
- return result;
-}
-} // namespace
-
-static fs::path g_blocks_path_cache_net_specific;
-static fs::path pathCached;
-static fs::path pathCachedNetSpecific;
-static RecursiveMutex csPathCached;
-
-const fs::path &GetBlocksDir()
-{
- LOCK(csPathCached);
- fs::path &path = g_blocks_path_cache_net_specific;
-
- // Cache the path to avoid calling fs::create_directories on every call of
- // this function
- if (!path.empty()) return path;
-
- if (gArgs.IsArgSet("-blocksdir")) {
- path = fs::system_complete(gArgs.GetArg("-blocksdir", ""));
- if (!fs::is_directory(path)) {
- path = "";
- return path;
- }
- } else {
- path = GetDataDir(false);
- }
-
- path /= BaseParams().DataDir();
- path /= "blocks";
- fs::create_directories(path);
- path = StripRedundantLastElementsOfPath(path);
- return path;
-}
-
const fs::path &GetDataDir(bool fNetSpecific)
{
- LOCK(csPathCached);
- fs::path &path = fNetSpecific ? pathCachedNetSpecific : pathCached;
-
- // Cache the path to avoid calling fs::create_directories on every call of
- // this function
- if (!path.empty()) return path;
-
- std::string datadir = gArgs.GetArg("-datadir", "");
- if (!datadir.empty()) {
- path = fs::system_complete(datadir);
- if (!fs::is_directory(path)) {
- path = "";
- return path;
- }
- } else {
- path = GetDefaultDataDir();
- }
- if (fNetSpecific)
- path /= BaseParams().DataDir();
-
- if (fs::create_directories(path)) {
- // This is the first run, create wallets subdirectory too
- fs::create_directories(path / "wallets");
- }
-
- path = StripRedundantLastElementsOfPath(path);
- return path;
+ return gArgs.GetDataDirPath(fNetSpecific);
}
bool CheckDataDirOption()
@@ -804,15 +813,6 @@ bool CheckDataDirOption()
return datadir.empty() || fs::is_directory(fs::system_complete(datadir));
}
-void ClearDatadirCache()
-{
- LOCK(csPathCached);
-
- pathCached = fs::path();
- pathCachedNetSpecific = fs::path();
- g_blocks_path_cache_net_specific = fs::path();
-}
-
fs::path GetConfigFile(const std::string& confPath)
{
return AbsPathForConfigVal(fs::path(confPath), false);
@@ -971,7 +971,7 @@ bool ArgsManager::ReadConfigFiles(std::string& error, bool ignore_invalid_keys)
}
// If datadir is changed in .conf file:
- ClearDatadirCache();
+ gArgs.ClearPathCache();
if (!CheckDataDirOption()) {
error = strprintf("specified data directory \"%s\" does not exist.", GetArg("-datadir", ""));
return false;
diff --git a/src/util/system.h b/src/util/system.h
index 29657e56e2..61f862c93a 100644
--- a/src/util/system.h
+++ b/src/util/system.h
@@ -91,13 +91,9 @@ void ReleaseDirectoryLocks();
bool TryCreateDirectories(const fs::path& p);
fs::path GetDefaultDataDir();
-// The blocks directory is always net specific.
-const fs::path &GetBlocksDir();
const fs::path &GetDataDir(bool fNetSpecific = true);
// Return true if -datadir option points to a valid directory or is not specified.
bool CheckDataDirOption();
-/** Tests only */
-void ClearDatadirCache();
fs::path GetConfigFile(const std::string& confPath);
#ifdef WIN32
fs::path GetSpecialFolderPath(int nFolder, bool fCreate = true);
@@ -200,6 +196,9 @@ protected:
std::map<OptionsCategory, std::map<std::string, Arg>> m_available_args GUARDED_BY(cs_args);
bool m_accept_any_command GUARDED_BY(cs_args){true};
std::list<SectionInfo> m_config_sections GUARDED_BY(cs_args);
+ fs::path m_cached_blocks_path GUARDED_BY(cs_args);
+ mutable fs::path m_cached_datadir_path GUARDED_BY(cs_args);
+ mutable fs::path m_cached_network_datadir_path GUARDED_BY(cs_args);
[[nodiscard]] bool ReadConfigStream(std::istream& stream, const std::string& filepath, std::string& error, bool ignore_invalid_keys = false);
@@ -264,6 +263,27 @@ public:
std::optional<const Command> GetCommand() const;
/**
+ * Get blocks directory path
+ *
+ * @return Blocks path which is network specific
+ */
+ const fs::path& GetBlocksDirPath();
+
+ /**
+ * Get data directory path
+ *
+ * @param net_specific Append network identifier to the returned path
+ * @return Absolute path on success, otherwise an empty path when a non-directory path would be returned
+ * @post Returned directory path is created unless it is empty
+ */
+ const fs::path& GetDataDirPath(bool net_specific = true) const;
+
+ /**
+ * Clear cached directory paths
+ */
+ void ClearPathCache();
+
+ /**
* Return a vector of strings of the given argument
*
* @param strArg Argument to get (e.g. "-foo")
diff --git a/src/validation.cpp b/src/validation.cpp
index 3ad53fbcb6..bf774a0791 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -2204,7 +2204,7 @@ bool CChainState::FlushStateToDisk(
// Write blocks and block index to disk.
if (fDoFullFlush || fPeriodicWrite) {
// Depend on nMinDiskSpace to ensure we can write block index
- if (!CheckDiskSpace(GetBlocksDir())) {
+ if (!CheckDiskSpace(gArgs.GetBlocksDirPath())) {
return AbortNode(state, "Disk space is too low!", _("Disk space is too low!"));
}
{
@@ -3890,12 +3890,12 @@ void BlockManager::FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPr
static FlatFileSeq BlockFileSeq()
{
- return FlatFileSeq(GetBlocksDir(), "blk", gArgs.GetBoolArg("-fastprune", false) ? 0x4000 /* 16kb */ : BLOCKFILE_CHUNK_SIZE);
+ return FlatFileSeq(gArgs.GetBlocksDirPath(), "blk", gArgs.GetBoolArg("-fastprune", false) ? 0x4000 /* 16kb */ : BLOCKFILE_CHUNK_SIZE);
}
static FlatFileSeq UndoFileSeq()
{
- return FlatFileSeq(GetBlocksDir(), "rev", UNDOFILE_CHUNK_SIZE);
+ return FlatFileSeq(gArgs.GetBlocksDirPath(), "rev", UNDOFILE_CHUNK_SIZE);
}
FILE* OpenBlockFile(const FlatFilePos &pos, bool fReadOnly) {
@@ -4101,38 +4101,46 @@ CVerifyDB::~CVerifyDB()
uiInterface.ShowProgress("", 100, false);
}
-bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CChainState& active_chainstate, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth)
+bool CVerifyDB::VerifyDB(
+ CChainState& chainstate,
+ const CChainParams& chainparams,
+ CCoinsView& coinsview,
+ int nCheckLevel, int nCheckDepth)
{
AssertLockHeld(cs_main);
- assert(std::addressof(::ChainstateActive()) == std::addressof(active_chainstate));
- if (active_chainstate.m_chain.Tip() == nullptr || active_chainstate.m_chain.Tip()->pprev == nullptr)
+ assert(std::addressof(::ChainstateActive()) == std::addressof(chainstate));
+ if (chainstate.m_chain.Tip() == nullptr || chainstate.m_chain.Tip()->pprev == nullptr)
return true;
// Verify blocks in the best chain
- if (nCheckDepth <= 0 || nCheckDepth > active_chainstate.m_chain.Height())
- nCheckDepth = active_chainstate.m_chain.Height();
+ if (nCheckDepth <= 0 || nCheckDepth > chainstate.m_chain.Height())
+ nCheckDepth = chainstate.m_chain.Height();
nCheckLevel = std::max(0, std::min(4, nCheckLevel));
LogPrintf("Verifying last %i blocks at level %i\n", nCheckDepth, nCheckLevel);
- CCoinsViewCache coins(coinsview);
+ CCoinsViewCache coins(&coinsview);
CBlockIndex* pindex;
CBlockIndex* pindexFailure = nullptr;
int nGoodTransactions = 0;
BlockValidationState state;
int reportDone = 0;
LogPrintf("[0%%]..."); /* Continued */
- for (pindex = active_chainstate.m_chain.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) {
- const int percentageDone = std::max(1, std::min(99, (int)(((double)(active_chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));
+
+ bool is_snapshot_cs = !chainstate.m_from_snapshot_blockhash.IsNull();
+
+ for (pindex = chainstate.m_chain.Tip(); pindex && pindex->pprev; pindex = pindex->pprev) {
+ const int percentageDone = std::max(1, std::min(99, (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * (nCheckLevel >= 4 ? 50 : 100))));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10;
}
uiInterface.ShowProgress(_("Verifying blocks...").translated, percentageDone, false);
- if (pindex->nHeight <= active_chainstate.m_chain.Height()-nCheckDepth)
+ if (pindex->nHeight <= chainstate.m_chain.Height()-nCheckDepth)
break;
- if (fPruneMode && !(pindex->nStatus & BLOCK_HAVE_DATA)) {
- // If pruning, only go back as far as we have data.
+ if ((fPruneMode || is_snapshot_cs) && !(pindex->nStatus & BLOCK_HAVE_DATA)) {
+ // If pruning or running under an assumeutxo snapshot, only go
+ // back as far as we have data.
LogPrintf("VerifyDB(): block verification stopping at height %d (pruning, no data)\n", pindex->nHeight);
break;
}
@@ -4154,9 +4162,11 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CChainState& active_ch
}
}
// check level 3: check for inconsistencies during memory-only disconnect of tip blocks
- if (nCheckLevel >= 3 && (coins.DynamicMemoryUsage() + active_chainstate.CoinsTip().DynamicMemoryUsage()) <= active_chainstate.m_coinstip_cache_size_bytes) {
+ size_t curr_coins_usage = coins.DynamicMemoryUsage() + chainstate.CoinsTip().DynamicMemoryUsage();
+
+ if (nCheckLevel >= 3 && curr_coins_usage <= chainstate.m_coinstip_cache_size_bytes) {
assert(coins.GetBestBlock() == pindex->GetBlockHash());
- DisconnectResult res = active_chainstate.DisconnectBlock(block, pindex, coins);
+ DisconnectResult res = chainstate.DisconnectBlock(block, pindex, coins);
if (res == DISCONNECT_FAILED) {
return error("VerifyDB(): *** irrecoverable inconsistency in block data at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
}
@@ -4170,26 +4180,26 @@ bool CVerifyDB::VerifyDB(const CChainParams& chainparams, CChainState& active_ch
if (ShutdownRequested()) return true;
}
if (pindexFailure)
- return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", active_chainstate.m_chain.Height() - pindexFailure->nHeight + 1, nGoodTransactions);
+ return error("VerifyDB(): *** coin database inconsistencies found (last %i blocks, %i good transactions before that)\n", chainstate.m_chain.Height() - pindexFailure->nHeight + 1, nGoodTransactions);
// store block count as we move pindex at check level >= 4
- int block_count = active_chainstate.m_chain.Height() - pindex->nHeight;
+ int block_count = chainstate.m_chain.Height() - pindex->nHeight;
// check level 4: try reconnecting blocks
if (nCheckLevel >= 4) {
- while (pindex != active_chainstate.m_chain.Tip()) {
- const int percentageDone = std::max(1, std::min(99, 100 - (int)(((double)(active_chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * 50)));
+ while (pindex != chainstate.m_chain.Tip()) {
+ const int percentageDone = std::max(1, std::min(99, 100 - (int)(((double)(chainstate.m_chain.Height() - pindex->nHeight)) / (double)nCheckDepth * 50)));
if (reportDone < percentageDone/10) {
// report every 10% step
LogPrintf("[%d%%]...", percentageDone); /* Continued */
reportDone = percentageDone/10;
}
uiInterface.ShowProgress(_("Verifying blocks...").translated, percentageDone, false);
- pindex = active_chainstate.m_chain.Next(pindex);
+ pindex = chainstate.m_chain.Next(pindex);
CBlock block;
if (!ReadBlockFromDisk(block, pindex, chainparams.GetConsensus()))
return error("VerifyDB(): *** ReadBlockFromDisk failed at %d, hash=%s", pindex->nHeight, pindex->GetBlockHash().ToString());
- if (!active_chainstate.ConnectBlock(block, state, pindex, coins, chainparams))
+ if (!chainstate.ConnectBlock(block, state, pindex, coins, chainparams))
return error("VerifyDB(): *** found unconnectable block at %d, hash=%s (%s)", pindex->nHeight, pindex->GetBlockHash().ToString(), state.ToString());
if (ShutdownRequested()) return true;
}
@@ -4289,143 +4299,23 @@ bool CChainState::ReplayBlocks(const CChainParams& params)
return true;
}
-//! Helper for CChainState::RewindBlockIndex
-void CChainState::EraseBlockData(CBlockIndex* index)
+bool CChainState::NeedsRedownload(const CChainParams& params) const
{
AssertLockHeld(cs_main);
- assert(!m_chain.Contains(index)); // Make sure this block isn't active
-
- // Reduce validity
- index->nStatus = std::min<unsigned int>(index->nStatus & BLOCK_VALID_MASK, BLOCK_VALID_TREE) | (index->nStatus & ~BLOCK_VALID_MASK);
- // Remove have-data flags.
- index->nStatus &= ~(BLOCK_HAVE_DATA | BLOCK_HAVE_UNDO);
- // Remove storage location.
- index->nFile = 0;
- index->nDataPos = 0;
- index->nUndoPos = 0;
- // Remove various other things
- index->nTx = 0;
- index->nChainTx = 0;
- index->nSequenceId = 0;
- // Make sure it gets written.
- setDirtyBlockIndex.insert(index);
- // Update indexes
- setBlockIndexCandidates.erase(index);
- auto ret = m_blockman.m_blocks_unlinked.equal_range(index->pprev);
- while (ret.first != ret.second) {
- if (ret.first->second == index) {
- m_blockman.m_blocks_unlinked.erase(ret.first++);
- } else {
- ++ret.first;
- }
- }
- // Mark parent as eligible for main chain again
- if (index->pprev && index->pprev->IsValid(BLOCK_VALID_TRANSACTIONS) && index->pprev->HaveTxsDownloaded()) {
- setBlockIndexCandidates.insert(index->pprev);
- }
-}
-
-bool CChainState::RewindBlockIndex(const CChainParams& params)
-{
- // Note that during -reindex-chainstate we are called with an empty m_chain!
-
- // First erase all post-segwit blocks without witness not in the main chain,
- // as this can we done without costly DisconnectTip calls. Active
- // blocks will be dealt with below (releasing cs_main in between).
- {
- LOCK(cs_main);
- for (const auto& entry : m_blockman.m_block_index) {
- if (IsWitnessEnabled(entry.second->pprev, params.GetConsensus()) && !(entry.second->nStatus & BLOCK_OPT_WITNESS) && !m_chain.Contains(entry.second)) {
- EraseBlockData(entry.second);
- }
- }
- }
-
- // Find what height we need to reorganize to.
- CBlockIndex *tip;
- int nHeight = 1;
- {
- LOCK(cs_main);
- while (nHeight <= m_chain.Height()) {
- // Although SCRIPT_VERIFY_WITNESS is now generally enforced on all
- // blocks in ConnectBlock, we don't need to go back and
- // re-download/re-verify blocks from before segwit actually activated.
- if (IsWitnessEnabled(m_chain[nHeight - 1], params.GetConsensus()) && !(m_chain[nHeight]->nStatus & BLOCK_OPT_WITNESS)) {
- break;
- }
- nHeight++;
- }
- tip = m_chain.Tip();
- }
- // nHeight is now the height of the first insufficiently-validated block, or tipheight + 1
+ // At and above params.SegwitHeight, segwit consensus rules must be validated
+ CBlockIndex* block{m_chain.Tip()};
+ const int segwit_height{params.GetConsensus().SegwitHeight};
- BlockValidationState state;
- // Loop until the tip is below nHeight, or we reach a pruned block.
- while (!ShutdownRequested()) {
- {
- LOCK(cs_main);
- LOCK(m_mempool.cs);
- // Make sure nothing changed from under us (this won't happen because RewindBlockIndex runs before importing/network are active)
- assert(tip == m_chain.Tip());
- if (tip == nullptr || tip->nHeight < nHeight) break;
- if (fPruneMode && !(tip->nStatus & BLOCK_HAVE_DATA)) {
- // If pruning, don't try rewinding past the HAVE_DATA point;
- // since older blocks can't be served anyway, there's
- // no need to walk further, and trying to DisconnectTip()
- // will fail (and require a needless reindex/redownload
- // of the blockchain).
- break;
- }
-
- // Disconnect block
- if (!DisconnectTip(state, params, nullptr)) {
- return error("RewindBlockIndex: unable to disconnect block at height %i (%s)", tip->nHeight, state.ToString());
- }
-
- // Reduce validity flag and have-data flags.
- // We do this after actual disconnecting, otherwise we'll end up writing the lack of data
- // to disk before writing the chainstate, resulting in a failure to continue if interrupted.
- // Note: If we encounter an insufficiently validated block that
- // is on m_chain, it must be because we are a pruning node, and
- // this block or some successor doesn't HAVE_DATA, so we were unable to
- // rewind all the way. Blocks remaining on m_chain at this point
- // must not have their validity reduced.
- EraseBlockData(tip);
-
- tip = tip->pprev;
- }
- // Make sure the queue of validation callbacks doesn't grow unboundedly.
- LimitValidationInterfaceQueue();
-
- // Occasionally flush state to disk.
- if (!FlushStateToDisk(params, state, FlushStateMode::PERIODIC)) {
- LogPrintf("RewindBlockIndex: unable to flush state to disk (%s)\n", state.ToString());
- return false;
- }
- }
-
- {
- LOCK(cs_main);
- if (m_chain.Tip() != nullptr) {
- // We can't prune block index candidates based on our tip if we have
- // no tip due to m_chain being empty!
- PruneBlockIndexCandidates();
-
- CheckBlockIndex(params.GetConsensus());
-
- // FlushStateToDisk can possibly read ::ChainActive(). Be conservative
- // and skip it here, we're about to -reindex-chainstate anyway, so
- // it'll get called a bunch real soon.
- BlockValidationState state;
- if (!FlushStateToDisk(params, state, FlushStateMode::ALWAYS)) {
- LogPrintf("RewindBlockIndex: unable to flush state to disk (%s)\n", state.ToString());
- return false;
- }
+ while (block != nullptr && block->nHeight >= segwit_height) {
+ if (!(block->nStatus & BLOCK_OPT_WITNESS)) {
+ // block is insufficiently validated for a segwit client
+ return true;
}
+ block = block->pprev;
}
- return true;
+ return false;
}
void CChainState::UnloadBlockIndex() {
diff --git a/src/validation.h b/src/validation.h
index 9a4b65ece6..63a8bdc096 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -196,14 +196,14 @@ struct MempoolAcceptResult {
VALID, //!> Fully validated, valid.
INVALID, //!> Invalid.
};
- ResultType m_result_type;
- TxValidationState m_state;
+ const ResultType m_result_type;
+ const TxValidationState m_state;
// The following fields are only present when m_result_type = ResultType::VALID
/** Mempool transactions replaced by the tx per BIP 125 rules. */
- std::optional<std::list<CTransactionRef>> m_replaced_transactions;
- /** Raw base fees. */
- std::optional<CAmount> m_base_fees;
+ const std::optional<std::list<CTransactionRef>> m_replaced_transactions;
+ /** Raw base fees in satoshis. */
+ const std::optional<CAmount> m_base_fees;
/** Constructor for failure case */
explicit MempoolAcceptResult(TxValidationState state)
@@ -213,7 +213,7 @@ struct MempoolAcceptResult {
/** Constructor for success case */
explicit MempoolAcceptResult(std::list<CTransactionRef>&& replaced_txns, CAmount fees)
- : m_result_type(ResultType::VALID), m_state(TxValidationState{}),
+ : m_result_type(ResultType::VALID),
m_replaced_transactions(std::move(replaced_txns)), m_base_fees(fees) {}
};
@@ -330,7 +330,12 @@ class CVerifyDB {
public:
CVerifyDB();
~CVerifyDB();
- bool VerifyDB(const CChainParams& chainparams, CChainState& active_chainstate, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ bool VerifyDB(
+ CChainState& chainstate,
+ const CChainParams& chainparams,
+ CCoinsView& coinsview,
+ int nCheckLevel,
+ int nCheckDepth) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
};
enum DisconnectResult
@@ -714,7 +719,9 @@ public:
/** Replay blocks that aren't fully applied to the database. */
bool ReplayBlocks(const CChainParams& params);
- bool RewindBlockIndex(const CChainParams& params) LOCKS_EXCLUDED(cs_main);
+
+ /** Whether the chain state needs to be redownloaded due to lack of witness data */
+ [[nodiscard]] bool NeedsRedownload(const CChainParams& params) const EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** Ensures we have a genesis block in the block tree, possibly writing one to disk. */
bool LoadGenesisBlock(const CChainParams& chainparams);
@@ -761,9 +768,6 @@ private:
bool RollforwardBlock(const CBlockIndex* pindex, CCoinsViewCache& inputs, const CChainParams& params) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
- //! Mark a block as not having block data
- void EraseBlockData(CBlockIndex* index) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
-
void CheckForkWarningConditions() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
void InvalidChainFound(CBlockIndex* pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
@@ -915,6 +919,8 @@ public:
return m_blockman.m_block_index;
}
+ //! @returns true if a snapshot-based chainstate is in use. Also implies
+ //! that a background validation chainstate is also in use.
bool IsSnapshotActive() const;
std::optional<uint256> SnapshotBlockhash() const;
diff --git a/src/wallet/coincontrol.cpp b/src/wallet/coincontrol.cpp
index 720877ead0..598c5f082c 100644
--- a/src/wallet/coincontrol.cpp
+++ b/src/wallet/coincontrol.cpp
@@ -6,21 +6,7 @@
#include <util/system.h>
-void CCoinControl::SetNull()
+CCoinControl::CCoinControl()
{
- destChange = CNoDestination();
- m_change_type.reset();
- m_add_inputs = true;
- fAllowOtherInputs = false;
- fAllowWatchOnly = false;
m_avoid_partial_spends = gArgs.GetBoolArg("-avoidpartialspends", DEFAULT_AVOIDPARTIALSPENDS);
- m_avoid_address_reuse = false;
- setSelected.clear();
- m_feerate.reset();
- fOverrideFeeRate = false;
- m_confirm_target.reset();
- m_signal_bip125_rbf.reset();
- m_fee_mode = FeeEstimateMode::UNSET;
- m_min_depth = DEFAULT_MIN_DEPTH;
- m_max_depth = DEFAULT_MAX_DEPTH;
}
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h
index d25a3fb3fa..716e1922fe 100644
--- a/src/wallet/coincontrol.h
+++ b/src/wallet/coincontrol.h
@@ -24,17 +24,17 @@ class CCoinControl
{
public:
//! Custom change destination, if not set an address is generated
- CTxDestination destChange;
+ CTxDestination destChange = CNoDestination();
//! Override the default change type if set, ignored if destChange is set
std::optional<OutputType> m_change_type;
//! If false, only selected inputs are used
- bool m_add_inputs;
+ bool m_add_inputs = true;
//! If false, allows unselected inputs, but requires all selected inputs be used
- bool fAllowOtherInputs;
+ bool fAllowOtherInputs = false;
//! Includes watch only addresses which are solvable
- bool fAllowWatchOnly;
+ bool fAllowWatchOnly = false;
//! Override automatic min/max checks on fee, m_feerate must be set if true
- bool fOverrideFeeRate;
+ bool fOverrideFeeRate = false;
//! Override the wallet's m_pay_tx_fee if set
std::optional<CFeeRate> m_feerate;
//! Override the default confirmation target if set
@@ -42,22 +42,17 @@ public:
//! Override the wallet's m_signal_rbf if set
std::optional<bool> m_signal_bip125_rbf;
//! Avoid partial use of funds sent to a given address
- bool m_avoid_partial_spends;
+ bool m_avoid_partial_spends = DEFAULT_AVOIDPARTIALSPENDS;
//! Forbids inclusion of dirty (previously used) addresses
- bool m_avoid_address_reuse;
+ bool m_avoid_address_reuse = false;
//! Fee estimation mode to control arguments to estimateSmartFee
- FeeEstimateMode m_fee_mode;
+ FeeEstimateMode m_fee_mode = FeeEstimateMode::UNSET;
//! Minimum chain depth value for coin availability
int m_min_depth = DEFAULT_MIN_DEPTH;
//! Maximum chain depth value for coin availability
int m_max_depth = DEFAULT_MAX_DEPTH;
- CCoinControl()
- {
- SetNull();
- }
-
- void SetNull();
+ CCoinControl();
bool HasSelected() const
{
diff --git a/src/wallet/coinselection.h b/src/wallet/coinselection.h
index f0e1addaf1..5c1b36be6e 100644
--- a/src/wallet/coinselection.h
+++ b/src/wallet/coinselection.h
@@ -15,6 +15,7 @@ static constexpr CAmount MIN_CHANGE{COIN / 100};
//! final minimum change amount after paying for fees
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
+/** A UTXO under consideration for use in funding a new transaction. */
class CInputCoin {
public:
CInputCoin(const CTransactionRef& tx, unsigned int i)
@@ -56,31 +57,58 @@ public:
}
};
+/** Parameters for filtering which OutputGroups we may use in coin selection.
+ * We start by being very selective and requiring multiple confirmations and
+ * then get more permissive if we cannot fund the transaction. */
struct CoinEligibilityFilter
{
+ /** Minimum number of confirmations for outputs that we sent to ourselves.
+ * We may use unconfirmed UTXOs sent from ourselves, e.g. change outputs. */
const int conf_mine;
+ /** Minimum number of confirmations for outputs received from a different
+ * wallet. We never spend unconfirmed foreign outputs as we cannot rely on these funds yet. */
const int conf_theirs;
+ /** Maximum number of unconfirmed ancestors aggregated across all UTXOs in an OutputGroup. */
const uint64_t max_ancestors;
+ /** Maximum number of descendants that a single UTXO in the OutputGroup may have. */
const uint64_t max_descendants;
- const bool m_include_partial_groups{false}; //! Include partial destination groups when avoid_reuse and there are full groups
+ /** When avoid_reuse=true and there are full groups (OUTPUT_GROUP_MAX_ENTRIES), whether or not to use any partial groups.*/
+ const bool m_include_partial_groups{false};
CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_ancestors) {}
CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors, uint64_t max_descendants) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_descendants) {}
CoinEligibilityFilter(int conf_mine, int conf_theirs, uint64_t max_ancestors, uint64_t max_descendants, bool include_partial) : conf_mine(conf_mine), conf_theirs(conf_theirs), max_ancestors(max_ancestors), max_descendants(max_descendants), m_include_partial_groups(include_partial) {}
};
+/** A group of UTXOs paid to the same output script. */
struct OutputGroup
{
+ /** The list of UTXOs contained in this output group. */
std::vector<CInputCoin> m_outputs;
+ /** Whether the UTXOs were sent by the wallet to itself. This is relevant because we may want at
+ * least a certain number of confirmations on UTXOs received from outside wallets while trusting
+ * our own UTXOs more. */
bool m_from_me{true};
+ /** The total value of the UTXOs in sum. */
CAmount m_value{0};
+ /** The minimum number of confirmations the UTXOs in the group have. Unconfirmed is 0. */
int m_depth{999};
+ /** The aggregated count of unconfirmed ancestors of all UTXOs in this
+ * group. Not deduplicated and may overestimate when ancestors are shared. */
size_t m_ancestors{0};
+ /** The maximum count of descendants of a single UTXO in this output group. */
size_t m_descendants{0};
+ /** The value of the UTXOs after deducting the cost of spending them at the effective feerate. */
CAmount effective_value{0};
+ /** The fee to spend these UTXOs at the effective feerate. */
CAmount fee{0};
+ /** The target feerate of the transaction we're trying to build. */
CFeeRate m_effective_feerate{0};
+ /** The fee to spend these UTXOs at the long term feerate. */
CAmount long_term_fee{0};
+ /** The feerate for spending a created change output eventually (i.e. not urgently, and thus at
+ * a lower feerate). Calculated using long term fee estimate. This is used to decide whether
+ * it could be economical to create a change output. */
CFeeRate m_long_term_feerate{0};
OutputGroup() {}
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 332e7b1397..f0aaee7e4e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -2478,7 +2478,7 @@ bool CWallet::SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAm
}
}
- // remove preset inputs from vCoins
+ // remove preset inputs from vCoins so that Coin Selection doesn't pick them.
for (std::vector<COutput>::iterator it = vCoins.begin(); it != vCoins.end() && coin_control.HasSelected();)
{
if (setPresetCoins.count(it->GetInputCoin()))
@@ -2490,9 +2490,9 @@ bool CWallet::SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAm
unsigned int limit_ancestor_count = 0;
unsigned int limit_descendant_count = 0;
chain().getPackageLimits(limit_ancestor_count, limit_descendant_count);
- size_t max_ancestors = (size_t)std::max<int64_t>(1, limit_ancestor_count);
- size_t max_descendants = (size_t)std::max<int64_t>(1, limit_descendant_count);
- bool fRejectLongChains = gArgs.GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS);
+ const size_t max_ancestors = (size_t)std::max<int64_t>(1, limit_ancestor_count);
+ const size_t max_descendants = (size_t)std::max<int64_t>(1, limit_descendant_count);
+ const bool fRejectLongChains = gArgs.GetBoolArg("-walletrejectlongchains", DEFAULT_WALLET_REJECT_LONG_CHAINS);
// form groups from remaining coins; note that preset coins will not
// automatically have their associated (same address) coins included
@@ -2502,16 +2502,53 @@ bool CWallet::SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAm
// explicitly shuffling the outputs before processing
Shuffle(vCoins.begin(), vCoins.end(), FastRandomContext());
}
- bool res = value_to_select <= 0 ||
- SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(1, 6, 0), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used) ||
- SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(1, 1, 0), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used) ||
- (m_spend_zero_conf_change && SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, 2), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) ||
- (m_spend_zero_conf_change && SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, std::min((size_t)4, max_ancestors/3), std::min((size_t)4, max_descendants/3)), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) ||
- (m_spend_zero_conf_change && SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, max_ancestors/2, max_descendants/2), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) ||
- (m_spend_zero_conf_change && SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, max_ancestors-1, max_descendants-1, true /* include_partial_groups */), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) ||
- (m_spend_zero_conf_change && !fRejectLongChains && SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max(), true /* include_partial_groups */), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used));
- // because SelectCoinsMinConf clears the setCoinsRet, we now add the possible inputs to the coinset
+ // Coin Selection attempts to select inputs from a pool of eligible UTXOs to fund the
+ // transaction at a target feerate. If an attempt fails, more attempts may be made using a more
+ // permissive CoinEligibilityFilter.
+ const bool res = [&] {
+ // Pre-selected inputs already cover the target amount.
+ if (value_to_select <= 0) return true;
+
+ // If possible, fund the transaction with confirmed UTXOs only. Prefer at least six
+ // confirmations on outputs received from other wallets and only spend confirmed change.
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(1, 6, 0), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) return true;
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(1, 1, 0), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) return true;
+
+ // Fall back to using zero confirmation change (but with as few ancestors in the mempool as
+ // possible) if we cannot fund the transaction otherwise. We never spend unconfirmed
+ // outputs received from other wallets.
+ if (m_spend_zero_conf_change) {
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, 2), vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) return true;
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, std::min((size_t)4, max_ancestors/3), std::min((size_t)4, max_descendants/3)),
+ vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) {
+ return true;
+ }
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, max_ancestors/2, max_descendants/2),
+ vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) {
+ return true;
+ }
+ // If partial groups are allowed, relax the requirement of spending OutputGroups (groups
+ // of UTXOs sent to the same address, which are obviously controlled by a single wallet)
+ // in their entirety.
+ if (SelectCoinsMinConf(value_to_select, CoinEligibilityFilter(0, 1, max_ancestors-1, max_descendants-1, true /* include_partial_groups */),
+ vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) {
+ return true;
+ }
+ // Try with unlimited ancestors/descendants. The transaction will still need to meet
+ // mempool ancestor/descendant policy to be accepted to mempool and broadcasted, but
+ // OutputGroups use heuristics that may overestimate ancestor/descendant counts.
+ if (!fRejectLongChains && SelectCoinsMinConf(value_to_select,
+ CoinEligibilityFilter(0, 1, std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max(), true /* include_partial_groups */),
+ vCoins, setCoinsRet, nValueRet, coin_selection_params, bnb_used)) {
+ return true;
+ }
+ }
+ // Coin Selection failed.
+ return false;
+ }();
+
+ // SelectCoinsMinConf clears setCoinsRet, so add the preset inputs from coin_control to the coinset
util::insert(setCoinsRet, setPresetCoins);
// add preset inputs to the total value selected
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index c4acef8705..03adca7a89 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -368,7 +368,7 @@ public:
CTransactionRef tx;
- /* New transactions start as UNCONFIRMED. At BlockConnected,
+ /** New transactions start as UNCONFIRMED. At BlockConnected,
* they will transition to CONFIRMED. In case of reorg, at BlockDisconnected,
* they roll back to UNCONFIRMED. If we detect a conflicting transaction at
* block connection, we update conflicted tx and its dependencies as CONFLICTED.
@@ -383,7 +383,7 @@ public:
ABANDONED
};
- /* Confirmation includes tx status and a triplet of {block height/block hash/tx index in block}
+ /** Confirmation includes tx status and a triplet of {block height/block hash/tx index in block}
* at which tx has been confirmed. All three are set to 0 if tx is unconfirmed or abandoned.
* Meaning of these fields changes with CONFLICTED state where they instead point to block hash
* and block height of the deepest conflicting tx.
@@ -481,7 +481,7 @@ public:
CAmount GetImmatureWatchOnlyCredit(const bool fUseCache = true) const;
CAmount GetChange() const;
- // Get the marginal bytes if spending the specified output from this transaction
+ /** Get the marginal bytes if spending the specified output from this transaction */
int GetSpendSize(unsigned int out, bool use_max_sig = false) const
{
return CalculateMaximumSignedInputSize(tx->vout[out], pwallet, use_max_sig);
@@ -495,7 +495,7 @@ public:
return (GetDebit(filter) > 0);
}
- // True if only scriptSigs are different
+ /** True if only scriptSigs are different */
bool IsEquivalentTo(const CWalletTx& tx) const;
bool InMempool() const;
@@ -503,7 +503,7 @@ public:
int64_t GetTxTime() const;
- // Pass this transaction to node for mempool insertion and relay to peers if flag set to true
+ /** Pass this transaction to node for mempool insertion and relay to peers if flag set to true */
bool SubmitMemoryPoolAndRelay(std::string& err_string, bool relay);
// TODO: Remove "NO_THREAD_SAFETY_ANALYSIS" and replace it with the correct
@@ -564,7 +564,15 @@ class COutput
{
public:
const CWalletTx *tx;
+
+ /** Index in tx->vout. */
int i;
+
+ /**
+ * Depth in block chain.
+ * If > 0: the tx is on chain and has this many confirmations.
+ * If = 0: the tx is waiting confirmation.
+ * If < 0: a conflicting tx is on chain and has this many confirmations. */
int nDepth;
/** Pre-computed estimated size of this output as a fully-signed input in a transaction. Can be -1 if it could not be calculated */
@@ -604,17 +612,30 @@ public:
}
};
+/** Parameters for one iteration of Coin Selection. */
struct CoinSelectionParams
{
+ /** Toggles use of Branch and Bound instead of Knapsack solver. */
bool use_bnb = true;
+ /** Size of a change output in bytes, determined by the output type. */
size_t change_output_size = 0;
+ /** Size of the input to spend a change output in virtual bytes. */
size_t change_spend_size = 0;
+ /** The targeted feerate of the transaction being built. */
CFeeRate m_effective_feerate;
+ /** The feerate estimate used to estimate an upper bound on what should be sufficient to spend
+ * the change output sometime in the future. */
CFeeRate m_long_term_feerate;
+ /** If the cost to spend a change output at the discard feerate exceeds its value, drop it to fees. */
CFeeRate m_discard_feerate;
+ /** Size of the transaction before coin selection, consisting of the header and recipient
+ * output(s), excluding the inputs and change output(s). */
size_t tx_noinputs_size = 0;
- //! Indicate that we are subtracting the fee from outputs
+ /** Indicate that we are subtracting the fee from outputs */
bool m_subtract_fee_outputs = false;
+ /** When true, always spend all (up to OUTPUT_GROUP_MAX_ENTRIES) or none of the outputs
+ * associated with the same address. This helps reduce privacy leaks resulting from address
+ * reuse. Dust outputs are not eligible to be added to output groups and thus not considered. */
bool m_avoid_partial_spends = false;
CoinSelectionParams(bool use_bnb, size_t change_output_size, size_t change_spend_size, CFeeRate effective_feerate,
@@ -652,7 +673,10 @@ private:
//! the current wallet version: clients below this version are not able to load the wallet
int nWalletVersion GUARDED_BY(cs_wallet){FEATURE_BASE};
+ /** The next scheduled rebroadcast of wallet transactions. */
int64_t nNextResend = 0;
+ /** Whether this wallet will submit newly created transactions to the node's mempool and
+ * prompt rebroadcasts (see ResendWalletTransactions()). */
bool fBroadcastTransactions = false;
// Local time that the tip block was received. Used to schedule wallet rebroadcasts.
std::atomic<int64_t> m_best_block_time {0};
@@ -682,10 +706,10 @@ private:
*/
bool AddToWalletIfInvolvingMe(const CTransactionRef& tx, CWalletTx::Confirmation confirm, bool fUpdate) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- /* Mark a transaction (and its in-wallet descendants) as conflicting with a particular block. */
+ /** Mark a transaction (and its in-wallet descendants) as conflicting with a particular block. */
void MarkConflicted(const uint256& hashBlock, int conflicting_height, const uint256& hashTx);
- /* Mark a transaction's inputs dirty, thus forcing the outputs to be recomputed */
+ /** Mark a transaction's inputs dirty, thus forcing the outputs to be recomputed */
void MarkInputsDirty(const CTransactionRef& tx) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
void SyncMetaData(std::pair<TxSpends::iterator, TxSpends::iterator>) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
@@ -694,6 +718,7 @@ private:
* Should be called with non-zero block_hash and posInBlock if this is for a transaction that is included in a block. */
void SyncTransaction(const CTransactionRef& tx, CWalletTx::Confirmation confirm, bool update_tx = true) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ /** WalletFlags set on this wallet. */
std::atomic<uint64_t> m_wallet_flags{0};
bool SetAddressBookWithDB(WalletBatch& batch, const CTxDestination& address, const std::string& strName, const std::string& strPurpose);
@@ -722,7 +747,7 @@ private:
*/
uint256 m_last_block_processed GUARDED_BY(cs_wallet);
- /* Height of last block processed is used by wallet to know depth of transactions
+ /** Height of last block processed is used by wallet to know depth of transactions
* without relying on Chain interface beyond asynchronous updates. For safety, we
* initialize it to -1. Height is a pointer on node's tip and doesn't imply
* that the wallet has scanned sequentially all blocks up to this one.
@@ -739,7 +764,7 @@ private:
bool CreateTransactionInternal(const std::vector<CRecipient>& vecSend, CTransactionRef& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, const CCoinControl& coin_control, FeeCalculation& fee_calc_out, bool sign);
public:
- /*
+ /**
* Main wallet lock.
* This lock protects all the fields added by CWallet.
*/
@@ -753,8 +778,11 @@ public:
/**
* Select a set of coins such that nValueRet >= nTargetValue and at least
- * all coins from coinControl are selected; Never select unconfirmed coins
- * if they are not ours
+ * all coins from coin_control are selected; never select unconfirmed coins if they are not ours
+ * param@[out] setCoinsRet Populated with inputs including pre-selected inputs from
+ * coin_control and Coin Selection if successful.
+ * param@[out] nValueRet Total value of selected coins including pre-selected ones
+ * from coin_control and Coin Selection if successful.
*/
bool SelectCoins(const std::vector<COutput>& vAvailableCoins, const CAmount& nTargetValue, std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet,
const CCoinControl& coin_control, CoinSelectionParams& coin_selection_params, bool& bnb_used) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
@@ -788,6 +816,8 @@ public:
/** Interface to assert chain access */
bool HaveChain() const { return m_chain ? true : false; }
+ /** Map from txid to CWalletTx for all transactions this wallet is
+ * interested in, including received and sent transactions. */
std::map<uint256, CWalletTx> mapWallet GUARDED_BY(cs_wallet);
typedef std::multimap<int64_t, CWalletTx*> TxItems;
@@ -799,6 +829,10 @@ public:
std::map<CTxDestination, CAddressBookData> m_address_book GUARDED_BY(cs_wallet);
const CAddressBookData* FindAddressBookEntry(const CTxDestination&, bool allow_change = false) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
+ /** Set of Coins owned by this wallet that we won't try to spend from. A
+ * Coin may be locked if it has already been used to fund a transaction
+ * that hasn't confirmed yet. We wouldn't consider the Coin spent already,
+ * but also shouldn't try to use it again. */
std::set<COutPoint> setLockedCoins GUARDED_BY(cs_wallet);
/** Registered interfaces::Chain::Notifications handler. */
@@ -833,6 +867,11 @@ public:
* small change; This method is stochastic for some inputs and upon
* completion the coin set and corresponding actual target value is
* assembled
+ * param@[in] coins Set of UTXOs to consider. These will be categorized into
+ * OutputGroups and filtered using eligibility_filter before
+ * selecting coins.
+ * param@[out] setCoinsRet Populated with the coins selected if successful.
+ * param@[out] nValueRet Used to return the total value of selected coins.
*/
bool SelectCoinsMinConf(const CAmount& nTargetValue, const CoinEligibilityFilter& eligibility_filter, std::vector<COutput> coins,
std::set<CInputCoin>& setCoinsRet, CAmount& nValueRet, const CoinSelectionParams& coin_selection_params, bool& bnb_used) const;
@@ -956,9 +995,9 @@ public:
* calling CreateTransaction();
*/
bool FundTransaction(CMutableTransaction& tx, CAmount& nFeeRet, int& nChangePosInOut, bilingual_str& error, bool lockUnspents, const std::set<int>& setSubtractFeeFromOutputs, CCoinControl);
- // Fetch the inputs and sign with SIGHASH_ALL.
+ /** Fetch the inputs and sign with SIGHASH_ALL. */
bool SignTransaction(CMutableTransaction& tx) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
- // Sign the tx given the input coins and sighash.
+ /** Sign the tx given the input coins and sighash. */
bool SignTransaction(CMutableTransaction& tx, const std::map<COutPoint, Coin>& coins, int sighash, std::map<int, std::string>& input_errors) const;
SigningResult SignMessage(const std::string& message, const PKHash& pkhash, std::string& str_sig) const;
@@ -1015,6 +1054,8 @@ public:
CFeeRate m_pay_tx_fee{DEFAULT_PAY_TX_FEE};
unsigned int m_confirm_target{DEFAULT_TX_CONFIRM_TARGET};
+ /** Allow Coin Selection to pick unconfirmed UTXOs that were sent from our own wallet if it
+ * cannot fund the transaction otherwise. */
bool m_spend_zero_conf_change{DEFAULT_SPEND_ZEROCONF_CHANGE};
bool m_signal_rbf{DEFAULT_WALLET_RBF};
bool m_allow_fallback_fee{true}; //!< will be false if -fallbackfee=0
@@ -1025,7 +1066,12 @@ public:
* Override with -fallbackfee
*/
CFeeRate m_fallback_fee{DEFAULT_FALLBACK_FEE};
+
+ /** If the cost to spend a change output at this feerate is greater than the value of the
+ * output itself, just drop it to fees. */
CFeeRate m_discard_rate{DEFAULT_DISCARD_FEE};
+
+ /** The maximum fee amount we're willing to pay to prioritize partial spend avoidance. */
CAmount m_max_aps_fee{DEFAULT_MAX_AVOIDPARTIALSPEND_FEE}; //!< note: this is absolute fee, not fee rate
OutputType m_default_address_type{DEFAULT_ADDRESS_TYPE};
/**
@@ -1333,10 +1379,10 @@ public:
}
};
-// Calculate the size of the transaction assuming all signatures are max size
-// Use DummySignatureCreator, which inserts 71 byte signatures everywhere.
-// NOTE: this requires that all inputs must be in mapWallet (eg the tx should
-// be IsAllFromMe).
+/** Calculate the size of the transaction assuming all signatures are max size
+* Use DummySignatureCreator, which inserts 71 byte signatures everywhere.
+* NOTE: this requires that all inputs must be in mapWallet (eg the tx should
+* be IsAllFromMe). */
std::pair<int64_t, int64_t> CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, bool use_max_sig = false) EXCLUSIVE_LOCKS_REQUIRED(wallet->cs_wallet);
std::pair<int64_t, int64_t> CalculateMaximumSignedTxSize(const CTransaction &tx, const CWallet *wallet, const std::vector<CTxOut>& txouts, bool use_max_sig = false);
diff --git a/test/functional/feature_blockfilterindex_prune.py b/test/functional/feature_blockfilterindex_prune.py
index d13d191b20..bada791fba 100755
--- a/test/functional/feature_blockfilterindex_prune.py
+++ b/test/functional/feature_blockfilterindex_prune.py
@@ -33,7 +33,7 @@ class FeatureBlockfilterindexPruneTest(BitcoinTestFramework):
self.log.info("prune some blocks")
pruneheight = self.nodes[0].pruneblockchain(400)
- assert_equal(pruneheight, 250)
+ assert_equal(pruneheight, 248)
self.log.info("check if we can access the tips blockfilter when we have pruned some blocks")
assert_greater_than(len(self.nodes[0].getblockfilter(self.nodes[0].getbestblockhash())['filter']), 0)
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py
index b7c2887ee8..f2130fb588 100755
--- a/test/functional/feature_cltv.py
+++ b/test/functional/feature_cltv.py
@@ -8,10 +8,24 @@ Test that the CHECKLOCKTIMEVERIFY soft-fork activates at (regtest) block height
1351.
"""
-from test_framework.blocktools import create_coinbase, create_block, create_transaction
-from test_framework.messages import CTransaction, msg_block, ToHex
+from test_framework.blocktools import (
+ create_block,
+ create_coinbase,
+ create_transaction,
+)
+from test_framework.messages import (
+ CTransaction,
+ ToHex,
+ msg_block,
+)
from test_framework.p2p import P2PInterface
-from test_framework.script import CScript, OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP, CScriptNum
+from test_framework.script import (
+ CScript,
+ CScriptNum,
+ OP_1NEGATE,
+ OP_CHECKLOCKTIMEVERIFY,
+ OP_DROP,
+)
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
@@ -23,32 +37,54 @@ from io import BytesIO
CLTV_HEIGHT = 1351
-def cltv_invalidate(tx):
- '''Modify the signature in vin 0 of the tx to fail CLTV
+# Helper function to modify a transaction by
+# 1) prepending a given script to the scriptSig of vin 0 and
+# 2) (optionally) modify the nSequence of vin 0 and the tx's nLockTime
+def cltv_modify_tx(node, tx, prepend_scriptsig, nsequence=None, nlocktime=None):
+ if nsequence is not None:
+ tx.vin[0].nSequence = nsequence
+ tx.nLockTime = nlocktime
+
+ # Need to re-sign, since nSequence and nLockTime changed
+ signed_result = node.signrawtransactionwithwallet(ToHex(tx))
+ new_tx = CTransaction()
+ new_tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex'])))
+ else:
+ new_tx = tx
+
+ new_tx.vin[0].scriptSig = CScript(prepend_scriptsig + list(CScript(new_tx.vin[0].scriptSig)))
+ return new_tx
+
- Prepends -1 CLTV DROP in the scriptSig itself.
+def cltv_invalidate(node, tx, failure_reason):
+ # Modify the signature in vin 0 and nSequence/nLockTime of the tx to fail CLTV
+ #
+ # According to BIP65, OP_CHECKLOCKTIMEVERIFY can fail due the following reasons:
+ # 1) the stack is empty
+ # 2) the top item on the stack is less than 0
+ # 3) the lock-time type (height vs. timestamp) of the top stack item and the
+ # nLockTime field are not the same
+ # 4) the top stack item is greater than the transaction's nLockTime field
+ # 5) the nSequence field of the txin is 0xffffffff
+ assert failure_reason in range(5)
+ scheme = [
+ # | Script to prepend to scriptSig | nSequence | nLockTime |
+ # +-------------------------------------------------+------------+--------------+
+ [[OP_CHECKLOCKTIMEVERIFY], None, None],
+ [[OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP], None, None],
+ [[CScriptNum(1000), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 1296688602], # timestamp of genesis block
+ [[CScriptNum(1000), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 500],
+ [[CScriptNum(500), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0xffffffff, 500],
+ ][failure_reason]
+
+ return cltv_modify_tx(node, tx, prepend_scriptsig=scheme[0], nsequence=scheme[1], nlocktime=scheme[2])
- TODO: test more ways that transactions using CLTV could be invalid (eg
- locktime requirements fail, sequence time requirements fail, etc).
- '''
- tx.vin[0].scriptSig = CScript([OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP] +
- list(CScript(tx.vin[0].scriptSig)))
def cltv_validate(node, tx, height):
- '''Modify the signature in vin 0 of the tx to pass CLTV
- Prepends <height> CLTV DROP in the scriptSig, and sets
- the locktime to height'''
- tx.vin[0].nSequence = 0
- tx.nLockTime = height
-
- # Need to re-sign, since nSequence and nLockTime changed
- signed_result = node.signrawtransactionwithwallet(ToHex(tx))
- new_tx = CTransaction()
- new_tx.deserialize(BytesIO(hex_str_to_bytes(signed_result['hex'])))
-
- new_tx.vin[0].scriptSig = CScript([CScriptNum(height), OP_CHECKLOCKTIMEVERIFY, OP_DROP] +
- list(CScript(new_tx.vin[0].scriptSig)))
- return new_tx
+ # Modify the signature in vin 0 and nSequence/nLockTime of the tx to pass CLTV
+ scheme = [[CScriptNum(height), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, height]
+
+ return cltv_modify_tx(node, tx, prepend_scriptsig=scheme[0], nsequence=scheme[1], nlocktime=scheme[2])
class BIP65Test(BitcoinTestFramework):
@@ -66,8 +102,7 @@ class BIP65Test(BitcoinTestFramework):
self.skip_if_no_wallet()
def test_cltv_info(self, *, is_active):
- assert_equal(self.nodes[0].getblockchaininfo()['softforks']['bip65'],
- {
+ assert_equal(self.nodes[0].getblockchaininfo()['softforks']['bip65'], {
"active": is_active,
"height": CLTV_HEIGHT,
"type": "buried",
@@ -83,18 +118,22 @@ class BIP65Test(BitcoinTestFramework):
self.coinbase_txids = [self.nodes[0].getblock(b)['tx'][0] for b in self.nodes[0].generate(CLTV_HEIGHT - 2)]
self.nodeaddress = self.nodes[0].getnewaddress()
- self.log.info("Test that an invalid-according-to-CLTV transaction can still appear in a block")
+ self.log.info("Test that invalid-according-to-CLTV transactions can still appear in a block")
- spendtx = create_transaction(self.nodes[0], self.coinbase_txids[0],
- self.nodeaddress, amount=1.0)
- cltv_invalidate(spendtx)
- spendtx.rehash()
+ # create one invalid tx per CLTV failure reason (5 in total) and collect them
+ invalid_ctlv_txs = []
+ for i in range(5):
+ spendtx = create_transaction(self.nodes[0], self.coinbase_txids[i],
+ self.nodeaddress, amount=1.0)
+ spendtx = cltv_invalidate(self.nodes[0], spendtx, i)
+ spendtx.rehash()
+ invalid_ctlv_txs.append(spendtx)
tip = self.nodes[0].getbestblockhash()
block_time = self.nodes[0].getblockheader(tip)['mediantime'] + 1
block = create_block(int(tip, 16), create_coinbase(CLTV_HEIGHT - 1), block_time)
block.nVersion = 3
- block.vtx.append(spendtx)
+ block.vtx.extend(invalid_ctlv_txs)
block.hashMerkleRoot = block.calc_merkle_root()
block.solve()
@@ -115,35 +154,46 @@ class BIP65Test(BitcoinTestFramework):
assert_equal(int(self.nodes[0].getbestblockhash(), 16), tip)
peer.sync_with_ping()
- self.log.info("Test that invalid-according-to-cltv transactions cannot appear in a block")
+ self.log.info("Test that invalid-according-to-CLTV transactions cannot appear in a block")
block.nVersion = 4
-
- spendtx = create_transaction(self.nodes[0], self.coinbase_txids[1],
- self.nodeaddress, amount=1.0)
- cltv_invalidate(spendtx)
- spendtx.rehash()
-
- # First we show that this tx is valid except for CLTV by getting it
- # rejected from the mempool for exactly that reason.
- assert_equal(
- [{
- 'txid': spendtx.hash,
- 'wtxid': spendtx.getwtxid(),
- 'allowed': False,
- 'reject-reason': 'non-mandatory-script-verify-flag (Negative locktime)',
- }],
- self.nodes[0].testmempoolaccept(rawtxs=[spendtx.serialize().hex()], maxfeerate=0),
- )
-
- # Now we verify that a block with this transaction is also invalid.
- block.vtx.append(spendtx)
- block.hashMerkleRoot = block.calc_merkle_root()
- block.solve()
-
- with self.nodes[0].assert_debug_log(expected_msgs=['CheckInputScripts on {} failed with non-mandatory-script-verify-flag (Negative locktime)'.format(block.vtx[-1].hash)]):
- peer.send_and_ping(msg_block(block))
- assert_equal(int(self.nodes[0].getbestblockhash(), 16), tip)
- peer.sync_with_ping()
+ block.vtx.append(CTransaction()) # dummy tx after coinbase that will be replaced later
+
+ # create and test one invalid tx per CLTV failure reason (5 in total)
+ for i in range(5):
+ spendtx = create_transaction(self.nodes[0], self.coinbase_txids[10+i],
+ self.nodeaddress, amount=1.0)
+ spendtx = cltv_invalidate(self.nodes[0], spendtx, i)
+ spendtx.rehash()
+
+ expected_cltv_reject_reason = [
+ "non-mandatory-script-verify-flag (Operation not valid with the current stack size)",
+ "non-mandatory-script-verify-flag (Negative locktime)",
+ "non-mandatory-script-verify-flag (Locktime requirement not satisfied)",
+ "non-mandatory-script-verify-flag (Locktime requirement not satisfied)",
+ "non-mandatory-script-verify-flag (Locktime requirement not satisfied)",
+ ][i]
+ # First we show that this tx is valid except for CLTV by getting it
+ # rejected from the mempool for exactly that reason.
+ assert_equal(
+ [{
+ 'txid': spendtx.hash,
+ 'wtxid': spendtx.getwtxid(),
+ 'allowed': False,
+ 'reject-reason': expected_cltv_reject_reason,
+ }],
+ self.nodes[0].testmempoolaccept(rawtxs=[spendtx.serialize().hex()], maxfeerate=0),
+ )
+
+ # Now we verify that a block with this transaction is also invalid.
+ block.vtx[1] = spendtx
+ block.hashMerkleRoot = block.calc_merkle_root()
+ block.solve()
+
+ with self.nodes[0].assert_debug_log(expected_msgs=['CheckInputScripts on {} failed with {}'.format(
+ block.vtx[-1].hash, expected_cltv_reject_reason)]):
+ peer.send_and_ping(msg_block(block))
+ assert_equal(int(self.nodes[0].getbestblockhash(), 16), tip)
+ peer.sync_with_ping()
self.log.info("Test that a version 4 block with a valid-according-to-CLTV transaction is accepted")
spendtx = cltv_validate(self.nodes[0], spendtx, CLTV_HEIGHT - 1)
diff --git a/test/functional/feature_notifications.py b/test/functional/feature_notifications.py
index 4e2de1daf4..6fc8773ee3 100755
--- a/test/functional/feature_notifications.py
+++ b/test/functional/feature_notifications.py
@@ -166,6 +166,8 @@ class NotificationsTest(BitcoinTestFramework):
# Should now verify contents of each file
for tx_id, blockheight, blockhash in tx_details:
fname = os.path.join(self.walletnotify_dir, notify_outputname(self.wallet, tx_id))
+ # Wait for the cached writes to hit storage
+ self.wait_until(lambda: os.path.getsize(fname) > 0, timeout=10)
with open(fname, 'rt', encoding='utf-8') as f:
text = f.read()
# Universal newline ensures '\n' on 'nt'
diff --git a/test/functional/mempool_spend_coinbase.py b/test/functional/mempool_spend_coinbase.py
index a249a73315..b900aa0b9c 100755
--- a/test/functional/mempool_spend_coinbase.py
+++ b/test/functional/mempool_spend_coinbase.py
@@ -20,40 +20,41 @@ from test_framework.wallet import MiniWallet
class MempoolSpendCoinbaseTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
- self.setup_clean_chain = True
def run_test(self):
wallet = MiniWallet(self.nodes[0])
- wallet.generate(200)
- chain_height = self.nodes[0].getblockcount()
- assert_equal(chain_height, 200)
+ # Invalidate two blocks, so that miniwallet has access to a coin that will mature in the next block
+ chain_height = 198
+ self.nodes[0].invalidateblock(self.nodes[0].getblockhash(chain_height + 1))
+ assert_equal(chain_height, self.nodes[0].getblockcount())
# Coinbase at height chain_height-100+1 ok in mempool, should
# get mined. Coinbase at height chain_height-100+2 is
# too immature to spend.
- b = [self.nodes[0].getblockhash(n) for n in range(101, 103)]
- coinbase_txids = [self.nodes[0].getblock(h)['tx'][0] for h in b]
- utxo_101 = wallet.get_utxo(txid=coinbase_txids[0])
- utxo_102 = wallet.get_utxo(txid=coinbase_txids[1])
+ wallet.scan_blocks(start=chain_height - 100 + 1, num=1)
+ utxo_mature = wallet.get_utxo()
+ wallet.scan_blocks(start=chain_height - 100 + 2, num=1)
+ utxo_immature = wallet.get_utxo()
- spend_101_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_101)["txid"]
+ spend_mature_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_mature)["txid"]
- # coinbase at height 102 should be too immature to spend
+ # other coinbase should be too immature to spend
+ immature_tx = wallet.create_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_immature, mempool_valid=False)
assert_raises_rpc_error(-26,
"bad-txns-premature-spend-of-coinbase",
- lambda: wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_102))
+ lambda: self.nodes[0].sendrawtransaction(immature_tx['hex']))
- # mempool should have just spend_101:
- assert_equal(self.nodes[0].getrawmempool(), [spend_101_id])
+ # mempool should have just the mature one
+ assert_equal(self.nodes[0].getrawmempool(), [spend_mature_id])
- # mine a block, spend_101 should get confirmed
+ # mine a block, mature one should get confirmed
self.nodes[0].generate(1)
assert_equal(set(self.nodes[0].getrawmempool()), set())
- # ... and now height 102 can be spent:
- spend_102_id = wallet.send_self_transfer(from_node=self.nodes[0], utxo_to_spend=utxo_102)["txid"]
- assert_equal(self.nodes[0].getrawmempool(), [spend_102_id])
+ # ... and now previously immature can be spent:
+ spend_new_id = self.nodes[0].sendrawtransaction(immature_tx['hex'])
+ assert_equal(self.nodes[0].getrawmempool(), [spend_new_id])
if __name__ == '__main__':
diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py
index 69821763bd..87297989ba 100755
--- a/test/functional/p2p_addr_relay.py
+++ b/test/functional/p2p_addr_relay.py
@@ -11,6 +11,7 @@ from test_framework.messages import (
NODE_NETWORK,
NODE_WITNESS,
msg_addr,
+ msg_getaddr
)
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
@@ -19,18 +20,6 @@ from test_framework.util import (
)
import time
-# Keep this with length <= 10. Addresses from larger messages are not relayed.
-ADDRS = []
-num_ipv4_addrs = 10
-
-for i in range(num_ipv4_addrs):
- addr = CAddress()
- addr.time = int(time.time()) + i
- addr.nServices = NODE_NETWORK | NODE_WITNESS
- addr.ip = "123.123.123.{}".format(i % 256)
- addr.port = 8333 + i
- ADDRS.append(addr)
-
class AddrReceiver(P2PInterface):
num_ipv4_received = 0
@@ -44,36 +33,87 @@ class AddrReceiver(P2PInterface):
self.num_ipv4_received += 1
+class GetAddrStore(P2PInterface):
+ getaddr_received = False
+ num_ipv4_received = 0
+
+ def on_getaddr(self, message):
+ self.getaddr_received = True
+
+ def on_addr(self, message):
+ for addr in message.addrs:
+ self.num_ipv4_received += 1
+
+ def addr_received(self):
+ return self.num_ipv4_received != 0
+
+
class AddrTest(BitcoinTestFramework):
+ counter = 0
+ mocktime = int(time.time())
+
def set_test_params(self):
self.num_nodes = 1
def run_test(self):
- self.log.info('Create connection that sends addr messages')
- addr_source = self.nodes[0].add_p2p_connection(P2PInterface())
+ self.oversized_addr_test()
+ self.relay_tests()
+ self.getaddr_tests()
+ self.blocksonly_mode_tests()
+
+ def setup_addr_msg(self, num):
+ addrs = []
+ for i in range(num):
+ addr = CAddress()
+ addr.time = self.mocktime + i
+ addr.nServices = NODE_NETWORK | NODE_WITNESS
+ addr.ip = f"123.123.123.{self.counter % 256}"
+ addr.port = 8333 + i
+ addrs.append(addr)
+ self.counter += 1
+
msg = msg_addr()
+ msg.addrs = addrs
+ return msg
+
+ def send_addr_msg(self, source, msg, receivers):
+ source.send_and_ping(msg)
+ # pop m_next_addr_send timer
+ self.mocktime += 5 * 60
+ self.nodes[0].setmocktime(self.mocktime)
+ for peer in receivers:
+ peer.sync_send_with_ping()
- self.log.info('Send too-large addr message')
- msg.addrs = ADDRS * 101 # more than 1000 addresses in one message
+ def oversized_addr_test(self):
+ self.log.info('Send an addr message that is too large')
+ addr_source = self.nodes[0].add_p2p_connection(P2PInterface())
+
+ msg = self.setup_addr_msg(1010)
with self.nodes[0].assert_debug_log(['addr message size = 1010']):
addr_source.send_and_ping(msg)
+ self.nodes[0].disconnect_p2ps()
+
+ def relay_tests(self):
+ self.log.info('Test address relay')
self.log.info('Check that addr message content is relayed and added to addrman')
+ addr_source = self.nodes[0].add_p2p_connection(P2PInterface())
num_receivers = 7
receivers = []
for _ in range(num_receivers):
receivers.append(self.nodes[0].add_p2p_connection(AddrReceiver()))
- msg.addrs = ADDRS
+
+ # Keep this with length <= 10. Addresses from larger messages are not
+ # relayed.
+ num_ipv4_addrs = 10
+ msg = self.setup_addr_msg(num_ipv4_addrs)
with self.nodes[0].assert_debug_log(
[
'Added {} addresses from 127.0.0.1: 0 tried'.format(num_ipv4_addrs),
- 'received: addr (301 bytes) peer=0',
+ 'received: addr (301 bytes) peer=1',
]
):
- addr_source.send_and_ping(msg)
- self.nodes[0].setmocktime(int(time.time()) + 30 * 60)
- for receiver in receivers:
- receiver.sync_with_ping()
+ self.send_addr_msg(addr_source, msg, receivers)
total_ipv4_received = sum(r.num_ipv4_received for r in receivers)
@@ -82,6 +122,92 @@ class AddrTest(BitcoinTestFramework):
ipv4_branching_factor = 2
assert_equal(total_ipv4_received, num_ipv4_addrs * ipv4_branching_factor)
+ self.nodes[0].disconnect_p2ps()
+
+ self.log.info('Check relay of addresses received from outbound peers')
+ inbound_peer = self.nodes[0].add_p2p_connection(AddrReceiver())
+ full_outbound_peer = self.nodes[0].add_outbound_p2p_connection(GetAddrStore(), p2p_idx=0, connection_type="outbound-full-relay")
+ msg = self.setup_addr_msg(2)
+ self.send_addr_msg(full_outbound_peer, msg, [inbound_peer])
+ self.log.info('Check that the first addr message received from an outbound peer is not relayed')
+ # Currently, there is a flag that prevents the first addr message received
+ # from a new outbound peer to be relayed to others. Originally meant to prevent
+ # large GETADDR responses from being relayed, it now typically affects the self-announcement
+ # of the outbound peer which is often sent before the GETADDR response.
+ assert_equal(inbound_peer.num_ipv4_received, 0)
+
+ self.log.info('Check that subsequent addr messages sent from an outbound peer are relayed')
+ msg2 = self.setup_addr_msg(2)
+ self.send_addr_msg(full_outbound_peer, msg2, [inbound_peer])
+ assert_equal(inbound_peer.num_ipv4_received, 2)
+
+ self.log.info('Check address relay to outbound peers')
+ block_relay_peer = self.nodes[0].add_outbound_p2p_connection(GetAddrStore(), p2p_idx=1, connection_type="block-relay-only")
+ msg3 = self.setup_addr_msg(2)
+ self.send_addr_msg(inbound_peer, msg3, [full_outbound_peer, block_relay_peer])
+
+ self.log.info('Check that addresses are relayed to full outbound peers')
+ assert_equal(full_outbound_peer.num_ipv4_received, 2)
+ self.log.info('Check that addresses are not relayed to block-relay-only outbound peers')
+ assert_equal(block_relay_peer.num_ipv4_received, 0)
+
+ self.nodes[0].disconnect_p2ps()
+
+ def getaddr_tests(self):
+ self.log.info('Test getaddr behavior')
+ self.log.info('Check that we send a getaddr message upon connecting to an outbound-full-relay peer')
+ full_outbound_peer = self.nodes[0].add_outbound_p2p_connection(GetAddrStore(), p2p_idx=0, connection_type="outbound-full-relay")
+ full_outbound_peer.sync_with_ping()
+ assert full_outbound_peer.getaddr_received
+
+ self.log.info('Check that we do not send a getaddr message upon connecting to a block-relay-only peer')
+ block_relay_peer = self.nodes[0].add_outbound_p2p_connection(GetAddrStore(), p2p_idx=1, connection_type="block-relay-only")
+ block_relay_peer.sync_with_ping()
+ assert_equal(block_relay_peer.getaddr_received, False)
+
+ self.log.info('Check that we answer getaddr messages only from inbound peers')
+ inbound_peer = self.nodes[0].add_p2p_connection(GetAddrStore())
+ inbound_peer.sync_with_ping()
+
+ # Add some addresses to addrman
+ for i in range(1000):
+ first_octet = i >> 8
+ second_octet = i % 256
+ a = f"{first_octet}.{second_octet}.1.1"
+ self.nodes[0].addpeeraddress(a, 8333)
+
+ full_outbound_peer.send_and_ping(msg_getaddr())
+ block_relay_peer.send_and_ping(msg_getaddr())
+ inbound_peer.send_and_ping(msg_getaddr())
+
+ self.mocktime += 5 * 60
+ self.nodes[0].setmocktime(self.mocktime)
+ inbound_peer.wait_until(inbound_peer.addr_received)
+
+ assert_equal(full_outbound_peer.num_ipv4_received, 0)
+ assert_equal(block_relay_peer.num_ipv4_received, 0)
+ assert inbound_peer.num_ipv4_received > 100
+
+ self.nodes[0].disconnect_p2ps()
+
+ def blocksonly_mode_tests(self):
+ self.log.info('Test addr relay in -blocksonly mode')
+ self.restart_node(0, ["-blocksonly"])
+ self.mocktime = int(time.time())
+
+ self.log.info('Check that we send getaddr messages')
+ full_outbound_peer = self.nodes[0].add_outbound_p2p_connection(GetAddrStore(), p2p_idx=0, connection_type="outbound-full-relay")
+ full_outbound_peer.sync_with_ping()
+ assert full_outbound_peer.getaddr_received
+
+ self.log.info('Check that we relay address messages')
+ addr_source = self.nodes[0].add_p2p_connection(P2PInterface())
+ msg = self.setup_addr_msg(2)
+ self.send_addr_msg(addr_source, msg, [full_outbound_peer])
+ assert_equal(full_outbound_peer.num_ipv4_received, 2)
+
+ self.nodes[0].disconnect_p2ps()
+
if __name__ == '__main__':
AddrTest().main()
diff --git a/test/functional/p2p_blocksonly.py b/test/functional/p2p_blocksonly.py
index 6584efae79..445cea6186 100755
--- a/test/functional/p2p_blocksonly.py
+++ b/test/functional/p2p_blocksonly.py
@@ -89,11 +89,7 @@ class P2PBlocksOnly(BitcoinTestFramework):
# Bump time forward to ensure nNextInvSend timer pops
self.nodes[0].setmocktime(int(time.time()) + 60)
- # Calling sync_with_ping twice requires that the node calls
- # `ProcessMessage` twice, and thus ensures `SendMessages` must have
- # been called at least once
- conn.sync_with_ping()
- conn.sync_with_ping()
+ conn.sync_send_with_ping()
assert(int(txid, 16) not in conn.get_invs())
def check_p2p_tx_violation(self, index=1):
diff --git a/test/functional/p2p_filter.py b/test/functional/p2p_filter.py
index 4bee33f825..359cfb9c34 100755
--- a/test/functional/p2p_filter.py
+++ b/test/functional/p2p_filter.py
@@ -174,8 +174,7 @@ class FilterTest(BitcoinTestFramework):
filter_peer.merkleblock_received = False
filter_peer.tx_received = False
self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 90)
- filter_peer.sync_with_ping()
- filter_peer.sync_with_ping()
+ filter_peer.sync_send_with_ping()
assert not filter_peer.merkleblock_received
assert not filter_peer.tx_received
diff --git a/test/functional/p2p_segwit.py b/test/functional/p2p_segwit.py
index 54891b07e1..9d32c1cb86 100755
--- a/test/functional/p2p_segwit.py
+++ b/test/functional/p2p_segwit.py
@@ -164,7 +164,7 @@ class TestP2PConn(P2PInterface):
def on_wtxidrelay(self, message):
self.last_wtxidrelay.append(message)
- def announce_tx_and_wait_for_getdata(self, tx, timeout=60, success=True, use_wtxid=False):
+ def announce_tx_and_wait_for_getdata(self, tx, success=True, use_wtxid=False):
if success:
# sanity check
assert (self.wtxidrelay and use_wtxid) or (not self.wtxidrelay and not use_wtxid)
@@ -178,11 +178,11 @@ class TestP2PConn(P2PInterface):
if success:
if use_wtxid:
- self.wait_for_getdata([wtxid], timeout)
+ self.wait_for_getdata([wtxid])
else:
- self.wait_for_getdata([tx.sha256], timeout)
+ self.wait_for_getdata([tx.sha256])
else:
- time.sleep(timeout)
+ time.sleep(5)
assert not self.last_message.get("getdata")
def announce_block_and_wait_for_getdata(self, block, use_header, timeout=60):
@@ -604,7 +604,7 @@ class SegWitTest(BitcoinTestFramework):
# Since we haven't delivered the tx yet, inv'ing the same tx from
# a witness transaction ought not result in a getdata.
- self.test_node.announce_tx_and_wait_for_getdata(tx, timeout=2, success=False)
+ self.test_node.announce_tx_and_wait_for_getdata(tx, success=False)
# Delivering this transaction with witness should fail (no matter who
# its from)
@@ -1461,7 +1461,7 @@ class SegWitTest(BitcoinTestFramework):
self.std_node.announce_tx_and_wait_for_getdata(tx3)
test_transaction_acceptance(self.nodes[1], self.std_node, tx3, with_witness=True, accepted=False, reason="bad-txns-nonstandard-inputs")
# Now the node will no longer ask for getdata of this transaction when advertised by same txid
- self.std_node.announce_tx_and_wait_for_getdata(tx3, timeout=5, success=False)
+ self.std_node.announce_tx_and_wait_for_getdata(tx3, success=False)
# Spending a higher version witness output is not allowed by policy,
# even with fRequireStandard=false.
@@ -1956,22 +1956,34 @@ class SegWitTest(BitcoinTestFramework):
def test_upgrade_after_activation(self):
"""Test the behavior of starting up a segwit-aware node after the softfork has activated."""
- self.restart_node(2, extra_args=["-segwitheight={}".format(SEGWIT_HEIGHT)])
+ # All nodes are caught up and node 2 is a pre-segwit node that will soon upgrade.
+ for n in range(2):
+ assert_equal(self.nodes[n].getblockcount(), self.nodes[2].getblockcount())
+ assert softfork_active(self.nodes[n], "segwit")
+ assert SEGWIT_HEIGHT < self.nodes[2].getblockcount()
+ assert 'segwit' not in self.nodes[2].getblockchaininfo()['softforks']
+
+ # Restarting node 2 should result in a shutdown because the blockchain consists of
+ # insufficiently validated blocks per segwit consensus rules.
+ self.stop_node(2)
+ self.nodes[2].assert_start_raises_init_error(
+ extra_args=[f"-segwitheight={SEGWIT_HEIGHT}"],
+ expected_msg=f": Witness data for blocks after height {SEGWIT_HEIGHT} requires validation. Please restart with -reindex..\nPlease restart with -reindex or -reindex-chainstate to recover.",
+ )
+
+ # As directed, the user restarts the node with -reindex
+ self.start_node(2, extra_args=["-reindex", f"-segwitheight={SEGWIT_HEIGHT}"])
+
+ # With the segwit consensus rules, the node is able to validate only up to SEGWIT_HEIGHT - 1
+ assert_equal(self.nodes[2].getblockcount(), SEGWIT_HEIGHT - 1)
self.connect_nodes(0, 2)
# We reconnect more than 100 blocks, give it plenty of time
+ # sync_blocks() also verifies the best block hash is the same for all nodes
self.sync_blocks(timeout=240)
- # Make sure that this peer thinks segwit has activated.
- assert softfork_active(self.nodes[2], 'segwit')
-
- # Make sure this peer's blocks match those of node0.
- height = self.nodes[2].getblockcount()
- while height >= 0:
- block_hash = self.nodes[2].getblockhash(height)
- assert_equal(block_hash, self.nodes[0].getblockhash(height))
- assert_equal(self.nodes[0].getblock(block_hash), self.nodes[2].getblock(block_hash))
- height -= 1
+ # The upgraded node should now have segwit activated
+ assert softfork_active(self.nodes[2], "segwit")
@subtest # type: ignore
def test_witness_sigops(self):
diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py
index 5c26039d04..52c8fa883d 100755
--- a/test/functional/rpc_misc.py
+++ b/test/functional/rpc_misc.py
@@ -61,6 +61,9 @@ class RpcMiscTest(BitcoinTestFramework):
node.logging(include=['qt'])
assert_equal(node.logging()['qt'], True)
+ self.log.info("test echoipc (testing spawned process in multiprocess build)")
+ assert_equal(node.echoipc("hello"), "hello")
+
self.log.info("test getindexinfo")
# Without any indices running the RPC returns an empty object
assert_equal(node.getindexinfo(), {})
diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py
index 05099f3339..cc80b543cd 100755
--- a/test/functional/test_framework/p2p.py
+++ b/test/functional/test_framework/p2p.py
@@ -539,8 +539,16 @@ class P2PInterface(P2PConnection):
self.send_message(message)
self.sync_with_ping(timeout=timeout)
- # Sync up with the node
+ def sync_send_with_ping(self, timeout=60):
+ """Ensure SendMessages is called on this connection"""
+ # Calling sync_with_ping twice requires that the node calls
+ # `ProcessMessage` twice, and thus ensures `SendMessages` must have
+ # been called at least once
+ self.sync_with_ping()
+ self.sync_with_ping()
+
def sync_with_ping(self, timeout=60):
+ """Ensure ProcessMessages is called on this connection"""
self.send_message(msg_ping(nonce=self.ping_counter))
def test_function():
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 5c10cc3687..a89a26caea 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -739,11 +739,12 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
# block in the cache does not age too much (have an old tip age).
# This is needed so that we are out of IBD when the test starts,
# see the tip age check in IsInitialBlockDownload().
- gen_addresses = [k.address for k in TestNode.PRIV_KEYS] + [ADDRESS_BCRT1_P2WSH_OP_TRUE]
+ gen_addresses = [k.address for k in TestNode.PRIV_KEYS][:3] + [ADDRESS_BCRT1_P2WSH_OP_TRUE]
+ assert_equal(len(gen_addresses), 4)
for i in range(8):
cache_node.generatetoaddress(
nblocks=25 if i != 7 else 24,
- address=gen_addresses[i % 4],
+ address=gen_addresses[i % len(gen_addresses)],
)
assert_equal(cache_node.getblockchaininfo()["blocks"], 199)
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index ce9c1bc024..c17c16f797 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -491,6 +491,7 @@ class TestNode():
self.start(extra_args, stdout=log_stdout, stderr=log_stderr, *args, **kwargs)
ret = self.process.wait(timeout=self.rpc_timeout)
self.log.debug(self._node_msg(f'bitcoind exited with status {ret} during initialization'))
+ assert ret != 0 # Exit code must indicate failure
self.running = False
self.process = None
# Check stderr for expected message
diff --git a/test/functional/test_framework/wallet.py b/test/functional/test_framework/wallet.py
index a906a21dd0..59ef18635b 100644
--- a/test/functional/test_framework/wallet.py
+++ b/test/functional/test_framework/wallet.py
@@ -37,9 +37,13 @@ class MiniWallet:
for i in range(start, start + num):
block = self._test_node.getblock(blockhash=self._test_node.getblockhash(i), verbosity=2)
for tx in block['tx']:
- for out in tx['vout']:
- if out['scriptPubKey']['hex'] == self._scriptPubKey.hex():
- self._utxos.append({'txid': tx['txid'], 'vout': out['n'], 'value': out['value']})
+ self.scan_tx(tx)
+
+ def scan_tx(self, tx):
+ """Scan the tx for self._scriptPubKey outputs and add them to self._utxos"""
+ for out in tx['vout']:
+ if out['scriptPubKey']['hex'] == self._scriptPubKey.hex():
+ self._utxos.append({'txid': tx['txid'], 'vout': out['n'], 'value': out['value']})
def generate(self, num_blocks):
"""Generate blocks with coinbase outputs to the internal address, and append the outputs to the internal list"""
@@ -69,6 +73,12 @@ class MiniWallet:
def send_self_transfer(self, *, fee_rate=Decimal("0.003"), from_node, utxo_to_spend=None):
"""Create and send a tx with the specified fee_rate. Fee may be exact or at most one satoshi higher than needed."""
+ tx = self.create_self_transfer(fee_rate=fee_rate, from_node=from_node, utxo_to_spend=utxo_to_spend)
+ self.sendrawtransaction(from_node=from_node, tx_hex=tx['hex'])
+ return tx
+
+ def create_self_transfer(self, *, fee_rate=Decimal("0.003"), from_node, utxo_to_spend=None, mempool_valid=True):
+ """Create and return a tx with the specified fee_rate. Fee may be exact or at most one satoshi higher than needed."""
self._utxos = sorted(self._utxos, key=lambda k: k['value'])
utxo_to_spend = utxo_to_spend or self._utxos.pop() # Pick the largest utxo (if none provided) and hope it covers the fee
vsize = Decimal(96)
@@ -84,8 +94,12 @@ class MiniWallet:
tx_hex = tx.serialize().hex()
tx_info = from_node.testmempoolaccept([tx_hex])[0]
- self._utxos.append({'txid': tx_info['txid'], 'vout': 0, 'value': send_value})
- from_node.sendrawtransaction(tx_hex)
- assert_equal(tx_info['vsize'], vsize)
- assert_equal(tx_info['fees']['base'], fee)
+ assert_equal(mempool_valid, tx_info['allowed'])
+ if mempool_valid:
+ assert_equal(tx_info['vsize'], vsize)
+ assert_equal(tx_info['fees']['base'], fee)
return {'txid': tx_info['txid'], 'wtxid': tx_info['wtxid'], 'hex': tx_hex}
+
+ def sendrawtransaction(self, *, from_node, tx_hex):
+ from_node.sendrawtransaction(tx_hex)
+ self.scan_tx(from_node.decoderawtransaction(tx_hex))
diff --git a/test/lint/lint-include-guards.sh b/test/lint/lint-include-guards.sh
index 5cfa41537f..c23b903bce 100755
--- a/test/lint/lint-include-guards.sh
+++ b/test/lint/lint-include-guards.sh
@@ -15,7 +15,7 @@ REGEXP_EXCLUDE_FILES_WITH_PREFIX="src/(crypto/ctaes/|leveldb/|crc32c/|secp256k1/
EXIT_CODE=0
for HEADER_FILE in $(git ls-files -- "*.h" | grep -vE "^${REGEXP_EXCLUDE_FILES_WITH_PREFIX}")
do
- HEADER_ID_BASE=$(cut -f2- -d/ <<< "${HEADER_FILE}" | sed "s/\.h$//g" | tr / _ | tr "[:lower:]" "[:upper:]")
+ HEADER_ID_BASE=$(cut -f2- -d/ <<< "${HEADER_FILE}" | sed "s/\.h$//g" | tr / _ | tr - _ | tr "[:lower:]" "[:upper:]")
HEADER_ID="${HEADER_ID_PREFIX}${HEADER_ID_BASE}${HEADER_ID_SUFFIX}"
if [[ $(grep -cE "^#(ifndef|define) ${HEADER_ID}" "${HEADER_FILE}") != 2 ]]; then
echo "${HEADER_FILE} seems to be missing the expected include guard:"
diff --git a/test/sanitizer_suppressions/ubsan b/test/sanitizer_suppressions/ubsan
index 27885b094e..3bcc554acb 100644
--- a/test/sanitizer_suppressions/ubsan
+++ b/test/sanitizer_suppressions/ubsan
@@ -96,6 +96,7 @@ implicit-unsigned-integer-truncation:crypto/
implicit-unsigned-integer-truncation:leveldb/
# std::variant warning fixed in https://github.com/gcc-mirror/gcc/commit/074436cf8cdd2a9ce75cadd36deb8301f00e55b9
implicit-unsigned-integer-truncation:std::__detail::__variant::_Variant_storage
+shift-base:nanobench.h
shift-base:*/include/c++/
shift-base:arith_uint256.cpp
shift-base:crypto/