2018-11-29 05:23:40 +00:00
|
|
|
# beacon_chain
|
2020-01-28 21:24:45 +00:00
|
|
|
# Copyright (c) 2018-2020 Status Research & Development GmbH
|
2018-11-29 05:23:40 +00:00
|
|
|
# Licensed and distributed under either of
|
2019-11-25 15:30:02 +00:00
|
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
2018-11-29 05:23:40 +00:00
|
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
|
2019-11-14 10:47:55 +00:00
|
|
|
{.used.}
|
|
|
|
|
2018-11-29 05:23:40 +00:00
|
|
|
import
|
2019-12-05 10:27:00 +00:00
|
|
|
times, unittest,
|
2019-12-03 16:45:12 +00:00
|
|
|
./testutil, ./testblockutil,
|
2020-07-07 23:02:14 +00:00
|
|
|
../beacon_chain/spec/[beaconstate, datatypes, digest, presets]
|
2018-11-29 05:23:40 +00:00
|
|
|
|
2020-03-10 04:00:19 +00:00
|
|
|
suiteReport "Beacon state" & preset():
|
2019-12-05 10:27:00 +00:00
|
|
|
timedTest "Smoke test initialize_beacon_state_from_eth1" & preset():
|
2019-07-10 12:23:02 +00:00
|
|
|
let state = initialize_beacon_state_from_eth1(
|
2020-07-07 23:02:14 +00:00
|
|
|
defaultRuntimePreset, Eth2Digest(), 0, makeInitialDeposits(SLOTS_PER_EPOCH, {}), {})
|
2020-07-26 18:55:48 +00:00
|
|
|
check: state.validators.lenu64 == SLOTS_PER_EPOCH
|