Module: Lightning::Onion::FailureMessages::ChannelDisabled
- Defined in:
- lib/lightning/onion/failure_messages/channel_disabled.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.load(payload) ⇒ Object
11 12 13 14 |
# File 'lib/lightning/onion/failure_messages/channel_disabled.rb', line 11 def self.load(payload) flags, len, rest = payload.unpack('H4nH*') new(flags, rest[0..len * 2]) end |
Instance Method Details
#to_payload ⇒ Object
7 8 9 |
# File 'lib/lightning/onion/failure_messages/channel_disabled.rb', line 7 def to_payload [TYPES[:channel_disabled], flags, channel_update.htb.bytesize].pack('nH4n') + channel_update.htb end |