Add last_seen to peer info (#1688)

* add last_seen to peer and update on ping/pong
expose last_seen in tui

* rustfmt

* chrono serde features
This commit is contained in:
Antioch Peverell
2018-10-08 13:39:52 +01:00
committed by GitHub
parent fd2eda2308
commit de5b6868fb
6 changed files with 25 additions and 27 deletions
+3
View File
@@ -18,6 +18,8 @@ use std::io;
use std::net::{IpAddr, SocketAddr};
use std::sync::mpsc;
use chrono::prelude::*;
use core::core::hash::Hash;
use core::pow::Difficulty;
use core::{core, ser};
@@ -243,6 +245,7 @@ pub struct PeerInfo {
pub total_difficulty: Difficulty,
pub height: u64,
pub direction: Direction,
pub last_seen: DateTime<Utc>,
}
/// The full txhashset data along with indexes required for a consumer to