Skip to content

hasher.Write error is not handled #166

@walldiss

Description

@walldiss

Problem

Current implementation of func Sum(data []byte, code uint64, length int) (Multihash, error) doesn't handle error returned from hasher.Write. If there is non-nil error returned it could potentially mean that hasheris not being in valid state to calculate the hash byhasher.Sum()`.

hasher.Write(data)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions