Module helper

Source
Expand description

These are internal helper functions used by the actual RPC handlers.

Many of the handlers have bodies with only small differences, the identical code is extracted and reused here in these functions.

These build on-top of crate::rpc::service functions.

Functions§

access_response_base
TODO: impl bootstrap
block_header 🔒
Map some data into a BlockHeader.
block_header_by_hash 🔒
Same as block_header but with the block’s hash.
check_height 🔒
Check if height is greater than the top_height.
hex_to_hash 🔒
Parse a hexadecimal String as a 32-byte hash.
response_base
TODO: impl bootstrap
top_height 🔒
cuprate_types::blockchain::BlockchainResponse::ChainHeight minus 1.