pub fn hash_to_writer<W: Write>(w: &mut W, hash: &B256) -> Result<()>
Writes a 32-byte hash to a writer.