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())))