@@ -895,8 +895,17 @@ def test_verify_slashable_vote_data_signature(privkeys,
895895 genesis_validators ,
896896 sample_slashable_vote_data_params ,
897897 sample_fork_data_params ):
898- sample_beacon_state_params ["validator_registry" ] = genesis_validators
899- state = BeaconState (** sample_beacon_state_params )
898+ beacon_state_params_with_genesis_validators = assoc (
899+ sample_beacon_state_params ,
900+ "validator_registry" ,
901+ genesis_validators ,
902+ )
903+ beacon_state_params_with_fork_data = assoc (
904+ beacon_state_params_with_genesis_validators ,
905+ "fork_data" ,
906+ ForkData (** sample_fork_data_params ),
907+ )
908+ state = BeaconState (** beacon_state_params_with_fork_data )
900909
901910 # NOTE: we can do this before "correcting" the params as they
902911 # touch disjoint subsets of the provided params
@@ -951,8 +960,17 @@ def test_verify_slashable_vote_data(param_mapper,
951960 sample_slashable_vote_data_params ,
952961 sample_fork_data_params ,
953962 max_casper_votes ):
954- sample_beacon_state_params ["validator_registry" ] = genesis_validators
955- state = BeaconState (** sample_beacon_state_params )
963+ beacon_state_params_with_genesis_validators = assoc (
964+ sample_beacon_state_params ,
965+ "validator_registry" ,
966+ genesis_validators ,
967+ )
968+ beacon_state_params_with_fork_data = assoc (
969+ beacon_state_params_with_genesis_validators ,
970+ "fork_data" ,
971+ ForkData (** sample_fork_data_params ),
972+ )
973+ state = BeaconState (** beacon_state_params_with_fork_data )
956974
957975 # NOTE: we can do this before "correcting" the params as they
958976 # touch disjoint subsets of the provided params
0 commit comments