Skip to content

Commit

Permalink
code refine: rename fn
Browse files Browse the repository at this point in the history
Signed-off-by: smtmfft <smtm@taiko.xyz>
  • Loading branch information
smtmfft committed May 15, 2024
1 parent bf29fce commit c93022f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion host/src/preflight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ mod test {
#[test]
fn test_slot_block_num_mapping() {
let chain_spec = SupportedChainSpecs::default()
.get_network_spec(&Network::TaikoA7.to_string())
.get_chain_spec(&Network::TaikoA7.to_string())
.unwrap();
let expected_slot = 1000u64;
let second_per_slot = 12u64;
Expand Down
4 changes: 2 additions & 2 deletions host/src/raiko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ mod tests {
// Unfortunately that also means that kzg is not getting fully verified by CI.
let block_number = if is_ci() { 105987 } else { 101368 };
let chain_spec = SupportedChainSpecs::default()
.get_network_spec(&network)
.get_chain_spec(&network)
.unwrap();
let proof_request = ProofRequest {
block_number,
Expand All @@ -298,7 +298,7 @@ mod tests {
let network = Network::Ethereum.to_string();
let block_number = 19707175;
let chain_spec = SupportedChainSpecs::default()
.get_network_spec(&network)
.get_chain_spec(&network)
.unwrap();
let proof_request = ProofRequest {
block_number,
Expand Down
2 changes: 1 addition & 1 deletion host/src/server/api/v1/proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async fn proof_handler(
);

let chain_spec = support_chain_specs
.get_network_spec(&proof_request.network.to_string())
.get_chain_spec(&proof_request.network.to_string())
.expect("unknown network");

// Execute the proof generation.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl SupportedChainSpecs {
self.0.keys().cloned().collect()
}

pub fn get_network_spec(&self, network: &String) -> Option<ChainSpec> {
pub fn get_chain_spec(&self, network: &String) -> Option<ChainSpec> {
self.0.get(network).cloned()
}
}
Expand Down

0 comments on commit c93022f

Please sign in to comment.