Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress logs during nodeless wallet rescans #5077

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

andiflabs
Copy link
Contributor

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

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.
@andiflabs andiflabs requested a review from a team as a code owner June 26, 2024 02:39
Copy link
Contributor

@mat-if mat-if left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

Going to try something, ignore me if this doesn't work..

Fixes IFL-2709

@andiflabs andiflabs merged commit a2e2e17 into staging Jun 26, 2024
10 checks passed
@andiflabs andiflabs deleted the andrea/suppress-logs-during-nodeless-rescan branch June 26, 2024 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants