Struct fuel_block_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<()>,
pub dry_run_semaphore: Semaphore,
}
Fields§
§config: Config
§db: Database
§txpool: Box<dyn TxPool>
§executor: Arc<dyn Executor<Database>>
§relayer: Box<dyn Relayer>
§lock: Mutex<()>
§dry_run_semaphore: Semaphore
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,
max_gas: Word
) -> Result<UncommittedResult<DBTransaction<Database>>>
pub async fn produce_and_execute_block(
&self,
height: BlockHeight,
max_gas: Word
) -> Result<UncommittedResult<DBTransaction<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.