babe: directly using append_u64 in transcript instead of to_le_bytes (#5005)

This commit is contained in:
Wei Tang
2020-02-21 10:43:42 +01:00
committed by GitHub
parent e8871e0327
commit 353e7a068f
@@ -92,8 +92,8 @@ pub(super) fn make_transcript(
epoch: u64,
) -> Transcript {
let mut transcript = Transcript::new(&BABE_ENGINE_ID);
transcript.append_message(b"slot number", &slot_number.to_le_bytes());
transcript.append_message(b"current epoch", &epoch.to_le_bytes());
transcript.append_u64(b"slot number", slot_number);
transcript.append_u64(b"current epoch", epoch);
transcript.append_message(b"chain randomness", randomness);
transcript
}