Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move remaining pool tests from zcash_client_sqlite to zcash_client_backend #1543

Merged
merged 4 commits into from
Sep 21, 2024

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Sep 20, 2024

No description provided.

@str4d
Copy link
Contributor Author

str4d commented Sep 20, 2024

Third commit is best reviewed with:

git show 47cd7b8089921bb6d6f0648cfc8b9d8a6a1643dc --color-moved=zebra --color-moved-ws=allow-indentation-change

Copy link

codecov bot commented Sep 20, 2024

Codecov Report

Attention: Patch coverage is 71.62757% with 387 lines in your changes missing coverage. Please review.

Project coverage is 61.32%. Comparing base (8b5236a) to head (e67e7ab).
Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
zcash_client_backend/src/data_api/testing/pool.rs 70.81% 385 Missing ⚠️
zcash_client_sqlite/src/lib.rs 95.45% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1543      +/-   ##
==========================================
+ Coverage   60.51%   61.32%   +0.80%     
==========================================
  Files         147      147              
  Lines       17313    18667    +1354     
==========================================
+ Hits        10477    11447     +970     
- Misses       6836     7220     +384     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

nuttycom
nuttycom previously approved these changes Sep 20, 2024
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK a463f7d with minor suggestion for improvement that can be addressed post-merge if necessary. Third commit reviewed by local diff with --color-moved=zebra.

fn get_confirmed_sends(
&self,
txid: &TxId,
) -> Result<Vec<(u64, Option<String>, Option<String>, Option<u32>)>, <Self as WalletRead>::Error>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the inner result type here be a struct? I have no idea what this tuple means.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that would be nicer. I pulled this API as-is from #1533. We also need to add documentation etc. to the new APIs in this PR, which includes All Of The Tests (but I'd spent long enough on this PR).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #1544.

let to_address: Option<String> = row.get(1)?;
let ephemeral_address: Option<String> = row.get(2)?;
let address_index: Option<u32> = row.get(3)?;
Ok((u64::from(v), to_address, ephemeral_address, address_index))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this would be much more usable if it were a struct.

zcash_client_sqlite/src/lib.rs Outdated Show resolved Hide resolved
@@ -1532,12 +1526,6 @@ pub(crate) fn checkpoint_gaps<T: ShieldedPoolTester>() {
// Scan the block
st.scan_cached_blocks(account.birthday().height() + 10, 1);

// Fake that everything has been scanned
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit concerned that this test still passes without this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that without the scan_cached_blocks it fails, so it needs that specific block to be scanned, but apparently not the rest of the chain.

@str4d
Copy link
Contributor Author

str4d commented Sep 20, 2024

Force-pushed to address the SQL review comment. I'll make the struct changes in a separate PR next week.

Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK e67e7ab

@nuttycom
Copy link
Contributor

Please add an issue to track the documentation & struct changes.

@str4d
Copy link
Contributor Author

str4d commented Sep 20, 2024

Opened #1544 and #1545.

@nuttycom nuttycom merged commit 778fe2e into main Sep 21, 2024
28 checks passed
@nuttycom nuttycom deleted the zcb-migrate-tests branch September 21, 2024 00:27
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post-hoc ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants