Struct fuel_core_producer::block_producer::Producer
source · pub struct Producer<Database, TxPool, Executor> {
pub config: Config,
pub db: Database,
pub txpool: TxPool,
pub executor: Arc<Executor>,
pub relayer: Box<dyn Relayer>,
pub lock: Mutex<()>,
}
Fields§
§config: Config
§db: Database
§txpool: TxPool
§executor: Arc<Executor>
§relayer: Box<dyn Relayer>
§lock: Mutex<()>
Implementations§
source§impl<Database, TxPool, Executor, ExecutorDB, TxSource> Producer<Database, TxPool, Executor>where
Database: BlockProducerDatabase + 'static,
TxPool: TxPool<TxSource = TxSource> + 'static,
Executor: Executor<Database = ExecutorDB, TxSource = TxSource> + 'static,
impl<Database, TxPool, Executor, ExecutorDB, TxSource> Producer<Database, TxPool, Executor>where Database: BlockProducerDatabase + 'static, TxPool: TxPool<TxSource = TxSource> + 'static, Executor: Executor<Database = ExecutorDB, TxSource = TxSource> + 'static,
sourcepub async fn produce_and_execute_block(
&self,
height: BlockHeight,
block_time: Option<Tai64>,
max_gas: Word
) -> Result<UncommittedResult<StorageTransaction<ExecutorDB>>>
pub async fn produce_and_execute_block( &self, height: BlockHeight, block_time: Option<Tai64>, max_gas: Word ) -> Result<UncommittedResult<StorageTransaction<ExecutorDB>>>
Produces and execute block for the specified height
sourcepub async fn dry_run(
&self,
transaction: Transaction,
height: Option<BlockHeight>,
utxo_validation: Option<bool>
) -> Result<Vec<Receipt>>
pub async fn dry_run( &self, transaction: Transaction, height: Option<BlockHeight>, utxo_validation: Option<bool> ) -> Result<Vec<Receipt>>
Simulate a transaction without altering any state. Does not aquire the production lock since it is basically a “read only” operation and shouldn’t get in the way of normal production.
Auto Trait Implementations§
impl<Database, TxPool, Executor> !RefUnwindSafe for Producer<Database, TxPool, Executor>
impl<Database, TxPool, Executor> Send for Producer<Database, TxPool, Executor>where Database: Send, Executor: Send + Sync, TxPool: Send,
impl<Database, TxPool, Executor> Sync for Producer<Database, TxPool, Executor>where Database: Sync, Executor: Send + Sync, TxPool: Sync,
impl<Database, TxPool, Executor> Unpin for Producer<Database, TxPool, Executor>where Database: Unpin, TxPool: Unpin,
impl<Database, TxPool, Executor> !UnwindSafe for Producer<Database, TxPool, Executor>
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