What changed, and why it matters
This commit simply renames an internal helper method from a longer name to a shorter one (allNonSignatureRecordProducers -> nonSignatureRecordProducers) and updates the three places that call it. There is no change to program logic, data handling, or security behavior.
No security action needed. Treat as routine code cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
A pure refactoring change in lnwire/channel_announcement_2.go. The unexported method allNonSignatureRecordProducers is renamed to nonSignatureRecordProducers, and its three call sites are updated. The function body, return values, and surrounding code are unchanged. No functional, cryptographic, or wire-protocol changes are present.
Changed components
lnwire/channel_announcement_2.goInspect captured patch +4 / −4
diff --git a/lnwire/channel_announcement_2.go b/lnwire/channel_announcement_2.go
index 94474d9..0066dad 100644
--- a/lnwire/channel_announcement_2.go
+++ b/lnwire/channel_announcement_2.go
@@ -81,17 +81,17 @@ func (c *ChannelAnnouncement2) Encode(w *bytes.Buffer, _ uint32) error {
// NOTE: this is part of the PureTLVMessage interface.
func (c *ChannelAnnouncement2) AllRecords() []tlv.Record {
recordProducers := append(
- c.allNonSignatureRecordProducers(), &c.Signature,
+ c.nonSignatureRecordProducers(), &c.Signature,
)
return ProduceRecordsSorted(recordProducers...)
}
-// allNonSignatureRecordProducers returns all the TLV record producers for the
+// nonSignatureRecordProducers returns all the TLV record producers for the
// message except the signature record producer.
//
//nolint:ll
-func (c *ChannelAnnouncement2) allNonSignatureRecordProducers() []tlv.RecordProducer {
+func (c *ChannelAnnouncement2) nonSignatureRecordProducers() []tlv.RecordProducer {
// The chain-hash record is only included if it is _not_ equal to the
// bitcoin mainnet genisis block hash.
var recordProducers []tlv.RecordProducer
@@ -239,7 +239,7 @@ func (c *ChannelAnnouncement2) DecodeNonSigTLVRecords(r io.Reader) error {
// excludes the signature field.
func (c *ChannelAnnouncement2) EncodeAllNonSigFields(w io.Writer) error {
return EncodeRecordsTo(
- w, ProduceRecordsSorted(c.allNonSignatureRecordProducers()...),
+ w, ProduceRecordsSorted(c.nonSignatureRecordProducers()...),
)
}
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.