mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Merge pull request #5625 from knst/v20-fix-todo
chore: TODO related fixes for old PRs
This commit is contained in:
commit
d5041b6f6e
@ -73,7 +73,6 @@ MasternodeList::MasternodeList(QWidget* parent) :
|
||||
ui->tableWidgetMasternodesDIP3->setColumnWidth(COLUMN_VOTING_ADDRESS, columnVotingWidth);
|
||||
|
||||
// dummy column for proTxHash
|
||||
// TODO use a proper table model for the MN list
|
||||
ui->tableWidgetMasternodesDIP3->insertColumn(COLUMN_PROTX_HASH);
|
||||
ui->tableWidgetMasternodesDIP3->setColumnHidden(COLUMN_PROTX_HASH, true);
|
||||
|
||||
|
@ -466,7 +466,6 @@ static UniValue waitforblockheight(const JSONRPCRequest& request)
|
||||
cond_blockchange.wait(lock, [&height]() EXCLUSIVE_LOCKS_REQUIRED(cs_blockchange) {return latestblock.height >= height || !IsRPCRunning(); });
|
||||
block = latestblock;
|
||||
}
|
||||
// TODO: Backport g_utxosetscan and associated logic from #16127
|
||||
UniValue ret(UniValue::VOBJ);
|
||||
ret.pushKV("hash", block.hash.GetHex());
|
||||
ret.pushKV("height", block.height);
|
||||
@ -2577,7 +2576,6 @@ bool FindScriptPubKey(std::atomic<int>& scan_progress, const std::atomic<bool>&
|
||||
} // namespace
|
||||
|
||||
/** RAII object to prevent concurrency issue when scanning the txout set */
|
||||
static std::mutex g_utxosetscan;
|
||||
static std::atomic<int> g_scan_progress;
|
||||
static std::atomic<bool> g_scan_in_progress;
|
||||
static std::atomic<bool> g_should_abort_scan;
|
||||
@ -2590,18 +2588,15 @@ public:
|
||||
|
||||
bool reserve() {
|
||||
CHECK_NONFATAL(!m_could_reserve);
|
||||
std::lock_guard<std::mutex> lock(g_utxosetscan);
|
||||
if (g_scan_in_progress) {
|
||||
if (g_scan_in_progress.exchange(true)) {
|
||||
return false;
|
||||
}
|
||||
g_scan_in_progress = true;
|
||||
m_could_reserve = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
~CoinsViewScanReserver() {
|
||||
if (m_could_reserve) {
|
||||
std::lock_guard<std::mutex> lock(g_utxosetscan);
|
||||
g_scan_in_progress = false;
|
||||
}
|
||||
}
|
||||
|
@ -22,12 +22,6 @@ class PSBTTest(BitcoinTestFramework):
|
||||
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 3
|
||||
# TODO: remove -txindex. Currently required for getrawtransaction call.
|
||||
self.extra_args = [
|
||||
["-txindex"],
|
||||
["-txindex"],
|
||||
["-txindex"]
|
||||
]
|
||||
self.supports_cli = False
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
|
@ -6,17 +6,11 @@
|
||||
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import (
|
||||
assert_approx,
|
||||
assert_equal,
|
||||
assert_raises_rpc_error,
|
||||
)
|
||||
|
||||
# TODO: Copied from wallet_groups.py -- should perhaps move into util.py
|
||||
def assert_approx(v, vexp, vspan=0.00001):
|
||||
if v < vexp - vspan:
|
||||
raise AssertionError("%s < [%s..%s]" % (str(v), str(vexp - vspan), str(vexp + vspan)))
|
||||
if v > vexp + vspan:
|
||||
raise AssertionError("%s > [%s..%s]" % (str(v), str(vexp - vspan), str(vexp + vspan)))
|
||||
|
||||
def reset_balance(node, discardaddr):
|
||||
'''Throw away all owned coins by the node so it gets a balance of 0.'''
|
||||
balance = node.getbalance(avoid_reuse=False)
|
||||
|
@ -12,7 +12,6 @@ from test_framework.util import (
|
||||
assert_equal,
|
||||
)
|
||||
|
||||
|
||||
class WalletGroupTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
|
Loading…
Reference in New Issue
Block a user