Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the `IsZero() bool` method to the `Identity` type. It returns true if the identity is equal to the Identity zero value. A 'valid' identity won't be zero since `H(data)` will not produce a hash value of all zero bits with overwhelming probability if a H is a collision-resistant hash function. The `IsZero` method is inline with the accepted Go JSON proposal adding the struct tag `omitzero`. Ref: golang/go#45669 (comment) Signed-off-by: Andreas Auernhammer <[email protected]>
- Loading branch information