fn verify_bank_against_expected_slot_hash(
    bank: &Bank,
    expected_slot: Slot,
    expected_hash: Hash,
) -> Result<()> {
    let bank_slot = bank.slot();
    let bank_hash = bank.get_accounts_hash();

    if bank_slot != expected_slot || bank_hash != expected_hash {
        return Err(SnapshotError::MismatchedSlotHash(
            (bank_slot, bank_hash),
            (expected_slot, expected_hash),
        ));
    }

    Ok(())
}
/// Check to make sure the deserialized bank's slot and hash matches the snapshot archive's slot
/// and hash
Check to make sure the deserialized bank's slot and hash matches the snapshot archive's slot
and hash
Check to make sure the deserialized bank ' s slot and hash matches the snapshot archive ' s slot and hash
fn verify_bank_against_expected_slot_hash(
    bank: &Bank,
    expected_slot: Slot,
    expected_hash: Hash,
) -> Result<()> {
    let bank_slot = bank.slot();
    let bank_hash = bank.get_accounts_hash();
    if bank_slot != expected_slot || bank_hash != expected_hash {
        return Err(SnapshotError::MismatchedSlotHash(
            (bank_slot, bank_hash),
            (expected_slot, expected_hash),
        ));
    }
    Ok(())
}
fn verify_bank_against_expected_slot_hash ( bank : & Bank , expected_slot : Slot , expected_hash : Hash , ) -> Result < ( ) > { let bank_slot = bank . slot ( ) ; let bank_hash = bank . get_accounts_hash ( ) ; if bank_slot != expected_slot || bank_hash != expected_hash { return Err ( SnapshotError :: MismatchedSlotHash ( ( bank_slot , bank_hash ) , ( expected_slot , expected_hash ) , ) ) ; } Ok ( ( ) ) }
Check to make sure the deserialized bank's slot and hash matches the snapshot archive's slot
and hash
Check to make sure the deserialized bank ' s slot and hash matches the snapshot archive ' s slot and hash
bank
&Bank
expected_slot
Slot
expected_hash
Hash