mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
lnwire: add AnnounceSignatures2 message
And ensure that it implements the AnnounceSignatures interface.
This commit is contained in:
@@ -187,6 +187,11 @@ func WriteElement(w *bytes.Buffer, element interface{}) error {
|
||||
return err
|
||||
}
|
||||
|
||||
case PartialSig:
|
||||
if err := e.Encode(w); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
case PingPayload:
|
||||
var l [2]byte
|
||||
binary.BigEndian.PutUint16(l[:], uint16(len(e)))
|
||||
@@ -936,6 +941,13 @@ func ReadElement(r io.Reader, element interface{}) error {
|
||||
}
|
||||
*e = addrBytes[:length]
|
||||
|
||||
case *PartialSig:
|
||||
var sig PartialSig
|
||||
if err = sig.Decode(r); err != nil {
|
||||
return err
|
||||
}
|
||||
*e = sig
|
||||
|
||||
case *ExtraOpaqueData:
|
||||
return e.Decode(r)
|
||||
|
||||
|
Reference in New Issue
Block a user