Skip to content

Commit

Permalink
Add test to remind us to fix the UtxoEntry redb type name (#3934)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Sep 4, 2024
1 parent 3807c9d commit 5e35dd5
Showing 1 changed file with 12 additions and 0 deletions.
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);
}
}

0 comments on commit 5e35dd5

Please sign in to comment.