mirror of
https://github.com/stakwork/sphinx-key.git
synced 2026-02-01 05:44:19 +01:00
vls error response
This commit is contained in:
@@ -20,7 +20,7 @@ pub use vls_protocol_signer::vls_protocol;
|
||||
|
||||
pub use derive::node_keys as derive_node_keys;
|
||||
pub use policy::{get_allowlist, make_policy, set_allowlist, set_policy};
|
||||
pub use sphinx_key_parser::{control, topics, MsgDriver};
|
||||
pub use sphinx_key_parser::{control, error::Error as ParserError, topics, MsgDriver};
|
||||
pub use sphinx_key_persister::FsPersister;
|
||||
pub struct InitResponse {
|
||||
pub root_handler: RootHandler,
|
||||
|
||||
13
sphinx-key/Cargo.lock
generated
13
sphinx-key/Cargo.lock
generated
@@ -1993,6 +1993,18 @@ dependencies = [
|
||||
"secp256k1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sphinx-glyph"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf0527b300544e9fe193611f1be1f76e3b25f5ceab4217347429c2912b60093e"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"rmp-serde",
|
||||
"serde",
|
||||
"sphinx-auther",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sphinx-key"
|
||||
version = "0.1.0"
|
||||
@@ -2025,6 +2037,7 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_bolt",
|
||||
"sphinx-auther",
|
||||
"sphinx-glyph",
|
||||
"vls-protocol",
|
||||
]
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ use crate::core::control::{controller_from_seed, FlashPersister};
|
||||
use sphinx_key_signer::control::{Config, ControlMessage, ControlResponse, Policy};
|
||||
use sphinx_key_signer::lightning_signer::bitcoin::Network;
|
||||
use sphinx_key_signer::vls_protocol::model::PubKey;
|
||||
use sphinx_key_signer::{self, make_init_msg, topics, InitResponse, RootHandler};
|
||||
use sphinx_key_signer::{self, make_init_msg, topics, InitResponse, ParserError, RootHandler};
|
||||
use std::sync::{mpsc, Arc, Mutex};
|
||||
|
||||
use embedded_svc::httpd::Result;
|
||||
@@ -104,7 +104,10 @@ pub fn make_event_loop(
|
||||
.expect("could not publish VLS response");
|
||||
}
|
||||
Err(e) => {
|
||||
let err_msg = ParserError::new(1, &e.to_string());
|
||||
log::error!("HANDLE FAILED {:?}", e);
|
||||
mqtt.publish(topics::ERROR, QOS, false, &err_msg.to_vec()[..])
|
||||
.expect("could not publish VLS error");
|
||||
// panic!("HANDLE FAILED {:?}", e);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user