Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi: update listsweeps to allow sweeps that are not in ListTransactions #4762

Merged
merged 1 commit into from
Nov 17, 2020

Conversation

carlaKC
Copy link
Collaborator

@carlaKC carlaKC commented Nov 11, 2020

Fixes #4748

return &ListSweepsResponse{
Sweeps: &ListSweepsResponse_TransactionDetails{
TransactionDetails: lnrpc.RPCTransactionDetails(transactions),
TransactionDetails: lnrpc.RPCTransactionDetails(sweepTxDetails),
Copy link
Collaborator

@bhandras bhandras Nov 11, 2020

Choose a reason for hiding this comment

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

I think both verbose and non-verbose response should be filtered, such that they are consistent (returning the same sweeps but with different level of detail). The linked bug seems to recommend the same. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Originally the point of having the non-verbose output was to save us the call to list all of our transactions from the wallet, which was my thinking in still returning the full list (incl rbf).

I also think there can be a use-case for knowing the txids of sweeps that never made it to chain (eg, the case where you have alerting on every tx your node broadcasts, you'd want to be able to check lnd's sweeps to whitelist the tx).

But I do agree it's confusing to have different output for verbose/not. Could add a IncludeDropped option which just returns all the sweeps when verbose is false, and does not work if verbose is true so that you can still get those rbf-ed txids if you need them? Unsure about it tbh.

Copy link
Collaborator

Choose a reason for hiding this comment

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

IMHO simplifying and only including sweeps that made it to the chain would make more sense. Having the IncludeDropped smells like something users probably ain't going to need (although a good generalization idea).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah SGTM, keep it consistent for now and then add the invisible/rbfed sweeps if anybody requires them. Will make a note in the proto that these sweeps aren't listed.

@carlaKC carlaKC force-pushed the 4748-sweeps branch 2 times, most recently from d26a44e to a05189e Compare November 12, 2020 09:16
Copy link
Collaborator

@bhandras bhandras left a comment

Choose a reason for hiding this comment

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

LGTM 🧇

lntest/itest/lnd_test.go Show resolved Hide resolved
Copy link
Collaborator

@guggero guggero left a comment

Choose a reason for hiding this comment

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

LGTM, only nits 😅

lntest/itest/lnd_test.go Show resolved Hide resolved
lntest/itest/lnd_test.go Outdated Show resolved Hide resolved
lntest/itest/lnd_test.go Outdated Show resolved Hide resolved
Previously, the verbose output of listsweeps would fail if we did not
find some sweeps in our wallet's listtransactions output. This could be
the case for sweeps that were rbf-ed, so the endpoint would fail. This
commit also updates the listsweeps endpoint to always check against the
wallet, so that we do not return these discarded sweeps that never
confirmed.
@carlaKC carlaKC added this to In progress in v0.12.0-beta via automation Nov 16, 2020
@carlaKC carlaKC added the v0.12 label Nov 16, 2020
@carlaKC carlaKC moved this from In progress to Reviewer approved in v0.12.0-beta Nov 16, 2020
@Roasbeef Roasbeef added this to the 0.12.0 milestone Nov 17, 2020
@Roasbeef Roasbeef merged commit e63f41c into lightningnetwork:master Nov 17, 2020
v0.12.0-beta automation moved this from Reviewer approved to Done Nov 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
v0.12.0-beta
  
Done
Development

Successfully merging this pull request may close these issues.

Sweep listing returns transaction ids that never confirmed
4 participants