What changed, and why it matters
This is a small internal code cleanup change. It swaps one internal type reference (channeldb.OpenChannel) for another internal type reference (chanstate.OpenChannel) inside a peer-related data structure. The commit message says the goal is to keep the peer-facing type independent from a compatibility alias while keeping the same field layout for existing callers. There is no security-relevant behavior change visible in the diff.
No security action needed. Treat as routine refactoring.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies lnpeer/peer.go to import the chanstate package instead of channeldb and changes the embedded type in NewChannel from channeldb.OpenChannel to chanstate.OpenChannel. The commit message explains this is a refactoring to decouple lnpeer from the channeldb compatibility alias. No functional logic, validation, cryptography, or network handling is changed.
Changed components
lnpeer/peer.goInspect captured patch +2 / −2
diff --git a/lnpeer/peer.go b/lnpeer/peer.go
index 51f7f29..ef18dda 100644
--- a/lnpeer/peer.go
+++ b/lnpeer/peer.go
@@ -5,7 +5,7 @@ import (
"github.com/btcsuite/btcd/btcec/v2"
"github.com/btcsuite/btcd/wire/v2"
- "github.com/lightningnetwork/lnd/channeldb"
+ "github.com/lightningnetwork/lnd/chanstate"
"github.com/lightningnetwork/lnd/lnwallet"
"github.com/lightningnetwork/lnd/lnwire"
)
@@ -14,7 +14,7 @@ import (
// with the set of channel options that may change how the channel is created.
// This can be used to pass along the nonce state needed for taproot channels.
type NewChannel struct {
- *channeldb.OpenChannel
+ *chanstate.OpenChannel
// ChanOpts can be used to change how the channel is created.
ChanOpts []lnwallet.ChannelOpt
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.