show header and chain tip hashes on status page in tui (#1951)
This commit is contained in:
@@ -47,6 +47,10 @@ impl TUIStatusListener for TUIStatusView {
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("------------------------")),
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("Header Tip Hash: "))
|
||||
.child(TextView::new(" ").with_id("basic_header_tip_hash")),
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("Header Chain Height: "))
|
||||
@@ -58,6 +62,10 @@ impl TUIStatusListener for TUIStatusView {
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("------------------------")),
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("Tip Hash: "))
|
||||
.child(TextView::new(" ").with_id("tip_hash")),
|
||||
).child(
|
||||
LinearLayout::new(Orientation::Horizontal)
|
||||
.child(TextView::new("Chain Height: "))
|
||||
@@ -213,12 +221,18 @@ impl TUIStatusListener for TUIStatusView {
|
||||
c.call_on_id("connected_peers", |t: &mut TextView| {
|
||||
t.set_content(stats.peer_count.to_string());
|
||||
});
|
||||
c.call_on_id("tip_hash", |t: &mut TextView| {
|
||||
t.set_content(stats.head.last_block_h.to_string());
|
||||
});
|
||||
c.call_on_id("chain_height", |t: &mut TextView| {
|
||||
t.set_content(stats.head.height.to_string());
|
||||
});
|
||||
c.call_on_id("basic_total_difficulty", |t: &mut TextView| {
|
||||
t.set_content(stats.head.total_difficulty.to_string());
|
||||
});
|
||||
c.call_on_id("basic_header_tip_hash", |t: &mut TextView| {
|
||||
t.set_content(stats.header_head.last_block_h.to_string());
|
||||
});
|
||||
c.call_on_id("basic_header_chain_height", |t: &mut TextView| {
|
||||
t.set_content(stats.header_head.height.to_string());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user