@@ -10,8 +10,8 @@ use acropolis_common::{
1010 params:: TECHNICAL_PARAMETER_POOL_RETIRE_MAX_EPOCH ,
1111 queries:: governance:: VoteRecord ,
1212 stake_addresses:: StakeAddressMap ,
13- BlockInfo , KeyHash , PoolMetadata , PoolRetirement , PoolUpdateEvent , Relay ,
14- StakeAddress , TxCertificate , TxIdentifier , Voter , VotingProcedures ,
13+ BlockInfo , KeyHash , PoolId , PoolMetadata , PoolRegistration , PoolRetirement , PoolUpdateEvent ,
14+ Relay , StakeAddress , TxCertificate , TxHash , TxIdentifier , Voter , VotingProcedures ,
1515} ;
1616use anyhow:: Result ;
1717use imbl:: HashMap ;
@@ -671,7 +671,8 @@ mod tests {
671671 use acropolis_common:: hash:: Hash ;
672672 use acropolis_common:: {
673673 state_history:: { StateHistory , StateHistoryStore } ,
674- PoolRetirement , Ratio , StakeAddress , TxCertificate , TxCertificateWithPos , TxIdentifier , VrfKeyHash
674+ PoolRetirement , Ratio , StakeAddress , TxCertificate , TxCertificateWithPos , TxIdentifier ,
675+ VrfKeyHash ,
675676 } ;
676677 use tokio:: sync:: Mutex ;
677678
@@ -868,7 +869,7 @@ mod tests {
868869 assert ! ( state. handle_tx_certs( & block, & msg) . is_ok( ) ) ;
869870
870871 assert_eq ! ( 1 , state. spos. len( ) ) ;
871- let spo = state. spos . get ( pool_id) ;
872+ let spo = state. spos . get ( & pool_id) ;
872873 assert ! ( spo. is_some( ) ) ;
873874
874875 block. number = 1 ;
@@ -908,7 +909,7 @@ mod tests {
908909 } ) ;
909910 assert ! ( state. handle_tx_certs( & block, & msg) . is_ok( ) ) ;
910911 assert_eq ! ( 1 , state. spos. len( ) ) ;
911- let spo = state. spos . get ( pool_id) ;
912+ let spo = state. spos . get ( & pool_id) ;
912913 assert ! ( spo. is_some( ) ) ;
913914 history. lock ( ) . await . commit ( block. number , state) ;
914915
@@ -1038,7 +1039,7 @@ mod tests {
10381039 let mut state = State :: new ( & save_blocks_store_config ( ) ) ;
10391040 let mut block = new_block ( 0 ) ;
10401041 let mut msg = new_certs_msg ( ) ;
1041- let spo_id = keyhash_224 ( & [ 1_u8 ] ) ;
1042+ let spo_id = test_pool_id_from_bytes ( & [ 1 ] ) ;
10421043 msg. certificates . push ( TxCertificateWithPos {
10431044 cert : TxCertificate :: PoolRegistration ( default_pool_registration ( spo_id. clone ( ) , None ) ) ,
10441045 tx_identifier : TxIdentifier :: default ( ) ,
@@ -1047,11 +1048,9 @@ mod tests {
10471048 let spo_id = test_pool_id_from_bytes ( & [ 1 ] ) ;
10481049
10491050 msg. certificates . push ( TxCertificateWithPos {
1050- PoolRegistrationWithPos {
1051- reg : default_pool_registration ( spo_id, None ) ,
1052- tx_hash : TxHash :: default ( ) ,
1053- cert_index : 0 ,
1054- } ,
1051+ cert : TxCertificate :: PoolRegistration ( default_pool_registration ( spo_id. clone ( ) , None ) ) ,
1052+ tx_identifier : TxIdentifier :: default ( ) ,
1053+ cert_index : 0 ,
10551054 } ) ;
10561055 assert ! ( state. handle_tx_certs( & block, & msg) . is_ok( ) ) ;
10571056 block = new_block ( 2 ) ;
0 commit comments