@@ -206,7 +206,7 @@ impl SqliteDatabase {
206206 Ok ( ( ) )
207207 }
208208
209- fn update_last_sync_time ( & self , ct : ConfirmationTime ) -> Result < i64 , Error > {
209+ fn update_last_sync_time ( & self , ct : BlockTime ) -> Result < i64 , Error > {
210210 let mut statement = self . connection . prepare_cached (
211211 "INSERT INTO last_sync_time (id, height, timestamp) VALUES (0, :height, :timestamp) ON CONFLICT(id) DO UPDATE SET height=:height, timestamp=:timestamp WHERE id = 0" ,
212212 ) ?;
@@ -389,7 +389,7 @@ impl SqliteDatabase {
389389 } ;
390390
391391 let confirmation_time = match ( height, timestamp) {
392- ( Some ( height) , Some ( timestamp) ) => Some ( ConfirmationTime { height, timestamp } ) ,
392+ ( Some ( height) , Some ( timestamp) ) => Some ( BlockTime { height, timestamp } ) ,
393393 _ => None ,
394394 } ;
395395
@@ -423,7 +423,7 @@ impl SqliteDatabase {
423423 let verified: bool = row. get ( 6 ) ?;
424424
425425 let confirmation_time = match ( height, timestamp) {
426- ( Some ( height) , Some ( timestamp) ) => Some ( ConfirmationTime { height, timestamp } ) ,
426+ ( Some ( height) , Some ( timestamp) ) => Some ( BlockTime { height, timestamp } ) ,
427427 _ => None ,
428428 } ;
429429
@@ -466,7 +466,7 @@ impl SqliteDatabase {
466466 } ;
467467
468468 let confirmation_time = match ( height, timestamp) {
469- ( Some ( height) , Some ( timestamp) ) => Some ( ConfirmationTime { height, timestamp } ) ,
469+ ( Some ( height) , Some ( timestamp) ) => Some ( BlockTime { height, timestamp } ) ,
470470 _ => None ,
471471 } ;
472472
@@ -501,12 +501,12 @@ impl SqliteDatabase {
501501 }
502502 }
503503
504- fn select_last_sync_time ( & self ) -> Result < Option < ConfirmationTime > , Error > {
504+ fn select_last_sync_time ( & self ) -> Result < Option < BlockTime > , Error > {
505505 let mut statement = self
506506 . connection
507507 . prepare_cached ( "SELECT height, timestamp FROM last_sync_time WHERE id = 0" ) ?;
508508 let mut rows = statement. query_map ( [ ] , |row| {
509- Ok ( ConfirmationTime {
509+ Ok ( BlockTime {
510510 height : row. get ( 0 ) ?,
511511 timestamp : row. get ( 1 ) ?,
512512 } )
@@ -658,7 +658,7 @@ impl BatchOperations for SqliteDatabase {
658658 Ok ( ( ) )
659659 }
660660
661- fn set_last_sync_time ( & mut self , ct : ConfirmationTime ) -> Result < ( ) , Error > {
661+ fn set_last_sync_time ( & mut self , ct : BlockTime ) -> Result < ( ) , Error > {
662662 self . update_last_sync_time ( ct) ?;
663663 Ok ( ( ) )
664664 }
@@ -749,7 +749,7 @@ impl BatchOperations for SqliteDatabase {
749749 }
750750 }
751751
752- fn del_last_sync_time ( & mut self ) -> Result < Option < ConfirmationTime > , Error > {
752+ fn del_last_sync_time ( & mut self ) -> Result < Option < BlockTime > , Error > {
753753 match self . select_last_sync_time ( ) ? {
754754 Some ( value) => {
755755 self . delete_last_sync_time ( ) ?;
@@ -870,7 +870,7 @@ impl Database for SqliteDatabase {
870870 Ok ( value)
871871 }
872872
873- fn get_last_sync_time ( & self ) -> Result < Option < ConfirmationTime > , Error > {
873+ fn get_last_sync_time ( & self ) -> Result < Option < BlockTime > , Error > {
874874 self . select_last_sync_time ( )
875875 }
876876
0 commit comments