From b83e472057b5b1d10b5edfb14ab76ef8516a06a3 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Thu, 27 Jul 2023 09:43:51 +0300 Subject: [PATCH] fixed pexinfo --- hbs2-peer/app/RPC.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hbs2-peer/app/RPC.hs b/hbs2-peer/app/RPC.hs index b0fbc44c..549f3168 100644 --- a/hbs2-peer/app/RPC.hs +++ b/hbs2-peer/app/RPC.hs @@ -240,6 +240,9 @@ runRpcCommand opt = \case ANNOUNCE h -> withRPC opt (RPCAnnounce h) FETCH h -> withRPC opt (RPCFetch h) PEERS -> withRPC opt RPCPeers + + PEXINFO -> withRPC opt RPCPexInfo + SETLOG s -> withRPC opt (RPCLogLevel s) REFLOGUPDATE bs -> withRPC opt (RPCRefLogUpdate bs) REFLOGFETCH k -> withRPC opt (RPCRefLogFetch k) @@ -301,7 +304,7 @@ withRPC o cmd = rpcClientMain o $ runResourceT do , rpcOnPeers = dontHandle , rpcOnPeersAnswer = (\(pa, k) -> Log.info $ pretty (AsBase58 k) <+> pretty pa) , rpcOnPexInfo = dontHandle - , rpcOnPexInfoAnswer = dontHandle + , rpcOnPexInfoAnswer = (\ps -> mapM_ (Log.info . pretty) ps) , rpcOnLogLevel = dontHandle , rpcOnRefLogUpdate = dontHandle , rpcOnRefLogFetch = dontHandle @@ -360,6 +363,10 @@ withRPC o cmd = rpcClientMain o $ runResourceT do pause @'Seconds 1 exitSuccess + RPCPexInfo{} -> liftIO do + pause @'Seconds 1 + exitSuccess + RPCLogLevel{} -> liftIO exitSuccess RPCRefLogUpdate{} -> liftIO do