Struct fuel_core_producer::block_producer::Producer
source · pub struct Producer<Database> {
pub config: Config,
pub db: Database,
pub txpool: Box<dyn TxPool>,
pub executor: Arc<dyn Executor<Database>>,
pub relayer: Box<dyn Relayer>,
pub lock: Mutex<()>,
}
Fields§
§config: Config
§db: Database
§txpool: Box<dyn TxPool>
§executor: Arc<dyn Executor<Database>>
§relayer: Box<dyn Relayer>
§lock: Mutex<()>
Implementations§
source§impl<Database> Producer<Database>where
Database: BlockProducerDatabase + 'static,
impl<Database> Producer<Database>where Database: BlockProducerDatabase + 'static,
sourcepub async fn produce_and_execute_block(
&self,
height: BlockHeight,
block_time: Tai64,
max_gas: Word
) -> Result<UncommittedResult<StorageTransaction<Database>>>
pub async fn produce_and_execute_block( &self, height: BlockHeight, block_time: Tai64, max_gas: Word ) -> Result<UncommittedResult<StorageTransaction<Database>>>
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> !RefUnwindSafe for Producer<Database>
impl<Database> Send for Producer<Database>where Database: Send,
impl<Database> Sync for Producer<Database>where Database: Sync,
impl<Database> Unpin for Producer<Database>where Database: Unpin,
impl<Database> !UnwindSafe for Producer<Database>
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