lnd.xprv/sweep
Johan T. Halseth 77daa3dbe4
sweeper: avoid deadlock on shutdown
We risked deadlocking on shutdown if a client (in our case a contract
resolver) attempted to schedule a sweep of an input after the
ChainNotifier had been shut down. This would cause the `collector`
goroutine to exit, and not handle incoming requests, causing a deadlock
(since the ChainArbitrator is being stopped before the Sweeper in the
server).

To fix this we could change the order these subsystems are stopped, but
this doesn't ensure there aren't other clients that could end up in the
same deadlock scenario. So instead we keep handling the incoming
requests even after the collector has exited (immediatly returning an
error), until the sweeper is signalled to shutdown.
2020-12-10 13:19:59 +01:00
..
backend_mock_test.go sweeper_test: return unique wallet utxos 2020-11-20 13:06:54 +01:00
bucket_list.go sweep: do not combine exclusive and non-exclusive inputs 2020-09-16 08:17:36 +02:00
defaults_rpctest.go sweep: add time-based sweeper 2018-12-18 10:50:17 +01:00
defaults.go sweep: add time-based sweeper 2018-12-18 10:50:17 +01:00
fee_estimator_mock_test.go chainfee: create new chainfee package extracting fees from lnwallet 2019-10-31 16:41:57 -07:00
interface.go multi: update WalletController PublishTransaction to include label 2020-05-19 13:30:00 +02:00
log.go multi: modify sweeper.CreateSweepTx to accept conf target, style changes 2018-10-18 18:08:27 -07:00
store_mock.go sweep: add list sweeps function 2020-05-05 21:10:11 +02:00
store_test.go sweep: use channeldb.MakeTestDB 2020-07-28 17:57:30 +02:00
store.go multi: add reset closure to kvdb.Update 2020-11-05 17:57:12 +01:00
sweeper_test.go sweeper: avoid deadlock on shutdown 2020-12-10 13:19:59 +01:00
sweeper.go sweeper: avoid deadlock on shutdown 2020-12-10 13:19:59 +01:00
test_utils.go sweep: make sweeper aware of unconfirmed parent transactions. 2020-09-17 12:30:39 +02:00
tx_input_set_test.go sweep/tx_input_set: account for required outputs in input set 2020-11-20 13:06:54 +01:00
tx_input_set.go sweep/tx_input_set: account for required outputs in input set 2020-11-20 13:06:54 +01:00
txgenerator_test.go sweep: make sweeper aware of unconfirmed parent transactions. 2020-09-17 12:30:39 +02:00
txgenerator.go sweep/txgenerator: fix input witness ordering 2020-12-08 10:59:23 +01:00
walletsweep_test.go sweep: pass dustLimit to CreateSweepTx 2020-11-20 13:06:53 +01:00
walletsweep.go sweep: pass dustLimit to CreateSweepTx 2020-11-20 13:06:53 +01:00
weight_estimator_test.go input+sweep: let weightestimator take known TxOut 2020-11-20 13:06:53 +01:00
weight_estimator.go sweep/tx_input_set: account for required outputs in input set 2020-11-20 13:06:54 +01:00