mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
lnd: introduce the utxoNursery which incubates outputs until maturity
This commit introduces the utxoNursery. The duty of the utxoNursery is to watch over CSV-locked immature outputs until they’ve fully matured. An output is mature once both its sequence lock indicated by the CSV op code within its output has become active. Once an output is mature the nursery sweeps the outputs in batches into the source wallet. The utxoNursery executes its duties once a commitment transaction has been broadcast on-chain.
This commit is contained in:
4
log.go
4
log.go
@@ -26,6 +26,7 @@ var (
|
||||
ntfnLog = btclog.Disabled
|
||||
chdbLog = btclog.Disabled
|
||||
hswcLog = btclog.Disabled
|
||||
utxnLog = btclog.Disabled
|
||||
)
|
||||
|
||||
// subsystemLoggers maps each subsystem identifier to its associated logger.
|
||||
@@ -39,6 +40,7 @@ var subsystemLoggers = map[string]btclog.Logger{
|
||||
"CHDB": chdbLog,
|
||||
"FNDG": fndgLog,
|
||||
"HSWC": hswcLog,
|
||||
"UTXN": utxnLog,
|
||||
}
|
||||
|
||||
// useLogger updates the logger references for subsystemID to logger. Invalid
|
||||
@@ -79,6 +81,8 @@ func useLogger(subsystemID string, logger btclog.Logger) {
|
||||
|
||||
case "HSWC":
|
||||
hswcLog = logger
|
||||
case "UTXN":
|
||||
utxnLog = logger
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user