pub fn save_block_transactions(
        &self,
        block_number: u32,
        operations: Vec<ExecutedOperations>,
    ) -> QueryResult<()> {
        for block_tx in operations.into_iter() {
            match block_tx {
                ExecutedOperations::Tx(tx) => {
                    // Store the executed operation in the corresponding schema.
                    let new_tx = NewExecutedTransaction::prepare_stored_tx(*tx, block_number);
                    OperationsSchema(self.0).store_executed_operation(new_tx)?;
                }
                ExecutedOperations::PriorityOp(prior_op) => {
                    // For priority operation we should only store it in the Operations schema.
                    let new_priority_op = NewExecutedPriorityOperation::prepare_stored_priority_op(
                        *prior_op,
                        block_number,
                    );
                    OperationsSchema(self.0).store_executed_priority_operation(new_priority_op)?;
                }
            }
        }
        Ok(())
    }
/// Given a block, stores its transactions in the database.
Given a block, stores its transactions in the database.
Given a block stores its transactions in the database .
pub fn save_block_transactions(
        &self,
        block_number: u32,
        operations: Vec<ExecutedOperations>,
    ) -> QueryResult<()> {
        for block_tx in operations.into_iter() {
            match block_tx {
                ExecutedOperations::Tx(tx) => {
                    // Store the executed operation in the corresponding schema.
                    let new_tx = NewExecutedTransaction::prepare_stored_tx(*tx, block_number);
                    OperationsSchema(self.0).store_executed_operation(new_tx)?;
                }
                ExecutedOperations::PriorityOp(prior_op) => {
                    // For priority operation we should only store it in the Operations schema.
                    let new_priority_op = NewExecutedPriorityOperation::prepare_stored_priority_op(
                        *prior_op,
                        block_number,
                    );
                    OperationsSchema(self.0).store_executed_priority_operation(new_priority_op)?;
                }
            }
        }
        Ok(())
    }
pub fn save_block_transactions ( & self , block_number : u32 , operations : Vec < ExecutedOperations > , ) -> QueryResult < ( ) > { for block_tx in operations . into_iter ( ) { match block_tx { ExecutedOperations :: Tx ( tx ) => { // Store the executed operation in the corresponding schema. let new_tx = NewExecutedTransaction :: prepare_stored_tx ( * tx , block_number ) ; OperationsSchema ( self . 0 ) . store_executed_operation ( new_tx ) ? ; } ExecutedOperations :: PriorityOp ( prior_op ) => { // For priority operation we should only store it in the Operations schema. let new_priority_op = NewExecutedPriorityOperation :: prepare_stored_priority_op ( * prior_op , block_number , ) ; OperationsSchema ( self . 0 ) . store_executed_priority_operation ( new_priority_op ) ? ; } } } Ok ( ( ) ) }
Given a block, stores its transactions in the database.
Given a block stores its transactions in the database .
&self
block_number
u32
operations
Vec<ExecutedOperations>