fixes from review

This commit is contained in:
Ethan Buchman
2016-04-26 22:17:13 -04:00
parent 523a170c3e
commit 501c4e4bac
7 changed files with 6 additions and 131 deletions

View File

@@ -15,7 +15,7 @@ func (txs Txs) Hash() []byte {
case 0:
return nil
case 1:
return txs[0]
return merkle.SimpleHashFromBinary(txs[0])
default:
left := Txs(txs[:(len(txs)+1)/2]).Hash()
right := Txs(txs[(len(txs)+1)/2:]).Hash()