Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

Implement naive tx cache #247

Merged
merged 4 commits into from Mar 24, 2020
Merged

Implement naive tx cache #247

merged 4 commits into from Mar 24, 2020

Conversation

xla
Copy link
Contributor

@xla xla commented Mar 24, 2020

Closes #244

@xla xla added proxy feature Something that doesn't exist yet labels Mar 24, 2020
@xla xla self-assigned this Mar 24, 2020
@xla xla added this to In progress in weekly via automation Mar 24, 2020
projectName,
orgId
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

It is a bit confusing to request a specific content although we are asserting that there will be no transactions

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Still working on meaningful tests, this is wip.

proxy/src/registry.rs Outdated Show resolved Hide resolved
})
};

self.transactions.insert(tx.id, tx.clone());
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be a good idea to implement a self.submit_tx proxy function that calls self.client.submit_transaction and inserts the tx in the cache. That way we don't ever forget to cache stuff.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unfortunately that is not doable at the moment as Message in the registry is a trait with a static method. So we can't really pull the code out that constructs registry transactions.

@xla xla marked this pull request as ready for review March 24, 2020 20:43
weekly automation moved this from In progress to Approved Mar 24, 2020
Copy link
Contributor

@NunoAlexandre NunoAlexandre left a comment

Choose a reason for hiding this comment

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

🌱

@xla xla merged commit cb328b9 into master Mar 24, 2020
weekly automation moved this from Approved to Done Mar 24, 2020
@xla xla deleted the xla/244-transactions-cache branch March 24, 2020 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Something that doesn't exist yet
Projects
No open projects
weekly
  
Done
Development

Successfully merging this pull request may close these issues.

Expose transaction cache from the proxy API
4 participants