@@ -20,6 +20,7 @@ mod tests {
20
20
use account_utils:: validator_definitions:: {
21
21
SigningDefinition , ValidatorDefinition , ValidatorDefinitions , Web3SignerDefinition ,
22
22
} ;
23
+ use eth2:: types:: FullBlockContents ;
23
24
use eth2_keystore:: KeystoreBuilder ;
24
25
use eth2_network_config:: Eth2NetworkConfig ;
25
26
use initialized_validators:: {
@@ -45,7 +46,9 @@ mod tests {
45
46
use tokio:: time:: sleep;
46
47
use types:: { attestation:: AttestationBase , * } ;
47
48
use url:: Url ;
48
- use validator_store:: { Error as ValidatorStoreError , SignedBlock , ValidatorStore } ;
49
+ use validator_store:: {
50
+ Error as ValidatorStoreError , SignedBlock , UnsignedBlock , ValidatorStore ,
51
+ } ;
49
52
50
53
/// If the we are unable to reach the Web3Signer HTTP API within this time out then we will
51
54
/// assume it failed to start.
@@ -595,8 +598,9 @@ mod tests {
595
598
async move {
596
599
let block = BeaconBlock :: < E > :: Base ( BeaconBlockBase :: empty ( & spec) ) ;
597
600
let block_slot = block. slot ( ) ;
601
+ let unsigned_block = UnsignedBlock :: Full ( FullBlockContents :: Block ( block) ) ;
598
602
validator_store
599
- . sign_block ( pubkey, block . into ( ) , block_slot)
603
+ . sign_block ( pubkey, unsigned_block , block_slot)
600
604
. await
601
605
. unwrap ( )
602
606
}
@@ -665,12 +669,10 @@ mod tests {
665
669
async move {
666
670
let mut altair_block = BeaconBlockAltair :: empty ( & spec) ;
667
671
altair_block. slot = altair_fork_slot;
672
+ let unsigned_block =
673
+ UnsignedBlock :: Full ( FullBlockContents :: Block ( altair_block. into ( ) ) ) ;
668
674
validator_store
669
- . sign_block (
670
- pubkey,
671
- BeaconBlock :: < E > :: Altair ( altair_block) . into ( ) ,
672
- altair_fork_slot,
673
- )
675
+ . sign_block ( pubkey, unsigned_block, altair_fork_slot)
674
676
. await
675
677
. unwrap ( )
676
678
}
@@ -752,12 +754,10 @@ mod tests {
752
754
async move {
753
755
let mut bellatrix_block = BeaconBlockBellatrix :: empty ( & spec) ;
754
756
bellatrix_block. slot = bellatrix_fork_slot;
757
+ let unsigned_block =
758
+ UnsignedBlock :: Full ( FullBlockContents :: Block ( bellatrix_block. into ( ) ) ) ;
755
759
validator_store
756
- . sign_block (
757
- pubkey,
758
- BeaconBlock :: < E > :: Bellatrix ( bellatrix_block) . into ( ) ,
759
- bellatrix_fork_slot,
760
- )
760
+ . sign_block ( pubkey, unsigned_block, bellatrix_fork_slot)
761
761
. await
762
762
. unwrap ( )
763
763
}
@@ -876,8 +876,9 @@ mod tests {
876
876
. assert_signatures_match ( "first_block" , |pubkey, validator_store| async move {
877
877
let block = first_block ( ) ;
878
878
let slot = block. slot ( ) ;
879
+ let unsigned_block = UnsignedBlock :: Full ( FullBlockContents :: Block ( block) ) ;
879
880
validator_store
880
- . sign_block ( pubkey, block . into ( ) , slot)
881
+ . sign_block ( pubkey, unsigned_block , slot)
881
882
. await
882
883
. unwrap ( )
883
884
} )
@@ -887,8 +888,9 @@ mod tests {
887
888
move |pubkey, validator_store| async move {
888
889
let block = double_vote_block ( ) ;
889
890
let slot = block. slot ( ) ;
891
+ let unsigned_block = UnsignedBlock :: Full ( FullBlockContents :: Block ( block) ) ;
890
892
validator_store
891
- . sign_block ( pubkey, block . into ( ) , slot)
893
+ . sign_block ( pubkey, unsigned_block , slot)
892
894
. await
893
895
. map ( |_| ( ) )
894
896
} ,
0 commit comments