Closed kcalvinalvin closed 3 years ago
Should it just return the err
, or Is there a way to find out explicitly when the -datadir
argument is incorrectly given?
Or should it be a more generalized message like
initialization error. Please verify config.\n%s\n
If your .blk and .dat files are "+
"not in %s, specify alternate path with -datadir\n.", err, cfg.BlockDir
It should just return the error since InitBridgeNodeState()
returns explicit error messages.
EDIT: Or no maybe something like
returnErr := fmt.Errorf("initialization error: %s. If your .blk and .dat files are not in %s, specify alternate path with -datadir\n.", err.String(), cfg.BlockDir)
return returnErr
Cool! I'll take this up. 🤖
https://github.com/mit-dci/utreexo/blob/80da33426dc3a90d2ea53f1e2f10e3dd9ef0fa1d/bridgenode/genproofs.go#L62-L65
We're overwriting the error here and not returning what's actually the problem. Don't do that.