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:
ffranr
2024-02-26 11:19:38 +00:00
parent 581c16d72f
commit cd566eb097
103 changed files with 426 additions and 390 deletions

View File

@@ -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 {