Module helper

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.