pub struct PublicationTracker {
pub timeout_seconds: u64,
/* private fields */
}Expand description
Publication tracker for detecting censorship or stuck transactions
Tracks pending publications and flags them if not included within the configured timeout period.
Fields§
§timeout_seconds: u64Publication timeout in seconds
Implementations§
Source§impl PublicationTracker
impl PublicationTracker
Sourcepub fn track_publication(
&mut self,
chain: &str,
tx_hash: Vec<u8>,
commitment_hash: Hash,
submitted_at: u64,
)
pub fn track_publication( &mut self, chain: &str, tx_hash: Vec<u8>, commitment_hash: Hash, submitted_at: u64, )
Record a new publication submission
Sourcepub fn confirm_publication(&mut self, chain: &str, tx_hash: &[u8]) -> bool
pub fn confirm_publication(&mut self, chain: &str, tx_hash: &[u8]) -> bool
Confirm a publication was included
Sourcepub fn timed_out(
&self,
chain: &str,
current_time: u64,
) -> Vec<&PendingPublication>
pub fn timed_out( &self, chain: &str, current_time: u64, ) -> Vec<&PendingPublication>
Get timed-out publications (censorship candidates)
Sourcepub fn pending_count(&self, chain: &str) -> usize
pub fn pending_count(&self, chain: &str) -> usize
Get count of pending publications
Sourcepub fn clear_chain(&mut self, chain: &str)
pub fn clear_chain(&mut self, chain: &str)
Clear all pending publications for a chain
Auto Trait Implementations§
impl Freeze for PublicationTracker
impl RefUnwindSafe for PublicationTracker
impl Send for PublicationTracker
impl Sync for PublicationTracker
impl Unpin for PublicationTracker
impl UnsafeUnpin for PublicationTracker
impl UnwindSafe for PublicationTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more