pub fn register_validators_in_txn<'a>(
        &self,
        public_keys: impl Iterator<Item = &'a PublicKeyBytes>,
        txn: &Transaction,
    ) -> Result<(), NotSafe> {
        let mut stmt = txn.prepare("INSERT INTO validators (public_key) VALUES (?1)")?;
        for pubkey in public_keys {
            if self.get_validator_id_opt(&txn, pubkey)?.is_none() {
                stmt.execute(&[pubkey.to_hex_string()])?;
            }
        }
        Ok(())
    }
/// Register multiple validators inside the given transaction.
///
/// The caller must commit the transaction for the changes to be persisted.
Register multiple validators inside the given transaction.
The caller must commit the transaction for the changes to be persisted.
Register multiple validators inside the given transaction . The caller must commit the transaction for the changes to be persisted .
pub fn register_validators_in_txn<'a>(
        &self,
        public_keys: impl Iterator<Item = &'a PublicKeyBytes>,
        txn: &Transaction,
    ) -> Result<(), NotSafe> {
        let mut stmt = txn.prepare("INSERT INTO validators (public_key) VALUES (?1)")?;
        for pubkey in public_keys {
            if self.get_validator_id_opt(&txn, pubkey)?.is_none() {
                stmt.execute(&[pubkey.to_hex_string()])?;
            }
        }
        Ok(())
    }
pub fn register_validators_in_txn < ' a > ( & self , public_keys : impl Iterator < Item = & ' a PublicKeyBytes > , txn : & Transaction , ) -> Result < ( ) , NotSafe > { let mut stmt = txn . prepare ( " " ) ? ; for pubkey in public_keys { if self . get_validator_id_opt ( & txn , pubkey ) ? . is_none ( ) { stmt . execute ( & [ pubkey . to_hex_string ( ) ] ) ? ; } } Ok ( ( ) ) }
Register multiple validators inside the given transaction.
Register multiple validators inside the given transaction .
&self
public_keys
impl Iterator<Item = &'a PublicKeyBytes>
txn
&Transaction