Skip to content

Commit d07cc9d

Browse files
authored
[hermes] Add storage tests + refactor (#907)
* [hermes] Add storage tests + refactor * Bump pythnet_sdk version + update cosmwasm * Address review feedbacks
1 parent c9c2031 commit d07cc9d

File tree

11 files changed

+619
-247
lines changed

11 files changed

+619
-247
lines changed

hermes/Cargo.lock

Lines changed: 2 additions & 202 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

hermes/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hermes"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55

66
[dependencies]
@@ -35,11 +35,10 @@ libp2p = { version = "0.42.2", features = [
3535
]}
3636

3737
log = { version = "0.4.17" }
38-
moka = { version = "0.11.0", features = ["future"] }
3938
pyth-sdk = { version = "0.7.0" }
4039

4140
# Parse Wormhole attester price attestations.
42-
pythnet-sdk = { path = "../pythnet/pythnet_sdk/", version = "=1.13.6", features = ["strum"] }
41+
pythnet-sdk = { path = "../pythnet/pythnet_sdk/", version = "2.0.0", features = ["strum"] }
4342

4443
rand = { version = "0.8.5" }
4544
reqwest = { version = "0.11.14", features = ["blocking", "json"] }

hermes/src/api/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl RpcPriceFeed {
7070
let price_feed_message = price_feed_update.price_feed;
7171

7272
Self {
73-
id: PriceIdentifier::new(price_feed_message.id),
73+
id: PriceIdentifier::new(price_feed_message.feed_id),
7474
price: Price {
7575
price: price_feed_message.price,
7676
conf: price_feed_message.conf,

hermes/src/api/ws.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ impl Subscriber {
165165
{
166166
let config = self
167167
.price_feeds_with_config
168-
.get(&PriceIdentifier::new(update.price_feed.id))
168+
.get(&PriceIdentifier::new(update.price_feed.feed_id))
169169
.ok_or(anyhow::anyhow!(
170170
"Config missing, price feed list was poisoned during iteration."
171171
))?;

0 commit comments

Comments
 (0)