Skip to content

Commit

Permalink
Support init bifrost message
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jun 9, 2022
1 parent c6a9bd0 commit 1fae4c9
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/peerd/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,23 @@ impl esb::Handler<ServiceBus> for Runtime {
if self.connect {
info!("{} with the remote peer", "Initializing connection".promo());

self.sender.send_message(bolt::Messages::Init(bolt::Init {
global_features: none!(),
local_features: none!(),
assets: none!(),
unknown_tlvs: none!(),
}))?;
match self.config.protocol {
P2pProtocol::Bolt => {
self.sender.send_message(bolt::Messages::Init(bolt::Init {
global_features: none!(),
local_features: none!(),
assets: none!(),
unknown_tlvs: none!(),
}))?;
}
P2pProtocol::Bifrost => {
self.sender.send_message(bifrost::Messages::Init(bifrost::Init {
protocols: empty!(),
assets: none!(),
unknown_tlvs: none!(),
}))?;
}
}

self.connect = false;
}
Expand Down

0 comments on commit 1fae4c9

Please sign in to comment.