@@ -161,9 +161,12 @@ func NewAssetFingerprint(policyId []byte, assetName []byte) AssetFingerprint {
161161}
162162
163163func (a AssetFingerprint ) Hash () Blake2b160 {
164- // We can ignore the error return here because our fixed size/key arguments will
165- // never trigger an error
166- tmpHash , _ := blake2b .New (20 , nil )
164+ tmpHash , err := blake2b .New (20 , nil )
165+ if err != nil {
166+ panic (
167+ fmt .Sprintf ("unexpected error creating empty blake2b hash: %s" , err ),
168+ )
169+ }
167170 tmpHash .Write (a .policyId )
168171 tmpHash .Write (a .assetName )
169172 return NewBlake2b160 (tmpHash .Sum (nil ))
@@ -375,9 +378,12 @@ func (a Address) MarshalJSON() ([]byte, error) {
375378type IssuerVkey [32 ]byte
376379
377380func (i IssuerVkey ) Hash () Blake2b224 {
378- // We can ignore the error return here because our fixed size/key arguments will
379- // never trigger an error
380- hash , _ := blake2b .New (28 , nil )
381+ hash , err := blake2b .New (28 , nil )
382+ if err != nil {
383+ panic (
384+ fmt .Sprintf ("unexpected error creating empty blake2b hash: %s" , err ),
385+ )
386+ }
381387 hash .Write (i [:])
382388 return Blake2b224 (hash .Sum (nil ))
383389}
0 commit comments