Skip to content

Commit 733a6c7

Browse files
committed
prototyp: add Hash#Equals helper function
1 parent fcd999c commit 733a6c7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/prototyp/hash.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ func (h *Hash) Hash() common.Hash {
195195
return common.HexToHash(h.String())
196196
}
197197

198+
func (h Hash) Equals(other Hash) bool {
199+
return strings.EqualFold(h.String(), other.String())
200+
}
201+
198202
func (h Hash) Value() (driver.Value, error) {
199203
s := h.String()
200204
if len(s) < 2 {

0 commit comments

Comments
 (0)