refactor: replace size check with is_single_member() method for clarity#6908
Conversation
|
WalkthroughThis change adds Sequence Diagram(s)sequenceDiagram
participant Caller
participant Params as LLMQParams
participant Single as Single-member flow
participant Multi as Multi-member flow
Note over Params: New method: is_single_member()
Caller->>Params: params.is_single_member()
alt is_single_member == true
Params-->>Caller: true
Caller->>Single: Single-member handling
Single-->>Caller: verify member signature / emit operator pubKeyShare / finalize commitment
else is_single_member == false
Params-->>Caller: false
Caller->>Multi: Multi-member handling
Multi-->>Caller: verify aggregated signatures / check quorumVvecHash / queue or secure-aggregate paths
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📥 CommitsReviewing files that changed from the base of the PR and between 2f540be2ee28558267d98b8909caeb7c72ea8d16 and 90a3b57. 📒 Files selected for processing (5)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (1)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (2)📓 Common learnings📚 Learning: 2025-08-19T15:08:00.835ZApplied to files:
⏰ 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)
🔇 Additional comments (4)
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 |
knst
left a comment
There was a problem hiding this comment.
utACK 2f540be2ee28558267d98b8909caeb7c72ea8d16
| @@ -51,7 +51,7 @@ bool CFinalCommitment::VerifySignatureAsync(CDeterministicMNManager& dmnman, CQu | |||
| LogPrint(BCLog::LLMQ, "CFinalCommitment::%s members[%s] quorumPublicKey[%s] commitmentHash[%s]\n", __func__, | |||
| ss3.str(), quorumPublicKey.ToString(), commitmentHash.ToString()); | |||
| } | |||
| if (llmq_params.size == 1) { | |||
| if (llmq_params.is_single_member()) { | |||
There was a problem hiding this comment.
2f540be to
90a3b57
Compare
Issue being fixed or feature implemented
Avoiding using raw size as indication for special logic; use a helper function in-case the conditions change in the future (however unlikely that may be)
What was done?
added helper for
is_single_memberHow Has This Been Tested?
builds
Breaking Changes
Checklist:
Go over all the following points, and put an
xin all the boxes that apply.