-
Notifications
You must be signed in to change notification settings - Fork 65
apollo_gateway: removing usage of gateway trates in rpc_state_reader #11539
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
apollo_gateway: removing usage of gateway trates in rpc_state_reader #11539
Conversation
|
Please delete this function. It is never used in code (except for testing this function - delete the test as well.). Code quote: pub async fn get_block_info(&self) -> RPCStateReaderResult<BlockInfo> {
let get_block_params = GetBlockWithTxHashesParams { block_id: self.block_id };
let reader = self.clone();
let get_block_with_tx_hashes_result = tokio::task::spawn_blocking(move || {
reader.send_rpc_request("starknet_getBlockWithTxHashes", get_block_params)
})
.await
.map_err(|e| RPCStateReaderError::InternalError(format!("Join error {}", e)))??;
let block_header: BlockHeader = serde_json::from_value(get_block_with_tx_hashes_result)
.map_err(|e| {
RPCStateReaderError::InternalError(format!("Failed to parse block header {}", e))
})?;
let block_info = block_header.try_into()?;
Ok(block_info)
} |
|
Please revert. Code quote: #[error("Internal error: {0}")]
InternalError(String), |
|
Delete this? Code quote: pub type StarknetResult<T> = Result<T, StarknetError>; |
3c34489 to
631fd8f
Compare
ArniStarkware
left a comment
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.
@ArniStarkware reviewed 3 files and all commit messages, made 1 comment, and resolved 3 discussions.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).
lev-starkware
left a comment
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.
@lev-starkware made 3 comments.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).
crates/apollo_gateway/src/rpc_state_reader.rs line 36 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Delete this?
Done.
crates/apollo_gateway/src/rpc_state_reader.rs line 112 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Please delete this function.
It is never used in code (except for testing this function - delete the test as well.).
Done.
crates/apollo_gateway/src/errors.rs line 315 at r1 (raw file):
Previously, ArniStarkware (Arnon Hod) wrote…
Please revert.
Done.
ArniStarkware
left a comment
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub).

No description provided.