Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test to remind us to fix the UtxoEntry redb type name #3934

Merged
merged 1 commit into from
Sep 4, 2024
Merged
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
12 changes: 12 additions & 0 deletions src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6700,4 +6700,16 @@ mod tests {
// zero
assert_eq!(Statistic::Schema.key(), 0);
}

#[test]
fn reminder_to_update_utxo_entry_type_name() {
// This test will break when the schema version is updated, and is a
// reminder to fix the type name in `impl redb::Value for &UtxoEntry`.
//
// The type name should be changed from `ord::index::utxo_entry::UtxoValue`
// to `ord::UtxoEntry`. I think it's probably best if we just name types
// `ord::NAME`, instead of including the full path, since the full path
// will change if we reorganize the code.
assert_eq!(SCHEMA_VERSION, 28);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice.

}
}
Loading