Implemented DNS on blockchain. Beautified a lot of code, fixed some things.

This commit is contained in:
Revertron
2021-02-19 16:41:43 +01:00
parent 4b5e5112da
commit d135204af7
24 changed files with 539 additions and 295 deletions
+6
View File
@@ -67,6 +67,12 @@ impl Transaction {
digest.result(&mut buf);
Bytes::from_bytes(&buf)
}
pub fn check_for(&self, domain: &str) -> bool {
let hash = Self::hash_identity(&domain);
let confirmation = Self::hash_with_key(&domain, &self.pub_key);
self.identity.eq(&hash) && self.confirmation.eq(&confirmation)
}
}
impl fmt::Debug for Transaction {