misc: fix error formatting in multiple files
This commit is contained in:
1 parent
2b729a78f3
commit
556e3525ea
28 files changed
+91
-91
No files matched your search
+13
-13
@@ -685,7 +685,7 @@ func (n *NetworkHarness) SaveProfilesPages() {
|
||||
|
||||
for _, node := range n.activeNodes {
|
||||
if err := saveProfilesPage(node); err != nil {
|
||||
fmt.Println(err)
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -699,16 +699,16 @@ func saveProfilesPage(node *HarnessNode) error {
|
||||
),
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to get profile page "+
|
||||
"(node_id=%d, name=%s): %v\n",
|
||||
return fmt.Errorf("failed to get profile page "+
|
||||
"(node_id=%d, name=%s): %v",
|
||||
node.NodeID, node.Cfg.Name, err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to read profile page "+
|
||||
"(node_id=%d, name=%s): %v\n",
|
||||
return fmt.Errorf("failed to read profile page "+
|
||||
"(node_id=%d, name=%s): %v",
|
||||
node.NodeID, node.Cfg.Name, err)
|
||||
}
|
||||
|
||||
@@ -719,16 +719,16 @@ func saveProfilesPage(node *HarnessNode) error {
|
||||
|
||||
logFile, err := os.Create(fileName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to create file for profile page "+
|
||||
"(node_id=%d, name=%s): %v\n",
|
||||
return fmt.Errorf("failed to create file for profile page "+
|
||||
"(node_id=%d, name=%s): %v",
|
||||
node.NodeID, node.Cfg.Name, err)
|
||||
}
|
||||
defer logFile.Close()
|
||||
|
||||
_, err = logFile.Write(body)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to save profile page "+
|
||||
"(node_id=%d, name=%s): %v\n",
|
||||
return fmt.Errorf("failed to save profile page "+
|
||||
"(node_id=%d, name=%s): %v",
|
||||
node.NodeID, node.Cfg.Name, err)
|
||||
}
|
||||
return nil
|
||||
@@ -872,10 +872,10 @@ func (n *NetworkHarness) OpenChannel(ctx context.Context,
|
||||
// prevents any funding workflows from being kicked off if the chain
|
||||
// isn't yet synced.
|
||||
if err := srcNode.WaitForBlockchainSync(ctx); err != nil {
|
||||
return nil, fmt.Errorf("Unable to sync srcNode chain: %v", err)
|
||||
return nil, fmt.Errorf("enable to sync srcNode chain: %v", err)
|
||||
}
|
||||
if err := destNode.WaitForBlockchainSync(ctx); err != nil {
|
||||
return nil, fmt.Errorf("Unable to sync destNode chain: %v", err)
|
||||
return nil, fmt.Errorf("unable to sync destNode chain: %v", err)
|
||||
}
|
||||
|
||||
minConfs := int32(1)
|
||||
@@ -941,10 +941,10 @@ func (n *NetworkHarness) OpenPendingChannel(ctx context.Context,
|
||||
|
||||
// Wait until srcNode and destNode have blockchain synced
|
||||
if err := srcNode.WaitForBlockchainSync(ctx); err != nil {
|
||||
return nil, fmt.Errorf("Unable to sync srcNode chain: %v", err)
|
||||
return nil, fmt.Errorf("unable to sync srcNode chain: %v", err)
|
||||
}
|
||||
if err := destNode.WaitForBlockchainSync(ctx); err != nil {
|
||||
return nil, fmt.Errorf("Unable to sync destNode chain: %v", err)
|
||||
return nil, fmt.Errorf("unable to sync destNode chain: %v", err)
|
||||
}
|
||||
|
||||
openReq := &lnrpc.OpenChannelRequest{
|
||||
|
||||
+1
-1
@@ -1122,7 +1122,7 @@ func (hn *HarnessNode) WaitForBlockchainSync(ctx context.Context) error {
|
||||
case err := <-errChan:
|
||||
return err
|
||||
case <-ctx.Done():
|
||||
return fmt.Errorf("Timeout while waiting for blockchain sync")
|
||||
return fmt.Errorf("timeout while waiting for blockchain sync")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user