-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: report session mining stats (#259)
* feat: report session mining stats Continued simplifying UI: - Removed buttons. Just push keys now. Easy. - Moved mining to top, 'since that what we're interested in. - Borders are green when active. Nice visual feedback - Consolidated both mining panels into a single one. Monitor wallet.tranaction stream to get notifications about mined blocks. Pro: It works with very little lift. Con: You wait until your block is confirmed before the UI picks up that it is mined. This should hopefully be very low lag since we're submitting to a local node that will validate it immediately. * chore: remove dead code
- Loading branch information
Showing
20 changed files
with
315 additions
and
656 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright 2023. The Tari Project | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
use ratatui::style::Color; | ||
|
||
use crate::{component::normal::mining::status_badge::StatusGetter, state::AppState}; | ||
|
||
pub struct MergeMiningStatus; | ||
|
||
impl StatusGetter for MergeMiningStatus { | ||
fn get_status(&self, state: &AppState) -> (&str, Color) { | ||
if state.state.config.session.merge_layer_active { | ||
("⚒️ Press [M] to stop Merge Mining", Color::Green) | ||
} else { | ||
("Press [M] to start Merge mining", Color::Gray) | ||
} | ||
} | ||
} | ||
|
||
pub struct ShaMiningStatus; | ||
|
||
impl StatusGetter for ShaMiningStatus { | ||
fn get_status(&self, state: &AppState) -> (&str, Color) { | ||
if state.state.config.session.sha3x_layer_active { | ||
("⚒️ Press [T] to stop SHA3X mining", Color::Yellow) | ||
} else { | ||
("Press [T] to start SHA3X mining", Color::Gray) | ||
} | ||
} | ||
} |
Oops, something went wrong.