pub(crate) fn add_transfer(
        &mut self,
        hash: DeployHash,
        deploy_info: &DeployInfo,
    ) -> Result<(), AddError> {
        if self.deploy_and_transfer_set.contains(&hash) {
            return Err(AddError::Duplicate);
        }
        if !deploy_info
            .header
            .is_valid(&self.deploy_config, self.timestamp)
        {
            return Err(AddError::InvalidDeploy);
        }
        if self.has_max_transfer_count() {
            return Err(AddError::TransferCount);
        }
        self.transfer_hashes.push(hash);
        self.deploy_and_transfer_set.insert(hash);
        Ok(())
    }
/// Attempts to add a transfer to the block; returns an error if that would violate a validity
/// condition.
///
/// This _must_ be called with a transfer - the function cannot check whether the argument is
/// actually a transfer.
Attempts to add a transfer to the block; returns an error if that would violate a validity
condition.

This _must_ be called with a transfer - the function cannot check whether the argument is
actually a transfer.
Attempts to add a transfer to the block ; returns an error if that would violate a validity condition . This _must_ be called with a transfer - the function cannot check whether the argument is actually a transfer .
pub(crate) fn add_transfer(
        &mut self,
        hash: DeployHash,
        deploy_info: &DeployInfo,
    ) -> Result<(), AddError> {
        if self.deploy_and_transfer_set.contains(&hash) {
            return Err(AddError::Duplicate);
        }
        if !deploy_info
            .header
            .is_valid(&self.deploy_config, self.timestamp)
        {
            return Err(AddError::InvalidDeploy);
        }
        if self.has_max_transfer_count() {
            return Err(AddError::TransferCount);
        }
        self.transfer_hashes.push(hash);
        self.deploy_and_transfer_set.insert(hash);
        Ok(())
    }
pub ( crate ) fn add_transfer ( & mut self , hash : DeployHash , deploy_info : & DeployInfo , ) -> Result < ( ) , AddError > { if self . deploy_and_transfer_set . contains ( & hash ) { return Err ( AddError :: Duplicate ) ; } if ! deploy_info . header . is_valid ( & self . deploy_config , self . timestamp ) { return Err ( AddError :: InvalidDeploy ) ; } if self . has_max_transfer_count ( ) { return Err ( AddError :: TransferCount ) ; } self . transfer_hashes . push ( hash ) ; self . deploy_and_transfer_set . insert ( hash ) ; Ok ( ( ) ) }
Attempts to add a transfer to the block; returns an error if that would violate a validity
condition.
Attempts to add a transfer to the block ; returns an error if that would violate a validity condition .
&mut self
hash
DeployHash
deploy_info
&DeployInfo
&mut self
hash
DeployHash
deploy_info
&DeployInfo