Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: str4d <thestr4d@gmail.com>
  • Loading branch information
nuttycom and str4d committed Jun 19, 2024
1 parent a452cf9 commit 1110f5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zcash_client_sqlite/src/wallet/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub fn init_wallet_db<P: consensus::Parameters + 'static>(
init_wallet_db_internal(wdb, seed, &[], true)
}

pub(crate) fn init_wallet_db_internal<P: consensus::Parameters + 'static>(
fn init_wallet_db_internal<P: consensus::Parameters + 'static>(
wdb: &mut WalletDb<rusqlite::Connection, P>,
seed: Option<SecretVec<u8>>,
target_migrations: &[Uuid],
Expand Down Expand Up @@ -400,6 +400,7 @@ mod tests {
];

let rows = describe_tables(&st.wallet().conn).unwrap();
assert_eq!(rows.len(), expected_tables.len());
for (actual, expected) in rows.iter().zip(expected_tables.iter()) {
assert_eq!(
re.replace_all(actual, " "),
Expand Down
2 changes: 2 additions & 0 deletions zcash_client_sqlite/src/wallet/init/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ mod tests {

use crate::{wallet::init::init_wallet_db_internal, WalletDb};

/// Tests that we can migrate from a completely empty wallet database to the target
/// migrations.
pub(crate) fn test_migrate(migrations: &[Uuid]) {
let data_file = NamedTempFile::new().unwrap();
let mut db_data = WalletDb::for_path(data_file.path(), Network::TestNetwork).unwrap();
Expand Down

0 comments on commit 1110f5d

Please sign in to comment.