pub struct VerificationThread {
pub sender_to_consensus: Sender<ConsensusEvent>,
pub blockchain_lock: Arc<RwLock<Blockchain>>,
pub peer_lock: Arc<RwLock<PeerCollection>>,
pub wallet_lock: Arc<RwLock<Wallet>>,
pub processed_txs: StatVariable,
pub processed_blocks: StatVariable,
pub processed_msgs: StatVariable,
pub invalid_txs: StatVariable,
pub stat_sender: Sender<String>,
}
Fields§
§sender_to_consensus: Sender<ConsensusEvent>
§blockchain_lock: Arc<RwLock<Blockchain>>
§peer_lock: Arc<RwLock<PeerCollection>>
§wallet_lock: Arc<RwLock<Wallet>>
§processed_txs: StatVariable
§processed_blocks: StatVariable
§processed_msgs: StatVariable
§invalid_txs: StatVariable
§stat_sender: Sender<String>
Implementations§
Source§impl VerificationThread
impl VerificationThread
pub async fn verify_tx(&mut self, transaction: Transaction)
pub async fn verify_txs(&mut self, transactions: &mut VecDeque<Transaction>)
pub async fn verify_block( &mut self, buffer: &[u8], peer_index: PeerIndex, block_hash: BlockHash, block_id: BlockId, )
Trait Implementations§
Source§impl ProcessEvent<VerifyRequest> for VerificationThread
impl ProcessEvent<VerifyRequest> for VerificationThread
Source§fn process_network_event<'life0, 'async_trait>(
&'life0 mut self,
_event: NetworkEvent,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_network_event<'life0, 'async_trait>(
&'life0 mut self,
_event: NetworkEvent,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes an event coming from other peers via network controller Read more
Source§fn process_timer_event<'life0, 'async_trait>(
&'life0 mut self,
_duration: Duration,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_timer_event<'life0, 'async_trait>(
&'life0 mut self,
_duration: Duration,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Triggered with each timer tick. duration will vary due to other processing tasks in the same thread. Read more
Source§fn process_event<'life0, 'async_trait>(
&'life0 mut self,
request: VerifyRequest,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process_event<'life0, 'async_trait>(
&'life0 mut self,
request: VerifyRequest,
) -> Pin<Box<dyn Future<Output = Option<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes the incoming events from other threads/controllers. Read more
fn on_init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_stat_interval<'life0, 'async_trait>(
&'life0 mut self,
current_time: Timestamp,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_ready_to_process(&self) -> bool
Auto Trait Implementations§
impl Freeze for VerificationThread
impl !RefUnwindSafe for VerificationThread
impl Send for VerificationThread
impl Sync for VerificationThread
impl Unpin for VerificationThread
impl !UnwindSafe for VerificationThread
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