From 9e26aefbfd4782342ccf168acc146597f4bcf668 Mon Sep 17 00:00:00 2001 From: Dmitry Zuikov Date: Tue, 26 Mar 2024 17:16:09 +0300 Subject: [PATCH] wip --- hbs2-git/hbs2-git-oracle/lib/HBS2/Git/Oracle/Run.hs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hbs2-git/hbs2-git-oracle/lib/HBS2/Git/Oracle/Run.hs b/hbs2-git/hbs2-git-oracle/lib/HBS2/Git/Oracle/Run.hs index e080ca2d..6541ab8a 100644 --- a/hbs2-git/hbs2-git-oracle/lib/HBS2/Git/Oracle/Run.hs +++ b/hbs2-git/hbs2-git-oracle/lib/HBS2/Git/Oracle/Run.hs @@ -1,7 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE PolyKinds #-} -{-# LANGUAGE NumericUnderscores #-} module HBS2.Git.Oracle.Run where import HBS2.Git.Oracle.Prelude @@ -13,11 +12,6 @@ import HBS2.Hash import HBS2.Merkle import HBS2.Data.Types.SignedBox -import HBS2.Net.Messaging -import HBS2.Net.Messaging.Pipe -import HBS2.Net.Proto.Service -import HBS2.Actors.Peer - import HBS2.KeyMan.Keys.Direct import HBS2.Git.Data.LWWBlock @@ -186,7 +180,7 @@ runDump pks = do debug $ "fucking dump!" <+> pretty self - let cmd = proc "hbs2-git-oracle" ["pipe", "-r", show (pretty (AsBase58 pks))] + let cmd = proc self ["pipe", "-r", show (pretty (AsBase58 pks))] & setStdin createPipe & setStdout createPipe @@ -297,7 +291,7 @@ instance (MonadUnliftIO m, HasOracleEnv m) => HandleMethod m RpcChannelQuery whe instance HasProtocol PIPE (ServiceProto BrowserPluginAPI PIPE) where type instance ProtocolId (ServiceProto BrowserPluginAPI PIPE) = 0xDEADF00D123 type instance Encoded PIPE = ByteString - decode = either (error.show) Just . deserialiseOrFail + decode = either (const Nothing) Just . deserialiseOrFail encode = serialise -- Some "deferred" implementation for our monad