pub fn store_produced_update(&self, update: &SignedUpdate) -> Result<(), DbError> {
        let existing_opt = self.retrieve_produced_update(update.update.previous_root)?;
        if let Some(existing) = existing_opt {
            if existing.update.new_root != update.update.new_root {
                error!("Updater attempted to store conflicting update. Existing update: {:?}. New conflicting update: {:?}.", &existing, &update);

                return Err(DbError::UpdaterConflictError {
                    existing: existing.update,
                    conflicting: update.update,
                });
            }
        }

        self.store_keyed_encodable(
            UPDATER_PRODUCED_UPDATE,
            &update.update.previous_root,
            update,
        )
    }
/// Store a pending update in the DB for potential submission.
///
/// This does not produce update meta or update the latest update db value.
/// It is used by update production and submission.
Store a pending update in the DB for potential submission.
This does not produce update meta or update the latest update db value.
It is used by update production and submission.
Store a pending update in the DB for potential submission . This does not produce update meta or update the latest update db value . It is used by update production and submission .
pub fn store_produced_update(&self, update: &SignedUpdate) -> Result<(), DbError> {
        let existing_opt = self.retrieve_produced_update(update.update.previous_root)?;
        if let Some(existing) = existing_opt {
            if existing.update.new_root != update.update.new_root {
                error!("Updater attempted to store conflicting update. Existing update: {:?}. New conflicting update: {:?}.", &existing, &update);
                return Err(DbError::UpdaterConflictError {
                    existing: existing.update,
                    conflicting: update.update,
                });
            }
        }
        self.store_keyed_encodable(
            UPDATER_PRODUCED_UPDATE,
            &update.update.previous_root,
            update,
        )
    }
pub fn store_produced_update ( & self , update : & SignedUpdate ) -> Result < ( ) , DbError > { let existing_opt = self . retrieve_produced_update ( update . update . previous_root ) ? ; if let Some ( existing ) = existing_opt { if existing . update . new_root != update . update . new_root { error ! ( " " existing update ) ; return Err ( DbError :: UpdaterConflictError { existing : existing . update , conflicting : update . update , } ) ; } } self . store_keyed_encodable ( UPDATER_PRODUCED_UPDATE , & update . update . previous_root , update , ) }
Store a pending update in the DB for potential submission.
Store a pending update in the DB for potential submission .
&self
update
&SignedUpdate
&self
update
&SignedUpdate