Skip to content

Commit c686177

Browse files
ProofOfKeagsyyforyongyu
authored andcommitted
lnwire: remove no longer used initiator field
1 parent 6b80796 commit c686177

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

lnwire/dyn_propose.go

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,6 @@ type DynPropose struct {
5252
// re-negotiate.
5353
ChanID ChannelID
5454

55-
// Initiator is a byte that identifies whether this message was sent as
56-
// the initiator of a dynamic commitment negotiation or the responder
57-
// of a dynamic commitment negotiation. bool true indicates it is the
58-
// initiator
59-
Initiator bool
60-
6155
// DustLimit, if not nil, proposes a change to the dust_limit_satoshis
6256
// for the sender's commitment transaction.
6357
DustLimit fn.Option[btcutil.Amount]
@@ -195,10 +189,6 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
195189
return err
196190
}
197191

198-
if err := WriteBool(w, dp.Initiator); err != nil {
199-
return err
200-
}
201-
202192
return WriteBytes(w, dp.ExtraData)
203193
}
204194

@@ -209,7 +199,7 @@ func (dp *DynPropose) Encode(w *bytes.Buffer, _ uint32) error {
209199
// This is a part of the lnwire.Message interface.
210200
func (dp *DynPropose) Decode(r io.Reader, _ uint32) error {
211201
// Parse out the only required field.
212-
if err := ReadElements(r, &dp.ChanID, &dp.Initiator); err != nil {
202+
if err := ReadElements(r, &dp.ChanID); err != nil {
213203
return err
214204
}
215205

lnwire/test_message.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,6 @@ var _ TestMessage = (*DynPropose)(nil)
817817
func (dp *DynPropose) RandTestMessage(t *rapid.T) Message {
818818
msg := &DynPropose{
819819
ChanID: RandChannelID(t),
820-
Initiator: rapid.Bool().Draw(t, "initiator"),
821820
ExtraData: RandExtraOpaqueData(t, nil),
822821
}
823822

0 commit comments

Comments
 (0)