Initial import.

This commit is contained in:
Ignotus Peverell
2016-10-20 20:06:12 -04:00
commit f73a308bf3
144 changed files with 29870 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
[package]
name = "grin"
version = "0.1.0"
authors = ["Ignotus Peverell <igno.peverell@protonmail.com>"]
[dependencies]
grin_core = { path = "../core" }
grin_store = { path = "../store" }
+3
View File
@@ -0,0 +1,3 @@
hard_tabs = true
wrap_comments = true
write_mode = "Overwrite"
+23
View File
@@ -0,0 +1,23 @@
//! Main crate putting together all the other crates that compose Grin into a
//! binary.
#![deny(non_upper_case_globals)]
#![deny(non_camel_case_types)]
#![deny(non_snake_case)]
#![deny(unused_mut)]
#![warn(missing_docs)]
extern crate grin_core as core;
extern crate grin_store as store;
use store::Store;
use core::genesis::genesis;
fn main() {
let gen = genesis();
let db = Store::open("./store").unwrap();
let mut key = "block:".to_string().into_bytes();
let mut hash_vec = gen.hash().to_vec();
key.append(&mut hash_vec);
db.put_ser(&key[..], &gen);
}