@@ -870,8 +870,17 @@ def test_verify_slashable_vote_data_signature(privkeys,
870870 genesis_validators ,
871871 sample_slashable_vote_data_params ,
872872 sample_fork_data_params ):
873- sample_beacon_state_params ["validator_registry" ] = genesis_validators
874- state = BeaconState (** sample_beacon_state_params )
873+ beacon_state_params_with_genesis_validators = assoc (
874+ sample_beacon_state_params ,
875+ "validator_registry" ,
876+ genesis_validators ,
877+ )
878+ beacon_state_params_with_fork_data = assoc (
879+ beacon_state_params_with_genesis_validators ,
880+ "fork_data" ,
881+ ForkData (** sample_fork_data_params ),
882+ )
883+ state = BeaconState (** beacon_state_params_with_fork_data )
875884
876885 # NOTE: we can do this before "correcting" the params as they
877886 # touch disjoint subsets of the provided params
@@ -926,8 +935,17 @@ def test_verify_slashable_vote_data(param_mapper,
926935 sample_slashable_vote_data_params ,
927936 sample_fork_data_params ,
928937 max_casper_votes ):
929- sample_beacon_state_params ["validator_registry" ] = genesis_validators
930- state = BeaconState (** sample_beacon_state_params )
938+ beacon_state_params_with_genesis_validators = assoc (
939+ sample_beacon_state_params ,
940+ "validator_registry" ,
941+ genesis_validators ,
942+ )
943+ beacon_state_params_with_fork_data = assoc (
944+ beacon_state_params_with_genesis_validators ,
945+ "fork_data" ,
946+ ForkData (** sample_fork_data_params ),
947+ )
948+ state = BeaconState (** beacon_state_params_with_fork_data )
931949
932950 # NOTE: we can do this before "correcting" the params as they
933951 # touch disjoint subsets of the provided params
0 commit comments