mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-30 03:46:45 +01:00
Compare commits
46 Commits
v30.2
...
v0.18.0rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a178e5261 | ||
|
|
7630301c16 | ||
|
|
b702e3757e | ||
|
|
742f7dd972 | ||
|
|
37f236acc6 | ||
|
|
f9dbb319d2 | ||
|
|
f13ad1cae0 | ||
|
|
dc251de6a5 | ||
|
|
9586157c0f | ||
|
|
a6d7026a45 | ||
|
|
e8612adc5d | ||
|
|
ca253f6ebf | ||
|
|
fa852f0e8d | ||
|
|
aeb7fbfd69 | ||
|
|
1675b7ce55 | ||
|
|
4566011631 | ||
|
|
6b9f45e81b | ||
|
|
7aa6a8aefb | ||
|
|
29c24b05fb | ||
|
|
4a5e52cb51 | ||
|
|
20268c6d76 | ||
|
|
a0d4e79b4d | ||
|
|
a4f9c024c6 | ||
|
|
6f43ed4c5a | ||
|
|
fa466cbc50 | ||
|
|
2fa85ebd1c | ||
|
|
d88f7f8764 | ||
|
|
9999879f56 | ||
|
|
fa9ff8fe21 | ||
|
|
8f470ecc53 | ||
|
|
fa2cdc9ac2 | ||
|
|
ef362f2773 | ||
|
|
b4fc5257b7 | ||
|
|
3f5ad622e5 | ||
|
|
1a8a5ede9f | ||
|
|
6ad79cbd56 | ||
|
|
a720a98301 | ||
|
|
f3f9c1de19 | ||
|
|
169dced9a4 | ||
|
|
fa4ce7038d | ||
|
|
fa05626ca7 | ||
|
|
fa25210d62 | ||
|
|
1111aecbb5 | ||
|
|
fab0d85802 | ||
|
|
39e20fc54f | ||
|
|
fa9b60c842 |
@@ -11,15 +11,15 @@ environment:
|
||||
PATH: 'C:\Python37-x64;C:\Python37-x64\Scripts;%PATH%'
|
||||
PYTHONUTF8: 1
|
||||
cache:
|
||||
- C:\tools\vcpkg\installed -> appveyor.yml
|
||||
- C:\Users\appveyor\clcache -> appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
|
||||
- C:\tools\vcpkg\installed -> .appveyor.yml
|
||||
- C:\Users\appveyor\clcache -> .appveyor.yml, build_msvc\**, **\Makefile.am, **\*.vcxproj.in
|
||||
install:
|
||||
- cmd: pip install --quiet git+https://github.com/frerich/clcache.git@v4.2.0
|
||||
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
|
||||
# - cmd: pip install zmq
|
||||
- cmd: echo set(VCPKG_BUILD_TYPE release) >> C:\tools\vcpkg\triplets\%PLATFORM%-windows-static.cmake
|
||||
- cmd: vcpkg remove --outdated --recurse
|
||||
- cmd: vcpkg install --triplet %PLATFORM%-windows-static %PACKAGES% > NUL
|
||||
- cmd: del /s /q C:\Tools\vcpkg\installed\%PLATFORM%-windows-static\debug # Remove unused debug library
|
||||
before_build:
|
||||
- ps: clcache -M 536870912
|
||||
- cmd: python build_msvc\msvc-autogen.py
|
||||
|
||||
@@ -146,7 +146,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -164,7 +163,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -180,7 +178,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -198,7 +195,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -113,7 +113,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -131,7 +130,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -147,7 +145,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -165,7 +162,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -134,7 +133,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -150,7 +148,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -168,7 +165,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -152,7 +151,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -168,7 +166,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -186,7 +183,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -96,7 +95,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -115,7 +113,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -138,7 +135,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<DisableSpecificWarnings>4018;4244;4267;4715;4805;</DisableSpecificWarnings>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
</Project>
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -116,7 +115,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -131,7 +129,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -148,7 +145,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -91,7 +91,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
@@ -109,7 +108,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
@@ -129,7 +127,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
@@ -151,7 +148,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
|
||||
@@ -89,7 +89,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -104,7 +103,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -121,7 +119,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -140,7 +137,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -89,9 +89,8 @@
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -104,9 +103,8 @@
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -122,9 +120,8 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -141,9 +138,8 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -92,7 +92,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -112,7 +111,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -134,7 +132,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -158,7 +155,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\wallet;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
@@ -113,7 +112,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\wallet;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
@@ -131,7 +129,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\wallet;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
@@ -151,7 +148,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\wallet;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -113,7 +112,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -131,7 +129,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -151,7 +148,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -113,7 +112,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -131,7 +129,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
@@ -151,7 +148,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
</ClCompile>
|
||||
|
||||
@@ -126,7 +126,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -143,7 +142,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
@@ -162,7 +160,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
@@ -183,7 +180,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>false</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\secp256k1\include;</AdditionalIncludeDirectories>
|
||||
<ExceptionHandling>Sync</ExceptionHandling>
|
||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
|
||||
@@ -135,7 +135,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\test;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -152,7 +151,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\test;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -170,7 +168,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\test;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -190,7 +187,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\leveldb\include;..\..\src\test;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src\;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -110,7 +109,6 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src\;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -129,7 +127,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src\;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -148,7 +145,6 @@
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>HAVE_CONFIG_H;WIN32;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<AdditionalIncludeDirectories>..\..\src\;</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
|
||||
AC_PREREQ([2.60])
|
||||
define(_CLIENT_VERSION_MAJOR, 0)
|
||||
define(_CLIENT_VERSION_MINOR, 17)
|
||||
define(_CLIENT_VERSION_REVISION, 99)
|
||||
define(_CLIENT_VERSION_MINOR, 18)
|
||||
define(_CLIENT_VERSION_REVISION, 0)
|
||||
define(_CLIENT_VERSION_BUILD, 0)
|
||||
define(_CLIENT_VERSION_RC, 0)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, false)
|
||||
define(_CLIENT_VERSION_RC, 1)
|
||||
define(_CLIENT_VERSION_IS_RELEASE, true)
|
||||
define(_COPYRIGHT_YEAR, 2019)
|
||||
define(_COPYRIGHT_HOLDERS,[The %s developers])
|
||||
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Bitcoin Core]])
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Miscellaneous RPC Changes
|
||||
-------------------------
|
||||
- Descriptors with key origin information imported through `importmulti` will have their key origin information stored in the wallet for use with creating PSBTs.
|
||||
- If `bip32derivs` of both `walletprocesspsbt` and `walletcreatefundedpsbt` is set to true but the key metadata for a public key has not been updated yet, then that key will have a derivation path as if it were just an independent key (i.e. no derivation path and its master fingerprint is itself)
|
||||
|
||||
Miscellaneous Wallet changes
|
||||
----------------------------
|
||||
|
||||
- The key metadata will need to be upgraded the first time that the HD seed is available.
|
||||
For unencrypted wallets this will occur on wallet loading.
|
||||
For encrypted wallets this will occur the first time the wallet is unlocked.
|
||||
@@ -1,9 +0,0 @@
|
||||
Low-level RPC changes
|
||||
----------------------
|
||||
|
||||
The `listunspent` RPC has been modified so that it also returns `witnessScript`,
|
||||
the witness script in the case of a P2WSH or P2SH-P2WSH output.
|
||||
|
||||
The `signrawtransactionwithkey` and `signrawtransactionwithwallet` RPCs have been
|
||||
modified so that they also optionally accept a `witnessScript`, the witness script in the
|
||||
case of a P2WSH or P2SH-P2WSH output. This is compatible with the change to `listunspent`.
|
||||
@@ -1,5 +0,0 @@
|
||||
Descriptor import support
|
||||
---------------------
|
||||
|
||||
The `importmulti` RPC now supports importing of addresses from descriptors. A "desc" parameter can be provided instead of the "scriptPubKey" in a request, as well as an optional range for ranged descriptors to specify the start and end of the range to import. More information about
|
||||
descriptors can be found [here](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
|
||||
@@ -1,4 +0,0 @@
|
||||
New RPC methods
|
||||
------------
|
||||
|
||||
- `deriveaddresses` returns one or more addresses corresponding to an [output descriptor](/doc/descriptors.md).
|
||||
@@ -1,8 +0,0 @@
|
||||
Miscellaneous RPC changes
|
||||
------------
|
||||
|
||||
- The RPC `createwallet` now has an optional `blank` argument that can be used to create a blank wallet.
|
||||
Blank wallets do not have any keys or HD seed.
|
||||
They cannot be opened in software older than 0.18.
|
||||
Once a blank wallet has a HD seed set (by using `sethdseed`) or private keys, scripts, addresses, and other watch only things have been imported, the wallet is no longer blank and can be opened in 0.17.x.
|
||||
Encrypting a blank wallet will also set a HD seed for it.
|
||||
@@ -1,4 +0,0 @@
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
- The minimum required version of QT has been increased from 5.2 to 5.5.1 (the [depends system](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md) provides 5.9.7)
|
||||
@@ -24,39 +24,28 @@ shut down (which might take a few minutes for older versions), then run the
|
||||
installer (on Windows) or just copy over `/Applications/Bitcoin-Qt` (on Mac)
|
||||
or `bitcoind`/`bitcoin-qt` (on Linux).
|
||||
|
||||
The first time you run version 0.15.0, your chainstate database will be converted to a
|
||||
new format, which will take anywhere from a few minutes to half an hour,
|
||||
depending on the speed of your machine.
|
||||
The first time you run version 0.15.0 or newer, your chainstate database
|
||||
will be converted to a new format, which will take anywhere from a few minutes
|
||||
to half an hour, depending on the speed of your machine.
|
||||
|
||||
Note that the block database format also changed in version 0.8.0 and there is no
|
||||
automatic upgrade code from before version 0.8 to version 0.15.0. Upgrading
|
||||
directly from 0.7.x and earlier without redownloading the blockchain is not supported.
|
||||
However, as usual, old wallet versions are still supported.
|
||||
|
||||
Downgrading warning
|
||||
-------------------
|
||||
|
||||
The chainstate database for this release is not compatible with previous
|
||||
releases, so if you run 0.15 and then decide to switch back to any
|
||||
older version, you will need to run the old release with the `-reindex-chainstate`
|
||||
option to rebuild the chainstate data structures in the old format.
|
||||
|
||||
If your node has pruning enabled, this will entail re-downloading and
|
||||
processing the entire blockchain.
|
||||
|
||||
Compatibility
|
||||
==============
|
||||
|
||||
Bitcoin Core is supported and extensively tested on operating systems using
|
||||
the Linux kernel, macOS 10.10+, and Windows 7 and newer. It is not recommended
|
||||
the Linux kernel, macOS 10.10+, and Windows 7 and newer. It is not recommended
|
||||
to use Bitcoin Core on unsupported systems.
|
||||
|
||||
Bitcoin Core should also work on most other Unix-like systems but is not
|
||||
frequently tested on them.
|
||||
as frequently tested on them.
|
||||
|
||||
From 0.17.0 onwards, macOS <10.10 is no longer supported. 0.17.0 is
|
||||
From 0.17.0 onwards, macOS <10.10 is no longer supported. 0.17.0 is
|
||||
built using Qt 5.9.x, which doesn't support versions of macOS older than
|
||||
10.10. Additionally, Bitcoin Core does not yet change appearance when
|
||||
10.10. Additionally, Bitcoin Core does not yet change appearance when
|
||||
macOS "dark mode" is activated.
|
||||
|
||||
In addition to previously-supported CPU platforms, this release's
|
||||
@@ -207,6 +196,9 @@ New RPCs
|
||||
moment, it returns an array of the currently active commands and how
|
||||
long they've been running.
|
||||
|
||||
- `deriveaddresses` returns one or more addresses corresponding to an
|
||||
[output descriptor](/doc/descriptors.md).
|
||||
|
||||
Updated RPCs
|
||||
------------
|
||||
|
||||
@@ -275,6 +267,23 @@ in the Low-level Changes section below.
|
||||
- The `unloadwallet` RPC is now synchronous, meaning it will not return
|
||||
until the wallet is fully unloaded.
|
||||
|
||||
- The `importmulti` RPC now supports importing of addresses from descriptors. A
|
||||
"desc" parameter can be provided instead of the "scriptPubKey" in a request, as
|
||||
well as an optional range for ranged descriptors to specify the start and end
|
||||
of the range to import. More information about descriptors can be found
|
||||
[here](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
|
||||
|
||||
- The `listunspent` RPC has been modified so that it also returns `witnessScript`,
|
||||
the witness script in the case of a P2WSH or P2SH-P2WSH output.
|
||||
|
||||
- The RPC `createwallet` now has an optional `blank` argument that can be used
|
||||
to create a blank wallet. Blank wallets do not have any keys or HD seed.
|
||||
They cannot be opened in software older than 0.18. Once a blank wallet has a
|
||||
HD seed set (by using `sethdseed`) or private keys, scripts, addresses, and
|
||||
other watch only things have been imported, the wallet is no longer blank and
|
||||
can be opened in 0.17.x. Encrypting a blank wallet will also set a HD seed
|
||||
for it.
|
||||
|
||||
REST changes
|
||||
------------
|
||||
|
||||
@@ -305,7 +314,7 @@ Graphical User Interface (GUI)
|
||||
sdk version)
|
||||
|
||||
Tools
|
||||
----
|
||||
-----
|
||||
|
||||
- A new `bitcoin-wallet` tool is now distributed alongside Bitcoin
|
||||
Core's other executables. Without needing to use any RPCs, this tool
|
||||
@@ -314,6 +323,14 @@ Tools
|
||||
encrypted, whether it uses an HD seed, how many transactions it
|
||||
contains, and how many address book entries it has.
|
||||
|
||||
Dependencies
|
||||
------------
|
||||
|
||||
- The minimum required version of QT (when building the GUI) has been increased
|
||||
from 5.2 to 5.5.1 (the [depends
|
||||
system](https://github.com/bitcoin/bitcoin/blob/master/depends/README.md)
|
||||
provides 5.9.7)
|
||||
|
||||
Low-level changes
|
||||
=================
|
||||
|
||||
@@ -330,6 +347,19 @@ RPC
|
||||
- A new `submitheader` RPC allows submitting block headers independently
|
||||
from their block. This is likely only useful for testing.
|
||||
|
||||
- The `signrawtransactionwithkey` and `signrawtransactionwithwallet` RPCs have been
|
||||
modified so that they also optionally accept a `witnessScript`, the witness script in the
|
||||
case of a P2WSH or P2SH-P2WSH output. This is compatible with the change to `listunspent`.
|
||||
|
||||
- Descriptors with key origin information imported through `importmulti` will
|
||||
have their key origin information stored in the wallet for use with creating
|
||||
PSBTs.
|
||||
|
||||
- If `bip32derivs` of both `walletprocesspsbt` and `walletcreatefundedpsbt` is
|
||||
set to true but the key metadata for a public key has not been updated yet,
|
||||
then that key will have a derivation path as if it were just an independent
|
||||
key (i.e. no derivation path and its master fingerprint is itself)
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
@@ -354,6 +384,13 @@ Network
|
||||
the `setban` RPC, all connections from that peer will still be
|
||||
rejected.
|
||||
|
||||
Wallet
|
||||
-------
|
||||
|
||||
- The key metadata will need to be upgraded the first time that the HD seed is
|
||||
available. For unencrypted wallets this will occur on wallet loading. For
|
||||
encrypted wallets this will occur the first time the wallet is unlocked.
|
||||
|
||||
Security
|
||||
--------
|
||||
|
||||
|
||||
@@ -291,24 +291,48 @@ bitcoin.org (see below for bitcoin.org update instructions).
|
||||
- After the pull request is merged, the website will automatically show the newest version within 15 minutes, as well
|
||||
as update the OS download links. Ping @saivann/@harding (saivann/harding on Freenode) in case anything goes wrong
|
||||
|
||||
- Update other repositories and websites for new version
|
||||
|
||||
- bitcoincore.org blog post
|
||||
|
||||
- bitcoincore.org RPC documentation update
|
||||
|
||||
- Update packaging repo
|
||||
|
||||
- Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
|
||||
|
||||
- Create a new branch for the major release "0.xx" (used to build the snap package)
|
||||
|
||||
- Notify MarcoFalke so that he can start building the snap package
|
||||
|
||||
- https://code.launchpad.net/~bitcoin-core/bitcoin-core-snap/+git/packaging (Click "Import Now" to fetch the branch)
|
||||
- https://code.launchpad.net/~bitcoin-core/bitcoin-core-snap/+git/packaging/+ref/0.xx (Click "Create snap package")
|
||||
- Name it "bitcoin-core-snap-0.xx"
|
||||
- Leave owner and series as-is
|
||||
- Select architectures that are compiled via gitian
|
||||
- Leave "automatically build when branch changes" unticked
|
||||
- Tick "automatically upload to store"
|
||||
- Put "bitcoin-core" in the registered store package name field
|
||||
- Tick the "edge" box
|
||||
- Put "0.xx" in the track field
|
||||
- Click "create snap package"
|
||||
- Click "Request builds" for every new release on this branch (after updating the snapcraft.yml in the branch to reflect the latest gitian results)
|
||||
- Promote release on https://snapcraft.io/bitcoin-core/releases if it passes sanity checks
|
||||
|
||||
- This repo
|
||||
|
||||
- Archive release notes for the new version to `doc/release-notes/` (branch `master` and branch of the release)
|
||||
|
||||
- Create a [new GitHub release](https://github.com/bitcoin/bitcoin/releases/new) with a link to the archived release notes.
|
||||
|
||||
- Announce the release:
|
||||
|
||||
- bitcoin-dev and bitcoin-core-dev mailing list
|
||||
|
||||
- Bitcoin Core announcements list https://bitcoincore.org/en/list/announcements/join/
|
||||
|
||||
- bitcoincore.org blog post
|
||||
|
||||
- bitcoincore.org RPC documentation update
|
||||
|
||||
- Update title of #bitcoin on Freenode IRC
|
||||
|
||||
- Optionally twitter, reddit /r/Bitcoin, ... but this will usually sort out itself
|
||||
|
||||
- Notify BlueMatt so that he can start building [the PPAs](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin)
|
||||
|
||||
- Archive release notes for the new version to `doc/release-notes/` (branch `master` and branch of the release)
|
||||
|
||||
- Create a [new GitHub release](https://github.com/bitcoin/bitcoin/releases/new) with a link to the archived release notes.
|
||||
|
||||
- Celebrate
|
||||
|
||||
@@ -160,6 +160,7 @@ static std::string openmodeToStr(std::ios_base::openmode mode)
|
||||
void ifstream::open(const fs::path& p, std::ios_base::openmode mode)
|
||||
{
|
||||
close();
|
||||
mode |= std::ios_base::in;
|
||||
m_file = fsbridge::fopen(p, openmodeToStr(mode).c_str());
|
||||
if (m_file == nullptr) {
|
||||
return;
|
||||
@@ -183,6 +184,7 @@ void ifstream::close()
|
||||
void ofstream::open(const fs::path& p, std::ios_base::openmode mode)
|
||||
{
|
||||
close();
|
||||
mode |= std::ios_base::out;
|
||||
m_file = fsbridge::fopen(p, openmodeToStr(mode).c_str());
|
||||
if (m_file == nullptr) {
|
||||
return;
|
||||
|
||||
16
src/init.cpp
16
src/init.cpp
@@ -97,7 +97,6 @@ static const char* FEE_ESTIMATES_FILENAME="fee_estimates.dat";
|
||||
/**
|
||||
* The PID file facilities.
|
||||
*/
|
||||
#ifndef WIN32
|
||||
static const char* BITCOIN_PID_FILENAME = "bitcoind.pid";
|
||||
|
||||
static fs::path GetPidFile()
|
||||
@@ -109,14 +108,17 @@ NODISCARD static bool CreatePidFile()
|
||||
{
|
||||
FILE* file = fsbridge::fopen(GetPidFile(), "w");
|
||||
if (file) {
|
||||
#ifdef WIN32
|
||||
fprintf(file, "%d\n", GetCurrentProcessId());
|
||||
#else
|
||||
fprintf(file, "%d\n", getpid());
|
||||
#endif
|
||||
fclose(file);
|
||||
return true;
|
||||
} else {
|
||||
return InitError(strprintf(_("Unable to create the PID file '%s': %s"), GetPidFile().string(), std::strerror(errno)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -286,15 +288,13 @@ void Shutdown(InitInterfaces& interfaces)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef WIN32
|
||||
try {
|
||||
if (!fs::remove(GetPidFile())) {
|
||||
LogPrintf("%s: Unable to remove PID file: File does not exist\n", __func__);
|
||||
}
|
||||
} catch (const fs::filesystem_error& e) {
|
||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, e.what());
|
||||
LogPrintf("%s: Unable to remove PID file: %s\n", __func__, fsbridge::get_filesystem_error_message(e));
|
||||
}
|
||||
#endif
|
||||
interfaces.chain_clients.clear();
|
||||
UnregisterAllValidationInterfaces();
|
||||
GetMainSignals().UnregisterBackgroundSignalScheduler();
|
||||
@@ -392,11 +392,7 @@ void SetupServerArgs()
|
||||
gArgs.AddArg("-par=<n>", strprintf("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)",
|
||||
-GetNumCores(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS), false, OptionsCategory::OPTIONS);
|
||||
gArgs.AddArg("-persistmempool", strprintf("Whether to save the mempool on shutdown and load on restart (default: %u)", DEFAULT_PERSIST_MEMPOOL), false, OptionsCategory::OPTIONS);
|
||||
#ifndef WIN32
|
||||
gArgs.AddArg("-pid=<file>", strprintf("Specify pid file. Relative paths will be prefixed by a net-specific datadir location. (default: %s)", BITCOIN_PID_FILENAME), false, OptionsCategory::OPTIONS);
|
||||
#else
|
||||
hidden_args.emplace_back("-pid");
|
||||
#endif
|
||||
gArgs.AddArg("-prune=<n>", strprintf("Reduce storage requirements by enabling pruning (deleting) of old blocks. This allows the pruneblockchain RPC to be called to delete specific blocks, and enables automatic pruning of old blocks if a target size in MiB is provided. This mode is incompatible with -txindex and -rescan. "
|
||||
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
||||
"(default: 0 = disable pruning blocks, 1 = allow manual pruning via RPC, >=%u = automatically prune block files to stay under the specified target size in MiB)", MIN_DISK_SPACE_FOR_BLOCK_FILES / 1024 / 1024), false, OptionsCategory::OPTIONS);
|
||||
@@ -1228,12 +1224,10 @@ bool AppInitMain(InitInterfaces& interfaces)
|
||||
{
|
||||
const CChainParams& chainparams = Params();
|
||||
// ********************************************************* Step 4a: application initialization
|
||||
#ifndef WIN32
|
||||
if (!CreatePidFile()) {
|
||||
// Detailed error printed inside CreatePidFile().
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
if (LogInstance().m_print_to_file) {
|
||||
if (gArgs.GetBoolArg("-shrinkdebugfile", LogInstance().DefaultShrinkDebugFile())) {
|
||||
// Do this first since it both loads a bunch of debug.log into memory,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <future>
|
||||
|
||||
const char* TransactionErrorString(const TransactionError err)
|
||||
std::string TransactionErrorString(const TransactionError err)
|
||||
{
|
||||
switch (err) {
|
||||
case TransactionError::OK:
|
||||
@@ -33,22 +33,16 @@ const char* TransactionErrorString(const TransactionError err)
|
||||
return "PSBTs not compatible (different transactions)";
|
||||
case TransactionError::SIGHASH_MISMATCH:
|
||||
return "Specified sighash value does not match existing value";
|
||||
|
||||
case TransactionError::UNKNOWN_ERROR:
|
||||
default: break;
|
||||
// no default case, so the compiler can warn about missing cases
|
||||
}
|
||||
return "Unknown error";
|
||||
assert(false);
|
||||
}
|
||||
|
||||
bool BroadcastTransaction(const CTransactionRef tx, uint256& hashTx, TransactionError& error, std::string& err_string, const bool allowhighfees)
|
||||
TransactionError BroadcastTransaction(const CTransactionRef tx, uint256& hashTx, std::string& err_string, const CAmount& highfee)
|
||||
{
|
||||
std::promise<void> promise;
|
||||
hashTx = tx->GetHash();
|
||||
|
||||
CAmount nMaxRawTxFee = maxTxFee;
|
||||
if (allowhighfees)
|
||||
nMaxRawTxFee = 0;
|
||||
|
||||
{ // cs_main scope
|
||||
LOCK(cs_main);
|
||||
CCoinsViewCache &view = *pcoinsTip;
|
||||
@@ -63,19 +57,16 @@ bool BroadcastTransaction(const CTransactionRef tx, uint256& hashTx, Transaction
|
||||
CValidationState state;
|
||||
bool fMissingInputs;
|
||||
if (!AcceptToMemoryPool(mempool, state, std::move(tx), &fMissingInputs,
|
||||
nullptr /* plTxnReplaced */, false /* bypass_limits */, nMaxRawTxFee)) {
|
||||
nullptr /* plTxnReplaced */, false /* bypass_limits */, highfee)) {
|
||||
if (state.IsInvalid()) {
|
||||
err_string = FormatStateMessage(state);
|
||||
error = TransactionError::MEMPOOL_REJECTED;
|
||||
return false;
|
||||
return TransactionError::MEMPOOL_REJECTED;
|
||||
} else {
|
||||
if (fMissingInputs) {
|
||||
error = TransactionError::MISSING_INPUTS;
|
||||
return false;
|
||||
return TransactionError::MISSING_INPUTS;
|
||||
}
|
||||
err_string = FormatStateMessage(state);
|
||||
error = TransactionError::MEMPOOL_ERROR;
|
||||
return false;
|
||||
return TransactionError::MEMPOOL_ERROR;
|
||||
}
|
||||
} else {
|
||||
// If wallet is enabled, ensure that the wallet has been made aware
|
||||
@@ -88,8 +79,7 @@ bool BroadcastTransaction(const CTransactionRef tx, uint256& hashTx, Transaction
|
||||
});
|
||||
}
|
||||
} else if (fHaveChain) {
|
||||
error = TransactionError::ALREADY_IN_CHAIN;
|
||||
return false;
|
||||
return TransactionError::ALREADY_IN_CHAIN;
|
||||
} else {
|
||||
// Make sure we don't block forever if re-sending
|
||||
// a transaction already in mempool.
|
||||
@@ -100,16 +90,14 @@ bool BroadcastTransaction(const CTransactionRef tx, uint256& hashTx, Transaction
|
||||
|
||||
promise.get_future().wait();
|
||||
|
||||
if(!g_connman) {
|
||||
error = TransactionError::P2P_DISABLED;
|
||||
return false;
|
||||
if (!g_connman) {
|
||||
return TransactionError::P2P_DISABLED;
|
||||
}
|
||||
|
||||
CInv inv(MSG_TX, hashTx);
|
||||
g_connman->ForEachNode([&inv](CNode* pnode)
|
||||
{
|
||||
g_connman->ForEachNode([&inv](CNode* pnode) {
|
||||
pnode->PushInventory(inv);
|
||||
});
|
||||
|
||||
return true;
|
||||
}
|
||||
return TransactionError::OK;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
// Copyright (c) 2017-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2017-2019 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_NODE_TRANSACTION_H
|
||||
#define BITCOIN_NODE_TRANSACTION_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <primitives/transaction.h>
|
||||
#include <uint256.h>
|
||||
|
||||
enum class TransactionError {
|
||||
OK = 0,
|
||||
UNKNOWN_ERROR,
|
||||
|
||||
OK, //!< No error
|
||||
MISSING_INPUTS,
|
||||
ALREADY_IN_CHAIN,
|
||||
P2P_DISABLED,
|
||||
@@ -20,24 +19,19 @@ enum class TransactionError {
|
||||
INVALID_PSBT,
|
||||
PSBT_MISMATCH,
|
||||
SIGHASH_MISMATCH,
|
||||
|
||||
ERROR_COUNT
|
||||
};
|
||||
|
||||
#define TRANSACTION_ERR_LAST TransactionError::ERROR_COUNT
|
||||
|
||||
const char* TransactionErrorString(const TransactionError error);
|
||||
std::string TransactionErrorString(const TransactionError error);
|
||||
|
||||
/**
|
||||
* Broadcast a transaction
|
||||
*
|
||||
* @param[in] tx the transaction to broadcast
|
||||
* @param[out] &txid the txid of the transaction, if successfully broadcast
|
||||
* @param[out] &error reference to UniValue to fill with error info on failure
|
||||
* @param[out] &err_string reference to std::string to fill with error string if available
|
||||
* @param[in] allowhighfees whether to allow fees exceeding maxTxFee
|
||||
* return true on success, false on error (and fills in `error`)
|
||||
* @param[in] highfee Reject txs with fees higher than this (if 0, accept any fee)
|
||||
* return error
|
||||
*/
|
||||
bool BroadcastTransaction(CTransactionRef tx, uint256& txid, TransactionError& error, std::string& err_string, bool allowhighfees = false);
|
||||
NODISCARD TransactionError BroadcastTransaction(CTransactionRef tx, uint256& txid, std::string& err_string, const CAmount& highfee);
|
||||
|
||||
#endif // BITCOIN_NODE_TRANSACTION_H
|
||||
|
||||
10
src/psbt.cpp
10
src/psbt.cpp
@@ -309,21 +309,19 @@ bool FinalizeAndExtractPSBT(PartiallySignedTransaction& psbtx, CMutableTransacti
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CombinePSBTs(PartiallySignedTransaction& out, TransactionError& error, const std::vector<PartiallySignedTransaction>& psbtxs)
|
||||
TransactionError CombinePSBTs(PartiallySignedTransaction& out, const std::vector<PartiallySignedTransaction>& psbtxs)
|
||||
{
|
||||
out = psbtxs[0]; // Copy the first one
|
||||
|
||||
// Merge
|
||||
for (auto it = std::next(psbtxs.begin()); it != psbtxs.end(); ++it) {
|
||||
if (!out.Merge(*it)) {
|
||||
error = TransactionError::PSBT_MISMATCH;
|
||||
return false;
|
||||
return TransactionError::PSBT_MISMATCH;
|
||||
}
|
||||
}
|
||||
if (!out.IsSane()) {
|
||||
error = TransactionError::INVALID_PSBT;
|
||||
return false;
|
||||
return TransactionError::INVALID_PSBT;
|
||||
}
|
||||
|
||||
return true;
|
||||
return TransactionError::OK;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -575,10 +575,9 @@ bool FinalizeAndExtractPSBT(PartiallySignedTransaction& psbtx, CMutableTransacti
|
||||
* Combines PSBTs with the same underlying transaction, resulting in a single PSBT with all partial signatures from each input.
|
||||
*
|
||||
* @param[out] &out the combined PSBT, if successful
|
||||
* @param[out] &error reference to TransactionError to fill with error info on failure
|
||||
* @param[in] psbtxs the PSBTs to combine
|
||||
* @return True if we successfully combined the transactions, false if they were not compatible
|
||||
* @return error (OK if we successfully combined the transactions, other error if they were not compatible)
|
||||
*/
|
||||
bool CombinePSBTs(PartiallySignedTransaction& out, TransactionError& error, const std::vector<PartiallySignedTransaction>& psbtxs);
|
||||
NODISCARD TransactionError CombinePSBTs(PartiallySignedTransaction& out, const std::vector<PartiallySignedTransaction>& psbtxs);
|
||||
|
||||
#endif // BITCOIN_PSBT_H
|
||||
|
||||
@@ -396,6 +396,8 @@ void BitcoinGUI::createActions()
|
||||
connect(activity, &OpenWalletActivity::opened, this, &BitcoinGUI::setCurrentWallet);
|
||||
connect(activity, &OpenWalletActivity::finished, activity, &QObject::deleteLater);
|
||||
connect(activity, &OpenWalletActivity::finished, dialog, &QObject::deleteLater);
|
||||
bool invoked = QMetaObject::invokeMethod(activity, "open");
|
||||
assert(invoked);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -59,7 +59,6 @@ OpenWalletActivity* WalletController::openWallet(const std::string& name, QWidge
|
||||
{
|
||||
OpenWalletActivity* activity = new OpenWalletActivity(this, name);
|
||||
activity->moveToThread(&m_activity_thread);
|
||||
QMetaObject::invokeMethod(activity, "open", Qt::QueuedConnection);
|
||||
return activity;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -1778,9 +1778,7 @@ static constexpr size_t PER_UTXO_OVERHEAD = sizeof(COutPoint) + sizeof(uint32_t)
|
||||
|
||||
static UniValue getblockstats(const JSONRPCRequest& request)
|
||||
{
|
||||
if (request.fHelp || request.params.size() < 1 || request.params.size() > 4) {
|
||||
throw std::runtime_error(
|
||||
RPCHelpMan{"getblockstats",
|
||||
const RPCHelpMan help{"getblockstats",
|
||||
"\nCompute per block statistics for a given window. All amounts are in satoshis.\n"
|
||||
"It won't work for some heights with pruning.\n"
|
||||
"It won't work without -txindex for utxo_size_inc, *fee or *feerate stats.\n",
|
||||
@@ -1836,7 +1834,9 @@ static UniValue getblockstats(const JSONRPCRequest& request)
|
||||
HelpExampleCli("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
|
||||
+ HelpExampleRpc("getblockstats", "1000 '[\"minfeerate\",\"avgfeerate\"]'")
|
||||
},
|
||||
}.ToString());
|
||||
};
|
||||
if (request.fHelp || !help.IsValidNumArgs(request.params.size())) {
|
||||
throw std::runtime_error(help.ToString());
|
||||
}
|
||||
|
||||
LOCK(cs_main);
|
||||
@@ -2159,7 +2159,7 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||
{"", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "An object with output descriptor and metadata",
|
||||
{
|
||||
{"desc", RPCArg::Type::STR, RPCArg::Optional::NO, "An output descriptor"},
|
||||
{"range", RPCArg::Type::NUM, /* default */ "1000", "Up to what child index HD chains should be explored"},
|
||||
{"range", RPCArg::Type::RANGE, /* default */ "1000", "The range of HD chain indexes to explore (either end or [begin,end])"},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -2216,7 +2216,7 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||
// loop through the scan objects
|
||||
for (const UniValue& scanobject : request.params[1].get_array().getValues()) {
|
||||
std::string desc_str;
|
||||
int range = 1000;
|
||||
std::pair<int64_t, int64_t> range = {0, 1000};
|
||||
if (scanobject.isStr()) {
|
||||
desc_str = scanobject.get_str();
|
||||
} else if (scanobject.isObject()) {
|
||||
@@ -2225,8 +2225,8 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||
desc_str = desc_uni.get_str();
|
||||
UniValue range_uni = find_value(scanobject, "range");
|
||||
if (!range_uni.isNull()) {
|
||||
range = range_uni.get_int();
|
||||
if (range < 0 || range > 1000000) throw JSONRPCError(RPC_INVALID_PARAMETER, "range out of range");
|
||||
range = ParseRange(range_uni);
|
||||
if (range.first < 0 || (range.second >> 31) != 0 || range.second >= range.first + 1000000) throw JSONRPCError(RPC_INVALID_PARAMETER, "range out of range");
|
||||
}
|
||||
} else {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Scan object needs to be either a string or an object");
|
||||
@@ -2237,8 +2237,11 @@ UniValue scantxoutset(const JSONRPCRequest& request)
|
||||
if (!desc) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid descriptor '%s'", desc_str));
|
||||
}
|
||||
if (!desc->IsRange()) range = 0;
|
||||
for (int i = 0; i <= range; ++i) {
|
||||
if (!desc->IsRange()) {
|
||||
range.first = 0;
|
||||
range.second = 0;
|
||||
}
|
||||
for (int i = range.first; i <= range.second; ++i) {
|
||||
std::vector<CScript> scripts;
|
||||
if (!desc->Expand(i, provider, scripts, provider)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Cannot derive script without private keys: '%s'", desc_str));
|
||||
|
||||
@@ -68,8 +68,7 @@ static const CRPCConvertParam vRPCConvertParams[] =
|
||||
{ "sendmany", 4, "subtractfeefrom" },
|
||||
{ "sendmany", 5 , "replaceable" },
|
||||
{ "sendmany", 6 , "conf_target" },
|
||||
{ "deriveaddresses", 1, "begin" },
|
||||
{ "deriveaddresses", 2, "end" },
|
||||
{ "deriveaddresses", 1, "range" },
|
||||
{ "scantxoutset", 1, "scanobjects" },
|
||||
{ "addmultisigaddress", 0, "nrequired" },
|
||||
{ "addmultisigaddress", 1, "keys" },
|
||||
|
||||
@@ -185,7 +185,7 @@ UniValue getdescriptorinfo(const JSONRPCRequest& request)
|
||||
|
||||
UniValue deriveaddresses(const JSONRPCRequest& request)
|
||||
{
|
||||
if (request.fHelp || request.params.empty() || request.params.size() > 3) {
|
||||
if (request.fHelp || request.params.empty() || request.params.size() > 2) {
|
||||
throw std::runtime_error(
|
||||
RPCHelpMan{"deriveaddresses",
|
||||
{"\nDerives one or more addresses corresponding to an output descriptor.\n"
|
||||
@@ -199,37 +199,37 @@ UniValue deriveaddresses(const JSONRPCRequest& request)
|
||||
"For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n"},
|
||||
{
|
||||
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The descriptor."},
|
||||
{"begin", RPCArg::Type::NUM, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the beginning of the range to import."},
|
||||
{"end", RPCArg::Type::NUM, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the end of the range to import."}
|
||||
{"range", RPCArg::Type::RANGE, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive."},
|
||||
},
|
||||
RPCResult{
|
||||
"[ address ] (array) the derived addresses\n"
|
||||
},
|
||||
RPCExamples{
|
||||
"First three native segwit receive addresses\n" +
|
||||
HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l\" 0 2")
|
||||
HelpExampleCli("deriveaddresses", "\"wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l\" \"[0,2]\"")
|
||||
}}.ToString()
|
||||
);
|
||||
}
|
||||
|
||||
RPCTypeCheck(request.params, {UniValue::VSTR, UniValue::VNUM, UniValue::VNUM});
|
||||
RPCTypeCheck(request.params, {UniValue::VSTR, UniValueType()}); // Range argument is checked later
|
||||
const std::string desc_str = request.params[0].get_str();
|
||||
|
||||
int range_begin = 0;
|
||||
int range_end = 0;
|
||||
int64_t range_begin = 0;
|
||||
int64_t range_end = 0;
|
||||
|
||||
if (request.params.size() >= 2) {
|
||||
if (request.params.size() == 2) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Missing range end parameter");
|
||||
}
|
||||
range_begin = request.params[1].get_int();
|
||||
range_end = request.params[2].get_int();
|
||||
if (range_begin < 0) {
|
||||
if (request.params.size() >= 2 && !request.params[1].isNull()) {
|
||||
auto range = ParseRange(request.params[1]);
|
||||
if (range.first < 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should be greater or equal than 0");
|
||||
}
|
||||
if (range_begin > range_end) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range end should be equal to or greater than begin");
|
||||
if ((range.second >> 31) != 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range is too high");
|
||||
}
|
||||
if (range.second >= range.first + 1000000) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range is too large");
|
||||
}
|
||||
range_begin = range.first;
|
||||
range_end = range.second;
|
||||
}
|
||||
|
||||
FlatSigningProvider provider;
|
||||
@@ -603,7 +603,7 @@ static const CRPCCommand commands[] =
|
||||
{ "control", "logging", &logging, {"include", "exclude"}},
|
||||
{ "util", "validateaddress", &validateaddress, {"address"} },
|
||||
{ "util", "createmultisig", &createmultisig, {"nrequired","keys","address_type"} },
|
||||
{ "util", "deriveaddresses", &deriveaddresses, {"descriptor", "begin", "end"} },
|
||||
{ "util", "deriveaddresses", &deriveaddresses, {"descriptor", "range"} },
|
||||
{ "util", "getdescriptorinfo", &getdescriptorinfo, {"descriptor"} },
|
||||
{ "util", "verifymessage", &verifymessage, {"address","signature","message"} },
|
||||
{ "util", "signmessagewithprivkey", &signmessagewithprivkey, {"privkey","message"} },
|
||||
|
||||
@@ -523,13 +523,7 @@ static UniValue getnetworkinfo(const JSONRPCRequest& request)
|
||||
|
||||
static UniValue setban(const JSONRPCRequest& request)
|
||||
{
|
||||
std::string strCommand;
|
||||
if (!request.params[1].isNull())
|
||||
strCommand = request.params[1].get_str();
|
||||
if (request.fHelp || request.params.size() < 2 ||
|
||||
(strCommand != "add" && strCommand != "remove"))
|
||||
throw std::runtime_error(
|
||||
RPCHelpMan{"setban",
|
||||
const RPCHelpMan help{"setban",
|
||||
"\nAttempts to add or remove an IP/Subnet from the banned list.\n",
|
||||
{
|
||||
{"subnet", RPCArg::Type::STR, RPCArg::Optional::NO, "The IP/Subnet (see getpeerinfo for nodes IP) with an optional netmask (default is /32 = single IP)"},
|
||||
@@ -543,7 +537,13 @@ static UniValue setban(const JSONRPCRequest& request)
|
||||
+ HelpExampleCli("setban", "\"192.168.0.0/24\" \"add\"")
|
||||
+ HelpExampleRpc("setban", "\"192.168.0.6\", \"add\", 86400")
|
||||
},
|
||||
}.ToString());
|
||||
};
|
||||
std::string strCommand;
|
||||
if (!request.params[1].isNull())
|
||||
strCommand = request.params[1].get_str();
|
||||
if (request.fHelp || !help.IsValidNumArgs(request.params.size()) || (strCommand != "add" && strCommand != "remove")) {
|
||||
throw std::runtime_error(help.ToString());
|
||||
}
|
||||
if (!g_banman) {
|
||||
throw JSONRPCError(RPC_DATABASE_ERROR, "Error: Ban database not loaded");
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
#include <chain.h>
|
||||
#include <coins.h>
|
||||
#include <compat/byteswap.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <consensus/tx_verify.h>
|
||||
#include <consensus/validation.h>
|
||||
#include <core_io.h>
|
||||
#include <index/txindex.h>
|
||||
#include <init.h>
|
||||
@@ -67,9 +67,7 @@ static void TxToJSON(const CTransaction& tx, const uint256 hashBlock, UniValue&
|
||||
|
||||
static UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
{
|
||||
if (request.fHelp || request.params.size() < 1 || request.params.size() > 3)
|
||||
throw std::runtime_error(
|
||||
RPCHelpMan{
|
||||
const RPCHelpMan help{
|
||||
"getrawtransaction",
|
||||
"\nReturn the raw transaction data.\n"
|
||||
|
||||
@@ -79,8 +77,7 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
"will return the transaction if it is in the mempool, or if -txindex is enabled and the transaction\n"
|
||||
"is in a block in the blockchain.\n"
|
||||
|
||||
"\nHint: use getmempoolentry to fetch a specific transaction from the mempool.\n"
|
||||
"Or use gettransaction for wallet transactions.\n"
|
||||
"\nHint: Use gettransaction for wallet transactions.\n"
|
||||
|
||||
"\nIf verbose is 'true', returns an Object with information about 'txid'.\n"
|
||||
"If verbose is 'false' or omitted, returns a string that is serialized, hex-encoded data for 'txid'.\n",
|
||||
@@ -148,7 +145,11 @@ static UniValue getrawtransaction(const JSONRPCRequest& request)
|
||||
+ HelpExampleCli("getrawtransaction", "\"mytxid\" false \"myblockhash\"")
|
||||
+ HelpExampleCli("getrawtransaction", "\"mytxid\" true \"myblockhash\"")
|
||||
},
|
||||
}.ToString());
|
||||
};
|
||||
|
||||
if (request.fHelp || !help.IsValidNumArgs(request.params.size())) {
|
||||
throw std::runtime_error(help.ToString());
|
||||
}
|
||||
|
||||
bool in_active_chain = true;
|
||||
uint256 hash = ParseHashV(request.params[0], "parameter 1");
|
||||
@@ -1065,10 +1066,11 @@ static UniValue sendrawtransaction(const JSONRPCRequest& request)
|
||||
|
||||
bool allowhighfees = false;
|
||||
if (!request.params[1].isNull()) allowhighfees = request.params[1].get_bool();
|
||||
const CAmount highfee{allowhighfees ? 0 : ::maxTxFee};
|
||||
uint256 txid;
|
||||
TransactionError err;
|
||||
std::string err_string;
|
||||
if (!BroadcastTransaction(tx, txid, err, err_string, allowhighfees)) {
|
||||
const TransactionError err = BroadcastTransaction(tx, txid, err_string, highfee);
|
||||
if (TransactionError::OK != err) {
|
||||
throw JSONRPCTransactionError(err, err_string);
|
||||
}
|
||||
|
||||
@@ -1493,8 +1495,8 @@ UniValue combinepsbt(const JSONRPCRequest& request)
|
||||
}
|
||||
|
||||
PartiallySignedTransaction merged_psbt;
|
||||
TransactionError error;
|
||||
if (!CombinePSBTs(merged_psbt, error, psbtxs)) {
|
||||
const TransactionError error = CombinePSBTs(merged_psbt, psbtxs);
|
||||
if (error != TransactionError::OK) {
|
||||
throw JSONRPCTransactionError(error);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
// Copyright (c) 2017-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2017-2019 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 <key_io.h>
|
||||
#include <keystore.h>
|
||||
#include <policy/fees.h>
|
||||
#include <rpc/protocol.h>
|
||||
#include <rpc/util.h>
|
||||
#include <tinyformat.h>
|
||||
#include <util/strencodings.h>
|
||||
@@ -201,6 +200,7 @@ struct Sections {
|
||||
case RPCArg::Type::STR:
|
||||
case RPCArg::Type::NUM:
|
||||
case RPCArg::Type::AMOUNT:
|
||||
case RPCArg::Type::RANGE:
|
||||
case RPCArg::Type::BOOL: {
|
||||
if (outer_type == OuterType::NAMED_ARG) return; // Nothing more to do for non-recursive types on first recursion
|
||||
auto left = indent;
|
||||
@@ -315,6 +315,17 @@ std::string RPCExamples::ToDescriptionString() const
|
||||
return m_examples.empty() ? m_examples : "\nExamples:\n" + m_examples;
|
||||
}
|
||||
|
||||
bool RPCHelpMan::IsValidNumArgs(size_t num_args) const
|
||||
{
|
||||
size_t num_required_args = 0;
|
||||
for (size_t n = m_args.size(); n > 0; --n) {
|
||||
if (!m_args.at(n - 1).IsOptional()) {
|
||||
num_required_args = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return num_required_args <= num_args && num_args <= m_args.size();
|
||||
}
|
||||
std::string RPCHelpMan::ToString() const
|
||||
{
|
||||
std::string ret;
|
||||
@@ -323,12 +334,7 @@ std::string RPCHelpMan::ToString() const
|
||||
ret += m_name;
|
||||
bool was_optional{false};
|
||||
for (const auto& arg : m_args) {
|
||||
bool optional;
|
||||
if (arg.m_fallback.which() == 1) {
|
||||
optional = true;
|
||||
} else {
|
||||
optional = RPCArg::Optional::NO != boost::get<RPCArg::Optional>(arg.m_fallback);
|
||||
}
|
||||
const bool optional = arg.IsOptional();
|
||||
ret += " ";
|
||||
if (optional) {
|
||||
if (!was_optional) ret += "( ";
|
||||
@@ -370,6 +376,15 @@ std::string RPCHelpMan::ToString() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool RPCArg::IsOptional() const
|
||||
{
|
||||
if (m_fallback.which() == 1) {
|
||||
return true;
|
||||
} else {
|
||||
return RPCArg::Optional::NO != boost::get<RPCArg::Optional>(m_fallback);
|
||||
}
|
||||
}
|
||||
|
||||
std::string RPCArg::ToDescriptionString() const
|
||||
{
|
||||
std::string ret;
|
||||
@@ -391,6 +406,10 @@ std::string RPCArg::ToDescriptionString() const
|
||||
ret += "numeric or string";
|
||||
break;
|
||||
}
|
||||
case Type::RANGE: {
|
||||
ret += "numeric or array";
|
||||
break;
|
||||
}
|
||||
case Type::BOOL: {
|
||||
ret += "boolean";
|
||||
break;
|
||||
@@ -450,6 +469,8 @@ std::string RPCArg::ToStringObj(const bool oneline) const
|
||||
return res + "\"hex\"";
|
||||
case Type::NUM:
|
||||
return res + "n";
|
||||
case Type::RANGE:
|
||||
return res + "n or [n,n]";
|
||||
case Type::AMOUNT:
|
||||
return res + "amount";
|
||||
case Type::BOOL:
|
||||
@@ -480,6 +501,7 @@ std::string RPCArg::ToString(const bool oneline) const
|
||||
return "\"" + m_name + "\"";
|
||||
}
|
||||
case Type::NUM:
|
||||
case Type::RANGE:
|
||||
case Type::AMOUNT:
|
||||
case Type::BOOL: {
|
||||
return m_name;
|
||||
@@ -509,3 +531,17 @@ std::string RPCArg::ToString(const bool oneline) const
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
std::pair<int64_t, int64_t> ParseRange(const UniValue& value)
|
||||
{
|
||||
if (value.isNum()) {
|
||||
return {0, value.get_int64()};
|
||||
}
|
||||
if (value.isArray() && value.size() == 2 && value[0].isNum() && value[1].isNum()) {
|
||||
int64_t low = value[0].get_int64();
|
||||
int64_t high = value[1].get_int64();
|
||||
if (low > high) throw JSONRPCError(RPC_INVALID_PARAMETER, "Range specified as [begin,end] must not have begin after end");
|
||||
return {low, high};
|
||||
}
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range must be specified as end or as [begin,end]");
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2017-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2017-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <node/transaction.h>
|
||||
#include <pubkey.h>
|
||||
#include <rpc/protocol.h>
|
||||
#include <script/standard.h>
|
||||
#include <univalue.h>
|
||||
|
||||
@@ -37,6 +38,9 @@ unsigned int ParseConfirmTarget(const UniValue& value);
|
||||
RPCErrorCode RPCErrorFromTransactionError(TransactionError terr);
|
||||
UniValue JSONRPCTransactionError(TransactionError terr, const std::string& err_string = "");
|
||||
|
||||
//! Parse a JSON range specified as int64, or [int64, int64]
|
||||
std::pair<int64_t, int64_t> ParseRange(const UniValue& value);
|
||||
|
||||
struct RPCArg {
|
||||
enum class Type {
|
||||
OBJ,
|
||||
@@ -47,13 +51,14 @@ struct RPCArg {
|
||||
OBJ_USER_KEYS, //!< Special type where the user must set the keys e.g. to define multiple addresses; as opposed to e.g. an options object where the keys are predefined
|
||||
AMOUNT, //!< Special type representing a floating point amount (can be either NUM or STR)
|
||||
STR_HEX, //!< Special type that is a STR with only hex chars
|
||||
RANGE, //!< Special type that is a NUM or [NUM,NUM]
|
||||
};
|
||||
|
||||
enum class Optional {
|
||||
/** Required arg */
|
||||
NO,
|
||||
/**
|
||||
* Optinal arg that is a named argument and has a default value of
|
||||
* Optional arg that is a named argument and has a default value of
|
||||
* `null`. When possible, the default value should be specified.
|
||||
*/
|
||||
OMITTED_NAMED_ARG,
|
||||
@@ -110,6 +115,8 @@ struct RPCArg {
|
||||
assert(type == Type::ARR || type == Type::OBJ);
|
||||
}
|
||||
|
||||
bool IsOptional() const;
|
||||
|
||||
/**
|
||||
* Return the type string of the argument.
|
||||
* Set oneline to allow it to be overridden by a custom oneline type string (m_oneline_description).
|
||||
@@ -185,6 +192,8 @@ public:
|
||||
RPCHelpMan(std::string name, std::string description, std::vector<RPCArg> args, RPCResults results, RPCExamples examples);
|
||||
|
||||
std::string ToString() const;
|
||||
/** If the supplied number of args is neither too small nor too high */
|
||||
bool IsValidNumArgs(size_t num_args) const;
|
||||
|
||||
private:
|
||||
const std::string m_name;
|
||||
|
||||
@@ -2259,12 +2259,6 @@ void static UpdateTip(const CBlockIndex *pindexNew, const CChainParams& chainPar
|
||||
}
|
||||
if (nUpgraded > 0)
|
||||
AppendWarning(warningMessages, strprintf(_("%d of last 100 blocks have unexpected version"), nUpgraded));
|
||||
if (nUpgraded > 100/2)
|
||||
{
|
||||
std::string strWarning = _("Warning: Unknown block versions being mined! It's possible unknown rules are in effect");
|
||||
// notify GetWarnings(), called by Qt and the JSON-RPC code to warn the user:
|
||||
DoWarning(strWarning);
|
||||
}
|
||||
}
|
||||
LogPrintf("%s: new best=%s height=%d version=0x%08x log2_work=%.8g tx=%lu date='%s' progress=%f cache=%.1fMiB(%utxo)", __func__, /* Continued */
|
||||
pindexNew->GetBlockHash().ToString(), pindexNew->nHeight, pindexNew->nVersion,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <wallet/psbtwallet.h>
|
||||
|
||||
bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, TransactionError& error, bool& complete, int sighash_type, bool sign, bool bip32derivs)
|
||||
TransactionError FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, bool& complete, int sighash_type, bool sign, bool bip32derivs)
|
||||
{
|
||||
LOCK(pwallet->cs_wallet);
|
||||
// Get all of the previous transactions
|
||||
@@ -19,8 +19,7 @@ bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, Transac
|
||||
|
||||
// Verify input looks sane. This will check that we have at most one uxto, witness or non-witness.
|
||||
if (!input.IsSane()) {
|
||||
error = TransactionError::INVALID_PSBT;
|
||||
return false;
|
||||
return TransactionError::INVALID_PSBT;
|
||||
}
|
||||
|
||||
// If we have no utxo, grab it from the wallet.
|
||||
@@ -37,8 +36,7 @@ bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, Transac
|
||||
|
||||
// Get the Sighash type
|
||||
if (sign && input.sighash_type > 0 && input.sighash_type != sighash_type) {
|
||||
error = TransactionError::SIGHASH_MISMATCH;
|
||||
return false;
|
||||
return TransactionError::SIGHASH_MISMATCH;
|
||||
}
|
||||
|
||||
complete &= SignPSBTInput(HidingSigningProvider(pwallet, !sign, !bip32derivs), psbtx, i, sighash_type);
|
||||
@@ -58,5 +56,5 @@ bool FillPSBT(const CWallet* pwallet, PartiallySignedTransaction& psbtx, Transac
|
||||
psbt_out.FromSignatureData(sigdata);
|
||||
}
|
||||
|
||||
return true;
|
||||
return TransactionError::OK;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2009-2018 The Bitcoin Core developers
|
||||
// Copyright (c) 2009-2019 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -18,16 +18,14 @@
|
||||
*
|
||||
* @param[in] pwallet pointer to a wallet
|
||||
* @param[in] &psbtx reference to PartiallySignedTransaction to fill in
|
||||
* @param[out] &error reference to UniValue to fill with error info on failure
|
||||
* @param[out] &complete indicates whether the PSBT is now complete
|
||||
* @param[in] sighash_type the sighash type to use when signing (if PSBT does not specify)
|
||||
* @param[in] sign whether to sign or not
|
||||
* @param[in] bip32derivs whether to fill in bip32 derivation information if available
|
||||
* return true on success, false on error (and fills in `error`)
|
||||
* return error
|
||||
*/
|
||||
bool FillPSBT(const CWallet* pwallet,
|
||||
NODISCARD TransactionError FillPSBT(const CWallet* pwallet,
|
||||
PartiallySignedTransaction& psbtx,
|
||||
TransactionError& error,
|
||||
bool& complete,
|
||||
int sighash_type = 1 /* SIGHASH_ALL */,
|
||||
bool sign = true,
|
||||
|
||||
@@ -1132,13 +1132,10 @@ static UniValue ProcessImportDescriptor(ImportData& import_data, std::map<CKeyID
|
||||
if (!data.exists("range")) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Descriptor is ranged, please specify the range");
|
||||
}
|
||||
const UniValue& range = data["range"];
|
||||
range_start = range.exists("start") ? range["start"].get_int64() : 0;
|
||||
if (!range.exists("end")) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "End of range for descriptor must be specified");
|
||||
}
|
||||
range_end = range["end"].get_int64();
|
||||
if (range_end < range_start || range_start < 0) {
|
||||
auto range = ParseRange(data["range"]);
|
||||
range_start = range.first;
|
||||
range_end = range.second;
|
||||
if (range_start < 0 || (range_end >> 31) != 0 || range_end - range_start >= 1000000) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid descriptor range specified");
|
||||
}
|
||||
}
|
||||
@@ -1373,12 +1370,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
|
||||
{"key", RPCArg::Type::STR, RPCArg::Optional::OMITTED, ""},
|
||||
}
|
||||
},
|
||||
{"range", RPCArg::Type::OBJ, RPCArg::Optional::OMITTED, "If a ranged descriptor is used, this specifies the start and end of the range to import",
|
||||
{
|
||||
{"start", RPCArg::Type::NUM, /* default */ "0", "Start of the range to import"},
|
||||
{"end", RPCArg::Type::NUM, RPCArg::Optional::NO, "End of the range to import (inclusive)"},
|
||||
}
|
||||
},
|
||||
{"range", RPCArg::Type::RANGE, RPCArg::Optional::OMITTED, "If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import"},
|
||||
{"internal", RPCArg::Type::BOOL, /* default */ "false", "Stating whether matching outputs should be treated as not incoming payments (also known as change)"},
|
||||
{"watchonly", RPCArg::Type::BOOL, /* default */ "false", "Stating whether matching outputs should be considered watchonly."},
|
||||
{"label", RPCArg::Type::STR, /* default */ "''", "Label to assign to the address, only allowed with internal=false"},
|
||||
|
||||
@@ -4007,8 +4007,8 @@ UniValue walletprocesspsbt(const JSONRPCRequest& request)
|
||||
bool sign = request.params[1].isNull() ? true : request.params[1].get_bool();
|
||||
bool bip32derivs = request.params[3].isNull() ? false : request.params[3].get_bool();
|
||||
bool complete = true;
|
||||
TransactionError err;
|
||||
if (!FillPSBT(pwallet, psbtx, err, complete, nHashType, sign, bip32derivs)) {
|
||||
const TransactionError err = FillPSBT(pwallet, psbtx, complete, nHashType, sign, bip32derivs);
|
||||
if (err != TransactionError::OK) {
|
||||
throw JSONRPCTransactionError(err);
|
||||
}
|
||||
|
||||
@@ -4125,8 +4125,8 @@ UniValue walletcreatefundedpsbt(const JSONRPCRequest& request)
|
||||
// Fill transaction with out data but don't sign
|
||||
bool bip32derivs = request.params[4].isNull() ? false : request.params[4].get_bool();
|
||||
bool complete = true;
|
||||
TransactionError err;
|
||||
if (!FillPSBT(pwallet, psbtx, err, complete, 1, false, bip32derivs)) {
|
||||
const TransactionError err = FillPSBT(pwallet, psbtx, complete, 1, false, bip32derivs);
|
||||
if (err != TransactionError::OK) {
|
||||
throw JSONRPCTransactionError(err);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,8 @@ BOOST_AUTO_TEST_CASE(psbt_updater_test)
|
||||
ssData >> psbtx;
|
||||
|
||||
// Fill transaction with our data
|
||||
TransactionError err;
|
||||
bool complete = true;
|
||||
FillPSBT(&m_wallet, psbtx, err, complete, SIGHASH_ALL, false, true);
|
||||
BOOST_REQUIRE_EQUAL(TransactionError::OK, FillPSBT(&m_wallet, psbtx, complete, SIGHASH_ALL, false, true));
|
||||
|
||||
// Get the final tx
|
||||
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
|
||||
|
||||
@@ -35,7 +35,7 @@ static bool IsBerkeleyBtree(const fs::path& path)
|
||||
boost::system::error_code ec;
|
||||
if (fs::file_size(path, ec) < 4096) return false;
|
||||
|
||||
fs::ifstream file(path.string(), std::ios::binary);
|
||||
fsbridge::ifstream file(path, std::ios::binary);
|
||||
if (!file.is_open()) return false;
|
||||
|
||||
file.seekg(12, std::ios::beg); // Magic bytes start at offset 12
|
||||
|
||||
@@ -180,7 +180,7 @@ class AssumeValidTest(BitcoinTestFramework):
|
||||
for i in range(2202):
|
||||
p2p1.send_message(msg_block(self.blocks[i]))
|
||||
# Syncing 2200 blocks can take a while on slow systems. Give it plenty of time to sync.
|
||||
p2p1.sync_with_ping(150)
|
||||
p2p1.sync_with_ping(200)
|
||||
assert_equal(self.nodes[1].getblock(self.nodes[1].getbestblockhash())['height'], 2202)
|
||||
|
||||
# Send blocks to node2. Block 102 will be rejected.
|
||||
|
||||
@@ -60,6 +60,7 @@ class BIP65Test(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [['-whitelist=127.0.0.1', '-par=1']] # Use only one script thread to get the exact reject reason for testing
|
||||
self.setup_clean_chain = True
|
||||
self.rpc_timeout = 120
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -47,6 +47,7 @@ class BIP66Test(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [['-whitelist=127.0.0.1', '-par=1', '-enablebip61']] # Use only one script thread to get the exact reject reason for testing
|
||||
self.setup_clean_chain = True
|
||||
self.rpc_timeout = 120
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -66,23 +66,7 @@ class NotificationsTest(BitcoinTestFramework):
|
||||
txids_rpc = list(map(lambda t: t['txid'], self.nodes[1].listtransactions("*", block_count)))
|
||||
assert_equal(sorted(txids_rpc), sorted(os.listdir(self.walletnotify_dir)))
|
||||
|
||||
# Mine another 41 up-version blocks. -alertnotify should trigger on the 51st.
|
||||
self.log.info("test -alertnotify")
|
||||
self.nodes[1].generatetoaddress(41, ADDRESS_BCRT1_UNSPENDABLE)
|
||||
self.sync_all()
|
||||
|
||||
# Give bitcoind 10 seconds to write the alert notification
|
||||
wait_until(lambda: len(os.listdir(self.alertnotify_dir)), timeout=10)
|
||||
|
||||
for notify_file in os.listdir(self.alertnotify_dir):
|
||||
os.remove(os.path.join(self.alertnotify_dir, notify_file))
|
||||
|
||||
# Mine more up-version blocks, should not get more alerts:
|
||||
self.nodes[1].generatetoaddress(2, ADDRESS_BCRT1_UNSPENDABLE)
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("-alertnotify should not continue notifying for more unknown version blocks")
|
||||
assert_equal(len(os.listdir(self.alertnotify_dir)), 0)
|
||||
# TODO: add test for `-alertnotify` large fork notifications
|
||||
|
||||
if __name__ == '__main__':
|
||||
NotificationsTest().main()
|
||||
|
||||
@@ -44,6 +44,7 @@ RANGE_BEGIN = PORT_MIN + 2 * PORT_RANGE # Start after p2p and rpc ports
|
||||
class ProxyTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 4
|
||||
self.setup_clean_chain = True
|
||||
|
||||
def setup_nodes(self):
|
||||
self.have_ipv6 = test_ipv6_local()
|
||||
@@ -198,4 +199,3 @@ class ProxyTest(BitcoinTestFramework):
|
||||
|
||||
if __name__ == '__main__':
|
||||
ProxyTest().main()
|
||||
|
||||
|
||||
@@ -22,7 +22,6 @@ VB_TOP_BITS = 0x20000000
|
||||
VB_UNKNOWN_BIT = 27 # Choose a bit unassigned to any deployment
|
||||
VB_UNKNOWN_VERSION = VB_TOP_BITS | (1 << VB_UNKNOWN_BIT)
|
||||
|
||||
WARN_UNKNOWN_RULES_MINED = "Unknown block versions being mined! It's possible unknown rules are in effect"
|
||||
WARN_UNKNOWN_RULES_ACTIVE = "unknown new rules activated (versionbit {})".format(VB_UNKNOWN_BIT)
|
||||
VB_PATTERN = re.compile("Warning: unknown new rules activated.*versionbit")
|
||||
|
||||
@@ -78,15 +77,10 @@ class VersionBitsWarningTest(BitcoinTestFramework):
|
||||
assert(not VB_PATTERN.match(node.getmininginfo()["warnings"]))
|
||||
assert(not VB_PATTERN.match(node.getnetworkinfo()["warnings"]))
|
||||
|
||||
self.log.info("Check that there is a warning if >50 blocks in the last 100 were an unknown version")
|
||||
# Build one period of blocks with VB_THRESHOLD blocks signaling some unknown bit
|
||||
self.send_blocks_with_version(node.p2p, VB_THRESHOLD, VB_UNKNOWN_VERSION)
|
||||
node.generatetoaddress(VB_PERIOD - VB_THRESHOLD, node_deterministic_address)
|
||||
|
||||
# Check that get*info() shows the 51/100 unknown block version error.
|
||||
assert(WARN_UNKNOWN_RULES_MINED in node.getmininginfo()["warnings"])
|
||||
assert(WARN_UNKNOWN_RULES_MINED in node.getnetworkinfo()["warnings"])
|
||||
|
||||
self.log.info("Check that there is a warning if previous VB_BLOCKS have >=VB_THRESHOLD blocks with unknown versionbits version.")
|
||||
# Mine a period worth of expected blocks so the generic block-version warning
|
||||
# is cleared. This will move the versionbit state to ACTIVE.
|
||||
|
||||
@@ -29,7 +29,6 @@ from test_framework.util import (
|
||||
assert_raises_rpc_error,
|
||||
bytes_to_hex_str,
|
||||
hex_str_to_bytes,
|
||||
wait_until,
|
||||
)
|
||||
|
||||
|
||||
@@ -38,7 +37,6 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [[
|
||||
'-txindex',
|
||||
'-reindex', # Need reindex for txindex
|
||||
'-acceptnonstdtxn=0', # Try to mimic main-net
|
||||
]] * self.num_nodes
|
||||
|
||||
@@ -56,7 +54,7 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
|
||||
|
||||
self.log.info('Start with empty mempool, and 200 blocks')
|
||||
self.mempool_size = 0
|
||||
wait_until(lambda: node.getblockcount() == 200)
|
||||
assert_equal(node.getblockcount(), 200)
|
||||
assert_equal(node.getmempoolinfo()['size'], self.mempool_size)
|
||||
coins = node.listunspent()
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@ from test_framework.util import (
|
||||
from test_framework.blocktools import (
|
||||
create_block,
|
||||
create_coinbase,
|
||||
TIME_GENESIS_BLOCK,
|
||||
)
|
||||
from test_framework.messages import (
|
||||
msg_block,
|
||||
@@ -46,9 +47,11 @@ from test_framework.mininode import (
|
||||
|
||||
class BlockchainTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
|
||||
def run_test(self):
|
||||
self.mine_chain()
|
||||
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1']) # Set extra args with pruning after rescan is complete
|
||||
|
||||
self._test_getblockchaininfo()
|
||||
@@ -61,6 +64,15 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
self._test_waitforblockheight()
|
||||
assert self.nodes[0].verifychain(4, 0)
|
||||
|
||||
def mine_chain(self):
|
||||
self.log.info('Create some old blocks')
|
||||
address = self.nodes[0].get_deterministic_priv_key().address
|
||||
for t in range(TIME_GENESIS_BLOCK, TIME_GENESIS_BLOCK + 200 * 600, 600):
|
||||
# ten-minute steps from genesis block time
|
||||
self.nodes[0].setmocktime(t)
|
||||
self.nodes[0].generatetoaddress(1, address)
|
||||
assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200)
|
||||
|
||||
def _test_getblockchaininfo(self):
|
||||
self.log.info("Test getblockchaininfo")
|
||||
|
||||
|
||||
@@ -27,17 +27,20 @@ class DeriveaddressesTest(BitcoinTestFramework):
|
||||
assert_equal(self.nodes[0].deriveaddresses(descriptor_pubkey), [address])
|
||||
|
||||
ranged_descriptor = "wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)#kft60nuy"
|
||||
assert_equal(self.nodes[0].deriveaddresses(ranged_descriptor, 0, 2), [address, "bcrt1qhku5rq7jz8ulufe2y6fkcpnlvpsta7rq4442dy", "bcrt1qpgptk2gvshyl0s9lqshsmx932l9ccsv265tvaq"])
|
||||
assert_equal(self.nodes[0].deriveaddresses(ranged_descriptor, [1, 2]), ["bcrt1qhku5rq7jz8ulufe2y6fkcpnlvpsta7rq4442dy", "bcrt1qpgptk2gvshyl0s9lqshsmx932l9ccsv265tvaq"])
|
||||
assert_equal(self.nodes[0].deriveaddresses(ranged_descriptor, 2), [address, "bcrt1qhku5rq7jz8ulufe2y6fkcpnlvpsta7rq4442dy", "bcrt1qpgptk2gvshyl0s9lqshsmx932l9ccsv265tvaq"])
|
||||
|
||||
assert_raises_rpc_error(-8, "Range should not be specified for an un-ranged descriptor", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)"), 0, 2)
|
||||
assert_raises_rpc_error(-8, "Range should not be specified for an un-ranged descriptor", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)"), [0, 2])
|
||||
|
||||
assert_raises_rpc_error(-8, "Range must be specified for a ranged descriptor", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"))
|
||||
|
||||
assert_raises_rpc_error(-8, "Missing range end parameter", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), 0)
|
||||
assert_raises_rpc_error(-8, "End of range is too high", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), 10000000000)
|
||||
|
||||
assert_raises_rpc_error(-8, "Range end should be equal to or greater than begin", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), 2, 0)
|
||||
assert_raises_rpc_error(-8, "Range is too large", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), [1000000000, 2000000000])
|
||||
|
||||
assert_raises_rpc_error(-8, "Range should be greater or equal than 0", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), -1, 0)
|
||||
assert_raises_rpc_error(-8, "Range specified as [begin,end] must not have begin after end", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), [2, 0])
|
||||
|
||||
assert_raises_rpc_error(-8, "Range should be greater or equal than 0", self.nodes[0].deriveaddresses, descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), [-1, 0])
|
||||
|
||||
combo_descriptor = descsum_create("combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)")
|
||||
assert_equal(self.nodes[0].deriveaddresses(combo_descriptor), ["mtfUoUax9L4tzXARpw1oTGxWyoogp52KhJ", "mtfUoUax9L4tzXARpw1oTGxWyoogp52KhJ", address, "2NDvEwGfpEqJWfybzpKPHF2XH3jwoQV3D7x"])
|
||||
|
||||
@@ -178,5 +178,10 @@ class GetblockstatsTest(BitcoinTestFramework):
|
||||
assert_raises_rpc_error(-5, 'Block not found', self.nodes[0].getblockstats,
|
||||
hash_or_height='000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f')
|
||||
|
||||
# Invalid number of args
|
||||
assert_raises_rpc_error(-1, 'getblockstats hash_or_height ( stats )', self.nodes[0].getblockstats, '00', 1, 2)
|
||||
assert_raises_rpc_error(-1, 'getblockstats hash_or_height ( stats )', self.nodes[0].getblockstats)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
GetblockstatsTest().main()
|
||||
|
||||
50
test/functional/rpc_misc.py
Executable file
50
test/functional/rpc_misc.py
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2019 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test RPC misc output."""
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_raises_rpc_error,
|
||||
assert_equal,
|
||||
assert_greater_than,
|
||||
assert_greater_than_or_equal,
|
||||
)
|
||||
|
||||
from test_framework.authproxy import JSONRPCException
|
||||
|
||||
|
||||
class RpcMiscTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
|
||||
def run_test(self):
|
||||
node = self.nodes[0]
|
||||
|
||||
self.log.info("test getmemoryinfo")
|
||||
memory = node.getmemoryinfo()['locked']
|
||||
assert_greater_than(memory['used'], 0)
|
||||
assert_greater_than(memory['free'], 0)
|
||||
assert_greater_than(memory['total'], 0)
|
||||
# assert_greater_than_or_equal() for locked in case locking pages failed at some point
|
||||
assert_greater_than_or_equal(memory['locked'], 0)
|
||||
assert_greater_than(memory['chunks_used'], 0)
|
||||
assert_greater_than(memory['chunks_free'], 0)
|
||||
assert_equal(memory['used'] + memory['free'], memory['total'])
|
||||
|
||||
self.log.info("test mallocinfo")
|
||||
try:
|
||||
mallocinfo = node.getmemoryinfo(mode="mallocinfo")
|
||||
self.log.info('getmemoryinfo(mode="mallocinfo") call succeeded')
|
||||
tree = ET.fromstring(mallocinfo)
|
||||
assert_equal(tree.tag, 'malloc')
|
||||
except JSONRPCException:
|
||||
self.log.info('getmemoryinfo(mode="mallocinfo") not available')
|
||||
assert_raises_rpc_error(-8, 'mallocinfo is only available when compiled with glibc 2.10+', node.getmemoryinfo, mode="mallocinfo")
|
||||
|
||||
assert_raises_rpc_error(-8, "unknown mode foobar", node.getmemoryinfo, mode="foobar")
|
||||
|
||||
if __name__ == '__main__':
|
||||
RpcMiscTest().main()
|
||||
@@ -95,6 +95,7 @@ class ScantxoutsetTest(BitcoinTestFramework):
|
||||
assert_equal(self.nodes[0].scantxoutset("start", [ {"desc": "combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)", "range": 1500}])['total_amount'], Decimal("28.672"))
|
||||
assert_equal(self.nodes[0].scantxoutset("start", [ {"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": 1499}])['total_amount'], Decimal("12.288"))
|
||||
assert_equal(self.nodes[0].scantxoutset("start", [ {"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": 1500}])['total_amount'], Decimal("28.672"))
|
||||
assert_equal(self.nodes[0].scantxoutset("start", [ {"desc": "combo(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1/1/*)", "range": [1500,1500]}])['total_amount'], Decimal("16.384"))
|
||||
|
||||
# Test the reported descriptors for a few matches
|
||||
assert_equal(descriptors(self.nodes[0].scantxoutset("start", [ {"desc": "combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/0h/0'/*)", "range": 1499}])), ["pkh([0c5f9a1e/0'/0'/0]026dbd8b2315f296d36e6b6920b1579ca75569464875c7ebe869b536a7d9503c8c)#dzxw429x", "pkh([0c5f9a1e/0'/0'/1]033e6f25d76c00bedb3a8993c7d5739ee806397f0529b1b31dda31ef890f19a60c)#43rvceed"])
|
||||
|
||||
@@ -29,11 +29,11 @@ from .util import (
|
||||
get_datadir_path,
|
||||
initialize_datadir,
|
||||
p2p_port,
|
||||
set_node_times,
|
||||
sync_blocks,
|
||||
sync_mempools,
|
||||
)
|
||||
|
||||
|
||||
class TestStatus(Enum):
|
||||
PASSED = 1
|
||||
FAILED = 2
|
||||
@@ -94,7 +94,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
self.setup_clean_chain = False
|
||||
self.nodes = []
|
||||
self.network_thread = None
|
||||
self.mocktime = 0
|
||||
self.rpc_timeout = 60 # Wait for up to 60 seconds for the RPC server to respond
|
||||
self.supports_cli = False
|
||||
self.bind_to_localhost_only = True
|
||||
@@ -275,6 +274,19 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
self.add_nodes(self.num_nodes, extra_args)
|
||||
self.start_nodes()
|
||||
self.import_deterministic_coinbase_privkeys()
|
||||
if not self.setup_clean_chain:
|
||||
for n in self.nodes:
|
||||
assert_equal(n.getblockchaininfo()["blocks"], 199)
|
||||
# To ensure that all nodes are out of IBD, the most recent block
|
||||
# must have a timestamp not too old (see IsInitialBlockDownload()).
|
||||
self.log.debug('Generate a block with current time')
|
||||
block_hash = self.nodes[0].generate(1)[0]
|
||||
block = self.nodes[0].getblock(blockhash=block_hash, verbosity=0)
|
||||
for n in self.nodes:
|
||||
n.submitblock(block)
|
||||
chain_info = n.getblockchaininfo()
|
||||
assert_equal(chain_info["blocks"], 200)
|
||||
assert_equal(chain_info["initialblockdownload"], False)
|
||||
|
||||
def import_deterministic_coinbase_privkeys(self):
|
||||
for n in self.nodes:
|
||||
@@ -316,7 +328,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
timewait=self.rpc_timeout,
|
||||
bitcoind=binary[i],
|
||||
bitcoin_cli=self.options.bitcoincli,
|
||||
mocktime=self.mocktime,
|
||||
coverage_dir=self.options.coveragedir,
|
||||
cwd=self.options.tmpdir,
|
||||
extra_conf=extra_confs[i],
|
||||
@@ -435,7 +446,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
def _initialize_chain(self):
|
||||
"""Initialize a pre-mined blockchain for use by the test.
|
||||
|
||||
Create a cache of a 200-block-long chain (with wallet) for MAX_NODES
|
||||
Create a cache of a 199-block-long chain (with wallet) for MAX_NODES
|
||||
Afterward, create num_nodes copies from the cache."""
|
||||
|
||||
assert self.num_nodes <= MAX_NODES
|
||||
@@ -468,7 +479,6 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
timewait=self.rpc_timeout,
|
||||
bitcoind=self.options.bitcoind,
|
||||
bitcoin_cli=self.options.bitcoincli,
|
||||
mocktime=self.mocktime,
|
||||
coverage_dir=None,
|
||||
cwd=self.options.tmpdir,
|
||||
))
|
||||
@@ -479,32 +489,22 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
for node in self.nodes:
|
||||
node.wait_for_rpc_connection()
|
||||
|
||||
# For backward compatibility of the python scripts with previous
|
||||
# versions of the cache, set mocktime to Jan 1,
|
||||
# 2014 + (201 * 10 * 60)"""
|
||||
self.mocktime = 1388534400 + (201 * 10 * 60)
|
||||
|
||||
# Create a 200-block-long chain; each of the 4 first nodes
|
||||
# Create a 199-block-long chain; each of the 4 first nodes
|
||||
# gets 25 mature blocks and 25 immature.
|
||||
# Note: To preserve compatibility with older versions of
|
||||
# initialize_chain, only 4 nodes will generate coins.
|
||||
#
|
||||
# blocks are created with timestamps 10 minutes apart
|
||||
# starting from 2010 minutes in the past
|
||||
block_time = self.mocktime - (201 * 10 * 60)
|
||||
for i in range(2):
|
||||
for peer in range(4):
|
||||
for j in range(25):
|
||||
set_node_times(self.nodes, block_time)
|
||||
self.nodes[peer].generatetoaddress(1, self.nodes[peer].get_deterministic_priv_key().address)
|
||||
block_time += 10 * 60
|
||||
# Must sync before next peer starts generating blocks
|
||||
sync_blocks(self.nodes)
|
||||
# The 4th node gets only 24 immature blocks so that the very last
|
||||
# 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().
|
||||
for i in range(8):
|
||||
self.nodes[0].generatetoaddress(25 if i != 7 else 24, self.nodes[i % 4].get_deterministic_priv_key().address)
|
||||
sync_blocks(self.nodes)
|
||||
|
||||
for n in self.nodes:
|
||||
assert_equal(n.getblockchaininfo()["blocks"], 199)
|
||||
|
||||
# Shut them down, and clean up cache directories:
|
||||
self.stop_nodes()
|
||||
self.nodes = []
|
||||
self.mocktime = 0
|
||||
|
||||
def cache_path(n, *paths):
|
||||
return os.path.join(get_datadir_path(self.options.cachedir, n), "regtest", *paths)
|
||||
|
||||
@@ -61,7 +61,7 @@ class TestNode():
|
||||
To make things easier for the test writer, any unrecognised messages will
|
||||
be dispatched to the RPC connection."""
|
||||
|
||||
def __init__(self, i, datadir, *, rpchost, timewait, bitcoind, bitcoin_cli, mocktime, coverage_dir, cwd, extra_conf=None, extra_args=None, use_cli=False, start_perf=False):
|
||||
def __init__(self, i, datadir, *, rpchost, timewait, bitcoind, bitcoin_cli, coverage_dir, cwd, extra_conf=None, extra_args=None, use_cli=False, start_perf=False):
|
||||
"""
|
||||
Kwargs:
|
||||
start_perf (bool): If True, begin profiling the node with `perf` as soon as
|
||||
@@ -90,8 +90,7 @@ class TestNode():
|
||||
"-debug",
|
||||
"-debugexclude=libevent",
|
||||
"-debugexclude=leveldb",
|
||||
"-mocktime=" + str(mocktime),
|
||||
"-uacomment=testnode%d" % i
|
||||
"-uacomment=testnode%d" % i,
|
||||
]
|
||||
|
||||
self.cli = TestNodeCLI(bitcoin_cli, self.datadir)
|
||||
|
||||
@@ -110,6 +110,7 @@ BASE_SCRIPTS = [
|
||||
'wallet_txn_clone.py',
|
||||
'wallet_txn_clone.py --segwit',
|
||||
'rpc_getchaintips.py',
|
||||
'rpc_misc.py',
|
||||
'interface_rest.py',
|
||||
'mempool_spend_coinbase.py',
|
||||
'mempool_reorg.py',
|
||||
|
||||
@@ -11,7 +11,6 @@ from test_framework.util import (
|
||||
assert_array_result,
|
||||
assert_equal,
|
||||
assert_fee_amount,
|
||||
assert_greater_than,
|
||||
assert_raises_rpc_error,
|
||||
connect_nodes_bi,
|
||||
sync_blocks,
|
||||
@@ -84,13 +83,8 @@ class WalletTest(BitcoinTestFramework):
|
||||
assert_equal(txout['value'], 50)
|
||||
|
||||
# Send 21 BTC from 0 to 2 using sendtoaddress call.
|
||||
# Locked memory should increase to sign transactions
|
||||
self.log.info("test getmemoryinfo")
|
||||
memory_before = self.nodes[0].getmemoryinfo()
|
||||
self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 11)
|
||||
mempool_txid = self.nodes[0].sendtoaddress(self.nodes[2].getnewaddress(), 10)
|
||||
memory_after = self.nodes[0].getmemoryinfo()
|
||||
assert_greater_than(memory_after['locked']['used'], memory_before['locked']['used'])
|
||||
|
||||
self.log.info("test gettxout (second part)")
|
||||
# utxo spent in mempool should be visible if you exclude mempool
|
||||
|
||||
@@ -7,17 +7,25 @@ from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
)
|
||||
from test_framework.blocktools import (
|
||||
TIME_GENESIS_BLOCK,
|
||||
)
|
||||
|
||||
|
||||
class CreateTxWalletTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = False
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
def run_test(self):
|
||||
self.log.info('Create some old blocks')
|
||||
self.nodes[0].setmocktime(TIME_GENESIS_BLOCK)
|
||||
self.nodes[0].generate(200)
|
||||
self.nodes[0].setmocktime(0)
|
||||
|
||||
self.log.info('Check that we have some (old) blocks and that anti-fee-sniping is disabled')
|
||||
assert_equal(self.nodes[0].getblockchaininfo()['blocks'], 200)
|
||||
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1)
|
||||
|
||||
@@ -584,7 +584,7 @@ class ImportMultiTest(BitcoinTestFramework):
|
||||
self.log.info("Should import the ranged descriptor with specified range as solvable")
|
||||
self.test_importmulti({"desc": descsum_create(desc),
|
||||
"timestamp": "now",
|
||||
"range": {"end": 1}},
|
||||
"range": 1},
|
||||
success=True,
|
||||
warnings=["Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag."])
|
||||
for address in addresses:
|
||||
@@ -807,7 +807,7 @@ class ImportMultiTest(BitcoinTestFramework):
|
||||
'desc': descsum_create('wpkh([80002067/0h/0h]' + xpub + '/*)'),
|
||||
'keypool': True,
|
||||
'timestamp': 'now',
|
||||
'range' : {'start': 0, 'end': 4}
|
||||
'range' : [0, 4],
|
||||
}]
|
||||
)
|
||||
for i in range(0, 5):
|
||||
|
||||
@@ -34,6 +34,14 @@ class TxnMallTest(BitcoinTestFramework):
|
||||
def run_test(self):
|
||||
# All nodes should start with 1,250 BTC:
|
||||
starting_balance = 1250
|
||||
|
||||
# All nodes should be out of IBD.
|
||||
# If the nodes are not all out of IBD, that can interfere with
|
||||
# blockchain sync later in the test when nodes are connected, due to
|
||||
# timing issues.
|
||||
for n in self.nodes:
|
||||
assert n.getblockchaininfo()["initialblockdownload"] == False
|
||||
|
||||
for i in range(4):
|
||||
assert_equal(self.nodes[i].getbalance(), starting_balance)
|
||||
self.nodes[i].getnewaddress("") # bug workaround, coins generated assigned to first getnewaddress!
|
||||
|
||||
Reference in New Issue
Block a user