Module: Lightning::Onion::FailureMessages::FinalIncorrectHtlcAmount

Defined in:
lib/lightning/onion/failure_messages/final_incorrect_htlc_amount.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.load(payload) ⇒ Object



11
12
13
# File 'lib/lightning/onion/failure_messages/final_incorrect_htlc_amount.rb', line 11

def self.load(payload)
  new(*payload.unpack('q>'))
end

Instance Method Details

#to_payloadObject



7
8
9
# File 'lib/lightning/onion/failure_messages/final_incorrect_htlc_amount.rb', line 7

def to_payload
  [TYPES[:final_incorrect_htlc_amount], incoming_htlc_amt].pack('nq>')
end