@@ -870,8 +870,17 @@ def test_verify_slashable_vote_data_signature(privkeys,
870
870
genesis_validators ,
871
871
sample_slashable_vote_data_params ,
872
872
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 )
875
884
876
885
# NOTE: we can do this before "correcting" the params as they
877
886
# touch disjoint subsets of the provided params
@@ -926,8 +935,17 @@ def test_verify_slashable_vote_data(param_mapper,
926
935
sample_slashable_vote_data_params ,
927
936
sample_fork_data_params ,
928
937
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 )
931
949
932
950
# NOTE: we can do this before "correcting" the params as they
933
951
# touch disjoint subsets of the provided params
0 commit comments