iron-fish / ironfish

A novel cryptocurrency focused on privacy and accessibility.
https://ironfish.network
Mozilla Public License 2.0
964 stars 579 forks source link

Suppress logs during nodeless wallet rescans #5077

Closed andiflabs closed 1 week ago

andiflabs commented 1 week ago

Summary

Running wallet:rescan when not connected to a node produces output like the following:

Scanning blocks: [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | 60 / 624032 | 0.00 / sec | ETA: N/AAdded block seq: 100, hash: 00000...bd9a1
Scanning blocks: [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | 128 / 624032 | 0.00 / sec | ETA: N/AAdded block seq: 200, hash: 00000...c61b7
Scanning blocks: [░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% | 282 / 624032 | 0.00 / sec | ETA: N/AAdded block seq: 300, hash: 00000...194db

That is: the progress bar output is disrupted by the scanner logs.

This commit suppresses the logs coming from the wallet so that the progress bar is the only output displayed.

Testing Plan

Run yarn start wallet:rescan while a node is NOT running and observe the output.

Documentation

N/A

Breaking Change

N/A