@@ -895,8 +895,17 @@ def test_verify_slashable_vote_data_signature(privkeys,
895
895
genesis_validators ,
896
896
sample_slashable_vote_data_params ,
897
897
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 )
900
909
901
910
# NOTE: we can do this before "correcting" the params as they
902
911
# touch disjoint subsets of the provided params
@@ -951,8 +960,17 @@ def test_verify_slashable_vote_data(param_mapper,
951
960
sample_slashable_vote_data_params ,
952
961
sample_fork_data_params ,
953
962
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 )
956
974
957
975
# NOTE: we can do this before "correcting" the params as they
958
976
# touch disjoint subsets of the provided params
0 commit comments