Skip to content

Commit

Permalink
reversed merkle
Browse files Browse the repository at this point in the history
  • Loading branch information
slanesuke committed Apr 17, 2024
1 parent 924b7d1 commit 6e7502f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mine-your-first-block/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ fn get_merkle_root(txids: Vec<String>) -> String {
// The last hash in the merkle tree
// merkle root in little endian
let merkle_root = be_txid[0].to_vec();
let merkle_root_be = merkle_root.iter().rev().cloned().collect::<Vec<u8>>();
hex::encode(merkle_root_be)
//let merkle_root_be = merkle_root.iter().rev().cloned().collect::<Vec<u8>>();
hex::encode(merkle_root)
}

fn deserialize_tx(filename: &str) -> Transaction {
Expand Down

0 comments on commit 6e7502f

Please sign in to comment.