From 346ceea2b69d10b7344a84338c20de1868261792 Mon Sep 17 00:00:00 2001 From: Nithish Karthik Date: Thu, 11 Apr 2024 23:22:08 +0530 Subject: [PATCH] test4 --- src/mining/merkle_tree.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mining/merkle_tree.go b/src/mining/merkle_tree.go index 07022ce..8a7c255 100644 --- a/src/mining/merkle_tree.go +++ b/src/mining/merkle_tree.go @@ -75,8 +75,7 @@ func CalcMerkleRoot(transactions []*transaction.Transaction, witness bool) [32]b for _ ,t := range transactions { if(t.Vin[0].IsCoinbase) { txids = append(txids, zeroHash) - } - if(witness){ + } else if(witness){ txids = append(txids, [32]byte(utils.DoubleHash(t.RawHex()))) } else { txids = append(txids, [32]byte(utils.ReverseBytes(t.TxHash())))