Protocol version type safety (#2811)

* add type safety for protocol_version

* cleanup tui for protocol version

* cleanup
This commit is contained in:
Antioch Peverell
2019-05-08 20:51:07 +01:00
committed by GitHub
parent 4ad2ed48a3
commit 8d5f73e8f1
9 changed files with 79 additions and 42 deletions
+1 -1
View File
@@ -74,7 +74,7 @@ pub struct Status {
impl Status {
pub fn from_tip_and_peers(current_tip: chain::Tip, connections: u32) -> Status {
Status {
protocol_version: p2p::msg::PROTOCOL_VERSION,
protocol_version: p2p::msg::ProtocolVersion::default().into(),
user_agent: p2p::msg::USER_AGENT.to_string(),
connections: connections,
tip: Tip::from_tip(current_tip),