Sha256: 887326fc22e788d31c8ba261bbdb49be7000c26cbcf479166a3eab68066c904a

Contents?: true

Size: 444 Bytes

Versions: 7

Compression:

Stored size: 444 Bytes

Contents

# frozen_string_literal: true

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
        end

        def self.load(payload)
          type_code, flags, len, rest = payload.unpack('na4nH*')
          new(type_code, flags, rest[0..len * 2])
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lightning-onion-0.2.6 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.5 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.4 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.3 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.2 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.1 lib/lightning/onion/failure_messages/channel_disabled.rb
lightning-onion-0.2.0 lib/lightning/onion/failure_messages/channel_disabled.rb