Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis committed Sep 20, 2023
1 parent c87035f commit ed377d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions service/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ async fn main() -> Result<(), std::io::Error> {
// Make an instance of network subgraph at either
// graph_node_query_endpoint/subgraphs/id/network_subgraph_deployment
// or network_subgraph_endpoint
let network_subgraph = NetworkSubgraph::new(
let network_subgraph: &'static NetworkSubgraph = Box::leak(Box::new(NetworkSubgraph::new(
Some(&config.indexer_infrastructure.graph_node_query_endpoint),
config
.network_subgraph
.network_subgraph_deployment
.as_deref(),
&config.network_subgraph.network_subgraph_endpoint,
);
)));

let indexer_allocations = indexer_allocations(
&network_subgraph,
Expand All @@ -79,7 +79,7 @@ async fn main() -> Result<(), std::io::Error> {
);

let attestation_signers = attestation_signers(
indexer_allocations,
indexer_allocations.clone(),
config.ethereum.mnemonic.clone(),
// TODO: Chain ID should be a config
U256::from(1),
Expand Down Expand Up @@ -136,7 +136,7 @@ async fn main() -> Result<(), std::io::Error> {
config.indexer_infrastructure.graph_node_status_endpoint,
indexer_management_db,
public_key(&config.ethereum.mnemonic).expect("Failed to initiate with operator wallet"),
network_subgraph,
&network_subgraph,
config.network_subgraph.network_subgraph_auth_token,
config.network_subgraph.serve_network_subgraph,
);
Expand Down
4 changes: 2 additions & 2 deletions service/src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub struct ServerOptions {
pub graph_node_status_endpoint: String,
pub indexer_management_db: PgPool,
pub operator_public_key: String,
pub network_subgraph: NetworkSubgraph,
pub network_subgraph: &'static NetworkSubgraph,
pub network_subgraph_auth_token: Option<String>,
pub serve_network_subgraph: bool,
}
Expand All @@ -53,7 +53,7 @@ impl ServerOptions {
graph_node_status_endpoint: String,
indexer_management_db: PgPool,
operator_public_key: String,
network_subgraph: NetworkSubgraph,
network_subgraph: &'static NetworkSubgraph,
network_subgraph_auth_token: Option<String>,
serve_network_subgraph: bool,
) -> Self {
Expand Down

0 comments on commit ed377d8

Please sign in to comment.