pub fn initialize_eth_stats(
        &self,
        last_committed_block: BlockNumber,
        last_verified_block: BlockNumber,
    ) -> QueryResult<()> {
        // Withdraw ops counter is set equal to the `verify` ops counter
        // since we assume that we've sent a withdraw for every `verify` op.
        update(eth_parameters::table.filter(eth_parameters::id.eq(true)))
            .set((
                eth_parameters::commit_ops.eq(last_committed_block as i64),
                eth_parameters::verify_ops.eq(last_verified_block as i64),
                eth_parameters::withdraw_ops.eq(last_verified_block as i64),
            ))
            .execute(self.0.conn())?;

        Ok(())
    }
/// Method that initializes the `eth_stats` table.
/// Since `eth_sender` module uses this table to identify the expected next block numbers
/// for sending operations to the Ethereum, we must initialize it with actual values.
Method that initializes the `eth_stats` table.
Since `eth_sender` module uses this table to identify the expected next block numbers
for sending operations to the Ethereum, we must initialize it with actual values.
Method that initializes the ` eth_stats ` table . Since ` eth_sender ` module uses this table to identify the expected next block numbers for sending operations to the Ethereum we must initialize it with actual values .
pub fn initialize_eth_stats(
        &self,
        last_committed_block: BlockNumber,
        last_verified_block: BlockNumber,
    ) -> QueryResult<()> {
        // Withdraw ops counter is set equal to the `verify` ops counter
        // since we assume that we've sent a withdraw for every `verify` op.
        update(eth_parameters::table.filter(eth_parameters::id.eq(true)))
            .set((
                eth_parameters::commit_ops.eq(last_committed_block as i64),
                eth_parameters::verify_ops.eq(last_verified_block as i64),
                eth_parameters::withdraw_ops.eq(last_verified_block as i64),
            ))
            .execute(self.0.conn())?;
        Ok(())
    }
pub fn initialize_eth_stats ( & self , last_committed_block : BlockNumber , last_verified_block : BlockNumber , ) -> QueryResult < ( ) > { // Withdraw ops counter is set equal to the `verify` ops counter // since we assume that we've sent a withdraw for every `verify` op. update ( eth_parameters :: table . filter ( eth_parameters :: id . eq ( true ) ) ) . set ( ( eth_parameters :: commit_ops . eq ( last_committed_block as i64 ) , eth_parameters :: verify_ops . eq ( last_verified_block as i64 ) , eth_parameters :: withdraw_ops . eq ( last_verified_block as i64 ) , ) ) . execute ( self . 0 . conn ( ) ) ? ; Ok ( ( ) ) }
Method that initializes the `eth_stats` table.
Method that initializes the ` eth_stats ` table .
&self
last_committed_block
BlockNumber
last_verified_block
BlockNumber