File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ async fn main() -> Result<(), anyhow::Error> {
4444 let mut stdout = std:: io:: stdout ( ) ;
4545 move |spk_i, _| {
4646 match once. take ( ) {
47- Some ( _) => print ! ( "\n Scanning keychain [{:?}]" , kind) ,
47+ Some ( _) => print ! ( "\n Scanning keychain [{:?}] {:<3} " , kind, spk_i ) ,
4848 None => print ! ( " {:<3}" , spk_i) ,
4949 } ;
5050 stdout. flush ( ) . expect ( "must flush" ) ;
Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ fn main() -> anyhow::Result<()> {
143143 let connected_to = block_emission. connected_to ( ) ;
144144 let start_apply_block = Instant :: now ( ) ;
145145 wallet. apply_block_connected_to ( & block_emission. block , height, connected_to) ?;
146+ if let Some ( changeset) = wallet. take_staged ( ) {
147+ db. write ( & changeset) ?;
148+ }
146149 let elapsed = start_apply_block. elapsed ( ) . as_secs_f32 ( ) ;
147150 println ! (
148151 "Applied block {} at height {} in {}s" ,
@@ -152,6 +155,9 @@ fn main() -> anyhow::Result<()> {
152155 Emission :: Mempool ( mempool_emission) => {
153156 let start_apply_mempool = Instant :: now ( ) ;
154157 wallet. apply_unconfirmed_txs ( mempool_emission. iter ( ) . map ( |( tx, time) | ( tx, * time) ) ) ;
158+ if let Some ( changeset) = wallet. take_staged ( ) {
159+ db. write ( & changeset) ?;
160+ }
155161 println ! (
156162 "Applied unconfirmed transactions in {}s" ,
157163 start_apply_mempool. elapsed( ) . as_secs_f32( )
You can’t perform that action at this time.
0 commit comments