lnwire: add the state hint obsfucator to the SingleFundingComplete msg

This commit is contained in:
Olaoluwa Osuntokun committed 2016-11-14 19:04:03 -08:00
1 parent fef927e276
commit 1ef218a73d
3 files changed
+34 -10

No files matched your search

+8
View File
@@ -199,6 +199,10 @@ func writeElement(w io.Writer, element interface{}) error {
if _, err := w.Write(b[:]); err != nil {
return err
}
case [4]byte:
if _, err := w.Write(e[:]); err != nil {
return err
}
case []byte:
// Enforce the maxmium length of all slices used in the wire
// protocol.
@@ -450,6 +454,10 @@ func readElement(r io.Reader, element interface{}) error {
}
*e = wire.BitcoinNet(binary.BigEndian.Uint32(b[:]))
return nil
case *[4]byte:
if _, err := io.ReadFull(r, e[:]); err != nil {
return err
}
case *[]byte:
bytes, err := wire.ReadVarBytes(r, 0, MaxSliceLength, "byte slice")
if err != nil {