mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Merge pull request #1432 from tomt1664/merged-master_23.x-pick
merged-master vs. elements-23.x cherry pick
This commit is contained in:
commit
abbc17048a
56 changed files with 828 additions and 345 deletions
|
|
@ -94,9 +94,9 @@ task:
|
|||
CI_VCPKG_TAG: '2021.05.12'
|
||||
VCPKG_DOWNLOADS: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\downloads'
|
||||
VCPKG_DEFAULT_BINARY_CACHE: 'C:\Users\ContainerAdministrator\AppData\Local\vcpkg\archives'
|
||||
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip'
|
||||
QT_LOCAL_PATH: 'C:\qt-everywhere-src-5.15.2.zip'
|
||||
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.2'
|
||||
QT_DOWNLOAD_URL: 'https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip'
|
||||
QT_LOCAL_PATH: 'C:\qt-everywhere-opensource-src-5.15.3.zip'
|
||||
QT_SOURCE_DIR: 'C:\qt-everywhere-src-5.15.3'
|
||||
QTBASEDIR: 'C:\Qt_static'
|
||||
x64_NATIVE_TOOLS: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"'
|
||||
IgnoreWarnIntDirInTempDetected: 'true'
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ Qt
|
|||
---------------------
|
||||
To build Bitcoin Core with the GUI, a static build of Qt is required.
|
||||
|
||||
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-src-5.15.2.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
|
||||
1. Download a single ZIP archive of Qt source code from https://download.qt.io/official_releases/qt/ (e.g., [`qt-everywhere-opensource-src-5.15.3.zip`](https://download.qt.io/official_releases/qt/5.15/5.15.3/single/qt-everywhere-opensource-src-5.15.3.zip)), and expand it into a dedicated folder. The following instructions assume that this folder is `C:\dev\qt-source`.
|
||||
|
||||
2. Open "x64 Native Tools Command Prompt for VS 2019", and input the following commands:
|
||||
```cmd
|
||||
|
|
@ -83,4 +83,4 @@ If is it enabled then in the output `Dynamic base` will be listed in the `DLL ch
|
|||
Terminal Server Aware
|
||||
```
|
||||
|
||||
This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.
|
||||
This may not disable all stack randomization as versions of windows employ additional stack randomization protections. These protections must be turned off in the OS configuration.
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<ClCompile Include="..\..\src\test\util\setup_common.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\addressbooktests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\apptests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\optiontests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\rpcnestedtests.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\test_main.cpp" />
|
||||
<ClCompile Include="..\..\src\qt\test\uritests.cpp" />
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
<ClCompile Include="..\..\src\wallet\test\wallet_test_fixture.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_addressbooktests.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_apptests.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_optiontests.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_rpcnestedtests.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_uritests.cpp" />
|
||||
<ClCompile Include="$(GeneratedFilesOutDir)\moc\moc_wallettests.cpp" />
|
||||
|
|
@ -90,6 +92,7 @@
|
|||
<ItemGroup>
|
||||
<MocTestFiles Include="..\..\src\qt\test\addressbooktests.h" />
|
||||
<MocTestFiles Include="..\..\src\qt\test\apptests.h" />
|
||||
<MocTestFiles Include="..\..\src\qt\test\optiontests.h" />
|
||||
<MocTestFiles Include="..\..\src\qt\test\rpcnestedtests.h" />
|
||||
<MocTestFiles Include="..\..\src\qt\test\uritests.h" />
|
||||
<MocTestFiles Include="..\..\src\qt\test\wallettests.h" />
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
|
|||
fi
|
||||
|
||||
if [ "$CI_OS_NAME" == "macos" ]; then
|
||||
sudo -H pip3 install --upgrade --break-system-packages pip
|
||||
sudo -H pip3 install --upgrade pip
|
||||
# shellcheck disable=SC2086
|
||||
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -738,10 +738,6 @@ case $host in
|
|||
BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"
|
||||
fi
|
||||
|
||||
if test "$use_sqlite" != "no" && $BREW list --versions sqlite3 >/dev/null; then
|
||||
export PKG_CONFIG_PATH="$($BREW --prefix sqlite3 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
fi
|
||||
|
||||
if $BREW list --versions qt@5 >/dev/null; then
|
||||
export PKG_CONFIG_PATH="$($BREW --prefix qt@5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -152,10 +152,10 @@ outdir_for_host() {
|
|||
unsigned_tarball_for_host() {
|
||||
case "$1" in
|
||||
*mingw*)
|
||||
echo "$(outdir_for_host "$1")/${DISTNAME}-win-unsigned.tar.gz"
|
||||
echo "$(outdir_for_host "$1")/${DISTNAME}-win64-unsigned.tar.gz"
|
||||
;;
|
||||
*darwin*)
|
||||
echo "$(outdir_for_host "$1")/${DISTNAME}-osx-unsigned.tar.gz"
|
||||
echo "$(outdir_for_host "$1")/${DISTNAME}-${1}-unsigned.tar.gz"
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
|
|
@ -227,7 +227,7 @@ SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(git -c log.showSignature=false log --f
|
|||
time-machine() {
|
||||
# shellcheck disable=SC2086
|
||||
guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \
|
||||
--commit=aa34d4d28dfe25ba47d5800d05000fb7221788c0 \
|
||||
--commit=ae03f401381e956c4c41b4cf495cbde964fa43d0 \
|
||||
--cores="$JOBS" \
|
||||
--keep-failed \
|
||||
--fallback \
|
||||
|
|
|
|||
|
|
@ -348,10 +348,10 @@ mkdir -p "$DISTSRC"
|
|||
find . -print0 \
|
||||
| sort --zero-terminated \
|
||||
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-osx-unsigned.tar.gz" && exit 1 )
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}-unsigned.tar.gz" && exit 1 )
|
||||
)
|
||||
make deploy ${V:+V=1} OSX_DMG="${OUTDIR}/${DISTNAME}-osx-unsigned.dmg"
|
||||
make deploy ${V:+V=1} OSX_DMG="${OUTDIR}/${DISTNAME}-${HOST}-unsigned.dmg"
|
||||
;;
|
||||
esac
|
||||
(
|
||||
|
|
@ -423,8 +423,8 @@ mkdir -p "$DISTSRC"
|
|||
find "${DISTNAME}" -print0 \
|
||||
| sort --zero-terminated \
|
||||
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST//x86_64-apple-darwin/osx64}.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST//x86_64-apple-darwin/osx64}.tar.gz" && exit 1 )
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-${HOST}.tar.gz" && exit 1 )
|
||||
;;
|
||||
esac
|
||||
) # $DISTSRC/installed
|
||||
|
|
@ -439,8 +439,8 @@ mkdir -p "$DISTSRC"
|
|||
find . -print0 \
|
||||
| sort --zero-terminated \
|
||||
| tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-win-unsigned.tar.gz" && exit 1 )
|
||||
| gzip -9n > "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" \
|
||||
|| ( rm -f "${OUTDIR}/${DISTNAME}-win64-unsigned.tar.gz" && exit 1 )
|
||||
)
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ mkdir -p "$DISTSRC"
|
|||
-- -volume_date all_file_dates ="$SOURCE_DATE_EPOCH"
|
||||
|
||||
# Compress uncompressed.dmg and output to OUTDIR
|
||||
./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-osx-signed.dmg"
|
||||
./dmg dmg uncompressed.dmg "${OUTDIR}/${DISTNAME}-${HOST}.dmg"
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -78,6 +78,11 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
|
|||
(("-rpath=") "-rpath-link="))
|
||||
#t))))))))
|
||||
|
||||
(define building-on (string-append (list-ref (string-split (%current-system) #\-) 0) "-guix-linux-gnu"))
|
||||
|
||||
(define (explicit-cross-configure package)
|
||||
(package-with-extra-configure-variable package "--build" building-on))
|
||||
|
||||
(define (make-cross-toolchain target
|
||||
base-gcc-for-libc
|
||||
base-kernel-headers
|
||||
|
|
@ -87,9 +92,9 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
|
|||
(let* ((xbinutils (cross-binutils target))
|
||||
;; 1. Build a cross-compiling gcc without targeting any libc, derived
|
||||
;; from BASE-GCC-FOR-LIBC
|
||||
(xgcc-sans-libc (cross-gcc target
|
||||
#:xgcc base-gcc-for-libc
|
||||
#:xbinutils xbinutils))
|
||||
(xgcc-sans-libc (explicit-cross-configure (cross-gcc target
|
||||
#:xgcc base-gcc-for-libc
|
||||
#:xbinutils xbinutils)))
|
||||
;; 2. Build cross-compiled kernel headers with XGCC-SANS-LIBC, derived
|
||||
;; from BASE-KERNEL-HEADERS
|
||||
(xkernel (cross-kernel-headers target
|
||||
|
|
@ -98,17 +103,17 @@ http://www.linuxfromscratch.org/hlfs/view/development/chapter05/gcc-pass1.html"
|
|||
xbinutils))
|
||||
;; 3. Build a cross-compiled libc with XGCC-SANS-LIBC and XKERNEL,
|
||||
;; derived from BASE-LIBC
|
||||
(xlibc (cross-libc target
|
||||
base-libc
|
||||
xgcc-sans-libc
|
||||
xbinutils
|
||||
xkernel))
|
||||
(xlibc (explicit-cross-configure (cross-libc target
|
||||
base-libc
|
||||
xgcc-sans-libc
|
||||
xbinutils
|
||||
xkernel)))
|
||||
;; 4. Build a cross-compiling gcc targeting XLIBC, derived from
|
||||
;; BASE-GCC
|
||||
(xgcc (cross-gcc target
|
||||
#:xgcc base-gcc
|
||||
#:xbinutils xbinutils
|
||||
#:libc xlibc)))
|
||||
(xgcc (explicit-cross-configure (cross-gcc target
|
||||
#:xgcc base-gcc
|
||||
#:xbinutils xbinutils
|
||||
#:libc xlibc))))
|
||||
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
||||
;; XGCC
|
||||
(package
|
||||
|
|
@ -166,13 +171,18 @@ desirable for building Bitcoin Core release binaries."
|
|||
(define (make-gcc-without-newlib gcc)
|
||||
(package-with-extra-configure-variable gcc "--with-newlib" "no"))
|
||||
|
||||
(define (make-mingw-w64-cross-gcc cross-gcc)
|
||||
(package-with-extra-patches cross-gcc
|
||||
(search-our-patches "vmov-alignment.patch"
|
||||
"gcc-broken-longjmp.patch")))
|
||||
|
||||
(define (make-mingw-pthreads-cross-toolchain target)
|
||||
"Create a cross-compilation toolchain package for TARGET"
|
||||
(let* ((xbinutils (cross-binutils target))
|
||||
(pthreads-xlibc mingw-w64-x86_64-winpthreads)
|
||||
(pthreads-xgcc (make-gcc-with-pthreads
|
||||
(cross-gcc target
|
||||
#:xgcc (make-gcc-without-newlib (make-ssp-fixed-gcc base-gcc))
|
||||
#:xgcc (make-gcc-without-newlib (make-ssp-fixed-gcc (make-mingw-w64-cross-gcc base-gcc)))
|
||||
#:xbinutils xbinutils
|
||||
#:libc pthreads-xlibc))))
|
||||
;; Define a meta-package that propagates the resulting XBINUTILS, XLIBC, and
|
||||
|
|
@ -196,7 +206,8 @@ chain for " target " development."))
|
|||
|
||||
(define (make-nsis-for-gcc-10 base-nsis)
|
||||
(package-with-extra-patches base-nsis
|
||||
(search-our-patches "nsis-gcc-10-memmove.patch")))
|
||||
(search-our-patches "nsis-gcc-10-memmove.patch"
|
||||
"nsis-disable-installer-reloc.patch")))
|
||||
|
||||
(define-public lief
|
||||
(package
|
||||
|
|
@ -490,7 +501,7 @@ and endian independent.")
|
|||
(license license:expat)))
|
||||
|
||||
(define-public python-signapple
|
||||
(let ((commit "b084cbbf44d5330448ffce0c7d118f75781b64bd"))
|
||||
(let ((commit "8a945a2e7583be2665cf3a6a89d665b70ecd1ab6"))
|
||||
(package
|
||||
(name "python-signapple")
|
||||
(version (git-version "0.1" "1" commit))
|
||||
|
|
@ -503,7 +514,7 @@ and endian independent.")
|
|||
(file-name (git-file-name name commit))
|
||||
(sha256
|
||||
(base32
|
||||
"0k7inccl2mzac3wq4asbr0kl8s4cghm8982z54kfascqg45shv01"))))
|
||||
"0fr1hangvfyiwflca6jg5g8zvg3jc9qr7vd2c12ff89pznf38dlg"))))
|
||||
(build-system python-build-system)
|
||||
(propagated-inputs
|
||||
`(("python-asn1crypto" ,python-asn1crypto)
|
||||
|
|
|
|||
68
contrib/guix/patches/gcc-broken-longjmp.patch
Normal file
68
contrib/guix/patches/gcc-broken-longjmp.patch
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
commit eb5698897c52702498938592d7f76e67d126451f
|
||||
Author: Eric Botcazou <ebotcazou@adacore.com>
|
||||
Date: Wed May 5 22:48:51 2021 +0200
|
||||
|
||||
Fix PR target/100402
|
||||
|
||||
This is a regression for 64-bit Windows present from mainline down to the 9
|
||||
branch and introduced by the fix for PR target/99234. Again SEH, but with
|
||||
a twist related to the way MinGW implements setjmp/longjmp, which turns out
|
||||
to be piggybacked on SEH with recent versions of MinGW, i.e. the longjmp
|
||||
performs a bona-fide unwinding of the stack, because it calls RtlUnwindEx
|
||||
with the second argument initially passed to setjmp, which is the result of
|
||||
__builtin_frame_address (0) in the MinGW header file:
|
||||
|
||||
define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
|
||||
|
||||
This means that we directly expose the frame pointer to the SEH machinery
|
||||
here (unlike with regular exception handling where we use an intermediate
|
||||
CFA) and thus that we cannot do whatever we want with it. The old code
|
||||
would leave it unaligned, i.e. not multiple of 16, whereas the new code
|
||||
aligns it, but this breaks for some reason; at least it appears that a
|
||||
.seh_setframe directive with 0 as second argument always works, so the
|
||||
fix aligns it this way.
|
||||
|
||||
gcc/
|
||||
PR target/100402
|
||||
* config/i386/i386.c (ix86_compute_frame_layout): For a SEH target,
|
||||
always return the establisher frame for __builtin_frame_address (0).
|
||||
gcc/testsuite/
|
||||
* gcc.c-torture/execute/20210505-1.c: New test.
|
||||
|
||||
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
|
||||
index 2f838840e96..06ad1b2274e 100644
|
||||
--- a/gcc/config/i386/i386.c
|
||||
+++ b/gcc/config/i386/i386.c
|
||||
@@ -6356,12 +6356,29 @@ ix86_compute_frame_layout (void)
|
||||
area, see the SEH code in config/i386/winnt.c for the rationale. */
|
||||
frame->hard_frame_pointer_offset = frame->sse_reg_save_offset;
|
||||
|
||||
- /* If we can leave the frame pointer where it is, do so. Also, return
|
||||
+ /* If we can leave the frame pointer where it is, do so; however return
|
||||
the establisher frame for __builtin_frame_address (0) or else if the
|
||||
- frame overflows the SEH maximum frame size. */
|
||||
+ frame overflows the SEH maximum frame size.
|
||||
+
|
||||
+ Note that the value returned by __builtin_frame_address (0) is quite
|
||||
+ constrained, because setjmp is piggybacked on the SEH machinery with
|
||||
+ recent versions of MinGW:
|
||||
+
|
||||
+ # elif defined(__SEH__)
|
||||
+ # if defined(__aarch64__) || defined(_ARM64_)
|
||||
+ # define setjmp(BUF) _setjmp((BUF), __builtin_sponentry())
|
||||
+ # elif (__MINGW_GCC_VERSION < 40702)
|
||||
+ # define setjmp(BUF) _setjmp((BUF), mingw_getsp())
|
||||
+ # else
|
||||
+ # define setjmp(BUF) _setjmp((BUF), __builtin_frame_address (0))
|
||||
+ # endif
|
||||
+
|
||||
+ and the second argument passed to _setjmp, if not null, is forwarded
|
||||
+ to the TargetFrame parameter of RtlUnwindEx by longjmp (after it has
|
||||
+ built an ExceptionRecord on the fly describing the setjmp buffer). */
|
||||
const HOST_WIDE_INT diff
|
||||
= frame->stack_pointer_offset - frame->hard_frame_pointer_offset;
|
||||
- if (diff <= 255)
|
||||
+ if (diff <= 255 && !crtl->accesses_prior_frames)
|
||||
{
|
||||
/* The resulting diff will be a multiple of 16 lower than 255,
|
||||
i.e. at most 240 as required by the unwind data structure. */
|
||||
30
contrib/guix/patches/nsis-disable-installer-reloc.patch
Normal file
30
contrib/guix/patches/nsis-disable-installer-reloc.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
Patch NSIS so that it's installer stubs, produced at NSIS build time,
|
||||
do not contain .reloc sections, which will exist by default when using
|
||||
binutils/ld 2.36+.
|
||||
|
||||
This ultimately fixes an issue when running the installer with the
|
||||
"Force randomization for images (Mandatory ASLR)" setting active.
|
||||
|
||||
This patch has not yet been sent upstream, because it's not clear if this
|
||||
is the best fix, for the underlying issue, which seems to be that makensis
|
||||
doesn't account for .reloc sections when it builds installers.
|
||||
|
||||
The existence of a reloc section shouldn't be a problem, and, if anything,
|
||||
is actually a requirement for working ASLR. All other Windows binaries we
|
||||
produce contain them, and function correctly when under the same
|
||||
"Force randomization for images (Mandatory ASLR)" setting.
|
||||
|
||||
See:
|
||||
https://github.com/bitcoin/bitcoin/issues/25726
|
||||
https://sourceforge.net/p/nsis/bugs/1131/
|
||||
|
||||
--- a/SCons/Config/gnu
|
||||
+++ b/SCons/Config/gnu
|
||||
@@ -102,6 +102,7 @@ stub_env.Append(LINKFLAGS = ['-mwindows']) # build windows executables
|
||||
stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no standard libraries
|
||||
stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
|
||||
stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
|
||||
+stub_env.Append(LINKFLAGS = ['-Wl,--disable-reloc-section'])
|
||||
|
||||
conf = FlagsConfigure(stub_env)
|
||||
conf.CheckCompileFlag('-fno-tree-loop-distribute-patterns') # GCC 10: Don't generate msvcrt!memmove calls (bug #1248)
|
||||
267
contrib/guix/patches/vmov-alignment.patch
Normal file
267
contrib/guix/patches/vmov-alignment.patch
Normal file
|
|
@ -0,0 +1,267 @@
|
|||
Description: Use unaligned VMOV instructions
|
||||
Author: Stephen Kitt <skitt@debian.org>
|
||||
Bug-Debian: https://bugs.debian.org/939559
|
||||
|
||||
Based on a patch originally by Claude Heiland-Allen <claude@mathr.co.uk>
|
||||
|
||||
--- a/gcc/config/i386/sse.md
|
||||
+++ b/gcc/config/i386/sse.md
|
||||
@@ -1058,17 +1058,11 @@
|
||||
{
|
||||
if (FLOAT_MODE_P (GET_MODE_INNER (<MODE>mode)))
|
||||
{
|
||||
- if (misaligned_operand (operands[1], <MODE>mode))
|
||||
- return "vmovu<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
- else
|
||||
- return "vmova<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
+ return "vmovu<ssemodesuffix>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (misaligned_operand (operands[1], <MODE>mode))
|
||||
- return "vmovdqu<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
- else
|
||||
- return "vmovdqa<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
+ return "vmovdqu<ssescalarsize>\t{%1, %0%{%3%}%N2|%0%{%3%}%N2, %1}";
|
||||
}
|
||||
}
|
||||
[(set_attr "type" "ssemov")
|
||||
@@ -1184,17 +1178,11 @@
|
||||
{
|
||||
if (FLOAT_MODE_P (GET_MODE_INNER (<MODE>mode)))
|
||||
{
|
||||
- if (misaligned_operand (operands[0], <MODE>mode))
|
||||
- return "vmovu<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
- else
|
||||
- return "vmova<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
+ return "vmovu<ssemodesuffix>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
}
|
||||
else
|
||||
{
|
||||
- if (misaligned_operand (operands[0], <MODE>mode))
|
||||
- return "vmovdqu<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
- else
|
||||
- return "vmovdqa<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
+ return "vmovdqu<ssescalarsize>\t{%1, %0%{%2%}|%0%{%2%}, %1}";
|
||||
}
|
||||
}
|
||||
[(set_attr "type" "ssemov")
|
||||
@@ -7806,7 +7794,7 @@
|
||||
"TARGET_SSE && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
|
||||
"@
|
||||
%vmovlps\t{%1, %0|%q0, %1}
|
||||
- %vmovaps\t{%1, %0|%0, %1}
|
||||
+ %vmovups\t{%1, %0|%0, %1}
|
||||
%vmovlps\t{%1, %d0|%d0, %q1}"
|
||||
[(set_attr "type" "ssemov")
|
||||
(set_attr "prefix" "maybe_vex")
|
||||
@@ -13997,29 +13985,15 @@
|
||||
switch (<MODE>mode)
|
||||
{
|
||||
case E_V8DFmode:
|
||||
- if (misaligned_operand (operands[2], <ssequartermode>mode))
|
||||
- return "vmovupd\t{%2, %x0|%x0, %2}";
|
||||
- else
|
||||
- return "vmovapd\t{%2, %x0|%x0, %2}";
|
||||
+ return "vmovupd\t{%2, %x0|%x0, %2}";
|
||||
case E_V16SFmode:
|
||||
- if (misaligned_operand (operands[2], <ssequartermode>mode))
|
||||
- return "vmovups\t{%2, %x0|%x0, %2}";
|
||||
- else
|
||||
- return "vmovaps\t{%2, %x0|%x0, %2}";
|
||||
+ return "vmovups\t{%2, %x0|%x0, %2}";
|
||||
case E_V8DImode:
|
||||
- if (misaligned_operand (operands[2], <ssequartermode>mode))
|
||||
- return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}"
|
||||
+ return which_alternative == 2 ? "vmovdqu64\t{%2, %x0|%x0, %2}"
|
||||
: "vmovdqu\t{%2, %x0|%x0, %2}";
|
||||
- else
|
||||
- return which_alternative == 2 ? "vmovdqa64\t{%2, %x0|%x0, %2}"
|
||||
- : "vmovdqa\t{%2, %x0|%x0, %2}";
|
||||
case E_V16SImode:
|
||||
- if (misaligned_operand (operands[2], <ssequartermode>mode))
|
||||
- return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}"
|
||||
+ return which_alternative == 2 ? "vmovdqu32\t{%2, %x0|%x0, %2}"
|
||||
: "vmovdqu\t{%2, %x0|%x0, %2}";
|
||||
- else
|
||||
- return which_alternative == 2 ? "vmovdqa32\t{%2, %x0|%x0, %2}"
|
||||
- : "vmovdqa\t{%2, %x0|%x0, %2}";
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
@@ -21225,63 +21199,27 @@
|
||||
switch (get_attr_mode (insn))
|
||||
{
|
||||
case MODE_V16SF:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- return "vmovups\t{%1, %t0|%t0, %1}";
|
||||
- else
|
||||
- return "vmovaps\t{%1, %t0|%t0, %1}";
|
||||
+ return "vmovups\t{%1, %t0|%t0, %1}";
|
||||
case MODE_V8DF:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- return "vmovupd\t{%1, %t0|%t0, %1}";
|
||||
- else
|
||||
- return "vmovapd\t{%1, %t0|%t0, %1}";
|
||||
+ return "vmovupd\t{%1, %t0|%t0, %1}";
|
||||
case MODE_V8SF:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- return "vmovups\t{%1, %x0|%x0, %1}";
|
||||
- else
|
||||
- return "vmovaps\t{%1, %x0|%x0, %1}";
|
||||
+ return "vmovups\t{%1, %x0|%x0, %1}";
|
||||
case MODE_V4DF:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- return "vmovupd\t{%1, %x0|%x0, %1}";
|
||||
- else
|
||||
- return "vmovapd\t{%1, %x0|%x0, %1}";
|
||||
+ return "vmovupd\t{%1, %x0|%x0, %1}";
|
||||
case MODE_XI:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- {
|
||||
- if (which_alternative == 2)
|
||||
- return "vmovdqu\t{%1, %t0|%t0, %1}";
|
||||
- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
- return "vmovdqu64\t{%1, %t0|%t0, %1}";
|
||||
- else
|
||||
- return "vmovdqu32\t{%1, %t0|%t0, %1}";
|
||||
- }
|
||||
+ if (which_alternative == 2)
|
||||
+ return "vmovdqu\t{%1, %t0|%t0, %1}";
|
||||
+ else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
+ return "vmovdqu64\t{%1, %t0|%t0, %1}";
|
||||
else
|
||||
- {
|
||||
- if (which_alternative == 2)
|
||||
- return "vmovdqa\t{%1, %t0|%t0, %1}";
|
||||
- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
- return "vmovdqa64\t{%1, %t0|%t0, %1}";
|
||||
- else
|
||||
- return "vmovdqa32\t{%1, %t0|%t0, %1}";
|
||||
- }
|
||||
+ return "vmovdqu32\t{%1, %t0|%t0, %1}";
|
||||
case MODE_OI:
|
||||
- if (misaligned_operand (operands[1], <ssehalfvecmode>mode))
|
||||
- {
|
||||
- if (which_alternative == 2)
|
||||
- return "vmovdqu\t{%1, %x0|%x0, %1}";
|
||||
- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
- return "vmovdqu64\t{%1, %x0|%x0, %1}";
|
||||
- else
|
||||
- return "vmovdqu32\t{%1, %x0|%x0, %1}";
|
||||
- }
|
||||
+ if (which_alternative == 2)
|
||||
+ return "vmovdqu\t{%1, %x0|%x0, %1}";
|
||||
+ else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
+ return "vmovdqu64\t{%1, %x0|%x0, %1}";
|
||||
else
|
||||
- {
|
||||
- if (which_alternative == 2)
|
||||
- return "vmovdqa\t{%1, %x0|%x0, %1}";
|
||||
- else if (GET_MODE_SIZE (<ssescalarmode>mode) == 8)
|
||||
- return "vmovdqa64\t{%1, %x0|%x0, %1}";
|
||||
- else
|
||||
- return "vmovdqa32\t{%1, %x0|%x0, %1}";
|
||||
- }
|
||||
+ return "vmovdqu32\t{%1, %x0|%x0, %1}";
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
}
|
||||
--- a/gcc/config/i386/i386.c
|
||||
+++ b/gcc/config/i386/i386.c
|
||||
@@ -4981,13 +4981,13 @@
|
||||
switch (type)
|
||||
{
|
||||
case opcode_int:
|
||||
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
|
||||
+ opcode = "vmovdqu32";
|
||||
break;
|
||||
case opcode_float:
|
||||
- opcode = misaligned_p ? "vmovups" : "vmovaps";
|
||||
+ opcode = "vmovups";
|
||||
break;
|
||||
case opcode_double:
|
||||
- opcode = misaligned_p ? "vmovupd" : "vmovapd";
|
||||
+ opcode = "vmovupd";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -4996,16 +4996,16 @@
|
||||
switch (scalar_mode)
|
||||
{
|
||||
case E_SFmode:
|
||||
- opcode = misaligned_p ? "%vmovups" : "%vmovaps";
|
||||
+ opcode = "%vmovups";
|
||||
break;
|
||||
case E_DFmode:
|
||||
- opcode = misaligned_p ? "%vmovupd" : "%vmovapd";
|
||||
+ opcode = "%vmovupd";
|
||||
break;
|
||||
case E_TFmode:
|
||||
if (evex_reg_p)
|
||||
- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
|
||||
+ opcode = "vmovdqu64";
|
||||
else
|
||||
- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
|
||||
+ opcode = "%vmovdqu";
|
||||
break;
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
@@ -5017,48 +5017,32 @@
|
||||
{
|
||||
case E_QImode:
|
||||
if (evex_reg_p)
|
||||
- opcode = (misaligned_p
|
||||
- ? (TARGET_AVX512BW
|
||||
- ? "vmovdqu8"
|
||||
- : "vmovdqu64")
|
||||
- : "vmovdqa64");
|
||||
+ opcode = TARGET_AVX512BW ? "vmovdqu8" : "vmovdqu64";
|
||||
else
|
||||
- opcode = (misaligned_p
|
||||
- ? (TARGET_AVX512BW
|
||||
- ? "vmovdqu8"
|
||||
- : "%vmovdqu")
|
||||
- : "%vmovdqa");
|
||||
+ opcode = TARGET_AVX512BW ? "vmovdqu8" : "%vmovdqu";
|
||||
break;
|
||||
case E_HImode:
|
||||
if (evex_reg_p)
|
||||
- opcode = (misaligned_p
|
||||
- ? (TARGET_AVX512BW
|
||||
- ? "vmovdqu16"
|
||||
- : "vmovdqu64")
|
||||
- : "vmovdqa64");
|
||||
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "vmovdqu64";
|
||||
else
|
||||
- opcode = (misaligned_p
|
||||
- ? (TARGET_AVX512BW
|
||||
- ? "vmovdqu16"
|
||||
- : "%vmovdqu")
|
||||
- : "%vmovdqa");
|
||||
+ opcode = TARGET_AVX512BW ? "vmovdqu16" : "%vmovdqu";
|
||||
break;
|
||||
case E_SImode:
|
||||
if (evex_reg_p)
|
||||
- opcode = misaligned_p ? "vmovdqu32" : "vmovdqa32";
|
||||
+ opcode = "vmovdqu32";
|
||||
else
|
||||
- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
|
||||
+ opcode = "%vmovdqu";
|
||||
break;
|
||||
case E_DImode:
|
||||
case E_TImode:
|
||||
case E_OImode:
|
||||
if (evex_reg_p)
|
||||
- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
|
||||
+ opcode = "vmovdqu64";
|
||||
else
|
||||
- opcode = misaligned_p ? "%vmovdqu" : "%vmovdqa";
|
||||
+ opcode = "%vmovdqu";
|
||||
break;
|
||||
case E_XImode:
|
||||
- opcode = misaligned_p ? "vmovdqu64" : "vmovdqa64";
|
||||
+ opcode = "vmovdqu64";
|
||||
break;
|
||||
default:
|
||||
gcc_unreachable ();
|
||||
|
|
@ -8,9 +8,11 @@ set -e
|
|||
|
||||
ROOTDIR=dist
|
||||
BUNDLE="${ROOTDIR}/Elements-Qt.app"
|
||||
BINARY="${BUNDLE}/Contents/MacOS/Elements-Qt"
|
||||
SIGNAPPLE=signapple
|
||||
TEMPDIR=sign.temp
|
||||
OUT=signature-osx.tar.gz
|
||||
ARCH=$(${SIGNAPPLE} info ${BINARY} | head -n 1 | cut -d " " -f 1)
|
||||
OUT="signature-osx-${ARCH}.tar.gz"
|
||||
OUTROOT=osx/dist
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import base64
|
|||
import json
|
||||
import logging
|
||||
import math
|
||||
import os.path
|
||||
import os
|
||||
import re
|
||||
import struct
|
||||
import sys
|
||||
|
|
@ -493,10 +493,11 @@ def do_generate(args):
|
|||
logging.debug("Mining block delta=%s start=%s mine=%s", seconds_to_hms(mine_time-bestheader["time"]), mine_time, is_mine)
|
||||
mined_blocks += 1
|
||||
psbt = generate_psbt(tmpl, reward_spk, blocktime=mine_time)
|
||||
psbt_signed = json.loads(args.bcli("-stdin", "walletprocesspsbt", input=psbt.encode('utf8')))
|
||||
input_stream = os.linesep.join([psbt, "true", "ALL"]).encode('utf8')
|
||||
psbt_signed = json.loads(args.bcli("-stdin", "walletprocesspsbt", input=input_stream))
|
||||
if not psbt_signed.get("complete",False):
|
||||
logging.debug("Generated PSBT: %s" % (psbt,))
|
||||
sys.stderr.write("PSBT signing failed")
|
||||
sys.stderr.write("PSBT signing failed\n")
|
||||
return 1
|
||||
block, signet_solution = do_decode_psbt(psbt_signed["psbt"])
|
||||
block = finish_block(block, signet_solution, args.grind_cmd)
|
||||
|
|
|
|||
|
|
@ -1,89 +1,112 @@
|
|||
-----BEGIN CERTIFICATE-----
|
||||
MIIGQzCCBSugAwIBAgIQBSN7Cm16Z0UT9p7lA2jiKDANBgkqhkiG9w0BAQsFADBy
|
||||
MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3
|
||||
d3cuZGlnaWNlcnQuY29tMTEwLwYDVQQDEyhEaWdpQ2VydCBTSEEyIEFzc3VyZWQg
|
||||
SUQgQ29kZSBTaWduaW5nIENBMB4XDTIxMDUyMTAwMDAwMFoXDTIyMDUyNjIzNTk1
|
||||
OVowgYAxCzAJBgNVBAYTAlVTMREwDwYDVQQIEwhEZWxhd2FyZTEOMAwGA1UEBxMF
|
||||
TGV3ZXMxJjAkBgNVBAoTHUJpdGNvaW4gQ29yZSBDb2RlIFNpZ25pbmcgTExDMSYw
|
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Y+whX8QgUWtvsauGi0/C1kVfnSD8oR7FwI+isX4KJpn15GkvmB0t
|
||||
9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIB
|
||||
hjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD
|
||||
ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2
|
||||
SV1EY+CtnJYYZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd
|
||||
+SeuMIW59mdNOj6PWTkiU0TryF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWc
|
||||
fFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy7zBZLq7gcfJW5GqXb5JQbZaNaHqa
|
||||
sjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iahixTXTBmyUEFxPT9N
|
||||
cCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN5r5N
|
||||
0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie
|
||||
4u1Ki7wb/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mI
|
||||
r/OSmbaz5mEP0oUA51Aa5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1
|
||||
/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tKG48BtieVU+i2iW1bvGjUI+iLUaJW+fCm
|
||||
gKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP82Z+
|
||||
-----END CERTIFICATE-----
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ $(package)_config_opts_freebsd=--with-pic
|
|||
$(package)_config_opts_netbsd=--with-pic
|
||||
$(package)_config_opts_openbsd=--with-pic
|
||||
$(package)_config_opts_android=--with-pic
|
||||
$(package)_cflags+=-Wno-error=implicit-function-declaration
|
||||
$(package)_cflags+=-Wno-error=implicit-function-declaration -Wno-error=format-security
|
||||
$(package)_cxxflags+=-std=c++17
|
||||
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
|
||||
endef
|
||||
|
|
|
|||
|
|
@ -5,9 +5,14 @@ $(package)_file_name=$(package)-$($(package)_version).tar.xz
|
|||
$(package)_sha256_hash=60ddcff932b7fd352752d51a5c4f04f3d0403230a584df9a2e0d5ed87c486c8b
|
||||
$(package)_dependencies=libxcb
|
||||
|
||||
# This package explicitly enables -Werror=array-bounds, which causes build failures
|
||||
# with GCC 12.1+. Work around that by turning errors back into warnings.
|
||||
# This workaround would be dropped if the package was updated, as that would require
|
||||
# a different build system (Meson)
|
||||
define $(package)_set_vars
|
||||
$(package)_config_opts = --enable-option-checking --disable-dependency-tracking
|
||||
$(package)_config_opts += --disable-static --disable-docs
|
||||
$(package)_cflags += -Wno-error=array-bounds
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
package=qt
|
||||
$(package)_version=5.15.2
|
||||
$(package)_version=5.15.3
|
||||
$(package)_download_path=https://download.qt.io/official_releases/qt/5.15/$($(package)_version)/submodules
|
||||
$(package)_suffix=everywhere-src-$($(package)_version).tar.xz
|
||||
$(package)_suffix=everywhere-opensource-src-$($(package)_version).tar.xz
|
||||
$(package)_file_name=qtbase-$($(package)_suffix)
|
||||
$(package)_sha256_hash=909fad2591ee367993a75d7e2ea50ad4db332f05e1c38dd7a5a274e156a4e0f8
|
||||
$(package)_sha256_hash=26394ec9375d52c1592bd7b689b1619c6b8dbe9b6f91fdd5c355589787f3a0b6
|
||||
$(package)_linux_dependencies=freetype fontconfig libxcb libxkbcommon libxcb_util libxcb_util_render libxcb_util_keysyms libxcb_util_image libxcb_util_wm
|
||||
$(package)_qt_libs=corelib network widgets gui plugins testlib
|
||||
$(package)_linguist_tools = lrelease lupdate lconvert
|
||||
$(package)_patches = qt.pro qttools_src.pro
|
||||
$(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch
|
||||
$(package)_patches += dont_use_avx_android_x86_64.patch dont_hardcode_x86_64.patch fix_montery_include.patch
|
||||
$(package)_patches += dont_hardcode_x86_64.patch fix_montery_include.patch
|
||||
$(package)_patches += fix_android_jni_static.patch dont_hardcode_pwd.patch
|
||||
$(package)_patches += qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch
|
||||
$(package)_patches += fix_bigsur_style.patch use_android_ndk23.patch
|
||||
$(package)_patches += use_android_ndk23.patch
|
||||
$(package)_patches += rcc_hardcode_timestamp.patch
|
||||
|
||||
$(package)_qttranslations_file_name=qttranslations-$($(package)_suffix)
|
||||
$(package)_qttranslations_sha256_hash=d5788e86257b21d5323f1efd94376a213e091d1e5e03b45a95dd052b5f570db8
|
||||
$(package)_qttranslations_sha256_hash=5d7869f670a135ad0986e266813b9dd5bbae2b09577338f9cdf8904d4af52db0
|
||||
|
||||
$(package)_qttools_file_name=qttools-$($(package)_suffix)
|
||||
$(package)_qttools_sha256_hash=c189d0ce1ff7c739db9a3ace52ac3e24cb8fd6dbf234e49f075249b38f43c1cc
|
||||
$(package)_qttools_sha256_hash=463b2fe71a085e7ab4e39333ae360ab0ec857b966d7a08f752c427e5df55f90d
|
||||
|
||||
$(package)_extra_sources = $($(package)_qttranslations_file_name)
|
||||
$(package)_extra_sources += $($(package)_qttools_file_name)
|
||||
|
|
@ -235,12 +235,10 @@ define $(package)_preprocess_cmds
|
|||
patch -p1 -i $($(package)_patch_dir)/fix_no_printer.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_android_jni_static.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/no-xlib.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/dont_use_avx_android_x86_64.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/dont_hardcode_x86_64.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/fix_bigsur_style.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/use_android_ndk23.patch && \
|
||||
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
|
||||
mkdir -p qtbase/mkspecs/macx-clang-linux &&\
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
Android: don't use avx and avx2 when building for Android x86_64
|
||||
|
||||
AVX and AVX2 are not supported on x86_64 ABI.
|
||||
See:
|
||||
- https://developer.android.com/ndk/guides/abis#86-64
|
||||
- https://bugreports.qt.io/browse/QTBUG-86785
|
||||
|
||||
Upstream commits:
|
||||
- Qt 6.0: ff1a44be33f4bc05d502a2ca49171e0408992f61
|
||||
- Qt 5.15: 8b2cc0f6deb038a4c9d4f0d9b690c7726bd809a9
|
||||
|
||||
|
||||
--- old/qtbase/configure.json
|
||||
+++ new/qtbase/configure.json
|
||||
@@ -1098,7 +1098,7 @@
|
||||
},
|
||||
"avx": {
|
||||
"label": "AVX",
|
||||
- "condition": "features.sse4_2 && tests.avx",
|
||||
+ "condition": "features.sse4_2 && tests.avx && (!config.android || !arch.x86_64)",
|
||||
"output": [
|
||||
"privateConfig",
|
||||
{ "type": "define", "name": "QT_COMPILER_SUPPORTS_AVX", "value": 1 }
|
||||
@@ -1114,7 +1114,7 @@
|
||||
},
|
||||
"avx2": {
|
||||
"label": "AVX2",
|
||||
- "condition": "features.avx && tests.avx2",
|
||||
+ "condition": "features.avx && tests.avx2 && (!config.android || !arch.x86_64)",
|
||||
"output": [
|
||||
"privateConfig",
|
||||
"privateFeature",
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--- old/qtbase/src/plugins/platforms/android/androidjnimain.cpp
|
||||
+++ new/qtbase/src/plugins/platforms/android/androidjnimain.cpp
|
||||
@@ -914,6 +914,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
|
||||
@@ -934,6 +934,14 @@ Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void */*reserved*/)
|
||||
__android_log_print(ANDROID_LOG_FATAL, "Qt", "registerNatives failed");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,90 +0,0 @@
|
|||
Fix rendering in macOS BigSur
|
||||
|
||||
See: https://bugreports.qt.io/browse/QTBUG-86513.
|
||||
|
||||
Upstream commits (combined in this patch):
|
||||
- Qt 6.0: 40fb97e97f550b8afd13ecc3a038d9d0c2d82bbb
|
||||
- Qt 6.0: 3857f104cac127f62e64e55a20613f0ac2e6b843
|
||||
- Qt 6.1: abee4cdd5925a8513f51784754fca8fa35031732
|
||||
|
||||
--- old/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm
|
||||
+++ new/qtbase/src/plugins/styles/mac/qmacstyle_mac.mm
|
||||
@@ -3870,6 +3870,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
const auto cs = d->effectiveAquaSizeConstrain(opt, w);
|
||||
// Extra hacks to get the proper pressed appreance when not selected or selected and inactive
|
||||
const bool needsInactiveHack = (!isActive && isSelected);
|
||||
+ const bool isBigSurOrAbove = QOperatingSystemVersion::current() >= QOperatingSystemVersion::MacOSBigSur;
|
||||
const auto ct = !needsInactiveHack && (isSelected || tp == QStyleOptionTab::OnlyOneTab) ?
|
||||
QMacStylePrivate::Button_PushButton :
|
||||
QMacStylePrivate::Button_PopupButton;
|
||||
@@ -3878,6 +3879,12 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
auto *pb = static_cast<NSButton *>(d->cocoaControl(cw));
|
||||
|
||||
auto vOffset = isPopupButton ? 1 : 2;
|
||||
+ if (isBigSurOrAbove) {
|
||||
+ // Make it 1, otherwise, offset is very visible compared
|
||||
+ // to selected tab (which is not a popup button).
|
||||
+ vOffset = 1;
|
||||
+ }
|
||||
+
|
||||
if (tabDirection == QMacStylePrivate::East)
|
||||
vOffset -= 1;
|
||||
const auto outerAdjust = isPopupButton ? 1 : 4;
|
||||
@@ -3894,9 +3901,22 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
|
||||
else
|
||||
frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
|
||||
+
|
||||
+ if (isSelected && isBigSurOrAbove) {
|
||||
+ // 1 pixed of 'roundness' is still visible on the right
|
||||
+ // (the left is OK, it's rounded).
|
||||
+ frameRect = frameRect.adjusted(0, 0, 1, 0);
|
||||
+ }
|
||||
+
|
||||
break;
|
||||
case QStyleOptionTab::Middle:
|
||||
frameRect = frameRect.adjusted(-innerAdjust, 0, innerAdjust, 0);
|
||||
+
|
||||
+ if (isSelected && isBigSurOrAbove) {
|
||||
+ // 1 pixel of 'roundness' is still visible on both
|
||||
+ // sides - left and right.
|
||||
+ frameRect = frameRect.adjusted(-1, 0, 1, 0);
|
||||
+ }
|
||||
break;
|
||||
case QStyleOptionTab::End:
|
||||
// Pressed state hack: tweak adjustments in preparation for flip below
|
||||
@@ -3904,6 +3924,11 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
frameRect = frameRect.adjusted(-innerAdjust, 0, outerAdjust, 0);
|
||||
else
|
||||
frameRect = frameRect.adjusted(-outerAdjust, 0, innerAdjust, 0);
|
||||
+
|
||||
+ if (isSelected && isBigSurOrAbove) {
|
||||
+ // 1 pixel of 'roundness' is still visible on the left.
|
||||
+ frameRect = frameRect.adjusted(-1, 0, 0, 0);
|
||||
+ }
|
||||
break;
|
||||
case QStyleOptionTab::OnlyOneTab:
|
||||
frameRect = frameRect.adjusted(-outerAdjust, 0, outerAdjust, 0);
|
||||
@@ -3951,7 +3976,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
NSPopUpArrowPosition oldPosition = NSPopUpArrowAtCenter;
|
||||
NSPopUpButtonCell *pbCell = nil;
|
||||
auto rAdjusted = r;
|
||||
- if (isPopupButton && tp == QStyleOptionTab::OnlyOneTab) {
|
||||
+ if (isPopupButton && (tp == QStyleOptionTab::OnlyOneTab || isBigSurOrAbove)) {
|
||||
+ // Note: starting from macOS BigSur NSPopupButton has this
|
||||
+ // arrow 'button' in a different place and it became
|
||||
+ // quite visible 'in between' inactive tabs.
|
||||
pbCell = static_cast<NSPopUpButtonCell *>(pb.cell);
|
||||
oldPosition = pbCell.arrowPosition;
|
||||
pbCell.arrowPosition = NSPopUpNoArrow;
|
||||
@@ -3959,6 +3987,10 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
// NSPopUpButton in this state is smaller.
|
||||
rAdjusted.origin.x -= 3;
|
||||
rAdjusted.size.width += 6;
|
||||
+ if (isBigSurOrAbove) {
|
||||
+ if (tp == QStyleOptionTab::End)
|
||||
+ rAdjusted.origin.x -= 2;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,46 +1,9 @@
|
|||
Fix compiling with GCC 11
|
||||
|
||||
See: https://bugreports.qt.io/browse/QTBUG-90395.
|
||||
Upstream:
|
||||
- bug report: https://bugreports.qt.io/browse/QTBUG-89977
|
||||
- fix in Qt 6.1: 813a928c7c3cf98670b6043149880ed5c955efb9
|
||||
|
||||
Upstream commits:
|
||||
- Qt 5.15 -- unavailable as open source
|
||||
- Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83
|
||||
- Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c
|
||||
|
||||
--- old/qtbase/src/corelib/global/qendian.h
|
||||
+++ new/qtbase/src/corelib/global/qendian.h
|
||||
@@ -44,6 +44,8 @@
|
||||
#include <QtCore/qfloat16.h>
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
--- old/qtbase/src/corelib/global/qfloat16.h
|
||||
+++ new/qtbase/src/corelib/global/qfloat16.h
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
+#include <limits>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
|
||||
|
||||
--- old/qtbase/src/tools/moc/generator.cpp
|
||||
+++ new/qtbase/src/tools/moc/generator.cpp
|
||||
@@ -40,6 +40,8 @@
|
||||
#include <QtCore/qplugin.h>
|
||||
#include <QtCore/qstringview.h>
|
||||
|
||||
+#include <limits>
|
||||
+
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
||||
--- old/qtbase/src/corelib/text/qbytearraymatcher.h
|
||||
+++ new/qtbase/src/corelib/text/qbytearraymatcher.h
|
||||
@@ -42,6 +42,8 @@
|
||||
|
|
@ -52,6 +15,12 @@ Upstream commits:
|
|||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
|
||||
Upstream fix and backports:
|
||||
- Qt 6.1: 3eab20ad382569cb2c9e6ccec2322c3d08c0f716
|
||||
- Qt 6.2: 380294a5971da85010a708dc23b0edec192cbf27
|
||||
- Qt 6.3: 2b2b3155d9f6ba1e4f859741468fbc47db09292b
|
||||
|
||||
--- old/qtbase/src/corelib/tools/qoffsetstringarray_p.h
|
||||
+++ new/qtbase/src/corelib/tools/qoffsetstringarray_p.h
|
||||
@@ -55,6 +55,7 @@
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ Use Android NDK r23 LTS
|
|||
|
||||
--- old/qtbase/mkspecs/features/android/default_pre.prf
|
||||
+++ new/qtbase/mkspecs/features/android/default_pre.prf
|
||||
@@ -73,7 +73,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
|
||||
@@ -76,7 +76,7 @@ else: equals(QT_ARCH, x86_64): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/x86_64-linux-
|
||||
else: equals(QT_ARCH, arm64-v8a): CROSS_COMPILE = $$NDK_LLVM_PATH/bin/aarch64-linux-android-
|
||||
else: CROSS_COMPILE = $$NDK_LLVM_PATH/bin/arm-linux-androideabi-
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
|
|||
| PCRE | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
|
||||
| Python (tests) | | [3.6](https://www.python.org/downloads) | | | |
|
||||
| qrencode | [3.4.4](https://fukuchi.org/works/qrencode) | | No | | |
|
||||
| Qt | [5.15.2](https://download.qt.io/official_releases/qt/) | [5.9.5](https://github.com/bitcoin/bitcoin/issues/20104) | No | | |
|
||||
| Qt | [5.15.3](https://download.qt.io/official_releases/qt/) | [5.9.5](https://github.com/bitcoin/bitcoin/issues/20104) | No | | |
|
||||
| SQLite | [3.32.1](https://sqlite.org/download.html) | [3.7.17](https://github.com/bitcoin/bitcoin/pull/19077) | | | |
|
||||
| XCB | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Linux only) |
|
||||
| systemtap ([tracing](tracing.md))| [4.5](https://sourceware.org/systemtap/ftp/releases/) | | | | |
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ TESTS += qt/test/test_elements-qt
|
|||
|
||||
TEST_QT_MOC_CPP = \
|
||||
qt/test/moc_apptests.cpp \
|
||||
qt/test/moc_optiontests.cpp \
|
||||
qt/test/moc_rpcnestedtests.cpp \
|
||||
qt/test/moc_uritests.cpp
|
||||
|
||||
|
|
@ -19,6 +20,7 @@ endif # ENABLE_WALLET
|
|||
TEST_QT_H = \
|
||||
qt/test/addressbooktests.h \
|
||||
qt/test/apptests.h \
|
||||
qt/test/optiontests.h \
|
||||
qt/test/rpcnestedtests.h \
|
||||
qt/test/uritests.h \
|
||||
qt/test/util.h \
|
||||
|
|
@ -30,6 +32,7 @@ qt_test_test_elements_qt_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BITCOIN
|
|||
qt_test_test_elements_qt_SOURCES = \
|
||||
init/bitcoin-qt.cpp \
|
||||
qt/test/apptests.cpp \
|
||||
qt/test/optiontests.cpp \
|
||||
qt/test/rpcnestedtests.cpp \
|
||||
qt/test/test_main.cpp \
|
||||
qt/test/uritests.cpp \
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ public:
|
|||
consensus.BIP65Height = 1; // Always active unless overridden
|
||||
consensus.BIP66Height = 1; // Always active unless overridden
|
||||
consensus.CSVHeight = 1; // Always active unless overridden
|
||||
consensus.SegwitHeight = 1; // Always active unless overridden
|
||||
consensus.SegwitHeight = 0; // Always active unless overridden
|
||||
consensus.MinBIP9WarningHeight = 0;
|
||||
consensus.powLimit = uint256S("7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
||||
consensus.nPowTargetTimespan = 14 * 24 * 60 * 60; // two weeks
|
||||
|
|
|
|||
|
|
@ -193,7 +193,9 @@ static void SidechainScriptPubKeyToJSON(const CScript& scriptPubKey, UniValue& o
|
|||
CTxDestination address;
|
||||
|
||||
out.pushKV(prefix + "asm", ScriptToAsmStr(scriptPubKey));
|
||||
out.pushKV(prefix + "desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
|
||||
if (include_addresses) {
|
||||
out.pushKV(prefix + "desc", InferDescriptor(scriptPubKey, DUMMY_SIGNING_PROVIDER)->ToString());
|
||||
}
|
||||
if (include_hex) out.pushKV(prefix + "hex", HexStr(scriptPubKey));
|
||||
|
||||
std::vector<std::vector<unsigned char>> solns;
|
||||
|
|
|
|||
|
|
@ -143,7 +143,8 @@ static std::vector<CSubNet> rpc_allow_subnets;
|
|||
//! Work queue for handling longer requests off the event loop thread
|
||||
static std::unique_ptr<WorkQueue<HTTPClosure>> g_work_queue{nullptr};
|
||||
//! Handlers for (sub)paths
|
||||
static std::vector<HTTPPathHandler> pathHandlers;
|
||||
static Mutex g_httppathhandlers_mutex;
|
||||
static std::vector<HTTPPathHandler> pathHandlers GUARDED_BY(g_httppathhandlers_mutex);
|
||||
//! Bound listening sockets
|
||||
static std::vector<evhttp_bound_socket *> boundSockets;
|
||||
|
||||
|
|
@ -244,6 +245,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
|
|||
// Find registered handler for prefix
|
||||
std::string strURI = hreq->GetURI();
|
||||
std::string path;
|
||||
LOCK(g_httppathhandlers_mutex);
|
||||
std::vector<HTTPPathHandler>::const_iterator i = pathHandlers.begin();
|
||||
std::vector<HTTPPathHandler>::const_iterator iend = pathHandlers.end();
|
||||
for (; i != iend; ++i) {
|
||||
|
|
@ -642,11 +644,13 @@ HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() const
|
|||
void RegisterHTTPHandler(const std::string &prefix, bool exactMatch, const HTTPRequestHandler &handler)
|
||||
{
|
||||
LogPrint(BCLog::HTTP, "Registering HTTP handler for %s (exactmatch %d)\n", prefix, exactMatch);
|
||||
LOCK(g_httppathhandlers_mutex);
|
||||
pathHandlers.push_back(HTTPPathHandler(prefix, exactMatch, handler));
|
||||
}
|
||||
|
||||
void UnregisterHTTPHandler(const std::string &prefix, bool exactMatch)
|
||||
{
|
||||
LOCK(g_httppathhandlers_mutex);
|
||||
std::vector<HTTPPathHandler>::iterator i = pathHandlers.begin();
|
||||
std::vector<HTTPPathHandler>::iterator iend = pathHandlers.end();
|
||||
for (; i != iend; ++i)
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ void SetupServerArgs(ArgsManager& argsman)
|
|||
argsman.AddArg("-maxconnections=<n>", strprintf("Maintain at most <n> connections to peers (default: %u). This limit does not apply to connections manually added via -addnode or the addnode RPC, which have a separate limit of %u.", DEFAULT_MAX_PEER_CONNECTIONS, MAX_ADDNODE_CONNECTIONS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxreceivebuffer=<n>", strprintf("Maximum per-connection receive buffer, <n>*1000 bytes (default: %u)", DEFAULT_MAXRECEIVEBUFFER), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxsendbuffer=<n>", strprintf("Maximum per-connection send buffer, <n>*1000 bytes (default: %u)", DEFAULT_MAXSENDBUFFER), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxtimeadjustment", strprintf("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by peers forward or backward by this amount. (default: %u seconds)", DEFAULT_MAX_TIME_ADJUSTMENT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxtimeadjustment", strprintf("Maximum allowed median peer time offset adjustment. Local perspective of time may be influenced by outbound peers forward or backward by this amount (default: %u seconds).", DEFAULT_MAX_TIME_ADJUSTMENT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-maxuploadtarget=<n>", strprintf("Tries to keep outbound traffic under the given target per 24h. Limit does not apply to peers with 'download' permission or blocks created within past week. 0 = no limit (default: %s). Optional suffix units [k|K|m|M|g|G|t|T] (default: M). Lowercase is 1000 base while uppercase is 1024 base", DEFAULT_MAX_UPLOAD_TARGET), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-onion=<ip:port>", "Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
argsman.AddArg("-i2psam=<ip:port>", "I2P SAM proxy to reach I2P peers and accept I2P connections (default: none)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ std::optional<CAddress> GetLocalAddrForPeer(CNode *pnode)
|
|||
if (pnode->IsInboundConn()) {
|
||||
// For inbound connections, assume both the address and the port
|
||||
// as seen from the peer.
|
||||
addrLocal = CAddress{pnode->GetAddrLocal(), addrLocal.nServices};
|
||||
addrLocal = CAddress{pnode->GetAddrLocal(), addrLocal.nServices, addrLocal.nTime};
|
||||
} else {
|
||||
// For outbound connections, assume just the address as seen from
|
||||
// the peer and leave the port in `addrLocal` as returned by
|
||||
|
|
|
|||
|
|
@ -1289,6 +1289,12 @@ void BitcoinGUI::setEncryptionStatus(int status)
|
|||
{
|
||||
switch(status)
|
||||
{
|
||||
case WalletModel::NoKeys:
|
||||
labelWalletEncryptionIcon->hide();
|
||||
encryptWalletAction->setChecked(false);
|
||||
changePassphraseAction->setEnabled(false);
|
||||
encryptWalletAction->setEnabled(false);
|
||||
break;
|
||||
case WalletModel::Unencrypted:
|
||||
labelWalletEncryptionIcon->hide();
|
||||
encryptWalletAction->setChecked(false);
|
||||
|
|
|
|||
|
|
@ -151,8 +151,11 @@ void OptionsModel::Init(bool resetSettings)
|
|||
|
||||
if (!settings.contains("fListen"))
|
||||
settings.setValue("fListen", DEFAULT_LISTEN);
|
||||
if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool()))
|
||||
if (!gArgs.SoftSetBoolArg("-listen", settings.value("fListen").toBool())) {
|
||||
addOverriddenOption("-listen");
|
||||
} else if (!settings.value("fListen").toBool()) {
|
||||
gArgs.SoftSetBoolArg("-listenonion", false);
|
||||
}
|
||||
|
||||
if (!settings.contains("server")) {
|
||||
settings.setValue("server", false);
|
||||
|
|
|
|||
31
src/qt/test/optiontests.cpp
Normal file
31
src/qt/test/optiontests.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright (c) 2018 The Bitcoin Core developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <qt/bitcoin.h>
|
||||
#include <qt/test/optiontests.h>
|
||||
#include <test/util/setup_common.h>
|
||||
#include <util/system.h>
|
||||
|
||||
#include <QSettings>
|
||||
#include <QTest>
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
//! Entry point for BitcoinApplication tests.
|
||||
void OptionTests::optionTests()
|
||||
{
|
||||
// Test regression https://github.com/bitcoin/bitcoin/issues/24457. Check
|
||||
// if setting an integer prune value causes an exception to be thrown in
|
||||
// the OptionsModel constructor.
|
||||
gArgs.LockSettings([&](util::Settings& settings) {
|
||||
settings.forced_settings.erase("prune");
|
||||
settings.rw_settings["prune"] = 3814;
|
||||
});
|
||||
gArgs.WriteSettingsFile();
|
||||
QVERIFY_EXCEPTION_THROWN(OptionsModel{}, std::runtime_error);
|
||||
gArgs.LockSettings([&](util::Settings& settings) {
|
||||
settings.rw_settings.erase("prune");
|
||||
});
|
||||
gArgs.WriteSettingsFile();
|
||||
}
|
||||
25
src/qt/test/optiontests.h
Normal file
25
src/qt/test/optiontests.h
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
// 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.
|
||||
|
||||
#ifndef BITCOIN_QT_TEST_OPTIONTESTS_H
|
||||
#define BITCOIN_QT_TEST_OPTIONTESTS_H
|
||||
|
||||
#include <qt/optionsmodel.h>
|
||||
|
||||
#include <QObject>
|
||||
|
||||
class OptionTests : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit OptionTests(interfaces::Node& node) : m_node(node) {}
|
||||
|
||||
private Q_SLOTS:
|
||||
void optionTests();
|
||||
|
||||
private:
|
||||
interfaces::Node& m_node;
|
||||
};
|
||||
|
||||
#endif // BITCOIN_QT_TEST_OPTIONTESTS_H
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
#include <interfaces/node.h>
|
||||
#include <qt/bitcoin.h>
|
||||
#include <qt/test/apptests.h>
|
||||
#include <qt/test/optiontests.h>
|
||||
#include <qt/test/rpcnestedtests.h>
|
||||
#include <qt/test/uritests.h>
|
||||
#include <test/util/setup_common.h>
|
||||
|
|
@ -89,6 +90,10 @@ int main(int argc, char* argv[])
|
|||
if (QTest::qExec(&app_tests) != 0) {
|
||||
fInvalid = true;
|
||||
}
|
||||
OptionTests options_tests(app.node());
|
||||
if (QTest::qExec(&options_tests) != 0) {
|
||||
fInvalid = true;
|
||||
}
|
||||
URITests test1;
|
||||
if (QTest::qExec(&test1) != 0) {
|
||||
fInvalid = true;
|
||||
|
|
|
|||
|
|
@ -347,6 +347,11 @@ WalletModel::EncryptionStatus WalletModel::getEncryptionStatus() const
|
|||
{
|
||||
if(!m_wallet->isCrypted())
|
||||
{
|
||||
// A previous bug allowed for watchonly wallets to be encrypted (encryption keys set, but nothing is actually encrypted).
|
||||
// To avoid misrepresenting the encryption status of such wallets, we only return NoKeys for watchonly wallets that are unencrypted.
|
||||
if (m_wallet->privateKeysDisabled()) {
|
||||
return NoKeys;
|
||||
}
|
||||
return Unencrypted;
|
||||
}
|
||||
else if(m_wallet->isLocked())
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ public:
|
|||
|
||||
enum EncryptionStatus
|
||||
{
|
||||
NoKeys, // wallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS)
|
||||
Unencrypted, // !wallet->IsCrypted()
|
||||
Locked, // wallet->IsCrypted() && wallet->IsLocked()
|
||||
Unlocked // wallet->IsCrypted() && !wallet->IsLocked()
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ static RPCHelpMan getblockfrompeer()
|
|||
"Subsequent calls for the same block and a new peer will cause the response from the previous peer to be ignored.\n\n"
|
||||
"Returns an empty JSON object if the request was successfully scheduled.",
|
||||
{
|
||||
{"block_hash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
|
||||
{"blockhash", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "The block hash to try to fetch"},
|
||||
{"peer_id", RPCArg::Type::NUM, RPCArg::Optional::NO, "The peer to fetch it from (see getpeerinfo for peer IDs)"},
|
||||
},
|
||||
RPCResult{RPCResult::Type::OBJ, "", /*optional=*/false, "", {}},
|
||||
|
|
@ -895,7 +895,7 @@ static RPCHelpMan getblockfrompeer()
|
|||
ChainstateManager& chainman = EnsureChainman(node);
|
||||
PeerManager& peerman = EnsurePeerman(node);
|
||||
|
||||
const uint256& block_hash{ParseHashV(request.params[0], "block_hash")};
|
||||
const uint256& block_hash{ParseHashV(request.params[0], "blockhash")};
|
||||
const NodeId peer_id{request.params[1].get_int64()};
|
||||
|
||||
const CBlockIndex* const index = WITH_LOCK(cs_main, return chainman.m_blockman.LookupBlockIndex(block_hash););
|
||||
|
|
@ -1621,7 +1621,7 @@ static void SoftForkDescPushBack(const CBlockIndex* blockindex, UniValue& softfo
|
|||
// BIP9 status
|
||||
bip9.pushKV("status", get_state_name(current_state));
|
||||
bip9.pushKV("since", g_versionbitscache.StateSinceHeight(blockindex->pprev, consensusParams, id));
|
||||
bip9.pushKV("status-next", get_state_name(next_state));
|
||||
bip9.pushKV("status_next", get_state_name(next_state));
|
||||
|
||||
// BIP9 signalling status, if applicable
|
||||
if (has_signal) {
|
||||
|
|
@ -1813,7 +1813,7 @@ const std::vector<RPCResult> RPCHelpForDeployment{
|
|||
{RPCResult::Type::NUM, "min_activation_height", "minimum height of blocks for which the rules may be enforced"},
|
||||
{RPCResult::Type::STR, "status", "status of deployment at specified block (one of \"defined\", \"started\", \"locked_in\", \"active\", \"failed\")"},
|
||||
{RPCResult::Type::NUM, "since", "height of the first block to which the status applies"},
|
||||
{RPCResult::Type::STR, "status-next", "status of deployment at the next block"},
|
||||
{RPCResult::Type::STR, "status_next", "status of deployment at the next block"},
|
||||
{RPCResult::Type::OBJ, "statistics", /*optional=*/true, "numeric statistics about signalling for a softfork (only for \"started\" and \"locked_in\" status)",
|
||||
{
|
||||
{RPCResult::Type::NUM, "period", "the length in blocks of the signalling period"},
|
||||
|
|
|
|||
|
|
@ -205,11 +205,11 @@ static RPCHelpMan createmultisig()
|
|||
result.pushKV("descriptor", descriptor->ToString());
|
||||
|
||||
UniValue warnings(UniValue::VARR);
|
||||
if (!request.params[2].isNull() && OutputTypeFromDestination(dest) != output_type) {
|
||||
if (descriptor->GetOutputType() != output_type) {
|
||||
// Only warns if the user has explicitly chosen an address type we cannot generate
|
||||
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
if (!warnings.empty()) result.pushKV("warnings", warnings);
|
||||
|
||||
return result;
|
||||
},
|
||||
|
|
@ -320,7 +320,7 @@ static RPCHelpMan deriveaddresses()
|
|||
|
||||
UniValue addresses(UniValue::VARR);
|
||||
|
||||
for (int i = range_begin; i <= range_end; ++i) {
|
||||
for (int64_t i = range_begin; i <= range_end; ++i) {
|
||||
FlatSigningProvider provider;
|
||||
std::vector<CScript> scripts;
|
||||
if (!desc->Expand(i, key_provider, scripts, provider)) {
|
||||
|
|
|
|||
|
|
@ -1202,6 +1202,7 @@ static RPCHelpMan decodepsbt()
|
|||
{RPCResult::Type::OBJ, "scriptPubKey", "",
|
||||
{
|
||||
{RPCResult::Type::STR, "asm", "The asm"},
|
||||
{RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
|
||||
{RPCResult::Type::STR_HEX, "hex", "The hex"},
|
||||
{RPCResult::Type::STR, "type", "The type, eg 'pubkeyhash'"},
|
||||
{RPCResult::Type::STR, "address", /*optional=*/true, "The Bitcoin address (only if a well-defined address exists)"},
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ UniValue RPCHelpMan::HandleRequest(const JSONRPCRequest& request) const
|
|||
throw std::runtime_error(ToString());
|
||||
}
|
||||
const UniValue ret = m_fun(*this, request);
|
||||
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [ret](const RPCResult& res) { return res.MatchesType(ret); }));
|
||||
CHECK_NONFATAL(std::any_of(m_results.m_results.begin(), m_results.m_results.end(), [&ret](const RPCResult& res) { return res.MatchesType(ret); }));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <test/util/setup_common.h>
|
||||
#include <univalue.h>
|
||||
#include <util/settings.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/system.h>
|
||||
|
||||
|
|
@ -41,6 +43,116 @@ void SetupArgs(ArgsManager& local_args, const std::vector<std::pair<std::string,
|
|||
}
|
||||
}
|
||||
|
||||
// Test behavior of GetArg functions when string, integer, and boolean types
|
||||
// are specified in the settings.json file. GetArg functions are convenience
|
||||
// functions. The GetSetting method can always be used instead of GetArg
|
||||
// methods to retrieve original values, and there's not always an objective
|
||||
// answer to what GetArg behavior is best in every case. This test makes sure
|
||||
// there's test coverage for whatever the current behavior is, so it's not
|
||||
// broken or changed unintentionally.
|
||||
BOOST_AUTO_TEST_CASE(setting_args)
|
||||
{
|
||||
ArgsManager args;
|
||||
SetupArgs(args, {{"-foo", ArgsManager::ALLOW_ANY}});
|
||||
|
||||
auto set_foo = [&](const util::SettingsValue& value) {
|
||||
args.LockSettings([&](util::Settings& settings) {
|
||||
settings.rw_settings["foo"] = value;
|
||||
});
|
||||
};
|
||||
|
||||
set_foo("str");
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "\"str\"");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "str");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 0);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), false);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), false);
|
||||
|
||||
set_foo("99");
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "\"99\"");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "99");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 99);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), true);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), true);
|
||||
|
||||
set_foo("3.25");
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "\"3.25\"");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "3.25");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 3);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), true);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), true);
|
||||
|
||||
set_foo("0");
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "\"0\"");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "0");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 0);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), false);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), false);
|
||||
|
||||
set_foo("");
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "\"\"");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 0);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), true);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), true);
|
||||
|
||||
set_foo(99);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "99");
|
||||
BOOST_CHECK_THROW(args.GetArg("foo", "default"), std::runtime_error);
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 99);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", true), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", false), std::runtime_error);
|
||||
|
||||
set_foo(3.25);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "3.25");
|
||||
BOOST_CHECK_THROW(args.GetArg("foo", "default"), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetIntArg("foo", 100), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", true), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", false), std::runtime_error);
|
||||
|
||||
set_foo(0);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "0");
|
||||
BOOST_CHECK_THROW(args.GetArg("foo", "default"), std::runtime_error);
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 0);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", true), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", false), std::runtime_error);
|
||||
|
||||
set_foo(true);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "true");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "1");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 1);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), true);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), true);
|
||||
|
||||
set_foo(false);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "false");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "0");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 0);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), false);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), false);
|
||||
|
||||
set_foo(UniValue::VOBJ);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "{}");
|
||||
BOOST_CHECK_THROW(args.GetArg("foo", "default"), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetIntArg("foo", 100), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", true), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", false), std::runtime_error);
|
||||
|
||||
set_foo(UniValue::VARR);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "[]");
|
||||
BOOST_CHECK_THROW(args.GetArg("foo", "default"), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetIntArg("foo", 100), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", true), std::runtime_error);
|
||||
BOOST_CHECK_THROW(args.GetBoolArg("foo", false), std::runtime_error);
|
||||
|
||||
set_foo(UniValue::VNULL);
|
||||
BOOST_CHECK_EQUAL(args.GetSetting("foo").write(), "null");
|
||||
BOOST_CHECK_EQUAL(args.GetArg("foo", "default"), "default");
|
||||
BOOST_CHECK_EQUAL(args.GetIntArg("foo", 100), 100);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", true), true);
|
||||
BOOST_CHECK_EQUAL(args.GetBoolArg("foo", false), false);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(boolarg)
|
||||
{
|
||||
ArgsManager local_args;
|
||||
|
|
|
|||
|
|
@ -675,10 +675,13 @@ BOOST_AUTO_TEST_CASE(get_local_addr_for_peer_port)
|
|||
const uint16_t bind_port = 20001;
|
||||
m_node.args->ForceSetArg("-bind", strprintf("3.4.5.6:%u", bind_port));
|
||||
|
||||
const uint32_t current_time = static_cast<uint32_t>(GetAdjustedTime());
|
||||
SetMockTime(current_time);
|
||||
|
||||
// Our address:port as seen from the peer, completely different from the above.
|
||||
in_addr peer_us_addr;
|
||||
peer_us_addr.s_addr = htonl(0x02030405);
|
||||
const CAddress peer_us{CService{peer_us_addr, 20002}, NODE_NETWORK};
|
||||
const CAddress peer_us{CService{peer_us_addr, 20002}, NODE_NETWORK, current_time};
|
||||
|
||||
// Create a peer with a routable IPv4 address (outbound).
|
||||
in_addr peer_out_in_addr;
|
||||
|
|
@ -699,7 +702,7 @@ BOOST_AUTO_TEST_CASE(get_local_addr_for_peer_port)
|
|||
// Without the fix peer_us:8333 is chosen instead of the proper peer_us:bind_port.
|
||||
auto chosen_local_addr = GetLocalAddrForPeer(&peer_out);
|
||||
BOOST_REQUIRE(chosen_local_addr);
|
||||
const CService expected{peer_us_addr, bind_port};
|
||||
const CAddress expected{CService{peer_us_addr, bind_port}, NODE_NETWORK, current_time};
|
||||
BOOST_CHECK(*chosen_local_addr == expected);
|
||||
|
||||
// Create a peer with a routable IPv4 address (inbound).
|
||||
|
|
|
|||
|
|
@ -592,6 +592,8 @@ public:
|
|||
allowed_syscalls.insert(__NR_getcwd); // get current working directory
|
||||
allowed_syscalls.insert(__NR_getdents); // get directory entries
|
||||
allowed_syscalls.insert(__NR_getdents64); // get directory entries
|
||||
allowed_syscalls.insert(__NR_inotify_rm_watch);// remove an existing watch from an inotify instance
|
||||
allowed_syscalls.insert(__NR_linkat); // create relative to a directory file descriptor
|
||||
allowed_syscalls.insert(__NR_lstat); // get file status
|
||||
allowed_syscalls.insert(__NR_mkdir); // create a directory
|
||||
allowed_syscalls.insert(__NR_newfstatat); // get file status
|
||||
|
|
|
|||
|
|
@ -127,6 +127,8 @@ bool LoadWallets(WalletContext& context)
|
|||
chain.initError(error);
|
||||
return false;
|
||||
}
|
||||
|
||||
NotifyWalletLoaded(context, pwallet);
|
||||
AddWallet(context, pwallet);
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -320,11 +320,11 @@ RPCHelpMan addmultisigaddress()
|
|||
result.pushKV("descriptor", descriptor->ToString());
|
||||
|
||||
UniValue warnings(UniValue::VARR);
|
||||
if (!request.params[3].isNull() && OutputTypeFromDestination(dest) != output_type) {
|
||||
if (descriptor->GetOutputType() != output_type) {
|
||||
// Only warns if the user has explicitly chosen an address type we cannot generate
|
||||
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
|
||||
}
|
||||
if (warnings.size()) result.pushKV("warnings", warnings);
|
||||
if (!warnings.empty()) result.pushKV("warnings", warnings);
|
||||
|
||||
return result;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ static const std::shared_ptr<CWallet> TestLoadWallet(WalletContext& context)
|
|||
std::vector<bilingual_str> warnings;
|
||||
auto database = MakeWalletDatabase("", options, status, error);
|
||||
auto wallet = CWallet::Create(context, "", std::move(database), options.create_flags, error, warnings);
|
||||
NotifyWalletLoaded(context, wallet);
|
||||
if (context.chain) {
|
||||
wallet->postInitProcess();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,6 +177,14 @@ std::unique_ptr<interfaces::Handler> HandleLoadWallet(WalletContext& context, Lo
|
|||
return interfaces::MakeHandler([&context, it] { LOCK(context.wallets_mutex); context.wallet_load_fns.erase(it); });
|
||||
}
|
||||
|
||||
void NotifyWalletLoaded(WalletContext& context, const std::shared_ptr<CWallet>& wallet)
|
||||
{
|
||||
LOCK(context.wallets_mutex);
|
||||
for (auto& load_wallet : context.wallet_load_fns) {
|
||||
load_wallet(interfaces::MakeWallet(context, wallet));
|
||||
}
|
||||
}
|
||||
|
||||
static Mutex g_loading_wallet_mutex;
|
||||
static Mutex g_wallet_release_mutex;
|
||||
static std::condition_variable g_wallet_release_cv;
|
||||
|
|
@ -242,6 +250,8 @@ std::shared_ptr<CWallet> LoadWalletInternal(WalletContext& context, const std::s
|
|||
status = DatabaseStatus::FAILED_LOAD;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
NotifyWalletLoaded(context, wallet);
|
||||
AddWallet(context, wallet);
|
||||
wallet->postInitProcess();
|
||||
|
||||
|
|
@ -358,6 +368,8 @@ std::shared_ptr<CWallet> CreateWallet(WalletContext& context, const std::string&
|
|||
wallet->Lock();
|
||||
}
|
||||
}
|
||||
|
||||
NotifyWalletLoaded(context, wallet);
|
||||
AddWallet(context, wallet);
|
||||
wallet->postInitProcess();
|
||||
|
||||
|
|
@ -3133,13 +3145,6 @@ std::shared_ptr<CWallet> CWallet::Create(WalletContext& context, const std::stri
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
{
|
||||
LOCK(context.wallets_mutex);
|
||||
for (auto& load_wallet : context.wallet_load_fns) {
|
||||
load_wallet(interfaces::MakeWallet(context, walletInstance));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
LOCK(walletInstance->cs_wallet);
|
||||
walletInstance->SetBroadcastTransactions(args.GetBoolArg("-walletbroadcast", DEFAULT_WALLETBROADCAST));
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ std::shared_ptr<CWallet> LoadWallet(WalletContext& context, const std::string& n
|
|||
std::shared_ptr<CWallet> CreateWallet(WalletContext& context, const std::string& name, std::optional<bool> load_on_start, DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error, std::vector<bilingual_str>& warnings);
|
||||
std::shared_ptr<CWallet> RestoreWallet(WalletContext& context, const fs::path& backup_file, const std::string& wallet_name, std::optional<bool> load_on_start, DatabaseStatus& status, bilingual_str& error, std::vector<bilingual_str>& warnings);
|
||||
std::unique_ptr<interfaces::Handler> HandleLoadWallet(WalletContext& context, LoadWalletFn load_wallet);
|
||||
void NotifyWalletLoaded(WalletContext& context, const std::shared_ptr<CWallet>& wallet);
|
||||
std::unique_ptr<WalletDatabase> MakeWalletDatabase(const std::string& name, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
|
||||
|
||||
//! -paytxfee default
|
||||
|
|
|
|||
|
|
@ -42,11 +42,11 @@ class SimplicityActivationTest(BitcoinTestFramework):
|
|||
assert_equal (decode["versionHex"], "20000000")
|
||||
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "defined")
|
||||
# The 1023rd block does not signal, but changes status-next to "started" from "defined"
|
||||
# The 1023rd block does not signal, but changes status_next to "started" from "defined"
|
||||
# bitcoin PR #23508 changed bip9 status to the current block instead of the next block
|
||||
blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress())
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "defined")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status-next"], "started")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "started")
|
||||
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "20000000")
|
||||
|
||||
blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress())
|
||||
|
|
@ -73,7 +73,7 @@ class SimplicityActivationTest(BitcoinTestFramework):
|
|||
# The 128th block then switches from "started" to "locked_in"
|
||||
blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress())
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "started")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status-next"], "locked_in")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "locked_in")
|
||||
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "21000000")
|
||||
|
||||
# Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling
|
||||
|
|
@ -86,7 +86,7 @@ class SimplicityActivationTest(BitcoinTestFramework):
|
|||
block = block[:7] + "0" + block[8:] # turn off Simplicity signal
|
||||
rpc.submitblock(block)
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status"], "locked_in")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status-next"], "active")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["simplicity"]["bip9"]["status_next"], "active")
|
||||
|
||||
# After the state is "active", signallng stops by default.
|
||||
blocks = self.generatetoaddress(rpc, 1, self.nodes[0].getnewaddress())
|
||||
|
|
|
|||
|
|
@ -49,11 +49,11 @@ class TaprootActivationTest(BitcoinTestFramework):
|
|||
assert_equal (decode["versionHex"], "20000000")
|
||||
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status"], "defined")
|
||||
# The 1023rd block does not signal, but changes status-next to "started" from "defined"
|
||||
# The 1023rd block does not signal, but changes status_next to "started" from "defined"
|
||||
# bitcoin PR #23508 changed bip9 status to the current block instead of the next block
|
||||
blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress())
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status"], "defined")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status-next"], "started")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status_next"], "started")
|
||||
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "20000000")
|
||||
|
||||
blocks = self.generatetoaddress(rpc, 127, rpc.getnewaddress())
|
||||
|
|
@ -80,7 +80,7 @@ class TaprootActivationTest(BitcoinTestFramework):
|
|||
# The 128th block then switches from "started" to "locked_in"
|
||||
blocks = self.generatetoaddress(rpc, 1, rpc.getnewaddress())
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status"], "started")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status-next"], "locked_in")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status_next"], "locked_in")
|
||||
assert_equal(rpc.getblockheader(blocks[0])["versionHex"], "20000004")
|
||||
|
||||
# Run through another 128 blocks, which will go from "locked in" to "active" regardless of signalling
|
||||
|
|
@ -93,7 +93,7 @@ class TaprootActivationTest(BitcoinTestFramework):
|
|||
block = block[:1] + "0" + block[2:] # turn off Taproot signal
|
||||
rpc.submitblock(block)
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status"], "locked_in")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status-next"], "active")
|
||||
assert_equal(rpc.getdeploymentinfo()["deployments"]["taproot"]["bip9"]["status_next"], "active")
|
||||
|
||||
# After the state is "active", signallng stops by default.
|
||||
blocks = self.generatetoaddress(rpc, 1, self.nodes[0].getnewaddress())
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ class BlockchainTest(BitcoinTestFramework):
|
|||
'active': False,
|
||||
'bip9': {
|
||||
'status': 'defined',
|
||||
'status-next': 'defined',
|
||||
'status_next': 'defined',
|
||||
'start_time': 2147483648,
|
||||
'timeout': 9223372036854775807,
|
||||
'since': 0,
|
||||
|
|
@ -213,7 +213,7 @@ class BlockchainTest(BitcoinTestFramework):
|
|||
'timeout': 0x7fffffffffffffff, # testdummy does not have a timeout so is set to the max int64 value
|
||||
'min_activation_height': 0,
|
||||
'status': 'started',
|
||||
'status-next': status_next,
|
||||
'status_next': status_next,
|
||||
'since': 144,
|
||||
'statistics': {
|
||||
'period': 144,
|
||||
|
|
@ -233,7 +233,7 @@ class BlockchainTest(BitcoinTestFramework):
|
|||
'timeout': 9223372036854775807,
|
||||
'min_activation_height': 0,
|
||||
'status': 'active',
|
||||
'status-next': 'active',
|
||||
'status_next': 'active',
|
||||
'since': 0,
|
||||
},
|
||||
'height': 0,
|
||||
|
|
|
|||
|
|
@ -80,14 +80,16 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
|
|||
assert 'warnings' not in result
|
||||
|
||||
# Generate addresses with the segwit types. These should all make legacy addresses
|
||||
for addr_type in ['bech32', 'p2sh-segwit']:
|
||||
result = wmulti0.createmultisig(2, keys, addr_type)
|
||||
assert_equal(legacy_addr, result['address'])
|
||||
assert_equal(result['warnings'], ["Unable to make chosen address type, please ensure no uncompressed public keys are present."])
|
||||
err_msg = ["Unable to make chosen address type, please ensure no uncompressed public keys are present."]
|
||||
|
||||
result = wmulti0.addmultisigaddress(2, keys, '', addr_type)
|
||||
for addr_type in ['bech32', 'p2sh-segwit']:
|
||||
result = wmulti0.createmultisig(nrequired=2, keys=keys, address_type=addr_type)
|
||||
assert_equal(legacy_addr, result['address'])
|
||||
assert_equal(result['warnings'], ["Unable to make chosen address type, please ensure no uncompressed public keys are present."])
|
||||
assert_equal(result['warnings'], err_msg)
|
||||
|
||||
result = wmulti0.addmultisigaddress(nrequired=2, keys=keys, address_type=addr_type)
|
||||
assert_equal(legacy_addr, result['address'])
|
||||
assert_equal(result['warnings'], err_msg)
|
||||
|
||||
self.log.info('Testing sortedmulti descriptors with BIP 67 test vectors')
|
||||
with open(os.path.join(os.path.dirname(os.path.realpath(__file__)), 'data/rpc_bip67.json'), encoding='utf-8') as f:
|
||||
|
|
@ -158,6 +160,7 @@ class RpcCreateMultiSigTest(BitcoinTestFramework):
|
|||
desc = descsum_create(desc)
|
||||
|
||||
msig = node2.createmultisig(self.nsigs, self.pub, self.output_type)
|
||||
assert 'warnings' not in msig
|
||||
madd = msig["address"]
|
||||
mredeem = msig["redeemScript"]
|
||||
assert_equal(desc, msig['descriptor'])
|
||||
|
|
|
|||
|
|
@ -44,6 +44,13 @@ class DeriveaddressesTest(BitcoinTestFramework):
|
|||
combo_descriptor = descsum_create("combo(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/0)")
|
||||
assert_equal(self.nodes[0].deriveaddresses(combo_descriptor), ["2dnaGtwYgBhXYQGTArxKKapi52Mkf3KTQhb", "2dnaGtwYgBhXYQGTArxKKapi52Mkf3KTQhb", address, "XY2Fo8bxL1EViXjWrZ5iZrb5thmfPvWJxw"])
|
||||
|
||||
# Before #26275, bitcoind would crash when deriveaddresses was
|
||||
# called with derivation index 2147483647, which is the maximum
|
||||
# positive value of a signed int32, and - currently - the
|
||||
# maximum value that the deriveaddresses bitcoin RPC call
|
||||
# accepts as derivation index.
|
||||
assert_equal(self.nodes[0].deriveaddresses(descsum_create("wpkh(tprv8ZgxMBicQKsPd7Uf69XL1XwhmjHopUGep8GuEiJDZmbQz6o58LninorQAfcKZWARbtRtfnLcJ5MQ2AtHcQJCCRUcMRvmDUjyEmNUWwx8UbK/1/1/*)"), [2147483647, 2147483647]), ["ert1qtzs23vgzpreks5gtygwxf8tv5rldxvvsua5ngg"])
|
||||
|
||||
hardened_without_privkey_descriptor = descsum_create("wpkh(tpubD6NzVbkrYhZ4WaWSyoBvQwbpLkojyoTZPRsgXELWz3Popb3qkjcJyJUGLnL4qHHoQvao8ESaAstxYSnhyswJ76uZPStJRJCTKvosUCJZL5B/1'/1/0)")
|
||||
assert_raises_rpc_error(-5, "Cannot derive script without private keys", self.nodes[0].deriveaddresses, hardened_without_privkey_descriptor)
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ from itertools import product
|
|||
|
||||
from test_framework.descriptors import descsum_create
|
||||
from test_framework.key import ECKey
|
||||
from test_framework.messages import (
|
||||
ser_compact_size,
|
||||
WITNESS_SCALE_FACTOR,
|
||||
)
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
# assert_approx,
|
||||
|
|
@ -1167,10 +1171,11 @@ class PSBTTest(BitcoinTestFramework):
|
|||
break
|
||||
psbt_in = dec["inputs"][input_idx]
|
||||
# Calculate the input weight
|
||||
# (prevout + sequence + length of scriptSig + 2 bytes buffer) * 4 + len of scriptwitness
|
||||
# (prevout + sequence + length of scriptSig + scriptsig + 1 byte buffer) * WITNESS_SCALE_FACTOR + num scriptWitness stack items + (length of stack item + stack item) * N stack items + 1 byte buffer
|
||||
len_scriptsig = len(psbt_in["final_scriptSig"]["hex"]) // 2 if "final_scriptSig" in psbt_in else 0
|
||||
len_scriptwitness = len(psbt_in["final_scriptwitness"]["hex"]) // 2 if "final_scriptwitness" in psbt_in else 0
|
||||
input_weight = ((41 + len_scriptsig + 2) * 4) + len_scriptwitness
|
||||
len_scriptsig += len(ser_compact_size(len_scriptsig)) + 1
|
||||
len_scriptwitness = (sum([(len(x) // 2) + len(ser_compact_size(len(x) // 2)) for x in psbt_in["final_scriptwitness"]]) + len(psbt_in["final_scriptwitness"]) + 1) if "final_scriptwitness" in psbt_in else 0
|
||||
input_weight = ((40 + len_scriptsig) * WITNESS_SCALE_FACTOR) + len_scriptwitness
|
||||
low_input_weight = input_weight // 2
|
||||
high_input_weight = input_weight * 2
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,10 @@ from itertools import product
|
|||
from test_framework.authproxy import JSONRPCException
|
||||
from test_framework.descriptors import descsum_create
|
||||
from test_framework.key import ECKey
|
||||
from test_framework.messages import (
|
||||
ser_compact_size,
|
||||
WITNESS_SCALE_FACTOR,
|
||||
)
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_equal,
|
||||
|
|
@ -533,10 +537,11 @@ class WalletSendTest(BitcoinTestFramework):
|
|||
break
|
||||
psbt_in = dec["inputs"][input_idx]
|
||||
# Calculate the input weight
|
||||
# (prevout + sequence + length of scriptSig + 2 bytes buffer) * 4 + len of scriptwitness
|
||||
# (prevout + sequence + length of scriptSig + scriptsig + 1 byte buffer) * WITNESS_SCALE_FACTOR + num scriptWitness stack items + (length of stack item + stack item) * N stack items + 1 byte buffer
|
||||
len_scriptsig = len(psbt_in["final_scriptSig"]["hex"]) // 2 if "final_scriptSig" in psbt_in else 0
|
||||
len_scriptwitness = len(psbt_in["final_scriptwitness"]["hex"]) // 2 if "final_scriptwitness" in psbt_in else 0
|
||||
input_weight = ((41 + len_scriptsig + 2) * 4) + len_scriptwitness
|
||||
len_scriptsig += len(ser_compact_size(len_scriptsig)) + 1
|
||||
len_scriptwitness = (sum([(len(x) // 2) + len(ser_compact_size(len(x) // 2)) for x in psbt_in["final_scriptwitness"]]) + len(psbt_in["final_scriptwitness"]) + 1) if "final_scriptwitness" in psbt_in else 0
|
||||
input_weight = ((40 + len_scriptsig) * WITNESS_SCALE_FACTOR) + len_scriptwitness
|
||||
|
||||
# Input weight error conditions
|
||||
assert_raises_rpc_error(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue