mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Rename canonical_hash to `hash
This commit is contained in:
@@ -12,6 +12,7 @@ db = { path = "../db" }
|
||||
failure = "0.1"
|
||||
failure_derive = "0.1"
|
||||
genesis = { path = "../../eth2/genesis" }
|
||||
hashing = { path = "../../eth2/utils/hashing" }
|
||||
serde_derive = "1.0"
|
||||
slot_clock = { path = "../../eth2/utils/slot_clock" }
|
||||
ssz = { path = "../../eth2/utils/ssz" }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use super::{BeaconChain, ClientDB, DBError, SlotClock};
|
||||
use bls::{AggregatePublicKey, AggregateSignature, PublicKey, Signature};
|
||||
use boolean_bitfield::BooleanBitfield;
|
||||
use hashing::hash;
|
||||
use slot_clock::{SystemTimeSlotClockError, TestingSlotClockError};
|
||||
use ssz::ssz_encode;
|
||||
use types::{
|
||||
@@ -127,12 +128,13 @@ where
|
||||
Error::BadRandaoSignature
|
||||
);
|
||||
|
||||
// TODO: check this is correct.
|
||||
let new_mix = {
|
||||
let mut mix = state.latest_randao_mixes
|
||||
[(state.slot % self.spec.latest_randao_mixes_length) as usize]
|
||||
.to_vec();
|
||||
mix.append(&mut ssz_encode(&block.randao_reveal));
|
||||
hash(&mix)
|
||||
Hash256::from(&hash(&mix)[..])
|
||||
};
|
||||
|
||||
state.latest_randao_mixes[(state.slot % self.spec.latest_randao_mixes_length) as usize] =
|
||||
@@ -396,11 +398,6 @@ fn penalize_validator(_state: &BeaconState, _proposer_index: usize) {
|
||||
// TODO: stubbed out.
|
||||
}
|
||||
|
||||
fn hash<T>(_input: &T) -> Hash256 {
|
||||
// TODO: stubbed out.
|
||||
Hash256::zero()
|
||||
}
|
||||
|
||||
fn get_domain(_fork: &Fork, _slot: u64, _domain_type: u64) -> u64 {
|
||||
// TODO: stubbed out.
|
||||
0
|
||||
|
||||
Reference in New Issue
Block a user