File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
libvdrtools/indy-wallet/src Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ use indy_utils::{
1818 crypto:: chacha20poly1305_ietf:: { self , Key as MasterKey } ,
1919 secret,
2020} ;
21- use log:: { debug , trace} ;
21+ use log:: { info , trace} ;
2222use serde:: { Deserialize , Serialize } ;
2323use serde_json:: Value as SValue ;
2424
@@ -714,6 +714,8 @@ impl WalletService {
714714 let new_wallet = self . get_wallet ( new_wh) . await ?;
715715
716716 let mut records = old_wallet. get_all ( ) . await ?;
717+ let total = records. get_total_count ( ) ?;
718+ info ! ( "Migrating {total:?} records" ) ;
717719 let mut num_records = 0 ;
718720
719721 while let Some ( WalletRecord {
@@ -724,6 +726,9 @@ impl WalletService {
724726 } ) = records. next ( ) . await ?
725727 {
726728 num_records += 1 ;
729+ if num_records % 1000 == 1 {
730+ info ! ( "Migrating wallet record number {num_records} / {total:?}" ) ;
731+ }
727732 let record = Record {
728733 type_ : type_. ok_or_else ( || {
729734 err_msg (
@@ -755,7 +760,7 @@ impl WalletService {
755760 }
756761 }
757762
758- debug ! ( "{num_records} records have been migrated!" ) ;
763+ info ! ( "{num_records} / {total:? } records have been migrated!" ) ;
759764
760765 Ok ( ( ) )
761766 }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pub async fn migrate_wallet<E>(
2222where
2323 E : Display ,
2424{
25- info ! ( "Starting wallet migration... " ) ;
25+ info ! ( "Starting wallet migration" ) ;
2626
2727 if src_wallet_handle == dest_wallet_handle {
2828 error ! ( "Equal wallet handles: {src_wallet_handle:?} {dest_wallet_handle:?}" ) ;
You can’t perform that action at this time.
0 commit comments