Skip to content
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

chore: remove todos #436

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 3 additions & 22 deletions crates/tests-integration/src/state_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use mempool_test_utils::starknet_api_test_utils::{
deploy_account_tx, deployed_account_contract_address,
};
use papyrus_common::pending_classes::PendingClasses;
use papyrus_common::BlockHashAndNumber;
use papyrus_rpc::{run_server, RpcConfig};
use papyrus_storage::body::BodyStorageWriter;
use papyrus_storage::class::ClassStorageWriter;
Expand Down Expand Up @@ -267,34 +266,16 @@ fn fund_account(
}
}

// TODO(Yael 5/6/2024): remove this function and use the one from papyrus test utils once we have
// mono-repo.
fn get_test_highest_block() -> Arc<RwLock<Option<BlockHashAndNumber>>> {
Arc::new(RwLock::new(None))
}

// TODO(Yael 5/6/2024): remove this function and use the one from papyrus test utils once we have
// mono-repo.
fn get_test_pending_data() -> Arc<RwLock<PendingData>> {
Arc::new(RwLock::new(PendingData::default()))
}

// TODO(Yael 5/6/2024): remove this function and use the one from papyrus test utils once we have
// mono-repo.
fn get_test_pending_classes() -> Arc<RwLock<PendingClasses>> {
Arc::new(RwLock::new(PendingClasses::default()))
}

async fn run_papyrus_rpc_server(storage_reader: StorageReader) -> SocketAddr {
let rpc_config = RpcConfig {
server_address: get_available_socket().await.to_string(),
..Default::default()
};
let (addr, handle) = run_server(
&rpc_config,
get_test_highest_block(),
get_test_pending_data(),
get_test_pending_classes(),
Arc::new(RwLock::new(None)),
Arc::new(RwLock::new(PendingData::default())),
Arc::new(RwLock::new(PendingClasses::default())),
storage_reader,
"NODE VERSION",
)
Expand Down
Loading