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

✅ Add contract update test #691

Merged
merged 1 commit into from
Jan 28, 2025
Merged

✅ Add contract update test #691

merged 1 commit into from
Jan 28, 2025

Conversation

wraitii
Copy link
Member

@wraitii wraitii commented Jan 28, 2025

No description provided.

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

see 2 files with indirect coverage changes

@wraitii wraitii force-pushed the chore/contract_update_test branch from 9a18366 to b589802 Compare January 28, 2025 11:01
async fn test_contract_upgrade() -> Result<()> {
let mut builder = NodeIntegrationCtxBuilder::new().await;
let rest_url = builder.conf.rest.clone();
let mut node_modules = builder.build().await?;
Copy link
Contributor

Choose a reason for hiding this comment

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

is it possible to call it "node" please :D :D :D my brain can't deal with npm's "node_modules" nightmare XD

and it makes sense to write node.wait_for_n_blocks(1).await?;

Comment on lines +180 to +181
// The state digest is ignored during the update phase.
state_digest: StateDigest(vec![3, 3, 3]),
Copy link
Contributor

Choose a reason for hiding this comment

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

ça je pense que ça va être confusant non ? Est-ce qu'on aurait pas plutôt un "UpdateContractEffect" avec uniquement les fields nécessaire ? Pas sûr que le contract_name soit utile par exemple

Copy link
Member Author

Choose a reason for hiding this comment

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

Mh, en soit je suis d'accord que c'est pas obvious, mais je me dis que ça pourrait être caché par le SDK.
Je suis pas sûr que ça soit ultra-utile côté node d'avoir la distinction?

En pratique c'est un artefact du fait que je process les registrations avant de process les contract-update dans node_state, si on inverse, c'est le contraire et c'est le next_state de la proof qui est zappé.

@wraitii wraitii merged commit bad5d74 into main Jan 28, 2025
11 checks passed
@wraitii wraitii deleted the chore/contract_update_test branch January 28, 2025 13:38
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.

2 participants