| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.NodeKernelAccess
Synopsis
- data NodeKernelAccess = NodeKernelAccess {}
- mkNodeKernelAccess :: Tracer IO Text -> BlockType blk -> NodeKernel IO addrNTN addrNTC blk -> IO (Maybe NodeKernelAccess)
- fetchBlock :: MonadIO m => NodeKernelAccess -> SlotNo -> Hash BlockHeader -> m (Maybe (ByteString, BlockNo))
- grabNodeKernelAccess :: MonadRpc e m => m NodeKernelAccess
Documentation
data NodeKernelAccess Source #
In-process access to the node kernel. Constructed by cardano-node once consensus initialisation completes.
Constructors
| NodeKernelAccess | |
Fields
| |
Instances
| Has (IORef (Maybe NodeKernelAccess)) RpcEnv Source # | |
Defined in Cardano.Rpc.Server.Internal.Monad | |
Arguments
| :: Tracer IO Text | Tracer for unsupported block type warnings |
| -> BlockType blk | Block type witness |
| -> NodeKernel IO addrNTN addrNTC blk | Consensus node kernel |
| -> IO (Maybe NodeKernelAccess) |
Construct NodeKernelAccess from a consensus NodeKernel.
Returns Nothing and traces the block type for non-Cardano block types.
Arguments
| :: MonadIO m | |
| => NodeKernelAccess | Node kernel access handle |
| -> SlotNo | Block slot number |
| -> Hash BlockHeader | Block header hash |
| -> m (Maybe (ByteString, BlockNo)) | Raw CBOR bytes and block number, or |
Fetch a raw block and its block number from ChainDB by slot and header hash.
grabNodeKernelAccess :: MonadRpc e m => m NodeKernelAccess Source #
Grab the current NodeKernelAccess from the environment, or throw
gRPC UNAVAILABLE if the node kernel has not yet initialised.