Initial beacon node setup.

- Add network crate.
- Add sync crate.
- Add version crate.
- Add lighthouse configuration.
- Add network configuration.
This commit is contained in:
Age Manning
2019-02-28 10:24:27 +11:00
parent 45c6e0395f
commit 19a64f906e
17 changed files with 345 additions and 135 deletions

View File

@@ -0,0 +1,25 @@
//TODO: Build the version and hash of the built lighthouse binary
/// Version information for the Lighthouse beacon node.
// currently only supports unstable release
extern crate target_info;
use target_info::Target;
const TRACK: &'static str = "unstable";
/// Provides the current platform
pub fn platform() -> String {
format!("{}-{}", Target::arch(), Target::os())
}
/// Version of the beacon node.
// TODO: Find the sha3 hash, date and rust version used to build the beacon_node binary
pub fn version() -> String {
format!(
"Lighthouse/v{}-{}/{}",
env!("CARGO_PKG_VERSION"),
TRACK,
platform()
)
}