Skip to content

Commit 192b483

Browse files
committed
hash changes
1 parent 52a684e commit 192b483

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

types/hashing.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,16 @@ func (h *Header) MemoizeHash() Hash {
7373
}
7474

7575
func (h *Header) computeHash() Hash {
76-
slimHash, err := h.HashSlim()
77-
if err != nil {
78-
return nil
79-
}
80-
8176
if h.Legacy != nil && !h.Legacy.IsZero() {
82-
legacyHash, err := h.HashLegacy()
83-
if err == nil {
77+
if legacyHash, err := h.HashLegacy(); err == nil {
8478
return legacyHash
8579
}
8680
}
8781

82+
slimHash, err := h.HashSlim()
83+
if err != nil {
84+
return nil
85+
}
8886
return slimHash
8987
}
9088

0 commit comments

Comments
 (0)