1
0
mirror of https://github.com/scsibug/nostr-rs-relay.git synced 2025-04-14 01:49:56 -04:00

feat: debug protocol messages

This commit is contained in:
Greg Heartsfield 2021-12-23 21:30:04 -06:00
parent 8a8ee5c425
commit bfc804e18c

@ -53,6 +53,7 @@ impl Stream for NostrStream {
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
/// Convert Message to NostrMessage
fn convert(msg: String) -> Result<NostrMessage> {
debug!("raw msg: {}", msg);
let parsed_res: Result<NostrMessage> = serde_json::from_str(&msg).map_err(|e| e.into());
match parsed_res {
Ok(m) => Ok(m),