-
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
Conversation
b73d6f2 to
2320348
Compare
| 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it needed to remove these checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found a reply, for context:
two deprecated tables were removed from the IndexStore (here). This makes the use of the two filters TransactionFilter::InputObject and TransactionFilter::ChangedObject unsupported. This was indeed the error thrown by this test when run.
iota/crates/iota-storage/src/indexes.rs
Lines 653 to 670 in 2320348
| Some(TransactionFilter::MoveFunction { | |
| package, | |
| module, | |
| function, | |
| }) => Ok(self.get_transactions_by_move_function( | |
| package, module, function, cursor, limit, reverse, | |
| )?), | |
| Some(TransactionFilter::FromAddress(address)) => { | |
| Ok(self.get_transactions_from_addr(address, cursor, limit, reverse)?) | |
| } | |
| Some(TransactionFilter::ToAddress(address)) => { | |
| Ok(self.get_transactions_to_addr(address, cursor, limit, reverse)?) | |
| } | |
| // NOTE: filter via checkpoint sequence number is implemented in | |
| // `get_transactions` of authority.rs. | |
| Some(_) => Err(IotaError::UserInput { | |
| error: UserInputError::Unsupported(format!("{:?}", filter)), | |
| }), |
Description of change
Fixes e2e tests:
by removing leftovers after removing depr tables PR
Links to any relevant issues
Part of #3321
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
By running e2e tests
Change checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.