-
Notifications
You must be signed in to change notification settings - Fork 58
Fix (e2e-test): Fix full_node_tests #3798
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -271,32 +271,7 @@ async fn test_full_node_indexes() -> Result<(), anyhow::Error> { | |||||||||||||||||||||||||||||||||||||
| let node = &test_cluster.fullnode_handle.iota_node; | ||||||||||||||||||||||||||||||||||||||
| let context = &mut test_cluster.wallet; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let (transferred_object, sender, receiver, digest, _) = transfer_coin(context).await?; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let txes = node | ||||||||||||||||||||||||||||||||||||||
| .state() | ||||||||||||||||||||||||||||||||||||||
| .get_transactions_for_tests( | ||||||||||||||||||||||||||||||||||||||
| Some(TransactionFilter::InputObject(transferred_object)), | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
| .await?; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes.len(), 1); | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes[0], digest); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let txes = node | ||||||||||||||||||||||||||||||||||||||
| .state() | ||||||||||||||||||||||||||||||||||||||
| .get_transactions_for_tests( | ||||||||||||||||||||||||||||||||||||||
| Some(TransactionFilter::ChangedObject(transferred_object)), | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
| .await?; | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes.len(), 2); | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes[1], digest); | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
-274
to
-299
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is it needed to remove these checks?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Database tables that were used to perform those filters were deprecated and removed in the cleanups mentioned in the description, so it's impossible to perform those checks any longer.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found a reply, for context: iota/crates/iota-storage/src/indexes.rs Lines 653 to 670 in 2320348
|
||||||||||||||||||||||||||||||||||||||
| let (_, sender, receiver, digest, _) = transfer_coin(context).await?; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let txes = node | ||||||||||||||||||||||||||||||||||||||
| .state() | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -641,28 +616,23 @@ async fn test_full_node_event_read_api_ok() { | |||||||||||||||||||||||||||||||||||||
| let node = &test_cluster.fullnode_handle.iota_node; | ||||||||||||||||||||||||||||||||||||||
| let jsonrpc_client = &test_cluster.fullnode_handle.rpc_client; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let (package_id, gas_id_1, _) = publish_nfts_package(context).await; | ||||||||||||||||||||||||||||||||||||||
| let (package_id, _, _) = publish_nfts_package(context).await; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let (transferred_object, _, _, digest, _) = transfer_coin(context).await.unwrap(); | ||||||||||||||||||||||||||||||||||||||
| let (_, sender, _, digest, _) = transfer_coin(context).await.unwrap(); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| let txes = node | ||||||||||||||||||||||||||||||||||||||
| .state() | ||||||||||||||||||||||||||||||||||||||
| .get_transactions_for_tests( | ||||||||||||||||||||||||||||||||||||||
| Some(TransactionFilter::InputObject(transferred_object)), | ||||||||||||||||||||||||||||||||||||||
| Some(TransactionFilter::FromAddress(sender)), | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| None, | ||||||||||||||||||||||||||||||||||||||
| false, | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
| .await | ||||||||||||||||||||||||||||||||||||||
| .unwrap(); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| if gas_id_1 == transferred_object { | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes.len(), 2); | ||||||||||||||||||||||||||||||||||||||
| assert!(txes[0] == digest || txes[1] == digest); | ||||||||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes.len(), 1); | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes[0], digest); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
| assert_eq!(txes.len(), 2); | ||||||||||||||||||||||||||||||||||||||
| assert!(txes[0] == digest || txes[1] == digest); | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| // This is a poor substitute for the post processing taking some time | ||||||||||||||||||||||||||||||||||||||
| sleep(Duration::from_millis(1000)).await; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.