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

Cancel long-running Neutrino GetUTXO calls on quit #2716

Merged

Conversation

Projects
None yet
4 participants
@halseth
Copy link
Collaborator

commented Feb 27, 2019

This PR makes sure long running calls to GetUTXO gets cancelled in case we are shutting down.

This is done by adding a quit channel to BtcWallet, and cancelling the call in case of shutdown.

Fixes #2300.

Replaces #1781

@cfromknecht

This comment has been minimized.

Copy link
Collaborator

commented Mar 7, 2019

reason for closing?

@wpaulino

This comment has been minimized.

Copy link
Collaborator

commented Mar 7, 2019

We agreed on using the context pattern instead.

@halseth

This comment has been minimized.

Copy link
Collaborator Author

commented Mar 13, 2019

Version using context is up here: #2770

It is a bit awkward though, so re-opening this one in case we would rather use this pattern.

@halseth halseth reopened this Mar 13, 2019

@halseth halseth force-pushed the halseth:getutxo-cancel-interface-change branch 2 times, most recently from 2e1ab43 to 5d7bba4 Mar 13, 2019

@cfromknecht
Copy link
Collaborator

left a comment

LGTB 💰

@halseth halseth force-pushed the halseth:getutxo-cancel-interface-change branch from 5d7bba4 to e21ab3b Mar 22, 2019

@cfromknecht cfromknecht added this to the 0.7 milestone Apr 11, 2019

@halseth halseth force-pushed the halseth:getutxo-cancel-interface-change branch 2 times, most recently from 952aaa8 to 3ea000c Apr 26, 2019

@halseth

This comment has been minimized.

Copy link
Collaborator Author

commented Apr 26, 2019

Rebased! PTAL @wpaulino

@cfromknecht

This comment has been minimized.

Copy link
Collaborator

commented Apr 27, 2019

would it be possible to squash some of these down? as it stands the intermediate commits won't compile

halseth added some commits Aug 24, 2018

lnwallet: make BlockChainIO.GetUTXO take cancel chan
Use quit channels as cancel chan for call to GetUTXO.
lnwallet/btcwallet: provide cancel chan as neutrino QuitChan option
This will make sure a long-running rescan can be canceled in case
Neutrino is the backend.
chainntnfs/neutrino: provide n.quit as neutrino QuitChan option
This will make sure a long-running rescan can be canceled in the case
the notifier is shutting down.

@halseth halseth force-pushed the halseth:getutxo-cancel-interface-change branch from 3ea000c to f589c86 May 9, 2019

@halseth

This comment has been minimized.

Copy link
Collaborator Author

commented May 9, 2019

would it be possible to squash some of these down? as it stands the intermediate commits won't compile

Eeh, looks like young halseth did not know how to structure commits...

@Roasbeef
Copy link
Member

left a comment

LGTM 🦎

@Roasbeef Roasbeef merged commit 29a60f3 into lightningnetwork:master May 10, 2019

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.06%) to 60.189%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@cfromknecht

This comment has been minimized.

Copy link
Collaborator

commented May 14, 2019

yunghalseth 4 prez

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.