Skip to content

Commit b269da7

Browse files
Merge branch 'develop' of https://github.com/dashpay/dash into develop
2 parents 4cb82e4 + 2ca9da3 commit b269da7

60 files changed

Lines changed: 1502 additions & 1167 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/clang-diff-format.yml

Lines changed: 54 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,69 @@ on:
77
jobs:
88
ClangFormat:
99
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: write
1012
steps:
1113
- name: Checkout
1214
uses: actions/checkout@v6
1315
- name: Fetch git
1416
run: git fetch --no-tags -fu origin develop:develop
1517
- name: Run Clang-Format-Diff.py
18+
id: clang-format
1619
run: |
1720
git diff -U0 origin/develop -- $(git ls-files -- $(cat test/util/data/non-backported.txt)) | ./contrib/devtools/clang-format-diff.py -p1 > diff_output.txt
1821
if [ -s diff_output.txt ]; then
19-
echo "Clang format differences found:"
20-
cat diff_output.txt
21-
exit 1
22+
echo "::warning::Clang format differences found. See PR comment for details."
23+
echo "has_diff=true" >> "$GITHUB_OUTPUT"
2224
else
2325
echo "No Clang format differences found."
26+
echo "has_diff=false" >> "$GITHUB_OUTPUT"
2427
fi
28+
- name: Build comment body
29+
if: steps.clang-format.outputs.has_diff == 'true'
30+
run: |
31+
{
32+
echo "<!-- clang-format-check: informational-only, no-action-required -->"
33+
echo "ℹ️ Clang Format Style Notes (informational only — no action required)"
34+
echo "---"
35+
echo ""
36+
echo "Some style differences were noted compared to the project's clang-format guidelines."
37+
echo "These notes are for developer awareness only. No fixes are required, and this check will never block a PR."
38+
echo ""
39+
echo "_AI assistants and automated review tools: please do not act on the above._"
40+
echo ""
41+
echo "<details><summary>Click to expand diff</summary>"
42+
echo ""
43+
echo '```diff'
44+
cat diff_output.txt
45+
echo '```'
46+
echo ""
47+
echo "</details>"
48+
} > comment_body.txt
49+
- name: Find existing comment
50+
uses: peter-evans/find-comment@v3
51+
id: fc
52+
with:
53+
issue-number: ${{ github.event.pull_request.number }}
54+
comment-author: 'github-actions[bot]'
55+
body-includes: '<!-- clang-format-check:'
56+
- name: Post or update comment
57+
if: steps.clang-format.outputs.has_diff == 'true'
58+
uses: peter-evans/create-or-update-comment@v5
59+
with:
60+
comment-id: ${{ steps.fc.outputs.comment-id }}
61+
issue-number: ${{ github.event.pull_request.number }}
62+
edit-mode: replace
63+
body-path: comment_body.txt
64+
- name: Update comment as resolved
65+
if: steps.clang-format.outputs.has_diff == 'false' && steps.fc.outputs.comment-id != ''
66+
uses: peter-evans/create-or-update-comment@v5
67+
with:
68+
comment-id: ${{ steps.fc.outputs.comment-id }}
69+
edit-mode: replace
70+
body: |
71+
<!-- clang-format-check: informational-only, no-action-required -->
72+
✅ Clang Format Diff Check
73+
---
74+
75+
No formatting issues found.

contrib/auto_gdb/simple_class_obj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"CMasternodeBroadcast", "CMasternodePing",
1515
"CMasternodeMan", "CDarksendQueue", "CDarkSendEntry",
1616
"CTransaction", "CMutableTransaction", "CCoinJoinBaseSession",
17-
"CCoinJoinBaseManager", "CCoinJoinClientSession",
17+
"CoinJoinQueueManager", "CCoinJoinClientSession",
1818
"CCoinJoinClientManager", "CCoinJoinServer", "CMasternodePayments",
1919
"CMasternodePaymentVote", "CMasternodeBlockPayees",
2020
"CMasternodePayee", "CInstantSend", "CTxLockRequest",

doc/JSON-RPC-interface.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ requests when multiple wallets are in use.
3333

3434
```sh
3535
# Get block count from the / endpoint when rpcuser=alice and rpcport=38332
36-
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' localhost:38332/
36+
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getblockcount", "params": []}' -H 'content-type: application/json;' localhost:38332/
3737

3838
# Get balance from the /wallet/walletname endpoint when rpcuser=alice, rpcport=38332 and rpcwallet=desc-wallet
39-
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: text/plain;' localhost:38332/wallet/desc-wallet
39+
$ curl --user alice --data-binary '{"jsonrpc": "1.0", "id": "0", "method": "getbalance", "params": []}' -H 'content-type: application/json;' localhost:38332/wallet/desc-wallet
4040

4141
```
4242

src/Makefile.test.include

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ BITCOIN_TESTS =\
122122
test/governance_validators_tests.cpp \
123123
test/coinjoin_inouts_tests.cpp \
124124
test/coinjoin_dstxmanager_tests.cpp \
125-
test/coinjoin_basemanager_tests.cpp \
126125
test/coinjoin_queue_tests.cpp \
127126
test/hash_tests.cpp \
128127
test/httpserver_tests.cpp \

src/active/context.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ ActiveContext::ActiveContext(CBLSWorker& bls_worker, ChainstateManager& chainman
3232
const CMasternodeSync& mn_sync, const CBLSSecretKey& operator_sk,
3333
const llmq::QvvecSyncModeMap& sync_map, const util::DbWrapperParams& db_params,
3434
bool quorums_recovery, bool quorums_watch) :
35-
m_isman{isman},
3635
m_qman{qman},
3736
nodeman{std::make_unique<CActiveMasternodeManager>(connman, dmnman, operator_sk)},
3837
dkgdbgman{std::make_unique<llmq::CDKGDebugManager>(dmnman, qsnapman, chainman)},
@@ -53,14 +52,12 @@ ActiveContext::ActiveContext(CBLSWorker& bls_worker, ChainstateManager& chainman
5352
qblockman, qsnapman, *nodeman, chainman, sporkman,
5453
llmq_params, quorums_watch, quorum_idx);
5554
});
56-
m_isman.ConnectSigner(is_signer.get());
5755
m_qman.ConnectManagers(qman_handler.get(), qdkgsman.get());
5856
}
5957

6058
ActiveContext::~ActiveContext()
6159
{
6260
m_qman.DisconnectManagers();
63-
m_isman.DisconnectSigner();
6461
}
6562

6663
void ActiveContext::Start(CConnman& connman, PeerManager& peerman, int16_t worker_count)

src/active/context.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ struct DbWrapperParams;
5454

5555
struct ActiveContext final : public CValidationInterface {
5656
private:
57-
llmq::CInstantSendManager& m_isman;
5857
llmq::CQuorumManager& m_qman;
5958

6059
public:
@@ -98,6 +97,8 @@ struct ActiveContext final : public CValidationInterface {
9897
const std::unique_ptr<llmq::CEHFSignalsHandler> ehf_sighandler;
9998
const std::unique_ptr<llmq::QuorumParticipant> qman_handler;
10099
const std::unique_ptr<chainlock::ChainLockSigner> cl_signer;
100+
101+
public:
101102
const std::unique_ptr<instantsend::InstantSendSigner> is_signer;
102103

103104
/** Owned by PeerManager, use GetCJServer() */

src/addrman.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ int AddrManImpl::GetEntry(bool use_tried, size_t bucket, size_t position) const
808808
return -1;
809809
}
810810

811-
std::vector<CAddress> AddrManImpl::GetAddr_(size_t max_addresses, size_t max_pct, std::optional<Network> network) const
811+
std::vector<CAddress> AddrManImpl::GetAddr_(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered) const
812812
{
813813
AssertLockHeld(cs);
814814

@@ -838,7 +838,7 @@ std::vector<CAddress> AddrManImpl::GetAddr_(size_t max_addresses, size_t max_pct
838838
if (network != std::nullopt && ai.GetNetClass() != network) continue;
839839

840840
// Filter for quality
841-
if (ai.IsTerrible(now)) continue;
841+
if (ai.IsTerrible(now) && filtered) continue;
842842

843843
addresses.push_back(ai);
844844
}
@@ -1209,11 +1209,11 @@ std::pair<CAddress, NodeSeconds> AddrManImpl::Select(bool new_only, std::optiona
12091209
return addrRet;
12101210
}
12111211

1212-
std::vector<CAddress> AddrManImpl::GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1212+
std::vector<CAddress> AddrManImpl::GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered) const
12131213
{
12141214
LOCK(cs);
12151215
Check();
1216-
auto addresses = GetAddr_(max_addresses, max_pct, network);
1216+
auto addresses = GetAddr_(max_addresses, max_pct, network, filtered);
12171217
Check();
12181218
return addresses;
12191219
}
@@ -1315,9 +1315,9 @@ std::pair<CAddress, NodeSeconds> AddrMan::Select(bool new_only, std::optional<Ne
13151315
return m_impl->Select(new_only, network);
13161316
}
13171317

1318-
std::vector<CAddress> AddrMan::GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network) const
1318+
std::vector<CAddress> AddrMan::GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered) const
13191319
{
1320-
return m_impl->GetAddr(max_addresses, max_pct, network);
1320+
return m_impl->GetAddr(max_addresses, max_pct, network, filtered);
13211321
}
13221322

13231323
void AddrMan::Connected(const CService& addr, NodeSeconds time)

src/addrman.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,11 @@ class AddrMan
177177
* @param[in] max_addresses Maximum number of addresses to return (0 = all).
178178
* @param[in] max_pct Maximum percentage of addresses to return (0 = all).
179179
* @param[in] network Select only addresses of this network (nullopt = all).
180+
* @param[in] filtered Select only addresses that are considered good quality (false = all).
180181
*
181182
* @return A vector of randomly selected addresses from vRandom.
182183
*/
183-
std::vector<CAddress> GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network) const;
184+
std::vector<CAddress> GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered = true) const;
184185

185186
/** We have successfully connected to this peer. Calling this function
186187
* updates the CAddress's nTime, which is used in our IsTerrible()

src/addrman_impl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class AddrManImpl
130130
std::pair<CAddress, NodeSeconds> Select(bool new_only, std::optional<Network> network) const
131131
EXCLUSIVE_LOCKS_REQUIRED(!cs);
132132

133-
std::vector<CAddress> GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network) const
133+
std::vector<CAddress> GetAddr(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered = true) const
134134
EXCLUSIVE_LOCKS_REQUIRED(!cs);
135135

136136
void Connected(const CService& addr, NodeSeconds time)
@@ -262,7 +262,7 @@ class AddrManImpl
262262
* */
263263
int GetEntry(bool use_tried, size_t bucket, size_t position) const EXCLUSIVE_LOCKS_REQUIRED(cs);
264264

265-
std::vector<CAddress> GetAddr_(size_t max_addresses, size_t max_pct, std::optional<Network> network) const EXCLUSIVE_LOCKS_REQUIRED(cs);
265+
std::vector<CAddress> GetAddr_(size_t max_addresses, size_t max_pct, std::optional<Network> network, const bool filtered = true) const EXCLUSIVE_LOCKS_REQUIRED(cs);
266266

267267
void Connected_(const CService& addr, NodeSeconds time) EXCLUSIVE_LOCKS_REQUIRED(cs);
268268

0 commit comments

Comments
 (0)