Remove merkle_index from test_harness YAML

IMO, this is an implementation detail that shouldn't be covered in these
tests.
This commit is contained in:
Paul Hauner 2019-03-03 11:31:08 +11:00
parent a8c3b5fdd8
commit 87feeea1fd
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
2 changed files with 12 additions and 8 deletions

View File

@ -10,27 +10,26 @@ test_cases:
num_slots: 64
skip_slots: [2, 3]
deposits:
# At slot 1, create a new validator deposit of 32 ETH.
- slot: 1
amount: 32
merkle_index: 0
# Trigger more deposits...
- slot: 3
amount: 32
merkle_index: 1
- slot: 5
amount: 32
merkle_index: 2
proposer_slashings:
# At slot 2, trigger a proposer slashing for validator #42.
- slot: 2
validator_index: 42
# At slot 8, trigger a proposer slashing for validator #13.
# Trigger another slashing...
- slot: 8
validator_index: 13
attester_slashings:
# At slot 2, trigger an attester slashing for validators #11 and #12.
- slot: 2
validator_indices: [11, 12]
# At slot 5, trigger an attester slashing for validator #14.
# Trigger another slashing...
- slot: 5
validator_indices: [14]
results:

View File

@ -68,12 +68,17 @@ fn parse_deposits(yaml: &Yaml) -> Option<Vec<DepositTuple>> {
let keypair = Keypair::random();
let proof_of_possession = create_proof_of_possession(&keypair);
let slot = as_u64(deposit, "slot").expect("Incomplete deposit");
let slot = as_u64(deposit, "slot").expect("Incomplete deposit (slot)");
let amount =
as_u64(deposit, "amount").expect("Incomplete deposit (amount)") * 1_000_000_000;
let deposit = Deposit {
// Note: `branch` and `index` will need to be updated once the spec defines their
// validity.
branch: vec![],
index: as_u64(deposit, "merkle_index").unwrap(),
index: 0,
deposit_data: DepositData {
amount: 32_000_000_000,
amount,
timestamp: 1,
deposit_input: DepositInput {
pubkey: keypair.pk.clone(),