Implemented loading Settings from file. Implemented mining of Keystore (key pair). Changed Transaction structure a lot. Added an icon to windows build. Changed some HTML.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
||||
use crate::{Block, Transaction, Key};
|
||||
use crate::{Block, Transaction, Bytes};
|
||||
use chrono::Utc;
|
||||
|
||||
pub struct Blockchain {
|
||||
@@ -54,7 +54,7 @@ impl Blockchain {
|
||||
pub fn check_block_hash(block: &Block) -> bool {
|
||||
// We need to clear Hash value to rehash it without it for check :(
|
||||
let mut copy: Block = block.clone();
|
||||
copy.hash = Key::default();
|
||||
copy.hash = Bytes::default();
|
||||
let data = serde_json::to_string(©).unwrap();
|
||||
Block::hash(data.as_bytes()) == block.hash
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user