multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using non-wrapping format verbs.
This commit is contained in:
103 files changed
+426
-390
No files matched your search
@@ -107,7 +107,7 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,
|
||||
tempBitcoindDir, err := ioutil.TempDir("", "bitcoind")
|
||||
if err != nil {
|
||||
return nil, nil,
|
||||
fmt.Errorf("unable to create temp directory: %v", err)
|
||||
fmt.Errorf("unable to create temp directory: %w", err)
|
||||
}
|
||||
|
||||
zmqBlockAddr := fmt.Sprintf("tcp://127.0.0.1:%d",
|
||||
@@ -138,7 +138,7 @@ func newBackend(miner string, netParams *chaincfg.Params, extraArgs []string,
|
||||
fmt.Printf("unable to remote temp dir %v: %v",
|
||||
tempBitcoindDir, err)
|
||||
}
|
||||
return nil, nil, fmt.Errorf("couldn't start bitcoind: %v", err)
|
||||
return nil, nil, fmt.Errorf("couldn't start bitcoind: %w", err)
|
||||
}
|
||||
|
||||
cleanUp := func() error {
|
||||
|
||||
Reference in new issue
Block a user