Skip to content

Commit

Permalink
Decode all messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rakanalh committed Feb 26, 2023
1 parent ce5e912 commit 893361a
Show file tree
Hide file tree
Showing 6 changed files with 422 additions and 17 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

13 changes: 11 additions & 2 deletions bin/raiden/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use raiden_client::{
SyncService,
},
};
use raiden_network_messages::decode::MessageDecoder;
use raiden_pathfinding::{
self,
config::PFSConfig,
Expand Down Expand Up @@ -222,6 +223,14 @@ async fn main() {
},
};

let message_decoder = MessageDecoder {
private_key: account.private_key(),
our_address: account.address(),
proxy_manager: proxy_manager.clone(),
secret_registry_address: default_addresses.secret_registry,
pathfinding_service_url: cli.services_config.pathfinding_service_address.clone(),
};

// #
// # Initialize Raiden
// #
Expand All @@ -245,7 +254,7 @@ async fn main() {
config,
contracts_manager,
proxy_manager,
state_manager,
state_manager: state_manager.clone(),
transport: transport_sender.clone(),
});

Expand Down Expand Up @@ -280,7 +289,7 @@ async fn main() {

futures::join!(
block_monitor_service.start(),
transport_service.run(transitioner),
transport_service.run(state_manager, transitioner, message_decoder),
http_service.start()
);
}
Expand Down
2 changes: 2 additions & 0 deletions raiden/network/messages/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rust-version = "1.59"
[dependencies]
# 3rd-Party
derive_more = { version = "0.99.11", default-features = false }
hex = { version = "0.4.3" }
thiserror = { version = "1.0", default-features = false }
tiny-keccak = { version = "2.0.0", features = [ "keccak" ] }
serde = { version = "1.0.136", default-features = false, features = [ "derive" ] }
Expand All @@ -21,5 +22,6 @@ web3 = { version = "0.18.0", default-features = false, features = ["signing"] }

# Raiden
raiden-blockchain = { path = "../../blockchain" }
raiden-pathfinding = { path = "../../pathfinding" }
raiden-primitives = { path = "../../primitives" }
raiden-state-machine = { path = "../../state-machine" }
Loading

0 comments on commit 893361a

Please sign in to comment.