Commit 90386a37 authored by Kevin Atkinson's avatar Kevin Atkinson

merkledag: provide better diagnostics when Prefix.Sum fails

License: MIT
Signed-off-by: default avatarKevin Atkinson <k@kevina.org>
parent c053e4d7
......@@ -266,6 +266,7 @@ func (n *ProtoNode) Cid() *cid.Cid {
c, err := n.Prefix.Sum(n.RawData())
if err != nil {
// programmer error
err = fmt.Errorf("invalid CID of length %d: %x: %v", len(n.RawData()), n.RawData(), err)
panic(err)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment