- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
fix: refactor CertsError #24
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
Conversation
c3e756c    to
    28086c2      
    Compare
  
    28086c2    to
    3c5612d      
    Compare
  
    
        8ae5f21
      
    | 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. WalkthroughThis set of changes refines error handling and naming consistency across several Rust modules. The  Changes
 Sequence Diagram(s)sequenceDiagram
    participant User
    participant FinalityCertificate
    participant CertsError
    User->>FinalityCertificate: new(power_delta, justification)
    FinalityCertificate->>CertsError: Validate justification.phase
    alt phase mismatch
        CertsError-->>User: InvalidJustificationVotePhase { expected, actual }
    else round mismatch
        CertsError-->>User: InvalidRound { expected, actual }
    else success
        FinalityCertificate-->>User: Ok(FinalityCertificate)
    end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~15 minutes Poem
 Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
 ⏰ 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 (21)
 ✨ Finishing Touches
 🧪 Generate unit tests
 🪧 TipsChatThere are 3 ways to chat with CodeRabbit: 
 SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
 Other keywords and placeholders
 CodeRabbit Configuration File ( | 
Cow<'static, str>instead ofStringInvalidJustificationintoInvalidJustificationVotePhaseandInvalidJustificationVoteValueChainCidinstead ofStringinIncorrectPowerDiffSummary by CodeRabbit
New Features
Bug Fixes
Refactor