zcash_client_sqlite: Fix the broken `account_birthday` query.
This commit is contained in:
parent
20e8bca8d9
commit
f7c29f0111
|
@ -7,10 +7,13 @@ and this library adheres to Rust's notion of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- A bug in the SQL query for `WalletDb::get_account_birthday` was fixed.
|
||||||
|
|
||||||
## [0.10.2] - 2024-03-27
|
## [0.10.2] - 2024-03-27
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- A bug in the SQL querey for `WalletDb::get_unspent_transparent_output` was fixed.
|
- A bug in the SQL query for `WalletDb::get_unspent_transparent_output` was fixed.
|
||||||
|
|
||||||
## [0.10.1] - 2024-03-25
|
## [0.10.1] - 2024-03-25
|
||||||
|
|
||||||
|
|
|
@ -1591,7 +1591,7 @@ pub(crate) fn account_birthday(
|
||||||
conn.query_row(
|
conn.query_row(
|
||||||
"SELECT birthday_height
|
"SELECT birthday_height
|
||||||
FROM accounts
|
FROM accounts
|
||||||
WHERE account = :account_id",
|
WHERE id = :account_id",
|
||||||
named_params![":account_id": account.0],
|
named_params![":account_id": account.0],
|
||||||
|row| row.get::<_, u32>(0).map(BlockHeight::from),
|
|row| row.get::<_, u32>(0).map(BlockHeight::from),
|
||||||
)
|
)
|
||||||
|
@ -3212,6 +3212,9 @@ mod tests {
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let account_id = st.test_account().unwrap().account_id();
|
let account_id = st.test_account().unwrap().account_id();
|
||||||
assert_matches!(account_birthday(&st.wallet().conn, account_id), Ok(_))
|
assert_matches!(
|
||||||
|
account_birthday(&st.wallet().conn, account_id),
|
||||||
|
Ok(birthday) if birthday == st.sapling_activation_height()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue