Skip to content

Commit 7c6e2b7

Browse files
committed
fix(dash): gate verify_rotated_quorums == false storage on all-verified
The `else if` branch in `feed_qr_info` skipped verification but still wrote into `rotated_quorums_per_cycle` whenever `already_fully_verified` was false. That contradicted the documented invariant ("a cycle is only stored when every entry is `Verified`") and could poison IS-lock BLS verification with unverified `quorum_public_key` values. Mirror the verified-only gate from the `verify_rotated_quorums == true` path: only store when every entry is `Verified` (which can still hold via cache hits from `known_qualified_quorum_entry`). Addresses CodeRabbit review comment on PR dashpay#736 dashpay#736 (comment)
1 parent 508e35f commit 7c6e2b7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • dash/src/sml/masternode_list_engine

dash/src/sml/masternode_list_engine/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,10 @@ impl MasternodeListEngine {
10971097
.values()
10981098
.all(|q| matches!(q.verified, LLMQEntryVerificationStatus::Verified))
10991099
});
1100-
if !already_fully_verified {
1100+
let all_entries_verified = qualified_last_commitment_per_index
1101+
.iter()
1102+
.all(|q| matches!(q.verified, LLMQEntryVerificationStatus::Verified));
1103+
if all_entries_verified && !already_fully_verified {
11011104
let cycle_map = build_cycle_quorum_map(
11021105
qualified_last_commitment_per_index,
11031106
rotation_quorum_type,

0 commit comments

Comments
 (0)