Skip to content

Conversation

@halseth
Copy link
Contributor

@halseth halseth commented Jun 11, 2019

Earlier versions of ListPayments only included completed payments. We
return to this behavior by ignore all other payments if the nonSucceeded
boolean is not set in the request

Copy link
Contributor

@wpaulino wpaulino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💫

Note: the status will show in the lncli response as UNKNOWN, SUCCEEDED, IN_FLIGHT, and FAILED for those wondering.

@wpaulino wpaulino added this to the 0.7 milestone Jun 12, 2019
@Roasbeef
Copy link
Member

Fails existing integration tests:

    --- FAIL: TestLightningNetworkDaemon/hold_invoice_sender_persistence (22.03s)
        lnd_test.go:88: Failed: (hold invoice sender persistence): exited with error: 
            *errors.errorString predicate not satisfied: payhash not found in response
            /home/travis/gopath/src/github.com/lightningnetwork/lnd/lntest/itest/lnd_test.go:13328 (0xd3ab63)
            	testHoldInvoicePersistence: t.Fatalf("predicate not satisfied: %v", err)
            /home/travis/gopath/src/github.com/lightningnetwork/lnd/lntest/itest/lnd_test.go:113 (0xced806)
            	(*harnessTest).RunTestCase: testCase.test(net, h)
            /home/travis/gopath/src/github.com/lightningnetwork/lnd/lntest/itest/lnd_test.go:13866 (0xd541f5)
            	TestLightningNetworkDaemon.func4: ht.RunTestCase(testCase, lndHarness)
            /home/travis/.gimme/versions/go1.12.6.linux.amd64/src/testing/testing.go:865 (0x4fbeb0)
            	tRunner: fn(t)
            /home/travis/.gimme/versions/go1.12.6.linux.amd64/src/runtime/asm_amd64.s:1337 (0x45e6d1)
            	goexit: BYTE	$0x90	// NOP

halseth added 2 commits June 12, 2019 08:51
Also make it optional to list non-succeeded payments.
Earlier versions of ListPayments only included completed payments. We
return to this behavior by ignore all other payments if the nonSucceeded
boolean is not set in the request.

message ListPaymentsRequest {
/// Set to also return payments that are not (yet) succeeded.
bool non_succeeded = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming suggestion: include_incomplete or include_unsuccessful?


// convertPaymentStatus converts a channeldb.PaymentStatus to the type expected
// by the RPC.
func convertPaymentStatus(dbStatus channeldb.PaymentStatus) (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this something that could be defined in lnrpc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants