Using the sha256 utils to generate a hash preimage for the htlc

This commit is contained in:
Dave Hrycyszyn
2024-07-29 10:41:10 +01:00
parent e1e2f49957
commit 2ced899c6b
3 changed files with 5 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ impl ezsockets::ClientExt for Client {
/// When we receive a text message, apply the bft-crdt operation contained in it to our
/// local bft-crdt.
async fn on_text(&mut self, text: String) -> Result<(), ezsockets::Error> {
let string_sha = utils::shassy(text.clone());
let string_sha = utils::sha256(text.clone());
println!("received text, sha: {string_sha}");
let incoming: bft_json_crdt::json_crdt::SignedOp = serde_json::from_str(&text).unwrap();
let object_sha = utils::shappy(incoming.clone());