mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-17 23:34:19 +01:00
the std::Error is not needed
This commit is contained in:
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
vls-protocol = { path = "../../validating-lightning-signer/vls-protocol" }
|
||||
vls-protocol = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer" }
|
||||
serde = { version = "1.0", default-features = false }
|
||||
serde_bolt = { version = "0.2", default-features = false }
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ pub fn request_from_msg<T: ser::Serialize + DeBolt>(
|
||||
) -> vls_protocol::Result<Vec<u8>> {
|
||||
let mut md = MsgDriver::new_empty();
|
||||
msgs::write_serial_request_header(&mut md, sequence, dbid)?;
|
||||
msgs::write(&mut md, msg).expect("failed to serial write");
|
||||
msgs::write(&mut md, msg)?;
|
||||
Ok(md.bytes())
|
||||
}
|
||||
|
||||
@@ -38,8 +38,8 @@ pub fn raw_response_from_msg<T: ser::Serialize + DeBolt>(
|
||||
|
||||
pub fn request_from_bytes<T: DeBolt>(msg: Vec<u8>) -> vls_protocol::Result<(T, u16, u64)> {
|
||||
let mut m = MsgDriver::new(msg);
|
||||
let (sequence, dbid) = msgs::read_serial_request_header(&mut m).expect("read ping header");
|
||||
let reply: T = msgs::read_message(&mut m).expect("failed to read ping message");
|
||||
let (sequence, dbid) = msgs::read_serial_request_header(&mut m)?;
|
||||
let reply: T = msgs::read_message(&mut m)?;
|
||||
Ok((reply, sequence, dbid))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user