Skip to content

Commit

Permalink
Use valid serialized CommitmentTree values for migration tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Jul 2, 2023
1 parent c4e11e6 commit 11134d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions zcash_client_sqlite/src/wallet/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ mod tests {

// add a sapling sent note
wdb.conn.execute(
"INSERT INTO blocks (height, hash, time, sapling_tree) VALUES (0, 0, 0, x'00')",
"INSERT INTO blocks (height, hash, time, sapling_tree) VALUES (0, 0, 0, x'000000')",
[],
)?;

Expand Down Expand Up @@ -1080,7 +1080,7 @@ mod tests {
RecipientAddress::Transparent(*ufvk.default_address().0.transparent().unwrap())
.encode(&tests::network());
wdb.conn.execute(
"INSERT INTO blocks (height, hash, time, sapling_tree) VALUES (0, 0, 0, x'00')",
"INSERT INTO blocks (height, hash, time, sapling_tree) VALUES (0, 0, 0, x'000000')",
[],
)?;
wdb.conn.execute(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ impl RusqliteMigration for Migration {
while let Some(row) = block_rows.next()? {
let block_height: u32 = row.get(0)?;
let sapling_tree_data: Vec<u8> = row.get(1)?;
if sapling_tree_data == vec![0x00] {
continue;
}

let block_end_tree = read_commitment_tree::<
sapling::Node,
Expand Down

0 comments on commit 11134d2

Please sign in to comment.