mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-19 16:24:29 +01:00
fix rmp_serde to vec named for controller responses
This commit is contained in:
@@ -81,7 +81,8 @@ pub fn make_event_loop(
|
|||||||
let persister: Arc<dyn Persist> = Arc::new(FsPersister::new(&ROOT_STORE, Some(8)));
|
let persister: Arc<dyn Persist> = Arc::new(FsPersister::new(&ROOT_STORE, Some(8)));
|
||||||
|
|
||||||
// initialize the RootHandler
|
// initialize the RootHandler
|
||||||
let root_handler = sphinx_signer::root::init(seed, network, policy, persister).expect("failed to init signer");
|
let root_handler =
|
||||||
|
sphinx_signer::root::init(seed, network, policy, persister).expect("failed to init signer");
|
||||||
|
|
||||||
// signing loop
|
// signing loop
|
||||||
let dummy_peer = PubKey([0; 33]);
|
let dummy_peer = PubKey([0; 33]);
|
||||||
@@ -127,7 +128,7 @@ pub fn make_event_loop(
|
|||||||
handle_control_response(&root_handler, cres, network, led_tx.clone())
|
handle_control_response(&root_handler, cres, network, led_tx.clone())
|
||||||
{
|
{
|
||||||
let res_data =
|
let res_data =
|
||||||
rmp_serde::to_vec(&res).expect("could not publish control response");
|
rmp_serde::to_vec_named(&res).expect("could not publish control response");
|
||||||
mqtt.publish(topics::CONTROL_RETURN, QOS, false, &res_data)
|
mqtt.publish(topics::CONTROL_RETURN, QOS, false, &res_data)
|
||||||
.expect("could not publish control response");
|
.expect("could not publish control response");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ async fn run_main(
|
|||||||
topics::CONTROL => {
|
topics::CONTROL => {
|
||||||
match ctrlr.handle(&msg_bytes) {
|
match ctrlr.handle(&msg_bytes) {
|
||||||
Ok((_msg, res)) => {
|
Ok((_msg, res)) => {
|
||||||
let res_data = rmp_serde::to_vec(&res)
|
let res_data = rmp_serde::to_vec_named(&res)
|
||||||
.expect("could not build control response");
|
.expect("could not build control response");
|
||||||
client
|
client
|
||||||
.publish(
|
.publish(
|
||||||
@@ -199,7 +199,7 @@ async fn run_test(
|
|||||||
topics::CONTROL => {
|
topics::CONTROL => {
|
||||||
match ctrlr.handle(&msg_bytes) {
|
match ctrlr.handle(&msg_bytes) {
|
||||||
Ok((_msg, res)) => {
|
Ok((_msg, res)) => {
|
||||||
let res_data = rmp_serde::to_vec(&res)
|
let res_data = rmp_serde::to_vec_named(&res)
|
||||||
.expect("could not build control response");
|
.expect("could not build control response");
|
||||||
client
|
client
|
||||||
.publish(
|
.publish(
|
||||||
|
|||||||
Reference in New Issue
Block a user