mirror of https://github.com/voidlizard/hbs2
wip
This commit is contained in:
parent
0aec2526ea
commit
9e26aefbfd
|
|
@ -1,7 +1,6 @@
|
||||||
{-# LANGUAGE AllowAmbiguousTypes #-}
|
{-# LANGUAGE AllowAmbiguousTypes #-}
|
||||||
{-# LANGUAGE UndecidableInstances #-}
|
{-# LANGUAGE UndecidableInstances #-}
|
||||||
{-# LANGUAGE PolyKinds #-}
|
{-# LANGUAGE PolyKinds #-}
|
||||||
{-# LANGUAGE NumericUnderscores #-}
|
|
||||||
module HBS2.Git.Oracle.Run where
|
module HBS2.Git.Oracle.Run where
|
||||||
|
|
||||||
import HBS2.Git.Oracle.Prelude
|
import HBS2.Git.Oracle.Prelude
|
||||||
|
|
@ -13,11 +12,6 @@ import HBS2.Hash
|
||||||
import HBS2.Merkle
|
import HBS2.Merkle
|
||||||
import HBS2.Data.Types.SignedBox
|
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.KeyMan.Keys.Direct
|
||||||
|
|
||||||
import HBS2.Git.Data.LWWBlock
|
import HBS2.Git.Data.LWWBlock
|
||||||
|
|
@ -186,7 +180,7 @@ runDump pks = do
|
||||||
|
|
||||||
debug $ "fucking dump!" <+> pretty self
|
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
|
& setStdin createPipe
|
||||||
& setStdout createPipe
|
& setStdout createPipe
|
||||||
|
|
||||||
|
|
@ -297,7 +291,7 @@ instance (MonadUnliftIO m, HasOracleEnv m) => HandleMethod m RpcChannelQuery whe
|
||||||
instance HasProtocol PIPE (ServiceProto BrowserPluginAPI PIPE) where
|
instance HasProtocol PIPE (ServiceProto BrowserPluginAPI PIPE) where
|
||||||
type instance ProtocolId (ServiceProto BrowserPluginAPI PIPE) = 0xDEADF00D123
|
type instance ProtocolId (ServiceProto BrowserPluginAPI PIPE) = 0xDEADF00D123
|
||||||
type instance Encoded PIPE = ByteString
|
type instance Encoded PIPE = ByteString
|
||||||
decode = either (error.show) Just . deserialiseOrFail
|
decode = either (const Nothing) Just . deserialiseOrFail
|
||||||
encode = serialise
|
encode = serialise
|
||||||
|
|
||||||
-- Some "deferred" implementation for our monad
|
-- Some "deferred" implementation for our monad
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue