Skip to content

Conversation

@daria305
Copy link
Contributor

@daria305 daria305 commented Oct 30, 2024

Description of change

Fixes e2e tests:

  • test_full_node_event_read_api_ok
  • test_full_node_indexes

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.

  • Bug fix (a non-breaking change which fixes an issue)

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.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code

@daria305 daria305 added the node Issues related to the Core Node team label Oct 30, 2024
@daria305 daria305 requested review from a team as code owners October 30, 2024 14:07
@daria305 daria305 force-pushed the core-node/fix/full_node_tests branch from b73d6f2 to 2320348 Compare October 30, 2024 14:40
Comment on lines -274 to -299
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);
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

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)),
}),

@muXxer muXxer merged commit 37a6009 into develop Oct 31, 2024
33 of 39 checks passed
@muXxer muXxer deleted the core-node/fix/full_node_tests branch October 31, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

node Issues related to the Core Node team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants