fn validate_utxo_hashes_response(
        &self,
        local_utxo_hashes: &[HashOutput],
        remote_utxo_hashes: &[HashOutput],
    ) -> Result<(), HorizonSyncError>
    {
        // Check that the correct number of utxo hashes returned
        if local_utxo_hashes.len() != remote_utxo_hashes.len() {
            return Err(HorizonSyncError::IncorrectResponse);
        }

        // Check that the received utxo set is the same as local
        if (0..local_utxo_hashes.len()).any(|i| local_utxo_hashes[i] != remote_utxo_hashes[i]) {
            return Err(HorizonSyncError::IncorrectResponse);
        }

        Ok(())
    }
// Validate the received UTXO set and, UTXO and RangeProofs MMR nodes.
Validate the received UTXO set and, UTXO and RangeProofs MMR nodes.
Validate the received UTXO set and UTXO and RangeProofs MMR nodes .
fn validate_utxo_hashes_response(
        &self,
        local_utxo_hashes: &[HashOutput],
        remote_utxo_hashes: &[HashOutput],
    ) -> Result<(), HorizonSyncError>
    {
        // Check that the correct number of utxo hashes returned
        if local_utxo_hashes.len() != remote_utxo_hashes.len() {
            return Err(HorizonSyncError::IncorrectResponse);
        }
        // Check that the received utxo set is the same as local
        if (0..local_utxo_hashes.len()).any(|i| local_utxo_hashes[i] != remote_utxo_hashes[i]) {
            return Err(HorizonSyncError::IncorrectResponse);
        }
        Ok(())
    }
fn validate_utxo_hashes_response ( & self , local_utxo_hashes : & [ HashOutput ] , remote_utxo_hashes : & [ HashOutput ] , ) -> Result < ( ) , HorizonSyncError > { // Check that the correct number of utxo hashes returned if local_utxo_hashes . len ( ) != remote_utxo_hashes . len ( ) { return Err ( HorizonSyncError :: IncorrectResponse ) ; } // Check that the received utxo set is the same as local if ( 0 .. local_utxo_hashes . len ( ) ) . any ( | i | local_utxo_hashes [ i ] != remote_utxo_hashes [ i ] ) { return Err ( HorizonSyncError :: IncorrectResponse ) ; } Ok ( ( ) ) }
Validate the received UTXO set and, UTXO and RangeProofs MMR nodes.
Validate the received UTXO set and UTXO and RangeProofs MMR nodes .
&self
local_utxo_hashes
&[HashOutput]
remote_utxo_hashes
&[HashOutput]
&self
local_utxo_hashes
&[HashOutput]
remote_utxo_hashes
&[HashOutput]