Handle an incoming htlc when we are a relaying node.
Handle an incoming htlc when we are a relaying node.
either:
This helper method will tell us if it is not even worth attempting to relay the payment to our local outgoing channel, because some parameters don't match with our settings for that channel.
This helper method will tell us if it is not even worth attempting to relay the payment to our local outgoing channel, because some parameters don't match with our settings for that channel. In that case we directly fail the htlc.
Select a channel to the same node to relay the payment to, that has the lowest balance and is compatible in terms of fees, expiry_delta, etc.
Select a channel to the same node to relay the payment to, that has the lowest balance and is compatible in terms of fees, expiry_delta, etc.
If no suitable channel is found we default to the originally requested channel.
This helper method translates relaying errors (returned by the downstream outgoing channel) to BOLT 4 standard errors that we should return upstream.
(Since version ) see corresponding Javadoc for more information.