Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1219,7 +1219,7 @@ mod tests {
let note = Note::from_parts(
addr,
NoteValue::from_raw(tv.note_v),
AssetBase::native(),
AssetBase::from_bytes(&tv.asset).unwrap(),
rho,
RandomSeed::from_bytes(tv.note_rseed, &rho).unwrap(),
)
Expand Down
8 changes: 3 additions & 5 deletions src/note/asset_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,22 +162,20 @@ pub mod testing {
}
}

// the following test should fail until updated to use the new asset ID derivation
#[test]
#[should_panic]
fn test_vectors() {
let test_vectors = crate::test_vectors::asset_id::test_vectors();

for tv in test_vectors {
let description = std::str::from_utf8(&tv.description).unwrap();

let calculated_asset_id = AssetBase::derive(
let calculated_asset_base = AssetBase::derive(
&IssuanceValidatingKey::from_bytes(&tv.key).unwrap(),
description,
);
let test_vector_asset_id = AssetBase::from_bytes(&tv.asset_id).unwrap();
let test_vector_asset_base = AssetBase::from_bytes(&tv.asset_base).unwrap();

assert_eq!(calculated_asset_id, test_vector_asset_id);
assert_eq!(calculated_asset_base, test_vector_asset_base);
}
}
}
Loading