Added app_version to handshake.

This commit is contained in:
Revertron
2021-03-21 00:48:32 +01:00
parent d23990c3e7
commit fdc5b8f233
5 changed files with 20 additions and 10 deletions
+3 -2
View File
@@ -4,6 +4,7 @@ use crate::event::Event;
use log::{trace, debug, info, warn, error};
pub struct Context {
pub app_version: String,
pub settings: Settings,
pub keystore: Keystore,
pub chain: Chain,
@@ -13,8 +14,8 @@ pub struct Context {
impl Context {
/// Creating an essential context to work with
pub fn new(settings: Settings, keystore: Keystore, chain: Chain) -> Context {
Context { settings, keystore, chain, x_zones: ExternalZones::new(), bus: Bus::new() }
pub fn new(app_version: String, settings: Settings, keystore: Keystore, chain: Chain) -> Context {
Context { app_version, settings, keystore, chain, x_zones: ExternalZones::new(), bus: Bus::new() }
}
/// Load keystore and return Context