Skip to content

Conversation

@ali-behjati
Copy link
Collaborator

@ali-behjati ali-behjati commented Jun 21, 2023

This PR adds some tests to the local storage to make sure it works fine. During the testing I realized that moka's Cache is not working as we expect it to work (it doesn't evict items as we want to) so we removed it and instead adopted a simple queue (or BTreeMap). We might replace it with a more efficient implementation in the future but will do in separate PRs (if needed).

Also, I added a new type alias of FeedId in the Message struct and renamed id to feed_id in pythnet_sdk to make the id more clear. I bumped version to 2.0.0 to get away from solana versioning and have proper version control on this crate. Lastly, updated the cosmwasm contract with this breaking change.

@ali-behjati ali-behjati requested review from Reisen and jayantk June 21, 2023 17:24
@vercel
Copy link

vercel bot commented Jun 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
example-oracle-amm ⬜️ Ignored (Inspect) Jun 22, 2023 10:22am
xc-admin-frontend ⬜️ Ignored (Inspect) Jun 22, 2023 10:22am

Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

nice!

},
};

pub fn create_dummy_price_feed_message_state(
Copy link
Contributor

Choose a reason for hiding this comment

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

(if you made this take an array of times_and_slots: [(i64, Slot)] you could shorten the tests below a bit)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I tried this now but the test readability was not very good. I decided to keep it as it is.

@ali-behjati ali-behjati merged commit d07cc9d into main Jun 22, 2023
@ali-behjati ali-behjati deleted the hermes/add-storage-tests branch June 22, 2023 13:38
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.

4 participants