Replace ssz_encode with int_to_bytes32

Only in the relevant places I can think of.. I might have missed some.
This commit is contained in:
Paul Hauner
2019-02-15 12:21:19 +11:00
parent fc04286ae6
commit 210ec89b0b
4 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
use crate::SlotProcessingError;
use hashing::hash;
use int_to_bytes::int_to_bytes32;
use log::debug;
use ssz::{ssz_encode, TreeHash};
use types::{
@@ -110,7 +111,7 @@ fn per_block_processing_signature_optional(
ensure!(
bls_verify(
&block_proposer.pubkey,
&ssz_encode(&state.current_epoch(spec)),
&int_to_bytes32(state.current_epoch(spec).as_u64()),
&block.randao_reveal,
get_domain(&state.fork, state.current_epoch(spec), DOMAIN_RANDAO)
),