Merge pull request #9519 from fuyangpengqi/master
refactor: use a more straightforward return value
This commit is contained in:
6 files changed
+7
-7
No files matched your search
@@ -3146,7 +3146,7 @@ func (c *OpenChannel) RemoteCommitChainTip() (*CommitDiff, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return cd, err
|
||||
return cd, nil
|
||||
}
|
||||
|
||||
// UnsignedAckedUpdates retrieves the persisted unsigned acked remote log
|
||||
|
||||
@@ -738,7 +738,7 @@ func serializeNewResult(rp *paymentResultNew) ([]byte, []byte, error) {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return key, buff.Bytes(), err
|
||||
return key, buff.Bytes(), nil
|
||||
}
|
||||
|
||||
// getResultKeyNew returns a byte slice representing a unique key for this
|
||||
|
||||
@@ -487,7 +487,7 @@ func (h *htlcTimeoutResolver) sweepTimeoutTx() error {
|
||||
return err
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// resolveSecondLevelTxLegacy sends a second level timeout transaction to the
|
||||
@@ -593,7 +593,7 @@ func (h *htlcTimeoutResolver) waitForConfirmedSpend(op *wire.OutPoint,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return spend, err
|
||||
return spend, nil
|
||||
}
|
||||
|
||||
// Stop signals the resolver to cancel any current resolution processes, and
|
||||
|
||||
@@ -89,7 +89,7 @@ func (h *hopHintsConfigMock) FetchChannelEdgesByID(chanID uint64) (
|
||||
policy2, ok := args.Get(2).(*models.ChannelEdgePolicy)
|
||||
require.True(h.t, ok)
|
||||
|
||||
return edgeInfo, policy1, policy2, err
|
||||
return edgeInfo, policy1, policy2, nil
|
||||
}
|
||||
|
||||
// getTestPubKey returns a valid parsed pub key to be used in our tests.
|
||||
|
||||
@@ -118,7 +118,7 @@ func (s *Server) SendToRoute(ctx context.Context,
|
||||
Failure: resp.Failure,
|
||||
}
|
||||
|
||||
return legacyResp, err
|
||||
return legacyResp, nil
|
||||
}
|
||||
|
||||
// QueryProbability returns the current success probability estimate for a
|
||||
|
||||
@@ -186,7 +186,7 @@ func serializeResult(rp *paymentResult) ([]byte, []byte, error) {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return key, buff.Bytes(), err
|
||||
return key, buff.Bytes(), nil
|
||||
}
|
||||
|
||||
// deserializeResult deserializes a payment result.
|
||||
|
||||
Reference in new issue
Block a user