Sha256: 60a312382d309eea5d1825856df9410bf658bf6aad3741f08885f7a85def2e9a

Contents?: true

Size: 397 Bytes

Versions: 3

Compression:

Stored size: 397 Bytes

Contents

# frozen_string_literal: true

module Lightning
  module Onion
    module FailureMessages
      module ExpiryTooSoon
        def to_payload
          [TYPES[:expiry_too_soon], channel_update.htb.bytesize].pack('n2') + channel_update.htb
        end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lightning-onion-0.2.10 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.9 lib/lightning/onion/failure_messages/expiry_too_soon.rb
lightning-onion-0.2.8 lib/lightning/onion/failure_messages/expiry_too_soon.rb