Merge branch 'deposit-contract-justin' of github.com:ethereum/eth2.0-specs into deposit-contract-justin

This commit is contained in:
Justin Drake 2019-06-10 16:03:08 +01:00
commit b60314e892
2 changed files with 1 additions and 21 deletions

View File

@ -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):

View File

@ -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`