IsEqual returns true if target is the same as hash.
(target *Hash)
| 104 | |
| 105 | // IsEqual returns true if target is the same as hash. |
| 106 | func (h *Hash) IsEqual(target *Hash) bool { |
| 107 | if h == nil && target == nil { |
| 108 | return true |
| 109 | } |
| 110 | if h == nil || target == nil { |
| 111 | return false |
| 112 | } |
| 113 | return *h == *target |
| 114 | } |
| 115 | |
| 116 | // Difficulty returns the leading Zero **bit** count of Hash in binary. |
| 117 | // return -1 indicate the Hash pointer is nil. |
no outgoing calls