fix: need to prepend HashTypeBlake3 prefix to bodyBytes for b3hash
This commit is contained in:
parent
365ba04844
commit
7c6d11258f
|
@ -90,7 +90,7 @@ func (m *MediaMetadata) decodeProof(dec *msgpack.Decoder) error {
|
||||||
|
|
||||||
childDec := msgpack.NewDecoder(bytes.NewReader(all[:proofSectionLength]))
|
childDec := msgpack.NewDecoder(bytes.NewReader(all[:proofSectionLength]))
|
||||||
|
|
||||||
b3hash := blake3.Sum256(bodyBytes)
|
b3hash := blake3.Sum256(append([]byte{byte(types.HashTypeBlake3)}, bodyBytes...))
|
||||||
|
|
||||||
arrayLen, err := childDec.DecodeArrayLen()
|
arrayLen, err := childDec.DecodeArrayLen()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue