We must relay the payment to a direct peer.
We are the final recipient.
We must relay the payment to a remote node.
We are an intermediate node.
Decrypt the onion packet of a received htlc.
Decrypt the onion packet of a received htlc. If we are the final recipient, we validate that the HTLC fields match the onion fields (this prevents intermediate nodes from sending an invalid amount or expiry).
NB: we can't fully validate RelayPackets because it requires knowing the channel/route we'll be using, which we don't know yet. Such validation is the responsibility of downstream components.
incoming htlc
this node's private key
this node's supported features
whether the payment is to be relayed or if our node is the final recipient (or an error).
(Since version ) see corresponding Javadoc for more information.
Helpers to handle incoming payment packets.