stakwork/sphinx-key

Proper channel id does not get passed to the persister

Closed this issue · 1 comments

When running our persister against our signer stack, we get filenames like this for channels:

STORE/CHANNEL/03AB306D/00000001

Take the same persister and run it against Devrandom and Ken's signer, and we get a proper pathname like this:

sdcard/channel/02795a96/b5213201

Make the diff below:

diff --git a/sphinx-key/src/core/events.rs b/sphinx-key/src/core/events.rs
index ca932e9..66e5361 100644
--- a/sphinx-key/src/core/events.rs
+++ b/sphinx-key/src/core/events.rs
@@ -68,7 +68,7 @@ pub fn make_event_loop(
     } = sphinx_key_signer::init(init_msg, network).expect("failed to init signer");
     
     // signing loop
-    let dummy_peer = PubKey([0; 33]);
+    let dummy_peer = PubKey([7u8; 33]);
     while let Ok(event) = rx.recv() {
         match event {
             Event::Connected => {

and you get the filename:

STORE/CHANNEL/03AB306D/07070701