Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ querystring = { version = "1.1.0", default-features = false }
regex = { version = "1.10.4", features = ["std"], default-features = false }
serde_json = { version = "1.0", default-features = false}
serde = { version = "1.0", features = ["derive"], default-features = false }
tokio = { version = "1.44.1", default-features = false }
tokio = { version = "1.44.1", default-features = false}
tokio-tungstenite = { version = "0.20.1", default-features = false }
url = { version = "=2.5.0", default-features = false}
urlencoding = { version = "2.1.0", default-features = false}
Expand Down
2 changes: 2 additions & 0 deletions core/main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ contract_tests = [
"websocket_contract_tests",
]
tdk=[]
console = ["console-subscriber"]
[dependencies]
base64.workspace = true
ripple_sdk = { workspace = true, features = ["full"] }
Expand All @@ -69,6 +70,7 @@ jaq-core = "1.5.0"
jaq-std = { version = "1.5.1", default-features = false }
strum = { version = "0.24", default-features = false }
strum_macros = "0.24"
console-subscriber = { version = "0.1", optional = true }

# openrpc_validator is optional and not part of the default workspace
# Only included when openrpc_validation feature is enabled
Expand Down
4 changes: 2 additions & 2 deletions core/main/src/firebolt/handlers/provider_registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ impl ProviderRegistrar {
rpc_module: &mut RpcModule<RpcModuleContext>,
) -> bool {
info!(
"register_method: method_name={}, method_type={:?}, rpc_module={:?}",
method_name, method_type, rpc_module
"register_method: method_name={}, method_type={:?}",
method_name, method_type
);

let result = match method_type {
Expand Down
11 changes: 11 additions & 0 deletions core/main/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ pub mod state;
pub mod utils;
include!(concat!(env!("OUT_DIR"), "/version.rs"));

#[cfg(feature = "console")]
fn init_console() {
console_subscriber::ConsoleLayer::builder()
.server_addr(([127, 0, 0, 1], 6669))
.init();
println!("Tokio Console enabled - connect with 'tokio-console' command");
}

#[tokio::main(worker_threads = 2)]
async fn main() {
#[cfg(feature = "console")]
init_console();

// Init logger
if let Err(e) = init_and_configure_logger(SEMVER_LIGHTWEIGHT, "gateway".into(), None) {
println!("{:?} logger init error", e);
Expand Down
5 changes: 4 additions & 1 deletion device/mock_device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
console = ["console-subscriber", "tokio/tracing"]

[lib]
crate-type = ["cdylib"]

Expand All @@ -37,7 +40,7 @@ serde_json.workspace = true
serde.workspace = true
url.workspace = true
tokio = { workspace = true, features = ["macros", "sync", "rt"] }

console-subscriber = { version = "0.1", optional = true }

[dev-dependencies]
ripple_tdk = { path = "../../core/tdk" }