Fix proof-of-possession issues.

These were introduced in an earlier commit
This commit is contained in:
Paul Hauner
2019-03-11 19:47:33 +11:00
parent 292991810d
commit e81f1c31c9
6 changed files with 41 additions and 23 deletions

View File

@@ -1,5 +1,4 @@
use super::errors::{DepositInvalid as Invalid, DepositValidationError as Error};
use bls::verify_proof_of_possession;
use hashing::hash;
use merkle_proof::verify_merkle_proof;
use ssz::ssz_encode;
@@ -27,13 +26,14 @@ pub fn verify_deposit(
spec: &ChainSpec,
) -> Result<(), Error> {
verify!(
// TODO: update proof of possession.
//
// https://github.com/sigp/lighthouse/issues/239
verify_proof_of_possession(
&deposit.deposit_data.deposit_input.proof_of_possession,
&deposit.deposit_data.deposit_input.pubkey
),
deposit
.deposit_data
.deposit_input
.validate_proof_of_possession(
state.slot.epoch(spec.slots_per_epoch),
&state.fork,
spec
),
Invalid::BadProofOfPossession
);