Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
refactor: update to new sdk versions
Browse files Browse the repository at this point in the history
  • Loading branch information
hopeyen committed Jun 21, 2023
1 parent 9687e49 commit 23d3cb8
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 14 deletions.
67 changes: 59 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion poi-radio/Cargo.toml
Expand Up @@ -10,7 +10,7 @@ keywords = ["graphprotocol", "data-integrity", "Indexer", "waku", "p2p"]
categories = ["network-programming", "web-programming::http-client"]

[dependencies]
graphcast-sdk = "0.3.3"
graphcast_sdk = { package = "graphcast-sdk", git = "https://github.com/graphops/graphcast-sdk" }
prost = "0.11"
once_cell = "1.17"
chrono = "0.4"
Expand Down
1 change: 1 addition & 0 deletions poi-radio/benches/gossips.rs
Expand Up @@ -53,6 +53,7 @@ fn gossip_poi_bench(c: &mut Criterion) {
persistence_file_path: None,
discv5_enrs: None,
discv5_port: None,
filter_protocol: None,
});

c.bench_function("gossip_poi", move |b| {
Expand Down
8 changes: 5 additions & 3 deletions poi-radio/src/config.rs
Expand Up @@ -15,7 +15,7 @@ use graphcast_sdk::{
init_tracing,
};
use serde::{Deserialize, Serialize};
use tracing::{debug, info};
use tracing::{debug, info, trace};

use crate::state::PersistedState;
use crate::{active_allocation_hashes, syncing_deployment_hashes};
Expand Down Expand Up @@ -269,6 +269,8 @@ pub struct Config {
default_value = "poi-radio"
)]
pub radio_name: String,
#[clap(long, value_name = "FILTER_PROTOCOL", env = "ENABLE_FILTER_PROTOCOL")]
pub filter_protocol: Option<bool>,
}

impl Config {
Expand Down Expand Up @@ -321,7 +323,7 @@ impl Config {
self.waku_host.clone(),
self.waku_port.clone(),
self.waku_addr.clone(),
Some(false),
self.filter_protocol,
self.discv5_enrs.clone(),
self.discv5_port,
)
Expand Down Expand Up @@ -361,7 +363,7 @@ impl Config {
//TODO: set up synchronous panic hook as part of PersistedState functions
// panic_hook(&path);
let state = PersistedState::load_cache(path);
debug!(
trace!(
state = tracing::field::debug(&state),
"Loaded Persisted state cache"
);
Expand Down
2 changes: 1 addition & 1 deletion test-runner/Cargo.toml
Expand Up @@ -21,7 +21,7 @@ categories = [
]

[dependencies]
waku = { version = "0.1.0", package = "waku-bindings" }
waku = { version = "0.1.1", package = "waku-bindings" }
test-utils = { path = "../test-utils" }
graphcast-sdk = "0.3.3"
poi-radio = { path = "../poi-radio" }
Expand Down
2 changes: 1 addition & 1 deletion test-utils/Cargo.toml
Expand Up @@ -21,7 +21,7 @@ categories = [
]

[dependencies]
waku = { version = "0.1.0", package = "waku-bindings" }
waku = { version = "0.1.1", package = "waku-bindings" }
graphcast-sdk = "0.3.3"
poi-radio = { path = "../poi-radio" }
tokio = { version = "1.1.1", features = ["full", "rt"] }
Expand Down
1 change: 1 addition & 0 deletions test-utils/src/config.rs
Expand Up @@ -47,5 +47,6 @@ pub fn test_config(
telegram_token: None,
discv5_enrs: None,
discv5_port: None,
filter_protocol: None,
}
}

0 comments on commit 23d3cb8

Please sign in to comment.