Calculate Report
/// Asynchronously calculates transactions completed by tag reporting.
///
/// This function is used by miners to calculate the fragment's tag for subsequent storage proof.
/// After completing the calculation, the miner needs to report to the chain. Reporting the calculation
/// results will increase the miner's computing power and include this data in the challenge.
///
/// # Arguments
///
/// * `tee_sig` - A reference to a string representing the trusted execution environment (TEE) signature.
/// * `account` - A reference to a string representing the account identifier.
/// * `digest` - A bounded vector of `DigestInfo` containing the digest information necessary for the report.
/// * `file_hash` - A reference to a string representing the hash of the file to be included in the report.
///
/// # Returns
///
/// * `Result<(TxHash, CalculateReport), Box<dyn std::error::Error>>` -
/// If successful, returns a tuple containing the transaction hash (`TxHash`) and the calculated report
/// (`CalculateReport`). In case of an error, returns an error wrapped in a `Box`.
///
pub async fn calculate_report(
&self,
tee_sig: &str,
account: &str,
digest: BoundedVec<DigestInfo>,
file_hash: &str,
) -> Result<(TxHash, CalculateReport), Box<dyn std::error::Error>>Last updated