lib/lightning/onion/failure_messages/channel_disabled.rb in lightning-onion-0.2.6 vs lib/lightning/onion/failure_messages/channel_disabled.rb in lightning-onion-0.2.8
- old
+ new
@@ -3,15 +3,15 @@
module Lightning
module Onion
module FailureMessages
module ChannelDisabled
def to_payload
- [type_code].pack('n') + flags + [channel_update.htb.bytesize].pack('n') + channel_update.htb
+ [TYPES[:channel_disabled], flags, channel_update.htb.bytesize].pack('nH4n') + channel_update.htb
end
def self.load(payload)
- type_code, flags, len, rest = payload.unpack('na4nH*')
- new(type_code, flags, rest[0..len * 2])
+ flags, len, rest = payload.unpack('H4nH*')
+ new(flags, rest[0..len * 2])
end
end
end
end
end