Added second keypair for encryption of domain names.
Changed keys file format to include second pair of keys, it will be in TOML now. Made many adjustments to block and transaction structures. Changed block serialization to binary format for hashing/mining. Removed old build dependencies.
This commit is contained in:
+2
-2
@@ -208,8 +208,8 @@ fn create_genesis_if_needed(context: &Arc<Mutex<Context>>, miner: &Arc<Mutex<Min
|
||||
if origin.is_empty() && last_block.is_none() {
|
||||
if let Some(keystore) = &context.keystore {
|
||||
// If blockchain is empty, we are going to mine a Genesis block
|
||||
let transaction = Transaction::origin(Chain::get_zones_hash(), context.get_keystore().unwrap().get_public());
|
||||
let block = Block::new(Some(transaction), context.get_keystore().unwrap().get_public(), Bytes::default(), ORIGIN_DIFFICULTY);
|
||||
let transaction = Transaction::origin(Chain::get_zones_hash(), keystore.get_public(), keystore.get_encryption_public());
|
||||
let block = Block::new(Some(transaction), keystore.get_public(), Bytes::default(), ORIGIN_DIFFICULTY);
|
||||
miner.lock().unwrap().add_block(block, keystore.clone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user