wip, refchans

This commit is contained in:
Dmitry Zuikov 2023-07-14 07:26:14 +03:00
parent 9c8c58766b
commit bcd24078b3
2 changed files with 42 additions and 0 deletions

View File

@ -97,6 +97,7 @@ library
, HBS2.Net.Proto.PeerMeta
, HBS2.Net.Proto.Sessions
, HBS2.Net.Proto.RefLog
, HBS2.Net.Proto.RefChan
, HBS2.Net.Proto.Types
, HBS2.OrDie
, HBS2.Prelude

View File

@ -0,0 +1,41 @@
{-# Language UndecidableInstances #-}
{-# Language AllowAmbiguousTypes #-}
{-# Language TemplateHaskell #-}
module HBS2.Net.Proto.RefChan where
import HBS2.Prelude.Plated
-- import HBS2.Hash
-- import HBS2.Clock
-- import HBS2.Net.Proto
-- import HBS2.Net.Auth.Credentials
-- import HBS2.Base58
-- import HBS2.Events
-- import HBS2.Net.Proto.Peer
-- import HBS2.Net.Proto.Sessions
import HBS2.Data.Types.Refs
-- import HBS2.System.Logger.Simple
-- import Data.Maybe
-- import Data.Hashable
-- import Data.ByteString (ByteString)
-- import Type.Reflection (someTypeRep)
import Lens.Micro.Platform
data RefChanACL e =
RefChanACLImmediate
deriving stock (Generic)
data RefChanHead e =
RefChanHead
{ _refChanHeadPrev :: Maybe HashRef
, _refChanHeadVersion :: Integer
, _refChanHeadHistory :: Maybe HashRef
, _refChanHeadACL :: RefChanACL e
}
deriving stock (Generic)
makeLenses ''RefChanHead