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

Treat expired temporary entries as not found in the RPC #979

Closed
wants to merge 1 commit into from

Conversation

leighmcculloch
Copy link
Member

What

Treat expired temporary entries as not found in the RPC when looking up data for preflight.

Why

According to the discussion [here] the RPC is treating temporary entries as found and so once they are expired and until their found the RPC is not identifying that the temporary entry will be a new entry created during the call and the refundable fee is not being calculated to include for that cost.

@tsachiherman asked me to run a test with this small change to see if it would fix the problem. This isn't a complete fix. There's code elsewhere in the file being edited that really should be looked over and tidied up. Also there needs to be tests for this. This change just holds a quick hack to confirm this is the problem.

@leighmcculloch leighmcculloch changed the title Treat expired temporary entries as not found in the RPC when looking up data for preflight. Treat expired temporary entries as not found in the RPC Sep 20, 2023
TryInto::<Box<dyn ExpirableLedgerEntry>>::try_into(&entry_and_expiration)
{
if expirable_entry.durability() != Persistent {
return Err(Error::NotFound);
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 not sure I understand this, why don't we do a has_expired check here? Seems like every temp entry will be NotFound now...

@leighmcculloch
Copy link
Member Author

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