pub struct TaskUnFail {
pub check_now: bool,
/* private fields */
}Expand description
Task that retries previously failed transactions.
Finds ProvenTxReqs with status “unfail” and attempts to retrieve a merkle proof. If proof is found: status -> unmined, referenced transactions -> unproven. If no proof: status -> invalid (back to failed).
Fields§
§check_now: boolManual trigger flag.
Implementations§
Source§impl TaskUnFail
impl TaskUnFail
Sourcepub fn new(
storage: WalletStorageManager,
services: Arc<dyn WalletServices>,
) -> Self
pub fn new( storage: WalletStorageManager, services: Arc<dyn WalletServices>, ) -> Self
Create a new unfail task.
Sourcepub fn with_trigger_msecs(self, msecs: u64) -> Self
pub fn with_trigger_msecs(self, msecs: u64) -> Self
Set the trigger interval in milliseconds.
Trait Implementations§
Source§impl WalletMonitorTask for TaskUnFail
impl WalletMonitorTask for TaskUnFail
Source§fn trigger(&mut self, now_msecs: u64) -> bool
fn trigger(&mut self, now_msecs: u64) -> bool
Return true if
run_task needs to be called now.
This is NOT async – it must be a fast, synchronous check.Source§fn run_task<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_task<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<String, WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the task’s work. Returns a log string describing what was done.
Source§fn async_setup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn async_setup<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), WalletError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Override to handle async task setup configuration.
Called before the first call to
trigger.Auto Trait Implementations§
impl !Freeze for TaskUnFail
impl !RefUnwindSafe for TaskUnFail
impl Send for TaskUnFail
impl Sync for TaskUnFail
impl Unpin for TaskUnFail
impl UnsafeUnpin for TaskUnFail
impl !UnwindSafe for TaskUnFail
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more