Skip to main content

Module miner

Module miner 

Source
Expand description

Mines transactions

Re-exportsΒ§

use crate::eth::pool::Pool; πŸ”’
use crate::eth::pool::transactions::PoolTransaction; πŸ”’
use alloy_primitives::TxHash; πŸ”’
use futures::channel::mpsc::Receiver; πŸ”’
use futures::stream::Fuse; πŸ”’
use futures::stream::StreamExt; πŸ”’
use futures::task::AtomicWaker; πŸ”’
use parking_lot::RawRwLock; πŸ”’
use parking_lot::RwLock; πŸ”’
use parking_lot::lock_api::RwLockWriteGuard; πŸ”’
use std::fmt; πŸ”’
use std::marker::PhantomData; πŸ”’
use std::pin::Pin; πŸ”’
use std::sync::Arc; πŸ”’
use std::sync::atomic::AtomicU64; πŸ”’
use std::sync::atomic::Ordering; πŸ”’
use std::task::Context; πŸ”’
use std::task::Poll; πŸ”’
use std::time::Duration; πŸ”’
use tokio::time::Instant; πŸ”’
use tokio::time::Sleep; πŸ”’

StructsΒ§

FixedBlockTimeMiner
A miner that’s supposed to create a new block every interval, mining all transactions that are ready at that time.
Miner
MinerInner
A Mining mode that does nothing
MiningWork πŸ”’
Transactions selected by a specific mining mode generation.
ReadyTransactionMiner
A miner that Listens for new ready transactions

EnumsΒ§

MiningMode
Mode of operations for the Miner

ConstantsΒ§

FAR_FUTURE πŸ”’
How far ahead to schedule a block whose deadline overflows an instant, as tokio’s timers do.
INSTANT_COALESCE_WINDOW πŸ”’
Default delay before instant mining. Zero avoids delaying receipt availability.

FunctionsΒ§

next_deadline πŸ”’
Returns the deadline of the tick after the one due at deadline, which fired at now.
resumed_deadline πŸ”’
Returns the first deadline after now on the schedule of deadline, or None if the tick due at deadline has not come due.