Skip to content
This repository was archived by the owner on Sep 24, 2025. It is now read-only.

Commit d339a18

Browse files
committed
vote.rs: add is_notarize_fallback and is_skip_fallback.
1 parent 21f0fa1 commit d339a18

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

program/src/vote.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,16 @@ impl Vote {
160160
matches!(self, Self::Skip(_))
161161
}
162162

163+
/// Whether the vote is a notarization fallback vote
164+
pub fn is_notarize_fallback(&self) -> bool {
165+
matches!(self, Self::NotarizeFallback(_))
166+
}
167+
168+
/// Whether the vote is a skip fallback vote
169+
pub fn is_skip_fallback(&self) -> bool {
170+
matches!(self, Self::SkipFallback(_))
171+
}
172+
163173
/// Whether the vote is a notarization or finalization
164174
pub fn is_notarization_or_finalization(&self) -> bool {
165175
matches!(self, Self::Notarize(_) | Self::Finalize(_))

0 commit comments

Comments
 (0)