mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #5951: backport: trivial 2024 03 22
d5d1a714fb
Merge bitcoin/bitcoin#24390: test: Remove suppression no longer needed with headers-only Boost.Test (fanquake)51630d2e5e
Merge bitcoin/bitcoin#22824: refactor: remove RecursiveMutex cs_nBlockSequenceId (MarcoFalke)a9b1575fe8
Merge bitcoin/bitcoin#22781: wallet: fix the behavior of IsHDEnabled, return false in case of a blank hd wallet. (Samuel Dobson)0505229c89
Merge bitcoin/bitcoin#22327: cli: Avoid truncating -rpcwaittimeout (MarcoFalke)1dc97c7679
Merge bitcoin/bitcoin#22149: test: Add temporary logging to debug #20975 (W. J. van der Laan)44f91cbc9a
Merge #21597: test: Document race:validation_chainstatemanager_tests suppression (fanquake)c326830f48
Merge bitcoin-core/gui#243: fix issue when disabling the auto-enabled blank wallet checkbox (MarcoFalke)267f42fd6a
Merge #21382: build: Clean remnants of QTBUG-34748 fix (fanquake)1fcc5f1101
Merge #20540: test: Fix wallet_multiwallet issue on windows (MarcoFalke)4afbaf2ea1
Merge #20322: test: Fix intermittent issue in wallet_listsinceblock (MarcoFalke) Pull request description: ## Issue being fixed or feature implemented Batch of backports ## What was done? Trivial batch of backports ## How Has This Been Tested? CI looks good ## Breaking Changes None ## Checklist: - [x] 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)_ Top commit has no ACKs. Tree-SHA512: 8eeac54f011eb1111888c745dd56184ac9601de290f2b0f7b7ad02240e8dc1cab5a47fed26bfed2bd6f1066e0710827a3e5b2426f0bf66821cf1cd09099d5160
This commit is contained in:
commit
f2a42a01b1
@ -19,17 +19,12 @@ $(package)_config_opts += --disable-xtest --disable-xv --disable-xvmc
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux &&\
|
||||
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \
|
||||
sed "s/pthread-stubs//" -i configure
|
||||
endef
|
||||
|
||||
# Don't install xcb headers to the default path in order to work around a qt
|
||||
# build issue: https://bugreports.qt.io/browse/QTBUG-34748
|
||||
# When using qt's internal libxcb, it may end up finding the real headers in
|
||||
# depends staging. Use a non-default path to avoid that.
|
||||
|
||||
define $(package)_config_cmds
|
||||
$($(package)_autoconf) --includedir=$(host_prefix)/include/xcb-shared
|
||||
$($(package)_autoconf)
|
||||
endef
|
||||
|
||||
define $(package)_build_cmds
|
||||
@ -41,5 +36,5 @@ define $(package)_stage_cmds
|
||||
endef
|
||||
|
||||
define $(package)_postprocess_cmds
|
||||
rm -rf share/man share/doc lib/*.la
|
||||
rm -rf share lib/*.la
|
||||
endef
|
||||
|
@ -735,7 +735,7 @@ static UniValue ConnectAndCallRPC(BaseRequestHandler* rh, const std::string& str
|
||||
// Execute and handle connection failures with -rpcwait.
|
||||
const bool fWait = gArgs.GetBoolArg("-rpcwait", false);
|
||||
const int timeout = gArgs.GetArg("-rpcwaittimeout", DEFAULT_WAIT_CLIENT_TIMEOUT);
|
||||
const int64_t deadline = GetTime<std::chrono::seconds>().count() + timeout;
|
||||
const auto deadline{GetTime<std::chrono::microseconds>() + 1s * timeout};
|
||||
|
||||
do {
|
||||
try {
|
||||
@ -748,9 +748,9 @@ static UniValue ConnectAndCallRPC(BaseRequestHandler* rh, const std::string& str
|
||||
}
|
||||
break; // Connection succeeded, no need to retry.
|
||||
} catch (const CConnectionFailed& e) {
|
||||
const int64_t now = GetTime<std::chrono::seconds>().count();
|
||||
const auto now{GetTime<std::chrono::microseconds>()};
|
||||
if (fWait && (timeout <= 0 || now < deadline)) {
|
||||
UninterruptibleSleep(std::chrono::seconds{1});
|
||||
UninterruptibleSleep(1s);
|
||||
} else {
|
||||
throw CConnectionFailed(strprintf("timeout on transient error: %s", e.what()));
|
||||
}
|
||||
|
@ -52,6 +52,12 @@ CreateWalletDialog::CreateWalletDialog(QWidget* parent) :
|
||||
}
|
||||
});
|
||||
|
||||
connect(ui->blank_wallet_checkbox, &QCheckBox::toggled, [this](bool checked) {
|
||||
if (!checked) {
|
||||
ui->disable_privkeys_checkbox->setChecked(false);
|
||||
}
|
||||
});
|
||||
|
||||
#ifndef USE_SQLITE
|
||||
ui->descriptor_checkbox->setToolTip(tr("Compiled without sqlite support (required for descriptor wallets)"));
|
||||
ui->descriptor_checkbox->setEnabled(false);
|
||||
|
@ -3688,10 +3688,7 @@ void CChainState::ReceivedBlockTransactions(const CBlock& block, CBlockIndex* pi
|
||||
CBlockIndex *pindex = queue.front();
|
||||
queue.pop_front();
|
||||
pindex->nChainTx = (pindex->pprev ? pindex->pprev->nChainTx : 0) + pindex->nTx;
|
||||
{
|
||||
LOCK(cs_nBlockSequenceId);
|
||||
pindex->nSequenceId = nBlockSequenceId++;
|
||||
}
|
||||
if (m_chain.Tip() == nullptr || !setBlockIndexCandidates.value_comp()(pindex, m_chain.Tip())) {
|
||||
if (!(pindex->nStatus & BLOCK_CONFLICT_CHAINLOCK)) {
|
||||
setBlockIndexCandidates.insert(pindex);
|
||||
|
@ -629,9 +629,8 @@ protected:
|
||||
* Every received block is assigned a unique and increasing identifier, so we
|
||||
* know which one to give priority in case of a fork.
|
||||
*/
|
||||
RecursiveMutex cs_nBlockSequenceId;
|
||||
/** Blocks loaded from disk are assigned id 0, so start the counter at 1. */
|
||||
int32_t nBlockSequenceId = 1;
|
||||
int32_t nBlockSequenceId GUARDED_BY(::cs_main) = 1;
|
||||
/** Decreasing counter (used by subsequent preciousblock calls). */
|
||||
int32_t nBlockReverseSequenceId = -1;
|
||||
/** chainwork for the last block that preciousblock has been applied to. */
|
||||
@ -828,7 +827,7 @@ public:
|
||||
|
||||
void PruneBlockIndexCandidates();
|
||||
|
||||
void UnloadBlockIndex();
|
||||
void UnloadBlockIndex() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
|
||||
/** Check whether we are doing an initial block download (synchronizing from disk or network) */
|
||||
bool IsInitialBlockDownload() const;
|
||||
|
@ -1617,9 +1617,10 @@ CAmount CWallet::GetChange(const CTransaction& tx) const
|
||||
bool CWallet::IsHDEnabled() const
|
||||
{
|
||||
// All Active ScriptPubKeyMans must be HD for this to be true
|
||||
bool result = true;
|
||||
bool result = false;
|
||||
for (const auto& spk_man : GetActiveScriptPubKeyMans()) {
|
||||
result &= spk_man->IsHDEnabled();
|
||||
if (!spk_man->IsHDEnabled()) return false;
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -223,6 +223,11 @@ def create_raw_transaction(node, txid, to_address, *, amount):
|
||||
signed_psbt = wrpc.walletprocesspsbt(psbt)
|
||||
psbt = signed_psbt['psbt']
|
||||
final_psbt = node.finalizepsbt(psbt)
|
||||
if not final_psbt["complete"]:
|
||||
node.log.info(f'final_psbt={final_psbt}')
|
||||
for w in node.listwallets():
|
||||
wrpc = node.get_wallet_rpc(w)
|
||||
node.log.info(f'listunspent={wrpc.listunspent()}')
|
||||
assert_equal(final_psbt["complete"], True)
|
||||
return final_psbt['hex']
|
||||
|
||||
|
@ -192,6 +192,7 @@ class ListSinceBlockTest(BitcoinTestFramework):
|
||||
address = key_to_p2pkh(eckey.get_pubkey().get_bytes())
|
||||
self.nodes[2].sendtoaddress(address, 10)
|
||||
self.nodes[2].generate(6)
|
||||
self.sync_all()
|
||||
self.nodes[2].importprivkey(privkey)
|
||||
utxos = self.nodes[2].listunspent()
|
||||
utxo = [u for u in utxos if u["address"] == address][0]
|
||||
|
@ -130,7 +130,7 @@ class MultiWalletTest(BitcoinTestFramework):
|
||||
os.mkdir(wallet_dir('no_access'))
|
||||
os.chmod(wallet_dir('no_access'), 0)
|
||||
try:
|
||||
with self.nodes[0].assert_debug_log(expected_msgs=['Too many levels of symbolic links', 'Error scanning']):
|
||||
with self.nodes[0].assert_debug_log(expected_msgs=['Error scanning']):
|
||||
walletlist = self.nodes[0].listwalletdir()['wallets']
|
||||
finally:
|
||||
# Need to ensure access is restored for cleanup
|
||||
|
@ -6,9 +6,6 @@
|
||||
# Data races from zmq namespace
|
||||
race:zmq::*
|
||||
|
||||
# race (TODO fix)
|
||||
race:validation_chainstatemanager_tests
|
||||
|
||||
# double locks (TODO fix)
|
||||
mutex:g_genesis_wait_mutex
|
||||
mutex:Interrupt
|
||||
|
Loading…
Reference in New Issue
Block a user