Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
Deposit.proof should be Vector
Browse files Browse the repository at this point in the history
  • Loading branch information
hwwhww committed Apr 29, 2019
1 parent c51e86a commit 142b42e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eth2/beacon/types/deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
)
import ssz
from ssz.sedes import (
List,
Vector,
bytes32,
uint64,
)
Expand All @@ -24,7 +24,7 @@ class Deposit(ssz.Serializable):

fields = [
# Merkle branch in the deposit tree
('proof', List(bytes32)),
('proof', Vector(bytes32, 1)),
# Index in the deposit tree
('index', uint64),
# Deposit data
Expand Down
5 changes: 5 additions & 0 deletions tests/eth2/beacon/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
)
from eth2.beacon.types.attestation_data import AttestationData
from eth2.beacon.types.crosslink_records import CrosslinkRecord
from eth2.beacon.types.deposits import Deposit
from eth2.beacon.types.deposit_data import DepositData
from eth2.beacon.types.deposit_input import DepositInput
from eth2.beacon.types.eth1_data import Eth1Data
Expand Down Expand Up @@ -76,6 +77,10 @@ def override_length(config):
for key, value in historical_batch_vector_dict.items():
HistoricalBatch._meta.container_sedes.field_name_to_sedes[key].length = value

Deposit._meta.container_sedes.field_name_to_sedes['proof'].length = (
config.DEPOSIT_CONTRACT_TREE_DEPTH
)


@pytest.fixture(scope="session")
def privkeys():
Expand Down

0 comments on commit 142b42e

Please sign in to comment.