update lss-connector dep

This commit is contained in:
Evan Feenstra
2023-06-02 11:29:56 -07:00
parent bedf7062e1
commit 03dc86aed3
2 changed files with 10 additions and 6 deletions

8
broker/Cargo.lock generated
View File

@@ -1713,7 +1713,7 @@ dependencies = [
[[package]]
name = "lss-connector"
version = "0.1.0"
source = "git+https://github.com/stakwork/sphinx-rs#e4089d251ceec05540db4f893d5879544fa4055b"
source = "git+https://github.com/stakwork/sphinx-rs#da6850edff5dd6ba61a3c6bb63c8ef2bb967ddd3"
dependencies = [
"anyhow",
"lightning-storage-server",
@@ -3173,7 +3173,7 @@ dependencies = [
[[package]]
name = "sphinx-auther"
version = "0.1.12"
source = "git+https://github.com/stakwork/sphinx-rs#e4089d251ceec05540db4f893d5879544fa4055b"
source = "git+https://github.com/stakwork/sphinx-rs#da6850edff5dd6ba61a3c6bb63c8ef2bb967ddd3"
dependencies = [
"anyhow",
"base64 0.13.1",
@@ -3185,7 +3185,7 @@ dependencies = [
[[package]]
name = "sphinx-glyph"
version = "0.1.2"
source = "git+https://github.com/stakwork/sphinx-rs#e4089d251ceec05540db4f893d5879544fa4055b"
source = "git+https://github.com/stakwork/sphinx-rs#da6850edff5dd6ba61a3c6bb63c8ef2bb967ddd3"
dependencies = [
"anyhow",
"hex",
@@ -3231,7 +3231,7 @@ dependencies = [
[[package]]
name = "sphinx-signer"
version = "0.1.0"
source = "git+https://github.com/stakwork/sphinx-rs#e4089d251ceec05540db4f893d5879544fa4055b"
source = "git+https://github.com/stakwork/sphinx-rs#da6850edff5dd6ba61a3c6bb63c8ef2bb967ddd3"
dependencies = [
"anyhow",
"bip39",

View File

@@ -14,7 +14,10 @@ pub async fn lss_setup(uri: &str, mqtt_tx: mpsc::Sender<ChannelRequest>) -> Resu
let reply = ChannelRequest::send(topics::LSS_MSG, msg_bytes, &mqtt_tx).await?;
let ir = Response::from_slice(&reply)?.as_init()?;
let (lss_conn, msg_bytes2) = LssBroker::new(uri, ir, spk).await?;
let lss_conn = LssBroker::new(uri, ir.clone(), spk).await?;
// this only returns the initial state if it was requested by signer
let msg_bytes2 = lss_conn.get_created_state_msg(&ir).await?;
let reply2 = ChannelRequest::send(topics::LSS_MSG, msg_bytes2, &mqtt_tx).await?;
let cr = Response::from_slice(&reply2)?.as_created()?;
@@ -58,7 +61,8 @@ pub fn lss_tasks(lss_conn: LssBroker, mut lss_rx: mpsc::Receiver<LssReq>, mut re
async fn reconnect_dance(cid: &str, lss_conn: &LssBroker, mqtt_tx: &mpsc::Sender<ChannelRequest>) -> Result<()> {
let init_bytes = lss_conn.make_init_msg().await?;
let reply = ChannelRequest::send_for(cid, topics::LSS_MSG, init_bytes, mqtt_tx).await?;
let state_bytes = lss_conn.get_initial_state_msg(&reply).await?;
let ir = Response::from_slice(&reply)?.as_init()?;
let state_bytes = lss_conn.get_created_state_msg(&ir).await?;
let reply2 = ChannelRequest::send_for(cid, topics::LSS_MSG, state_bytes, mqtt_tx).await?;
let cr = Response::from_slice(&reply2)?.as_created()?;
lss_conn.handle(Response::Created(cr)).await?;