Sha256: c4900d2d52559f97c7ee60891d52849946b22f82f50db474aa0d652a97602e15

Contents?: true

Size: 406 Bytes

Versions: 7

Compression:

Stored size: 406 Bytes

Contents

# frozen_string_literal: true

module Lightning
  module Onion
    module FailureMessages
      module ExpiryTooSoon
        def to_payload
          [type_code, channel_update.htb.bytesize].pack('nn') + channel_update.htb
        end

        def self.load(payload)
          type_code, len, rest = payload.unpack('nnH*')
          new(type_code, 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/expiry_too_soon.rb
lightning-onion-0.2.5 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.4 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.3 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.2 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.1 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.0 lib/lightning/onion/failure_messages/expiry_too_soon.rb