Skip to content

Commit

Permalink
Merge branch 'deposit-contract-justin' of github.com:ethereum/eth2.0-…
Browse files Browse the repository at this point in the history
…specs into deposit-contract-justin
  • Loading branch information
JustinDrake committed Jun 10, 2019
2 parents ef91ee5 + 4d6a25f commit b60314e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions deposit_contract/tests/contracts/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,6 @@ def registration_contract(w3, tester):
return registration_deployed


@pytest.fixture(params=[0, 1, 2])
def modified_registration_contract(
request,
w3,
tester):
registration_code = get_deposit_contract_code()
contract_bytecode = compiler.compile_code(registration_code)['bytecode']
contract_abi = compiler.mk_full_signature(registration_code)
registration = w3.eth.contract(
abi=contract_abi,
bytecode=contract_bytecode)
tx_hash = registration.constructor().transact()
tx_receipt = w3.eth.waitForTransactionReceipt(tx_hash)
registration_deployed = w3.eth.contract(
address=tx_receipt.contractAddress,
abi=contract_abi
)
return registration_deployed


@pytest.fixture
def assert_tx_failed(tester):
def assert_tx_failed(function_to_test, exception=eth_tester.exceptions.TransactionFailed):
Expand Down
2 changes: 1 addition & 1 deletion specs/core/0_beacon-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ Before genesis has been triggered and whenever the deposit contract emits a `Dep
When `is_genesis_trigger(deposits, timestamp) is True` for the first time let:

* `genesis_deposits = deposits`
* `genesis_time = timestamp % SECONDS_PER_DAY + 2 * SECONDS_PER_DAY` where `SECONDS_PER_DAY = 86400`
* `genesis_time = timestamp - timestamp % SECONDS_PER_DAY + 2 * SECONDS_PER_DAY` where `SECONDS_PER_DAY = 86400`
* `genesis_eth1_data` be the object of type `Eth1Data` where:
* `genesis_eth1_data.block_hash` is the Ethereum 1.0 block hash that emitted to log for the last deposit in `deposits`
* `genesis_eth1_data.deposit_root` is the deposit root for the last deposit in `deposits`
Expand Down

0 comments on commit b60314e

Please sign in to comment.