Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
commit-id:24d31106
  • Loading branch information
Itay-Tsabary-Starkware committed Jan 14, 2025
1 parent 1b914ec commit 6027fc6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/starknet_sequencer_infra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ validator.workspace = true

[dev-dependencies]
assert_matches.workspace = true
once_cell.workspace = true
pretty_assertions.workspace = true
starknet-types-core.workspace = true
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::fmt::Debug;
use std::net::SocketAddr;
use std::sync::Arc;

use once_cell::sync::Lazy;
use std::sync::{Arc, Mutex};
use async_trait::async_trait;
use hyper::body::to_bytes;
use hyper::header::CONTENT_TYPE;
Expand Down Expand Up @@ -64,6 +65,33 @@ const DESERIALIZE_REQ_ERROR_MESSAGE: &str = "Could not deserialize client reques
const DESERIALIZE_RES_ERROR_MESSAGE: &str = "Could not deserialize server response";
const VALID_VALUE_A: ValueA = Felt::ONE;



// Define the shared fixture
static TEST_PORTS: Lazy<Arc<Mutex<YourSharedDataType>>> = Lazy::new(|| {
let mut available_ports = AvailablePorts::new(test_unique_index, 0);
Arc::new(Mutex::new(fixture))
});

// Mock data type for illustration
struct YourSharedDataType {
value: u32,
}

impl YourSharedDataType {
fn new() -> Self {
Self { value: 0 }
}

fn increment(&mut self) {
self.value += 1;
}

fn get_value(&self) -> u32 {
self.value
}
}

#[async_trait]
impl ComponentAClientTrait for RemoteComponentClient<ComponentARequest, ComponentAResponse> {
async fn a_get_value(&self) -> ResultA {
Expand Down

0 comments on commit 6027fc6

Please sign in to comment.