pub fn run_execute(
        &self,
        correlation_id: CorrelationId,
        mut exec_request: ExecuteRequest,
    ) -> Result<ExecutionResults, Error> {
        let executor = Executor::new(*self.config());

        let deploys = exec_request.take_deploys();
        let mut results = ExecutionResults::with_capacity(deploys.len());

        for deploy_item in deploys {
            let result = match deploy_item.session {
                ExecutableDeployItem::Transfer { .. } => self.transfer(
                    correlation_id,
                    &executor,
                    exec_request.protocol_version,
                    exec_request.parent_state_hash,
                    BlockTime::new(exec_request.block_time),
                    deploy_item,
                    exec_request.proposer.clone(),
                ),
                _ => self.deploy(
                    correlation_id,
                    &executor,
                    exec_request.protocol_version,
                    exec_request.parent_state_hash,
                    BlockTime::new(exec_request.block_time),
                    deploy_item,
                    exec_request.proposer.clone(),
                ),
            };
            match result {
                Ok(result) => results.push_back(result),
                Err(error) => {
                    return Err(error);
                }
            };
        }

        Ok(results)
    }
/// Runs a deploy execution request.
///
/// For each deploy stored in the request it will execute it.
///
/// Currently a special shortcut is taken to distinguish a native transfer, from a deploy.
///
/// Return execution results which contains results from each deploy ran.
Runs a deploy execution request.
For each deploy stored in the request it will execute it.

Currently a special shortcut is taken to distinguish a native transfer, from a deploy.

Return execution results which contains results from each deploy ran.
Runs a deploy execution request . For each deploy stored in the request it will execute it . Currently a special shortcut is taken to distinguish a native transfer from a deploy . Return execution results which contains results from each deploy ran .
pub fn run_execute(
        &self,
        correlation_id: CorrelationId,
        mut exec_request: ExecuteRequest,
    ) -> Result<ExecutionResults, Error> {
        let executor = Executor::new(*self.config());
        let deploys = exec_request.take_deploys();
        let mut results = ExecutionResults::with_capacity(deploys.len());
        for deploy_item in deploys {
            let result = match deploy_item.session {
                ExecutableDeployItem::Transfer { .. } => self.transfer(
                    correlation_id,
                    &executor,
                    exec_request.protocol_version,
                    exec_request.parent_state_hash,
                    BlockTime::new(exec_request.block_time),
                    deploy_item,
                    exec_request.proposer.clone(),
                ),
                _ => self.deploy(
                    correlation_id,
                    &executor,
                    exec_request.protocol_version,
                    exec_request.parent_state_hash,
                    BlockTime::new(exec_request.block_time),
                    deploy_item,
                    exec_request.proposer.clone(),
                ),
            };
            match result {
                Ok(result) => results.push_back(result),
                Err(error) => {
                    return Err(error);
                }
            };
        }
        Ok(results)
    }
pub fn run_execute ( & self , correlation_id : CorrelationId , mut exec_request : ExecuteRequest , ) -> Result < ExecutionResults , Error > { let executor = Executor :: new ( * self . config ( ) ) ; let deploys = exec_request . take_deploys ( ) ; let mut results = ExecutionResults :: with_capacity ( deploys . len ( ) ) ; for deploy_item in deploys { let result = match deploy_item . session { ExecutableDeployItem :: Transfer { .. } => self . transfer ( correlation_id , & executor , exec_request . protocol_version , exec_request . parent_state_hash , BlockTime :: new ( exec_request . block_time ) , deploy_item , exec_request . proposer . clone ( ) , ) , _ => self . deploy ( correlation_id , & executor , exec_request . protocol_version , exec_request . parent_state_hash , BlockTime :: new ( exec_request . block_time ) , deploy_item , exec_request . proposer . clone ( ) , ) , } ; match result { Ok ( result ) => results . push_back ( result ) , Err ( error ) => { return Err ( error ) ; } } ; } Ok ( results ) }
Runs a deploy execution request.
Runs a deploy execution request .
&self
correlation_id
CorrelationId
exec_request
ExecuteRequest
&self
correlation_id
CorrelationId
exec_request
ExecuteRequest