Skip to content

Commit 9d3f22a

Browse files
Merge #6454: [v22.0.x] backport: 22.0.0 rc.4 backports
fa29ed5 Merge #6456: fix(qt): allow refreshing wallet data without crashing (pasta) 758cd64 Merge #6452: fix: store ready queues on the mixing masternode (pasta) 395447b Merge #6451: depends: update 'src/dashbls' to dashpay/bls-signatures@7e747e8a as 62fa665 (pasta) Pull request description: ## Issue being fixed or feature implemented batch of backports to go into rc.4 ## What was done? Bls library updated to compile on freebsd, fix for mixing ## How Has This Been Tested? ## Breaking Changes ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK fa29ed5 Tree-SHA512: 6a050bca13ca2e5324a6a8a7966d2d6aa3c0c97ee3c884aa35102f949dfef62e976d053cd05a549908c30e8bb6a81d996a82181852841809d8959ca78c96e823
2 parents e0151e3 + fa29ed5 commit 9d3f22a

File tree

5 files changed

+96
-62
lines changed

5 files changed

+96
-62
lines changed

src/coinjoin/server.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,7 @@ void CCoinJoinServer::CheckForCompleteQueue()
520520
"with %d participants\n", dsq.ToString(), vecSessionCollaterals.size());
521521
dsq.Sign(*m_mn_activeman);
522522
m_peerman->RelayDSQ(dsq);
523+
WITH_LOCK(cs_vecqueue, vecCoinJoinQueue.push_back(dsq));
523524
}
524525
}
525526

src/dashbls/.github/workflows/build-binds.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [macos-latest, ubuntu-latest]
26-
golang: [ '1.17' ]
27-
python: ['3.7', '3.8', '3.9', '3.10', '3.11']
26+
golang: [ '1.22' ]
27+
python: ['3.9', '3.10', '3.11', '3.12']
2828

2929
steps:
3030
- name: Checkout code

src/dashbls/configure.ac

+83-52
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AC_PREREQ([2.60])
2-
AC_INIT([libdashbls],[1.3.3])
2+
AC_INIT([libdashbls],[1.3.4])
33
AC_CONFIG_AUX_DIR([build-aux])
44
AC_CONFIG_MACRO_DIR([build-aux/m4])
55

@@ -100,7 +100,7 @@ dnl warning about something unrelated, for example about some path issue. If tha
100100
dnl -Werror cannot be used because all of those warnings would be turned into errors.
101101
AX_CHECK_COMPILE_FLAG([-Werror], [FLAG_WERROR="-Werror"], [FLAG_WERROR=""])
102102

103-
if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then
103+
if test x"$use_debug" = x"yes" -o x"$use_optimizations" = x"no"; then
104104
dnl Clear default -g -O2 flags
105105
if test x"$CFLAGS_overridden" = x"no"; then
106106
CFLAGS=""
@@ -112,7 +112,7 @@ if [[[ "$use_debug" == "yes" || "$use_optimizations" == "no" ]]]; then
112112
dnl Disable optimizations
113113
AX_CHECK_COMPILE_FLAG([-O0], [[DEBUG_FLAGS="$DEBUG_FLAGS -O0"]], [], [[$FLAG_WERROR]])
114114

115-
if [[[ "$use_debug" == "yes" ]]]; then
115+
if test x"$use_debug" = x"yes"; then
116116
dnl Prefer -g3, fall back to -g if that is unavailable.
117117
AX_CHECK_COMPILE_FLAG(
118118
[-g3],
@@ -220,7 +220,11 @@ case $host in
220220
GMP_LDFLAGS="-L$gmp_prefix/lib"
221221
fi
222222
fi
223-
;;
223+
;;
224+
*freebsd*)
225+
GMP_CPPFLAGS="-I/usr/local/include"
226+
GMP_LDFLAGS="-L/usr/local/lib"
227+
;;
224228
esac
225229

226230
if test x"$want_backend" = x"auto"; then
@@ -432,44 +436,74 @@ fi
432436

433437
use_pkgconfig=yes
434438

435-
if [[[ "$host_cpu" == x86_64 && "$use_optimizations" == "yes" ]]]; then
436-
dnl Support for AMD64 (also known as x86_64 on some platforms) processors
437-
CPU_ARCH="x64"
438-
AC_DEFINE([ARCH], [X64], [Architecture.])
439-
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
440-
elif [[[ "$host_cpu" == aarch* && "$use_optimizations" == "yes" ]]]; then
441-
dnl Support for 64-bit ARM processors
442-
dnl Relic doesn't support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE.
443-
CPU_ARCH="none"
444-
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
445-
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
446-
elif [[[ "$host_cpu" == i?86 && "$use_optimizations" == "yes" ]]]; then
447-
dnl Support for Intel x86 processors
448-
CPU_ARCH="x86"
449-
AC_DEFINE([ARCH], [X86], [Architecture.])
450-
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
451-
elif [[[ "$host_cpu" == arm* && "$use_optimizations" == "yes" ]]]; then
452-
dnl Support for 32-bit native ARM processors
453-
CPU_ARCH="arm"
454-
AC_DEFINE([ARCH], [ARM], [Architecture.])
455-
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
456-
elif [[[ "$host_cpu" == *64* ]]]; then
457-
dnl Support for an undefined 64-bit architecture
458-
CPU_ARCH="none"
459-
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
460-
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
461-
elif [[[ "$host_cpu" == *32* || "$host_cpu" == arm* || "$host_cpu" == i?86 ]]]; then
462-
dnl Support for an undefined 32-bit architecture
463-
CPU_ARCH="none"
464-
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
465-
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
439+
if test x"$use_optimizations" = x"yes"; then
440+
case $host_cpu in
441+
amd64 | x86_64)
442+
dnl Support for AMD64 (also known as x86_64 on some platforms) processors
443+
CPU_ARCH="x64"
444+
AC_DEFINE([ARCH], [X64], [Architecture.])
445+
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
446+
;;
447+
aarch*)
448+
dnl Support for 64-bit ARM processors
449+
dnl Relic does not support aarch64 yet, set CPU_ARCH to none and ARCH to RELIC_NONE.
450+
CPU_ARCH="none"
451+
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
452+
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
453+
;;
454+
i?86)
455+
dnl Support for Intel x86 processors
456+
CPU_ARCH="x86"
457+
AC_DEFINE([ARCH], [X86], [Architecture.])
458+
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
459+
;;
460+
arm*)
461+
dnl Support for 32-bit native ARM processors
462+
CPU_ARCH="arm"
463+
AC_DEFINE([ARCH], [ARM], [Architecture.])
464+
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
465+
;;
466+
*64*)
467+
dnl Support for an undefined 64-bit architecture
468+
CPU_ARCH="none"
469+
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
470+
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
471+
;;
472+
*32*)
473+
dnl Support for an undefined 32-bit architecture
474+
CPU_ARCH="none"
475+
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
476+
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
477+
;;
478+
*)
479+
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
480+
;;
481+
esac
466482
else
467-
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
483+
case $host_cpu in
484+
*64*)
485+
dnl Support for an undefined 64-bit architecture
486+
CPU_ARCH="none"
487+
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
488+
AC_DEFINE([WSIZE], [64], [Size of word in this architecture.])
489+
;;
490+
*32* | arm* | i?86)
491+
dnl Support for an undefined 32-bit architecture
492+
CPU_ARCH="none"
493+
AC_DEFINE([ARCH], [RELIC_NONE], [Architecture.])
494+
AC_DEFINE([WSIZE], [32], [Size of word in this architecture.])
495+
;;
496+
*)
497+
AC_MSG_ERROR([Unable to determine host architecture, may not be supported!])
498+
;;
499+
esac
468500
fi
469501

470502
case $host in
471503
*darwin*)
472504
AC_DEFINE([OPSYS], [MACOSX], [Detected operation system.])
505+
TARGET_OS=darwin
506+
473507
AC_PATH_PROG([BREW],brew,)
474508
if test x$BREW = x; then
475509
AC_PATH_PROG([PORT],port,)
@@ -482,8 +516,10 @@ case $host in
482516
fi
483517
;;
484518
*mingw*)
485-
use_pkgconfig=no
486519
AC_DEFINE([OPSYS], [WINDOWS], [Detected operation system.])
520+
TARGET_OS=windows
521+
522+
use_pkgconfig=no
487523
LIBTOOL_APP_LDFLAGS="$LIBTOOL_APP_LDFLAGS -all-static"
488524

489525
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
@@ -496,16 +532,21 @@ case $host in
496532
;;
497533
*linux*)
498534
AC_DEFINE([OPSYS], [LINUX], [Detected operation system.])
535+
TARGET_OS=linux
536+
499537
RELIC_CPPFLAGS="-D_GNU_SOURCE"
500538
;;
501539
*android*)
502540
AC_DEFINE([OPSYS], [DROID], [Detected operation system.])
541+
TARGET_OS=android
503542
;;
504543
*freebsd*)
505544
AC_DEFINE([OPSYS], [FREEBSD], [Detected operation system.])
545+
TARGET_OS=freebsd
506546
;;
507547
*netbsd*)
508548
AC_DEFINE([OPSYS], [NETBSD], [Detected operation system.])
549+
TARGET_OS=netbsd
509550
;;
510551
*)
511552
AC_DEFINE([OPSYS], [RELIC_NONE], [Detected operation system.])
@@ -555,7 +596,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[char foo;]])],
555596
CFLAGS="$saved_CFLAGS"
556597
])
557598

558-
if [[[ "$CFLAGS_overridden" == "no" && "$CXXFLAGS_overridden" == "no" ]]]; then
599+
if test x"$CFLAGS_overridden" = x"no" -a x"$CXXFLAGS_overridden" = x"no"; then
559600
dnl Enable warnings
560601
AX_CHECK_COMPILE_FLAG([-Wall],[WARN_FLAGS="$WARN_FLAGS -Wall"], [], [[$FLAG_WERROR]])
561602
AX_CHECK_COMPILE_FLAG([-Wcast-align],[WARN_FLAGS="$WARN_FLAGS -Wcast-align"], [], [[$FLAG_WERROR]])
@@ -743,7 +784,6 @@ CORE_CPPFLAGS="$CORE_CPPFLAGS -DHAVE_BUILD_INFO"
743784

744785
case $host in
745786
*mingw*)
746-
TARGET_OS=windows
747787
AC_CHECK_LIB([user32], [main], [], [AC_MSG_ERROR([libuser32 missing])])
748788
AC_CHECK_LIB([shell32], [SHGetSpecialFolderPathW], [], [AC_MSG_ERROR([libshell32 missing])])
749789
AC_CHECK_LIB([advapi32], [CryptAcquireContextW], [], [AC_MSG_ERROR([libadvapi32 missing])])
@@ -771,15 +811,10 @@ case $host in
771811
AX_CHECK_LINK_FLAG([-Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,--major-subsystem-version -Wl,6 -Wl,--minor-subsystem-version -Wl,1"], [], [])
772812
;;
773813
*darwin*)
774-
TARGET_OS=darwin
775-
776814
AX_CHECK_LINK_FLAG([-Wl,-headerpad_max_install_names], [CORE_LDFLAGS="$CORE_LDFLAGS -Wl,-headerpad_max_install_names"], [], [])
777815
CORE_CPPFLAGS="$CORE_CPPFLAGS -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0"
778816
OBJCXXFLAGS="$CXXFLAGS"
779817
;;
780-
*linux*)
781-
TARGET_OS=linux
782-
;;
783818
esac
784819

785820
dnl These flags are specific to ld64, and may cause issues with other linkers.
@@ -799,19 +834,15 @@ AC_LANG_POP([C])
799834
AC_MSG_CHECKING([whether to build runtest])
800835
if test x$use_tests = xyes; then
801836
AC_MSG_RESULT([yes])
802-
BUILD_TEST="yes"
803837
else
804838
AC_MSG_RESULT([no])
805-
BUILD_TEST=""
806839
fi
807840

808841
AC_MSG_CHECKING([whether to build runbench])
809842
if test x$use_bench = xyes; then
810843
AC_MSG_RESULT([yes])
811-
BUILD_BENCH="yes"
812844
else
813845
AC_MSG_RESULT([no])
814-
BUILD_BENCH=""
815846
fi
816847

817848
AM_CONDITIONAL([TARGET_DARWIN], [test "$TARGET_OS" = "darwin"])
@@ -836,8 +867,8 @@ AM_CONDITIONAL(WITH_MPC, test 1 -eq 1)
836867
AM_CONDITIONAL(WITH_DV, test 1 -eq 1)
837868
AM_CONDITIONAL(WITH_FBX, test 1 -eq 1)
838869

839-
AM_CONDITIONAL([USE_TESTS], [test x$BUILD_TEST = xyes])
840-
AM_CONDITIONAL([USE_BENCH], [test x$BUILD_BENCH = xyes])
870+
AM_CONDITIONAL([USE_TESTS], [test x"$use_tests" = x"yes"])
871+
AM_CONDITIONAL([USE_BENCH], [test x"$use_bench" = x"yes"])
841872
AM_CONDITIONAL([HARDEN], [test "$use_hardening" = "yes"])
842873
AM_CONDITIONAL([OPTIMIZE], [test "$use_optimizations" = "yes"])
843874

@@ -874,8 +905,8 @@ echo
874905
echo "Options used to compile and link:"
875906
echo " target os = $TARGET_OS"
876907
echo " backend = $want_backend"
877-
echo " build bench = $BUILD_BENCH"
878-
echo " build test = $BUILD_TEST"
908+
echo " build bench = $use_tests"
909+
echo " build test = $use_bench"
879910
echo " use debug = $use_debug"
880911
echo " use hardening = $use_hardening"
881912
echo " use optimizations = $use_optimizations"

src/qt/transactiontablemodel.cpp

+9-7
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,11 @@ class TransactionTablePriv
106106

107107
/* Query entire wallet anew from core.
108108
*/
109-
void refreshWallet(interfaces::Wallet& wallet)
109+
void refreshWallet(interfaces::Wallet& wallet, bool force = false)
110110
{
111111
parent->beginResetModel();
112-
assert(!m_loaded);
112+
assert(!m_loaded || force);
113+
cachedWallet.clear();
113114
try {
114115
for (const auto& wtx : wallet.getWalletTxs()) {
115116
if (TransactionRecord::showTransaction()) {
@@ -284,9 +285,9 @@ TransactionTableModel::~TransactionTableModel()
284285
delete priv;
285286
}
286287

287-
void TransactionTableModel::refreshWallet()
288+
void TransactionTableModel::refreshWallet(bool force)
288289
{
289-
priv->refreshWallet(walletModel->wallet());
290+
priv->refreshWallet(walletModel->wallet(), force);
290291
}
291292

292293
/** Updates the column title to "Amount (DisplayUnit)" and emits headerDataChanged() signal for table headers to react. */
@@ -846,12 +847,13 @@ void TransactionTablePriv::DispatchNotifications()
846847

847848
vQueueNotifications[i].invoke(parent);
848849
}
850+
vQueueNotifications.clear();
849851
} else {
850-
// it's much faster to just refresh the whole thing instead
851-
bool invoked = QMetaObject::invokeMethod(parent, "refreshWallet", Qt::QueuedConnection);
852+
// it's much faster to just drop all the queued notifications and refresh the whole thing instead
853+
vQueueNotifications.clear();
854+
bool invoked = QMetaObject::invokeMethod(parent, "refreshWallet", Qt::QueuedConnection, Q_ARG(bool, true));
852855
assert(invoked);
853856
}
854-
vQueueNotifications.clear();
855857
}
856858

857859
void TransactionTableModel::subscribeToCoreSignals()

src/qt/transactiontablemodel.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class TransactionTableModel : public QAbstractTableModel
114114

115115
public Q_SLOTS:
116116
/* Refresh the whole wallet, helpful for huge notification queues */
117-
void refreshWallet();
117+
void refreshWallet(bool foce = false);
118118
/* New transaction, or transaction changed status */
119119
void updateTransaction(const QString &hash, int status, bool showTransaction);
120120
void updateAddressBook(const QString &address, const QString &label,

0 commit comments

Comments
 (0)