-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor(agent): extract oracle component/service #128
Conversation
|
||
/// Capacities of the channels top-level components use to communicate | ||
#[derive(Deserialize, Debug)] | ||
pub struct ChannelCapacities { |
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.
might be good to mark the deprecated ones.
src/agent/services/oracle.rs
Outdated
state.clone(), | ||
publisher_permissions_tx.clone(), | ||
) | ||
.await; |
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.
maybe add some logs here?
src/agent/services/oracle.rs
Outdated
|
||
loop { | ||
select! { | ||
update = notifier.next() => handle_account_update(state.clone(), network, update).await, |
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.
how we handle websocket failures here? i don't see any logic to handle it. i think we had it in the past.
src/agent/services/oracle.rs
Outdated
}; | ||
} | ||
None => { | ||
tracing::debug!("subscriber closed connection"); |
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.
back to my comment above, we need to reconnect when it happens.
src/agent/solana.rs
Outdated
/// | ||
/// Behaviour: | ||
/// - Spawns Oracle: (Obsolete, now Extracted to state/oracle.rs) | ||
/// - Spawns a Subscriber: |
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.
subscriber is no more
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.
Nice! The code is now much simpler!! thanks! I think we want to fix the WS behaviour and CI before merging.
98ee33a
to
228d4e7
Compare
228d4e7
to
1724443
Compare
No description provided.