Check against error veriable
Peter Rabbitson committed
Mar 27, 2020 at 19:26 UTC
73bb0e8353878e883e860f093a2eaf3b725a9c6b
1 file changed
+1
-1
core/commands/dag/dag.go
+1
-1
@@ -326,7 +326,7 @@ The output of blocks happens in strict DAG-traversal, first-seen, order.
326
// minimal user friendliness
327
if err != nil &&
328
!node.IsOnline &&
329
- err.Error() == "merkledag: not found" {
329
+ err == ipld.ErrNotFound {
330
err = fmt.Errorf("%s (currently offline, perhaps retry after attaching to the network)", err)
331
}
332