mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-23 04:04:12 +00:00
Remove old hash_tree_root stub from state trans
This commit is contained in:
parent
f9acc42aca
commit
4d3889d838
@ -3,7 +3,7 @@ use bls::{AggregatePublicKey, AggregateSignature, PublicKey, Signature};
|
|||||||
use boolean_bitfield::BooleanBitfield;
|
use boolean_bitfield::BooleanBitfield;
|
||||||
use hashing::hash;
|
use hashing::hash;
|
||||||
use slot_clock::{SystemTimeSlotClockError, TestingSlotClockError};
|
use slot_clock::{SystemTimeSlotClockError, TestingSlotClockError};
|
||||||
use ssz::ssz_encode;
|
use ssz::{ssz_encode, TreeHash};
|
||||||
use types::{
|
use types::{
|
||||||
beacon_state::SlotProcessingError, readers::BeaconBlockReader, AttestationData,
|
beacon_state::SlotProcessingError, readers::BeaconBlockReader, AttestationData,
|
||||||
AttestationDataAndCustodyBit, BeaconBlock, BeaconState, Exit, Fork, Hash256,
|
AttestationDataAndCustodyBit, BeaconBlock, BeaconState, Exit, Fork, Hash256,
|
||||||
@ -183,7 +183,7 @@ where
|
|||||||
ensure!(
|
ensure!(
|
||||||
bls_verify(
|
bls_verify(
|
||||||
&proposer.pubkey,
|
&proposer.pubkey,
|
||||||
&hash_tree_root(&proposer_slashing.proposal_data_1),
|
&proposer_slashing.proposal_data_1.hash_tree_root(),
|
||||||
&proposer_slashing.proposal_signature_1,
|
&proposer_slashing.proposal_signature_1,
|
||||||
get_domain(
|
get_domain(
|
||||||
&state.fork_data,
|
&state.fork_data,
|
||||||
@ -196,7 +196,7 @@ where
|
|||||||
ensure!(
|
ensure!(
|
||||||
bls_verify(
|
bls_verify(
|
||||||
&proposer.pubkey,
|
&proposer.pubkey,
|
||||||
&hash_tree_root(&proposer_slashing.proposal_data_2),
|
&proposer_slashing.proposal_data_2.hash_tree_root(),
|
||||||
&proposer_slashing.proposal_signature_2,
|
&proposer_slashing.proposal_signature_2,
|
||||||
get_domain(
|
get_domain(
|
||||||
&state.fork_data,
|
&state.fork_data,
|
||||||
@ -273,7 +273,7 @@ where
|
|||||||
data: attestation.data.clone(),
|
data: attestation.data.clone(),
|
||||||
custody_bit: false,
|
custody_bit: false,
|
||||||
};
|
};
|
||||||
hash_tree_root(&attestation_data_and_custody_bit).to_vec()
|
&attestation_data_and_custody_bit.hash_tree_root()
|
||||||
};
|
};
|
||||||
// Signature verification.
|
// Signature verification.
|
||||||
ensure!(
|
ensure!(
|
||||||
@ -333,7 +333,7 @@ where
|
|||||||
validator_index: exit.validator_index,
|
validator_index: exit.validator_index,
|
||||||
signature: self.spec.empty_signature.clone(),
|
signature: self.spec.empty_signature.clone(),
|
||||||
};
|
};
|
||||||
hash_tree_root(&exit_struct)
|
exit_struct.hash_tree_root()
|
||||||
};
|
};
|
||||||
ensure!(
|
ensure!(
|
||||||
bls_verify(
|
bls_verify(
|
||||||
@ -418,11 +418,6 @@ fn bls_verify_aggregate(
|
|||||||
signature.verify(message, pubkey)
|
signature.verify(message, pubkey)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hash_tree_root<T>(_input: &T) -> Hash256 {
|
|
||||||
// TODO: stubbed out.
|
|
||||||
Hash256::zero()
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<DBError> for Error {
|
impl From<DBError> for Error {
|
||||||
fn from(e: DBError) -> Error {
|
fn from(e: DBError) -> Error {
|
||||||
Error::DBError(e.message)
|
Error::DBError(e.message)
|
||||||
|
Loading…
Reference in New Issue
Block a user