| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Rpc.Server.Internal.UtxoRpc.Type.ChainPoint
Synopsis
- mkChainPointMsg :: ChainPoint -> WithOrigin BlockNo -> UTCTime -> Proto ChainPoint
- utxoRpcChainPointMsgToChainPoint :: (HasCallStack, MonadThrow m) => Proto ChainPoint -> m (ChainPoint, WithOrigin BlockNo, UTCTime)
- mkTipBlockRef :: Header (CardanoBlock StandardCrypto) -> UTCTime -> Proto BlockRef
- chainPointToBlockRef :: ChainPoint -> Proto BlockRef
- tipHeaderPoint :: Header (CardanoBlock StandardCrypto) -> ChainPoint
- utcTimeToMs :: UTCTime -> Word64
Documentation
mkChainPointMsg :: ChainPoint -> WithOrigin BlockNo -> UTCTime -> Proto ChainPoint Source #
utxoRpcChainPointMsgToChainPoint :: (HasCallStack, MonadThrow m) => Proto ChainPoint -> m (ChainPoint, WithOrigin BlockNo, UTCTime) Source #
Inverse of mkChainPointMsg. Note: Origin and At (BlockNo 0) both
encode to height=0, so the decode always maps 0 back to Origin.
Arguments
| :: Header (CardanoBlock StandardCrypto) | |
| -> UTCTime | Slot wall-clock time; encoded as milliseconds since the Unix epoch |
| -> Proto BlockRef |
Project a ChainDB header and a slot timestamp into a BlockRef: slot,
header hash, block height and timestamp.
chainPointToBlockRef :: ChainPoint -> Proto BlockRef Source #
Project a ChainPoint into a BlockRef with slot and hash only - a
rollback reference has no height or timestamp, so those are left at
their proto defaults. ChainPointAtGenesis becomes the default message
(origin).
tipHeaderPoint :: Header (CardanoBlock StandardCrypto) -> ChainPoint Source #
The ChainPoint of a ChainDB tip header.
utcTimeToMs :: UTCTime -> Word64 Source #
Milliseconds since the Unix epoch, the timestamp encoding UTxO RPC uses.