pub fn serialized_batch_digest<K: AsRef<[u8]>>(
    sbm: K
) -> Result<BatchDigest, DigestError>
Expand description

Hashes a serialized batch message without deserializing it into a batch.

See the test test_batch_and_serialized, which guarantees that the output of this function remains the same as the [fastcrypto::Hash::digest] result you would get from Batch. See also the micro-benchmark batch_digest, which checks the performance of this is identical to hashing a serialized batch.

TODO: remove the expects in the below, making this return a Result and correspondingly doing error management at the callers. See #268 TODO: update batch hashing to reflect hashing fixed sequences of transactions, see #87.