lnwire: remove no longer used initiator field

This commit is contained in:
Keagan McClelland authored and yyforyongyu committed 2025-06-25 01:10:46 +08:00
1 parent 6b80796bb8
commit c6861770de
2 files changed
+1 -12

No files matched your search

+1 -11
View File
@@ -52,12 +52,6 @@ type DynPropose struct {
// re-negotiate.
ChanID ChannelID
// Initiator is a byte that identifies whether this message was sent as
// the initiator of a dynamic commitment negotiation or the responder
// of a dynamic commitment negotiation. bool true indicates it is the
// initiator
Initiator bool
// DustLimit, if not nil, proposes a change to the dust_limit_satoshis
// for the sender's commitment transaction.
DustLimit fn.Option[btcutil.Amount]
@@ -195,10 +189,6 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
return err
}
if err := WriteBool(w, dp.Initiator); err != nil {
return err
}
return WriteBytes(w, dp.ExtraData)
}
@@ -209,7 +199,7 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
// This is a part of the lnwire.Message interface.
func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
// Parse out the only required field.
if err := ReadElements(r, &dp.ChanID, &dp.Initiator); err != nil {
if err := ReadElements(r, &dp.ChanID); err != nil {
return err
}
-1
View File
@@ -817,7 +817,6 @@ var _ TestMessage = (*DynPropose)(nil)
func (dp *DynPropose) RandTestMessage(t *rapid.T) Message {
msg := &DynPropose{
ChanID: RandChannelID(t),
Initiator: rapid.Bool().Draw(t, "initiator"),
ExtraData: RandExtraOpaqueData(t, nil),
}