cardano-rpc
Safe HaskellNone
LanguageHaskell2010

Cardano.Rpc.Server.Internal.UtxoRpc.Sync

Description

Handlers for the UTxO RPC SyncService - synchronising chain data (fetching blocks, dumping history, following the tip).

Synopsis

Documentation

fetchBlockMethod Source #

Arguments

:: MonadRpc e m 
=> Proto FetchBlockRequest

Request containing a block reference (slot + hash)

-> m (Proto FetchBlockResponse)

Response containing the fetched block with raw CBOR and cardano header

Handle the FetchBlock SyncService RPC method. Fetches a block from ChainDB by slot and header hash. Returns NOT_FOUND if the requested block is missing. Returns INVALID_ARGUMENT if the block reference has an invalid hash.