What changed, and why it matters
This is a small, ordinary code change that wires up a new optional component (an 'aux closer') to the chain arbitrator during server startup. It only adds plumbing: importing a package under a shorter alias and passing one more optional field into a configuration struct. There is no indication of a security bug, fix, or vulnerability in the diff or commit message.
No security action required. Review as normal code maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies server.go to (1) alias the chancloser import as chcl, (2) pass AuxCloser into the contractcourt.ChainArbitratorConfig via fn.MapOption to convert the option type, and (3) update the existing chancloser.ParseUpfrontShutdownAddress call to use the new alias. This is a dependency-injection/wiring change with no logic changes to security-critical functions.
Changed components
lnd/server.gocontractcourt.ChainArbitratorConfiglnwallet/chancloser.AuxChanCloserInspect captured patch +7 / −2
diff --git a/server.go b/server.go
index 1c2db3d..cc7d6bd 100644
--- a/server.go
+++ b/server.go
@@ -61,7 +61,7 @@ import (
"github.com/lightningnetwork/lnd/lnutils"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwallet/chainfee"
- "github.com/lightningnetwork/lnd/lnwallet/chancloser"
+ chcl "github.com/lightningnetwork/lnd/lnwallet/chancloser"
"github.com/lightningnetwork/lnd/lnwallet/chanfunding"
"github.com/lightningnetwork/lnd/lnwallet/rpcwallet"
"github.com/lightningnetwork/lnd/lnwire"
@@ -1370,6 +1370,11 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
AuxLeafStore: implCfg.AuxLeafStore,
AuxSigner: implCfg.AuxSigner,
AuxResolver: implCfg.AuxContractResolver,
+ AuxCloser: fn.MapOption(
+ func(c chcl.AuxChanCloser) contractcourt.AuxChanCloser {
+ return c
+ },
+ )(implCfg.AuxChanCloser),
}, dbs.ChanStateDB)
// Select the configuration and funding parameters for Bitcoin.
@@ -1447,7 +1452,7 @@ func newServer(ctx context.Context, cfg *Config, listenAddrs []net.Addr,
}
// Attempt to parse the provided upfront-shutdown address (if any).
- script, err := chancloser.ParseUpfrontShutdownAddress(
+ script, err := chcl.ParseUpfrontShutdownAddress(
cfg.UpfrontShutdownAddr, cfg.ActiveNetParams.Params,
)
if err != nil {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.