Skip to content

Commit

Permalink
Use different methods for getting protocol version
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Sep 24, 2024
1 parent 2b4b1e8 commit 7a1cf66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 5 additions & 0 deletions cmd/soroban-rpc/lib/preflight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ mod curr {
pub(crate) use soroban_simulation_curr as soroban_simulation;
#[allow(clippy::duplicate_mod)]
pub(crate) mod shared;

pub(crate) const PROTOCOL: u32 = soroban_env_host::meta::INTERFACE_VERSION.protocol;
}

#[path = "."]
Expand All @@ -46,6 +48,9 @@ mod prev {
pub(crate) use soroban_simulation_prev as soroban_simulation;
#[allow(clippy::duplicate_mod)]
pub(crate) mod shared;

pub(crate) const PROTOCOL: u32 = soroban_env_host::meta::get_ledger_protocol_version(
soroban_env_host::meta::INTERFACE_VERSION);
}

use std::cell::RefCell;
Expand Down
2 changes: 0 additions & 2 deletions cmd/soroban-rpc/lib/preflight/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ use std::convert::TryFrom;
use std::ptr::null_mut;
use std::rc::Rc;

pub(crate) const PROTOCOL: u32 = meta::get_ledger_protocol_version(meta::INTERFACE_VERSION);

fn fill_ledger_info(c_ledger_info: CLedgerInfo, network_config: &NetworkConfig) -> LedgerInfo {
let network_passphrase = unsafe { from_c_string(c_ledger_info.network_passphrase) };
let mut ledger_info = LedgerInfo {
Expand Down

0 comments on commit 7a1cf66

Please sign in to comment.