lnwire: Add upfront shutdown messages and feature bit

This commit adds the feature bit and additional fields
required in `open_channel` and `accept_channel` wire
messages for `option_upfront_shutdown_script`.
This commit is contained in:
Steven Roose authored and carla committed 2019-12-03 11:38:21 +02:00
1 parent db21c394b2
commit 2fb7172725
8 files changed
+198 -21

No files matched your search

+2 -2
View File
@@ -816,8 +816,8 @@ func ReadElement(r io.Reader, element interface{}) error {
}
length := binary.BigEndian.Uint16(addrLen[:])
var addrBytes [34]byte
if length > 34 {
var addrBytes [deliveryAddressMaxSize]byte
if length > deliveryAddressMaxSize {
return fmt.Errorf("Cannot read %d bytes into addrBytes", length)
}
if _, err = io.ReadFull(r, addrBytes[:length]); err != nil {