Skip to content

Commit

Permalink
fix: make fields public and mut for set addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
glihm committed Dec 7, 2023
1 parent 95b0c81 commit c530ab8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/katana/core/src/hooker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::sequencer::KatanaSequencer;

#[derive(Debug, Clone, serde::Deserialize, serde::Serialize, Copy, PartialEq, Eq)]
pub struct HookerAddresses {
orderbook_arkchain: FieldElement,
executor_starknet: FieldElement,
pub orderbook_arkchain: FieldElement,
pub executor_starknet: FieldElement,
}

#[async_trait]
Expand Down Expand Up @@ -71,5 +71,5 @@ pub trait KatanaHooker {
/// # Arguments
///
/// * `addresses` - Important addresses related to solis.
fn set_addresses(&self, addresses: HookerAddresses);
fn set_addresses(&mut self, addresses: HookerAddresses);
}
2 changes: 1 addition & 1 deletion crates/katana/core/src/sequencer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl KatanaSequencer {
}

pub async fn set_addresses(&self, addresses: HookerAddresses) {
self.hooker.read().await.set_addresses(addresses);
self.hooker.write().await.set_addresses(addresses);
}

/// Returns the pending state if the sequencer is running in _interval_ mode. Otherwise `None`.
Expand Down

0 comments on commit c530ab8

Please sign in to comment.