Commit 15f412bf authored by vipwzw's avatar vipwzw Committed by 33cn

fix get hash bug

parent c7437c84
......@@ -434,7 +434,8 @@ func (evl EvidenceEnvelopeList) Hash() []byte {
default:
left := evl[:(len(evl)+1)/2].Hash()
right := evl[(len(evl)+1)/2:].Hash()
return merkle.GetHashFromTwoHash(left, right)
cache := make([]byte, len(left)+len(right))
return merkle.GetHashFromTwoHash(cache, left, right)
}
}
......
......@@ -79,7 +79,8 @@ func (evl EvidenceList) Hash() []byte {
default:
left := evl[:(len(evl)+1)/2].Hash()
right := evl[(len(evl)+1)/2:].Hash()
return merkle.GetHashFromTwoHash(left, right)
cache := make([]byte, len(left)+len(right))
return merkle.GetHashFromTwoHash(cache, left, right)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment