More a few properties to mainnet genesis. Don't get too excited, several are placeholders.

This commit is contained in:
Ignotus Peverell 2018-12-11 01:07:17 +00:00
parent cd135c4dca
commit 934b11d06f
No known key found for this signature in database
GPG key ID: 99CD25F39F8F8211
3 changed files with 11 additions and 10 deletions

2
Cargo.lock generated
View file

@ -751,7 +751,6 @@ dependencies = [
"grin_keychain 0.4.2",
"grin_store 0.4.2",
"grin_util 0.4.2",
"grin_wallet 0.4.2",
"lmdb-zero 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lru-cache 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -854,7 +853,6 @@ dependencies = [
"grin_keychain 0.4.2",
"grin_store 0.4.2",
"grin_util 0.4.2",
"grin_wallet 0.4.2",
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.80 (registry+https://github.com/rust-lang/crates.io-index)",

View file

@ -12,6 +12,7 @@ build = "src/build/build.rs"
[workspace]
members = ["api", "chain", "config", "core", "keychain", "p2p", "servers", "store", "util", "pool", "wallet"]
exclude = ["etc/gen_gen"]
[[bin]]
name = "grin"

View file

@ -16,7 +16,6 @@
use chrono::prelude::{TimeZone, Utc};
use consensus;
use core;
use global;
use pow::{Difficulty, Proof, ProofOfWork};
@ -110,7 +109,6 @@ pub fn genesis_testnet3() -> core::Block {
pub fn genesis_testnet4() -> core::Block {
core::Block::with_header(core::BlockHeader {
height: 0,
// previous: core::hash::Hash([0xff; 32]),
timestamp: Utc.ymd(2018, 10, 17).and_hms(20, 0, 0),
pow: ProofOfWork {
total_difficulty: Difficulty::from_num(global::initial_block_difficulty()),
@ -137,13 +135,17 @@ pub fn genesis_testnet4() -> core::Block {
pub fn genesis_main() -> core::Block {
core::Block::with_header(core::BlockHeader {
height: 0,
// previous: core::hash::Hash([0xff; 32]),
timestamp: Utc.ymd(2018, 8, 14).and_hms(0, 0, 0),
timestamp: Utc.ymd(2019, 0, 15).and_hms(12, 0, 0),
output_mmr_size: 1,
kernel_mmr_size: 1,
pow: ProofOfWork {
total_difficulty: Difficulty::from_num(global::initial_block_difficulty()),
secondary_scaling: 1,
nonce: global::get_genesis_nonce(),
proof: Proof::zero(consensus::PROOFSIZE),
total_difficulty: Difficulty::from_num(10_u64.pow(8)),
secondary_scaling: 1856,
nonce: 1,
proof: Proof {
nonces: vec![0; 42],
edge_bits: 29,
},
},
..Default::default()
})