Skip to content

Commit

Permalink
Address review comments in transaction_data_requests
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Aug 9, 2024
1 parent 8752ad7 commit 171cc3d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions zcash_client_sqlite/src/wallet/transparent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,9 @@ pub(crate) fn transaction_data_requests<P: consensus::Parameters>(
conn: &rusqlite::Connection,
params: &P,
) -> Result<Vec<TransactionDataRequest>, SqliteClientError> {
// We cannot construct transaction data requests for the case where we cannot determine the
// height at which to begin, so we require that either the target height or mined height be
// set. In practice, we should not encounter entries in `transparent_spend_search_queue`
// because under ordinary circumstances, it is populated via a call from
// `decrypt_and_store_transaction` on ordinary mined transaction data retrieved from the chain.
// We cannot construct address-based transaction data requests for the case where we cannot
// determine the height at which to begin, so we require that either the target height or mined
// height be set.
let mut address_request_stmt = conn.prepare_cached(
"SELECT ssq.address, IFNULL(t.target_height, t.mined_height)
FROM transparent_spend_search_queue ssq
Expand All @@ -515,7 +513,7 @@ pub(crate) fn transaction_data_requests<P: consensus::Parameters>(
TransactionDataRequest::SpendsFromAddress {
address,
block_range_start,
block_range_end: Some(block_range_start + DEFAULT_TX_EXPIRY_DELTA),
block_range_end: Some(block_range_start + DEFAULT_TX_EXPIRY_DELTA + 1),

Check warning on line 516 in zcash_client_sqlite/src/wallet/transparent.rs

View check run for this annotation

Codecov / codecov/patch

zcash_client_sqlite/src/wallet/transparent.rs#L510-L516

Added lines #L510 - L516 were not covered by tests
},
)
})?
Expand Down

0 comments on commit 171cc3d

Please sign in to comment.