multi: rename LookupHtlc to LookupHtlcResolution for clarity

This commit is contained in:
yyforyongyu committed 2023-03-01 01:47:08 +08:00
1 parent 2bf84fbe41
commit c26917ee1f
11 files changed
+2952 -2939

No files matched your search

+14 -10
View File
@@ -697,27 +697,31 @@ func (h *HarnessRPC) GetChanInfo(
return resp
}
// LookupHtlc makes a RPC call to the node's LookupHtlc and returns the
// response.
func (h *HarnessRPC) LookupHtlc(
req *lnrpc.LookupHtlcRequest) *lnrpc.LookupHtlcResponse {
// LookupHtlcResolution makes a RPC call to the node's LookupHtlcResolution and
// returns the response.
//
//nolint:lll
func (h *HarnessRPC) LookupHtlcResolution(
req *lnrpc.LookupHtlcResolutionRequest) *lnrpc.LookupHtlcResolutionResponse {
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
defer cancel()
resp, err := h.LN.LookupHtlc(ctxt, req)
h.NoError(err, "LookupHtlc")
resp, err := h.LN.LookupHtlcResolution(ctxt, req)
h.NoError(err, "LookupHtlcResolution")
return resp
}
// LookupHtlcAssertErr makes a RPC call to the node's LookupHtlc and asserts
// an RPC error is returned.
func (h *HarnessRPC) LookupHtlcAssertErr(req *lnrpc.LookupHtlcRequest) error {
// LookupHtlcResolutionAssertErr makes a RPC call to the node's
// LookupHtlcResolution and asserts an RPC error is returned.
func (h *HarnessRPC) LookupHtlcResolutionAssertErr(
req *lnrpc.LookupHtlcResolutionRequest) error {
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
defer cancel()
_, err := h.LN.LookupHtlc(ctxt, req)
_, err := h.LN.LookupHtlcResolution(ctxt, req)
require.Error(h, err, "expected an error")
return err