cuprate_blockchain::ops::output

Function rct_output_to_output_on_chain

Source
pub fn rct_output_to_output_on_chain(
    rct_output: &RctOutput,
    table_tx_unlock_time: &impl DatabaseRo<TxUnlockTime>,
) -> Result<OutputOnChain, RuntimeError>
Expand description

Map an RctOutput to a cuprate_types::OutputOnChain.

§Panics

This function will panic if rct_output’s commitment fails to decompress into a valid EdwardsPoint.

This should normally not happen as commitments that are stored in the database should always be valid.

§Errors

This function returns RuntimeError::KeyNotFound if the input (if applicable) doesn’t exist or other RuntimeError’s on database errors.