spec: update tags to v0.5.1

This commit is contained in:
Michael Sproul
2019-04-15 10:51:20 +10:00
parent 2914d77cd3
commit d95ae95ce8
48 changed files with 148 additions and 148 deletions

View File

@@ -15,7 +15,7 @@ use types::*;
///
/// Note: this function is incomplete.
///
/// Spec v0.5.0
/// Spec v0.5.1
pub fn verify_deposit(
state: &BeaconState,
deposit: &Deposit,
@@ -46,7 +46,7 @@ pub fn verify_deposit(
/// Verify that the `Deposit` index is correct.
///
/// Spec v0.5.0
/// Spec v0.5.1
pub fn verify_deposit_index(state: &BeaconState, deposit: &Deposit) -> Result<(), Error> {
verify!(
deposit.index == state.deposit_index,
@@ -88,7 +88,7 @@ pub fn get_existing_validator_index(
/// Verify that a deposit is included in the state's eth1 deposit root.
///
/// Spec v0.5.0
/// Spec v0.5.1
fn verify_deposit_merkle_proof(state: &BeaconState, deposit: &Deposit, spec: &ChainSpec) -> bool {
let leaf = hash(&get_serialized_deposit_data(deposit));
verify_merkle_proof(
@@ -102,7 +102,7 @@ fn verify_deposit_merkle_proof(state: &BeaconState, deposit: &Deposit, spec: &Ch
/// Helper struct for easily getting the serialized data generated by the deposit contract.
///
/// Spec v0.5.0
/// Spec v0.5.1
#[derive(Encode)]
struct SerializedDepositData {
amount: u64,
@@ -113,7 +113,7 @@ struct SerializedDepositData {
/// Return the serialized data generated by the deposit contract that is used to generate the
/// merkle proof.
///
/// Spec v0.5.0
/// Spec v0.5.1
fn get_serialized_deposit_data(deposit: &Deposit) -> Vec<u8> {
let serialized_deposit_data = SerializedDepositData {
amount: deposit.deposit_data.amount,