Sha256: c7bfd47957c3391036fdc556f24714003a892804edd6a05b4b0e52505107154c

Contents?: true

Size: 445 Bytes

Versions: 7

Compression:

Stored size: 445 Bytes

Contents

# frozen_string_literal: true

module Lightning
  module Onion
    module FailureMessages
      module FeeInsufficient
        def to_payload
          [type_code, htlc_msat, channel_update.htb.bytesize].pack('nq>n') + channel_update.htb
        end

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