-
Notifications
You must be signed in to change notification settings - Fork 1.2k
test: improve trigger checks in feature_governance_cl.py
#6926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: improve trigger checks in feature_governance_cl.py
#6926
Conversation
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR refactors the governance cleanup verification in feature_governance_cl.py by replacing a brittle 1-second sleep with explicit log assertions. The test now uses assert_debug_log to deterministically confirm that UpdateCachesAndClean scheduler events execute, then verifies cleanup completion via RPC calls. This approach eliminates race conditions where cleanup might not complete within the fixed sleep window. The change aligns with Dash Core's governance subsystem architecture where scheduled cleanup occurs in two phases: marking objects for deletion, then removing them after GOVERNANCE_DELETION_DELAY. The test exercises this flow by advancing mock time and triggering the scheduler explicitly.
PR Description Notes:
- The PR description is completely empty - all fields (issue being fixed, what was done, how tested, breaking changes) are blank.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| test/functional/feature_governance_cl.py | 2/5 | Replaced time.sleep with deterministic log assertions but iterates over all nodes including isolated node 5, causing potential RPC failures; contains redundant mocktime assignments |
Confidence score: 2/5
- This PR has significant issues that could cause test failures and requires careful review before merging.
- Score lowered because: (1) the code iterates over
self.nodesincluding node 5 which remains isolated from the network, likely causing RPC failures whenmockscheduler()is called on the disconnected node; (2) redundantnode.mocktimeassignments on lines145 and 153 have no effect sincesetmocktime()already updates internal time state; (3) the empty PR description provides no context for reviewers to understand the motivation or validate correctness. - Pay close attention to lines 143-155 where the node iteration occurs - verify that node 5's isolation doesn't break the
mockscheduler()calls or consider excluding it from the loop.
Sequence Diagram
sequenceDiagram
participant User
participant Node0
participant Nodes1_4 as "Nodes 1-4"
participant Node5
participant Blockchain
participant GovernanceSystem as "Governance System"
participant ChainLock as "ChainLock System"
User->>Node0: "Enable DKG Spork"
Node0->>Nodes1_4: "Sync spork update"
User->>Node0: "Mine cycle quorum"
Node0->>Blockchain: "Generate blocks"
Blockchain->>ChainLock: "Activate ChainLocks"
User->>Node0: "Enable Superblocks Spork"
Node0->>Nodes1_4: "Sync spork update"
User->>Node0: "Move to superblock cycle start"
Node0->>Blockchain: "Generate blocks to cycle boundary"
User->>Node0: "Prepare Proposal_0 and Proposal_1"
Node0->>GovernanceSystem: "gobject prepare (P0 & P1)"
GovernanceSystem-->>Node0: "Return collateral hashes"
User->>Node0: "Wait 10 minutes (bump mocktime)"
User->>Node0: "Generate 6 confirmation blocks"
Node0->>Blockchain: "Mine 6 blocks"
User->>Node0: "Submit proposals"
Node0->>GovernanceSystem: "gobject submit (P0 & P1)"
GovernanceSystem-->>Node0: "Store proposals"
User->>Node5: "Isolate node 5"
Node5--xNodes1_4: "Disconnect from network"
User->>Node0: "Vote for proposals"
Node0->>GovernanceSystem: "gobject vote-many (P0 & P1)"
GovernanceSystem->>Nodes1_4: "Sync votes"
Note over Node5: Node5 misses votes
User->>Node0: "Move into superblock maturity window"
Node0->>Blockchain: "Generate blocks"
GovernanceSystem->>Nodes1_4: "Create trigger for superblock"
Note over Node5: Node5 misses trigger
User->>Node0: "Mine to superblock height"
Node0->>Blockchain: "Generate remaining blocks"
Node0->>Blockchain: "Mine superblock with payouts"
Blockchain->>ChainLock: "Request ChainLock"
ChainLock-->>Blockchain: "ChainLock superblock"
User->>Node0: "Mine superblock_cycle + 1 blocks"
loop sb_cycle + 1 times
Node0->>Blockchain: "Generate block"
end
User->>Nodes1_4: "Bump time and trigger scheduler cleanup"
Nodes1_4->>GovernanceSystem: "mockscheduler (5 min delta)"
GovernanceSystem-->>Nodes1_4: "Mark old triggers for deletion"
User->>Nodes1_4: "Bump time again and trigger cleanup"
Nodes1_4->>GovernanceSystem: "mockscheduler (10 min delta)"
GovernanceSystem->>GovernanceSystem: "Delete old triggers (UpdateCachesAndClean)"
GovernanceSystem-->>Nodes1_4: "Triggers removed"
User->>Node5: "Reconnect isolated node"
Node5->>Node0: "Reconnect to network"
Note over Node5: mnsync status: not synced
User->>Node0: "Generate 1 block"
Node0->>Blockchain: "Mine block"
ChainLock->>Blockchain: "Create ChainLock"
Blockchain->>Node5: "Sync via ChainLock"
Note over Node5: Skips governance checks<br/>due to ChainLock coverage
Context used:
- Context from
dashboard- CLAUDE.md (source)
1 file reviewed, 3 comments
|
Caution Review failedThe head commit changed during the review from b4a73bf1e4feb4eb773c500c5873598903ad41bc to 0708b1bf17a2c92948e12c58a37ee64bbde2b9f3. Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe functional test test/functional/feature_governance_cl.py was refactored to remove real-time Sequence Diagram(s)sequenceDiagram
participant Test
participant NodeA as Node A (daemon)
participant NodeB as Node B (daemon)
participant MockScheduler
participant RPC as Governance RPC
Note over Test,NodeA: Setup governance objects and nodes
Test->>NodeA: create trigger/object
Test->>NodeB: create trigger/object
Note over Test,MockScheduler: Advance ~5 minutes to trigger cache cleaning
Test->>NodeA: setmocktime(+5m)
Test->>NodeB: setmocktime(+5m)
Test->>MockScheduler: run scheduler on NodeA and NodeB
MockScheduler->>NodeA: execute scheduled cleanup
MockScheduler->>NodeB: execute scheduled cleanup
NodeA-->>Test: debug-log "UpdateCachesAndClean" (assert)
NodeB-->>Test: debug-log "UpdateCachesAndClean" (assert)
Note over Test,MockScheduler: Advance additional ~10 minutes for deletion
Test->>NodeA: setmocktime(+10m)
Test->>NodeB: setmocktime(+10m)
Test->>MockScheduler: run scheduler again on NodeA and NodeB
MockScheduler->>NodeA: execute deletion tasks
MockScheduler->>NodeB: execute deletion tasks
Test->>RPC: getgovernanceinfo / list triggers
RPC-->>Test: returns empty triggers list (assert)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20–30 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between b82450a and 35cf71ada7a7f4730afbfdbdc37f85085a628b4d.
📒 Files selected for processing (1)
test/functional/feature_governance_cl.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
test/functional/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
Functional tests should be written in Python and placed in test/functional/
Files:
test/functional/feature_governance_cl.py
🧬 Code graph analysis (1)
test/functional/feature_governance_cl.py (2)
test/functional/test_framework/test_node.py (1)
assert_debug_log(444-472)test/functional/test_framework/util.py (1)
assert_equal(69-74)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build container / Build container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
test/functional/feature_governance_cl.py (2)
141-147: DRY the two scheduler phases with a small parametrized loop.Removes duplication while preserving behavior and assertions.
Apply this diff:
- delta = 5 * 60 - self.mocktime += delta - for node in self.nodes: - with node.assert_debug_log(expected_msgs=['UpdateCachesAndClean']): - node.setmocktime(self.mocktime) - node.mockscheduler(delta) - # Move forward to satisfy GOVERNANCE_DELETION_DELAY, should actually remove old triggers now - delta = 10 * 60 - self.mocktime += delta - for node in self.nodes: - with node.assert_debug_log(expected_msgs=['UpdateCachesAndClean -- Governance Objects: 0']): - node.setmocktime(self.mocktime) - node.mockscheduler(delta) + for delta, expected in ( + (5 * 60, ['UpdateCachesAndClean']), # mark old triggers for deletion + (10 * 60, ['UpdateCachesAndClean -- Governance Objects: 0']), # deletion after delay + ): + self.mocktime += delta + for node in self.nodes: + with node.assert_debug_log(expected_msgs=expected): + node.setmocktime(self.mocktime) + node.mockscheduler(delta)
148-153: Log match may be brittle; RPC already asserts 0.Optional: relax the second log check to reduce coupling to exact formatting.
Apply this minimal change:
- with node.assert_debug_log(expected_msgs=['UpdateCachesAndClean -- Governance Objects: 0']): + with node.assert_debug_log(expected_msgs=['UpdateCachesAndClean -- Governance Objects:']):Rationale: RPC below enforces zero objects; the log assertion then only checks that the cleanup path ran, avoiding failures on minor message-format changes.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 35cf71ada7a7f4730afbfdbdc37f85085a628b4d and b116fc6d1cc2b2984ee617bb90af4b4a58e68ade.
📒 Files selected for processing (1)
test/functional/feature_governance_cl.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
test/functional/**/*.py
📄 CodeRabbit inference engine (CLAUDE.md)
Functional tests should be written in Python and placed in test/functional/
Files:
test/functional/feature_governance_cl.py
🧠 Learnings (1)
📚 Learning: 2025-10-28T08:54:00.383Z
Learnt from: UdjinM6
PR: dashpay/dash#6926
File: test/functional/feature_governance_cl.py:0-0
Timestamp: 2025-10-28T08:54:00.383Z
Learning: In Dash tests, the scheduler (mockscheduler) operates independently of network state. Isolated nodes should still run scheduler-based cleanup processes like governance cleanup, even if they have different state due to network isolation.
Applied to files:
test/functional/feature_governance_cl.py
🧬 Code graph analysis (1)
test/functional/feature_governance_cl.py (2)
test/functional/test_framework/test_node.py (1)
assert_debug_log(444-472)test/functional/test_framework/util.py (1)
assert_equal(69-74)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: win64-build / Build source
- GitHub Check: mac-build / Build source
- GitHub Check: linux64_nowallet-build / Build source
- GitHub Check: arm-linux-build / Build source
- GitHub Check: linux64_tsan-build / Build source
- GitHub Check: linux64_sqlite-build / Build source
- GitHub Check: linux64_ubsan-build / Build source
- GitHub Check: linux64-build / Build source
- GitHub Check: linux64_fuzz-build / Build source
- GitHub Check: Lint / Run linters
🔇 Additional comments (1)
test/functional/feature_governance_cl.py (1)
155-156: Including the isolated node here is correct.Running cleanup and verifying RPC state on all nodes (including the isolated one) matches the scheduler’s node-local behavior and the intent captured in this PR. Looks good.
Based on learnings
a7fe1eb to
562bb5a
Compare
feature_governance_cl.pyfeature_governance_cl.py
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall, failure rate dropped for my localhost in case of multi-parallel runs from 40% to just 20% so it's definitely worth to get merged; though check my 2 comments
| self.log.info("Bump mocktime to trigger governance cleanup") | ||
| for delta, expected in ( | ||
| (5 * 60, ['UpdateCachesAndClean -- Governance Objects:']), # mark old triggers for deletion | ||
| (10 * 60, ['UpdateCachesAndClean -- Governance Objects: 0']), # deletion after delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it still fails on my localhost sometimes with this error:
2025-11-18T10:42:30.615000Z TestFramework (INFO): Mine (superblock cycle + 1) blocks on non-isolated nodes to forget about this trigger
2025-11-18T10:42:33.844000Z TestFramework (INFO): Bump mocktime to trigger governance cleanup
2025-11-18T10:42:36.159000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_framework.py", line 163, in main
self.run_test()
~~~~~~~~~~~~~^^
File "/home/knst/projects/dash-reviews/test/functional/feature_governance_cl.py", line 154, in run_test
with node.assert_debug_log(expected_msgs=expected):
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/contextlib.py", line 148, in __exit__
next(self.gen)
~~~~^^^^^^^^^^
File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_node.py", line 472, in assert_debug_log
self._raise_assertion_error('Expected messages "{}" does not partially match log:\n\n{}\n\n'.format(str(expected_msgs), print_log))
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/knst/projects/dash-reviews/test/functional/test_framework/test_node.py", line 202, in _raise_assertion_error
raise AssertionError(self._node_msg(msg))
AssertionError: [node 0] Expected messages "['UpdateCachesAndClean -- Governance Objects: 0']" does not partially match log:
- 2025-11-18T10:42:34.150405Z (mocktime: 1417720363) [ http] [httpserver.cpp:250] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:54968
- 2025-11-18T10:42:34.150441Z (mocktime: 1417720363) [httpworker.2] [rpc/request.cpp:180] [parse] [rpc] ThreadRPCServer method=setmocktime user=__cookie__
- 2025-11-18T10:42:34.150465Z (mocktime: 1417720963) [httpworker.2] [httprpc.cpp:92] [~RpcHttpRequest] [bench] HTTP RPC request handled: user=__cookie__ command=setmocktime external=false status=200 elapsed_time_ms=0
- 2025-11-18T10:42:34.150661Z (mocktime: 1417720963) [ http] [httpserver.cpp:250] [http_request_cb] [http] Received a POST request for / from 127.0.0.1:54968
- 2025-11-18T10:42:34.150696Z (mocktime: 1417720963) [httpworker.3] [rpc/request.cpp:180] [parse] [rpc] ThreadRPCServer method=mockscheduler user=__cookie__
- 2025-11-18T10:42:34.150729Z (mocktime: 1417720963) [httpworker.3] [httprpc.cpp:92] [~RpcHttpRequest] [bench] HTTP RPC request handled: user=__cookie__ command=mockscheduler external=false status=200 elapsed_time_ms=0
- 2025-11-18T10:42:34.150750Z (mocktime: 1417720963) [ scheduler] [wallet/bdb.cpp:604] [PeriodicFlush] [walletdb] Flushing wallet.dat
- 2025-11-18T10:42:34.150933Z (mocktime: 1417720963) [ scheduler] [wallet/bdb.cpp:612] [PeriodicFlush] [walletdb] Flushed wallet.dat 0ms
- 2025-11-18T10:42:34.150966Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1142] [RequestGovernanceObjectVotes] [gobject] CGovernanceManager::RequestGovernanceObjectVotes -- start: vTriggerObjHashes 1 vOtherObjHashes 0 mapAskedRecently 3
- 2025-11-18T10:42:34.150974Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1187] [RequestGovernanceObjectVotes] [gobject] CGovernanceManager::RequestGovernanceObjectVotes -- end: vTriggerObjHashes 0 vOtherObjHashes 0 mapAskedRecently 3
- 2025-11-18T10:42:34.151028Z (mocktime: 1417720963) [ scheduler] [net_processing.cpp:5700] [CheckForStaleTipAndEvictPeers] Potential stale tip detected, will try using extra outbound peer (last tip update: 600 seconds ago)
- 2025-11-18T10:42:34.151033Z (mocktime: 1417720963) [ scheduler] [net.cpp:2812] [SetTryNewOutboundPeer] [net] setting try another outbound peer=true
- 2025-11-18T10:42:34.162188Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1364] [RequestOrphanObjects] [gobject] CGovernanceObject::RequestOrphanObjects -- number objects = 0
- 2025-11-18T10:42:34.162194Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:451] [CheckAndRemove] [gobject] CGovernanceManager::UpdateCachesAndClean
- 2025-11-18T10:42:34.162206Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1491] [CleanAndRemoveTriggers] [gobject] CGovernanceManager::CleanAndRemoveTriggers -- mapTrigger.size() = 1
- 2025-11-18T10:42:34.162211Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1508] [CleanAndRemoveTriggers] [gobject] CGovernanceManager::CleanAndRemoveTriggers -- superblock status = 2
- 2025-11-18T10:42:34.162214Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1518] [CleanAndRemoveTriggers] [gobject] CGovernanceManager::CleanAndRemoveTriggers -- Valid trigger found
- 2025-11-18T10:42:34.162218Z (mocktime: 1417720963) [ scheduler] [governance/classes.cpp:354] [IsExpired] [gobject] CSuperblock::IsExpired -- nBlockHeight = 260, nExpirationBlock = 280
- 2025-11-18T10:42:34.162222Z (mocktime: 1417720963) [ scheduler] [governance/classes.cpp:357] [IsExpired] [gobject] CSuperblock::IsExpired -- Outdated trigger found
- 2025-11-18T10:42:34.162225Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1530] [CleanAndRemoveTriggers] [gobject] CGovernanceManager::CleanAndRemoveTriggers -- marked for removal
- 2025-11-18T10:42:34.162231Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:1539] [CleanAndRemoveTriggers] [gobject] CGovernanceManager::CleanAndRemoveTriggers -- Removing trigger object {"event_block_height": 260, "payment_addresses": "yfN5WF4U5SpeGrXvqrLKPzH7wh46SQNr5F|yfrq6iLyzG6tJBepQSkHzLNo2mUzfGzfth", "payment_amounts": "1.10000000|3.30000000", "proposal_hashes": "ec5a9087f779c5c84c1b56ccd9dd9b0b890434143dd08fb5534749ad375f8c83|a126e06e72ca5f32efb204b9cb734bdc06c5b7ac61376780fac491de6957d427", "type":2}
- 2025-11-18T10:42:34.162237Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:494] [CheckAndRemove] [gobject] CGovernanceManager::UpdateCachesAndClean -- Checking object for deletion: 2dfea208559b3b66ae1eb2a52174d12228796996236106ca6ec5af021cdb2ec5, deletion time = 1417720963, time since deletion = 0, delete flag = 1, expired flag = 1
- 2025-11-18T10:42:34.162247Z (mocktime: 1417720963) [ scheduler] [governance/governance.cpp:561] [CheckAndRemove] [gobject] CGovernanceManager::UpdateCachesAndClean -- Governance Objects: 1 (Proposals: 0, Triggers: 1, Other: 0; Erased: 2), Votes: 3, m_requested_hash_time size=0
- 2025-11-18T10:42:34.226820Z (mocktime: 1417720963) [ msghand] [net.cpp:4726] [PushMessage] [net] sending ping (8 bytes) peer=0
- 2025-11-18T10:42:34.226871Z (mocktime: 1417720963) [ msghand] [net.cpp:4726] [PushMessage] [net] sending ping (8 bytes) peer=2
- 2025-11-18T10:42:34.226890Z (mocktime: 1417720963) [ msghand] [net.cpp:4726] [PushMessage] [net] sending ping (8 bytes) peer=1
- 2025-11-18T10:42:34.226897Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention pnode->cs_vSend, net.cpp:4744 started
- 2025-11-18T10:42:34.226901Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention pnode->cs_vSend, net.cpp:4744 completed (0μs)
- 2025-11-18T10:42:34.226916Z (mocktime: 1417720963) [ msghand] [net.cpp:4726] [PushMessage] [net] sending ping (8 bytes) peer=3
- 2025-11-18T10:42:34.227217Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention connman.m_nodes_mutex, net.cpp:4809 started
- 2025-11-18T10:42:34.227225Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention connman.m_nodes_mutex, net.cpp:4809 completed (0μs)
- 2025-11-18T10:42:34.227232Z (mocktime: 1417720963) [ net] [logging/timer.h:57] [Log] [lock] Enter: lock contention m_nodes_mutex, net.cpp:2087 started
- 2025-11-18T10:42:34.227238Z (mocktime: 1417720963) [ net] [logging/timer.h:57] [Log] [lock] Enter: lock contention m_nodes_mutex, net.cpp:2087 completed (0μs)
- 2025-11-18T10:42:34.227249Z (mocktime: 1417720963) [ msghand] [net_processing.cpp:3620] [ProcessMessage] [net] received: pong (8 bytes) peer=2
- 2025-11-18T10:42:34.227276Z (mocktime: 1417720963) [ msghand] [net_processing.cpp:3620] [ProcessMessage] [net] received: pong (8 bytes) peer=0
- 2025-11-18T10:42:34.227375Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention connman.m_nodes_mutex, net.cpp:4809 started
- 2025-11-18T10:42:34.227382Z (mocktime: 1417720963) [ msghand] [logging/timer.h:57] [Log] [lock] Enter: lock contention connman.m_nodes_mutex, net.cpp:4809 completed (0μs)
- 2025-11-18T10:42:34.227422Z (mocktime: 1417720963) [ msghand] [net_processing.cpp:3620] [ProcessMessage] [net] received: pong (8 bytes) peer=3
- 2025-11-18T10:42:34.227432Z (mocktime: 1417720963) [ msghand] [net_processing.cpp:3620] [ProcessMessage] [net] received: pong (8 bytes) peer=1
- 2025-11-18T10:42:35.030199Z (mocktime: 1417720963) [ cl-schdlr] [chainlock/chainlock.cpp:344] [EnforceBestChainLock] [chainlocks] CChainLocksHandler::EnforceBestChainLock -- enforcing block 0ddb9006bff658d6a9b12746d69d910c451ec1c0fe45c9dba8586ef690c79d77 via CLSIG (ChainLockSig(nHeight=281, blockHash=0ddb9006bff658d6a9b12746d69d910c451ec1c0fe45c9dba8586ef690c79d77))
consider 4d5caf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how 4d5caf3 could help.... 🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
somehow adding an extra block here make test reliable; not sure why exactly it helped, yeah
extra mocktime bump is irrelevant
Instead of `4d5caf3a7423007a0c078c00cf3cdb821cb1e373 could be just:
diff --git a/test/functional/feature_governance_cl.py b/test/functional/feature_governance_cl.py
index 67ef21e21e..edacd2bab1 100755
--- a/test/functional/feature_governance_cl.py
+++ b/test/functional/feature_governance_cl.py
@@ -152,6 +152,7 @@ class DashGovernanceTest (DashTestFramework):
with node.assert_debug_log(expected_msgs=expected):
node.setmocktime(self.mocktime)
node.mockscheduler(delta)
+ self.generate(self.nodes[0], 1, sync_fun=lambda: self.sync_blocks(self.nodes[0:5]))
# Confirm in RPC
for node in self.nodes:
b4a73bf to
0708b1b
Compare
|
Applied ec65dde and rebased to avoid CI errors |
0708b1b to
8c68d9b
Compare
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 8c68d9b
Issue being fixed or feature implemented
What was done?
How Has This Been Tested?
Breaking Changes
Checklist: