-
Notifications
You must be signed in to change notification settings - Fork 289
[hermes] add /v2/price_feeds endpoint #1277
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
filters: Some(vec![RpcFilterType::Memcmp(Memcmp::new( | ||
0, // offset | ||
MemcmpEncodedBytes::Bytes(b"PAS1".to_vec()), // bytes | ||
))]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getting
warning: use of deprecated field `solana_client::rpc_filter::Memcmp::offset`: Field will be made private in future. Please use a constructor method instead.
--> src/network/pythnet.rs:140:13
|
140 | offset: 0,
| ^^^^^^^^^^^
|
= note: `#[warn(deprecated)]` on by default
warning: use of deprecated field `solana_client::rpc_filter::Memcmp::bytes`: Field will be made private in future. Please use a constructor method instead.
--> src/network/pythnet.rs:141:13
|
141 | bytes: MemcmpEncodedBytes::Bytes(b"PAS1".to_vec()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated field `solana_client::rpc_filter::Memcmp::encoding`: Field has no server-side effect. Specify encoding with `MemcmpEncodedBytes` variant instead. Field will be made private in future. Please use a constructor method instead.
--> src/network/pythnet.rs:142:13
|
142 | encoding: None,
| ^^^^^^^^^^^^^^
possibly due to upgrading solana packages hence the change here to fix the warnings
the new Memcmp::new
method does not require an encoding parameter, so we can omit it
impl Memcmp {
pub fn new(offset: usize, encoded_bytes: MemcmpEncodedBytes) -> Self {
Self {
offset,
bytes: encoded_bytes,
encoding: None,
}
}
}
@@ -52,7 +53,7 @@ impl From<PriceIdInput> for PriceIdentifier { | |||
|
|||
type Base64String = String; | |||
|
|||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)] | |||
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by refactors
@@ -284,7 +294,7 @@ pub async fn spawn(opts: RunOptions, state: Arc<State>) -> Result<()> { | |||
}) | |||
}; | |||
|
|||
let task_guadian_watcher = { | |||
let task_guardian_watcher = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo fix
a5db5b7
to
9a451c4
Compare
dc38d38
to
a828c26
Compare
// Split product keys into chunks of 150 to avoid too many open files error (error trying to connect: tcp open error: Too many open files (os error 24)) | ||
for product_keys_chunk in mapping_acct | ||
.products | ||
.iter() | ||
.filter(|&prod_pkey| *prod_pkey != Pubkey::default()) | ||
.collect::<Vec<_>>() | ||
.chunks(150) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried with 200 but still intermittently getting os error 24
so went with 150 to be safe
TODO: support
market_hours
when the on-chain component is done