htlcswitch: change errors to warnings
for issues caused by bogus incoming HTLC data
This commit is contained in:
parent
2ae82df2fa
commit
4b4d34fcce
@ -2217,7 +2217,7 @@ func (l *channelLink) CheckHtlcForward(payHash [32]byte,
|
|||||||
// any case, we'll cancel this HTLC.
|
// any case, we'll cancel this HTLC.
|
||||||
actualFee := incomingHtlcAmt - amtToForward
|
actualFee := incomingHtlcAmt - amtToForward
|
||||||
if incomingHtlcAmt < amtToForward || actualFee < expectedFee {
|
if incomingHtlcAmt < amtToForward || actualFee < expectedFee {
|
||||||
l.log.Errorf("outgoing htlc(%x) has insufficient fee: "+
|
l.log.Warnf("outgoing htlc(%x) has insufficient fee: "+
|
||||||
"expected %v, got %v",
|
"expected %v, got %v",
|
||||||
payHash[:], int64(expectedFee), int64(actualFee))
|
payHash[:], int64(expectedFee), int64(actualFee))
|
||||||
|
|
||||||
@ -2239,7 +2239,7 @@ func (l *channelLink) CheckHtlcForward(payHash [32]byte,
|
|||||||
// sender messed up, or an intermediate node tampered with the HTLC.
|
// sender messed up, or an intermediate node tampered with the HTLC.
|
||||||
timeDelta := policy.TimeLockDelta
|
timeDelta := policy.TimeLockDelta
|
||||||
if incomingTimeout < outgoingTimeout+timeDelta {
|
if incomingTimeout < outgoingTimeout+timeDelta {
|
||||||
l.log.Errorf("incoming htlc(%x) has incorrect time-lock value: "+
|
l.log.Warnf("incoming htlc(%x) has incorrect time-lock value: "+
|
||||||
"expected at least %v block delta, got %v block delta",
|
"expected at least %v block delta, got %v block delta",
|
||||||
payHash[:], timeDelta, incomingTimeout-outgoingTimeout)
|
payHash[:], timeDelta, incomingTimeout-outgoingTimeout)
|
||||||
|
|
||||||
@ -2286,7 +2286,7 @@ func (l *channelLink) canSendHtlc(policy ForwardingPolicy,
|
|||||||
// too small for the next hop. If so, then we'll cancel the HTLC
|
// too small for the next hop. If so, then we'll cancel the HTLC
|
||||||
// directly.
|
// directly.
|
||||||
if amt < policy.MinHTLCOut {
|
if amt < policy.MinHTLCOut {
|
||||||
l.log.Errorf("outgoing htlc(%x) is too small: min_htlc=%v, "+
|
l.log.Warnf("outgoing htlc(%x) is too small: min_htlc=%v, "+
|
||||||
"htlc_value=%v", payHash[:], policy.MinHTLCOut,
|
"htlc_value=%v", payHash[:], policy.MinHTLCOut,
|
||||||
amt)
|
amt)
|
||||||
|
|
||||||
@ -2305,7 +2305,7 @@ func (l *channelLink) canSendHtlc(policy ForwardingPolicy,
|
|||||||
// Next, ensure that the passed HTLC isn't too large. If so, we'll
|
// Next, ensure that the passed HTLC isn't too large. If so, we'll
|
||||||
// cancel the HTLC directly.
|
// cancel the HTLC directly.
|
||||||
if policy.MaxHTLC != 0 && amt > policy.MaxHTLC {
|
if policy.MaxHTLC != 0 && amt > policy.MaxHTLC {
|
||||||
l.log.Errorf("outgoing htlc(%x) is too large: max_htlc=%v, "+
|
l.log.Warnf("outgoing htlc(%x) is too large: max_htlc=%v, "+
|
||||||
"htlc_value=%v", payHash[:], policy.MaxHTLC, amt)
|
"htlc_value=%v", payHash[:], policy.MaxHTLC, amt)
|
||||||
|
|
||||||
// As part of the returned error, we'll send our latest routing
|
// As part of the returned error, we'll send our latest routing
|
||||||
@ -2322,7 +2322,7 @@ func (l *channelLink) canSendHtlc(policy ForwardingPolicy,
|
|||||||
// future, so we'll reject an HTLC if the outgoing expiration time is
|
// future, so we'll reject an HTLC if the outgoing expiration time is
|
||||||
// too close to the current height.
|
// too close to the current height.
|
||||||
if timeout <= heightNow+l.cfg.OutgoingCltvRejectDelta {
|
if timeout <= heightNow+l.cfg.OutgoingCltvRejectDelta {
|
||||||
l.log.Errorf("htlc(%x) has an expiry that's too soon: "+
|
l.log.Warnf("htlc(%x) has an expiry that's too soon: "+
|
||||||
"outgoing_expiry=%v, best_height=%v", payHash[:],
|
"outgoing_expiry=%v, best_height=%v", payHash[:],
|
||||||
timeout, heightNow)
|
timeout, heightNow)
|
||||||
failure := l.createFailureWithUpdate(
|
failure := l.createFailureWithUpdate(
|
||||||
@ -2335,7 +2335,7 @@ func (l *channelLink) canSendHtlc(policy ForwardingPolicy,
|
|||||||
|
|
||||||
// Check absolute max delta.
|
// Check absolute max delta.
|
||||||
if timeout > l.cfg.MaxOutgoingCltvExpiry+heightNow {
|
if timeout > l.cfg.MaxOutgoingCltvExpiry+heightNow {
|
||||||
l.log.Errorf("outgoing htlc(%x) has a time lock too far in "+
|
l.log.Warnf("outgoing htlc(%x) has a time lock too far in "+
|
||||||
"the future: got %v, but maximum is %v", payHash[:],
|
"the future: got %v, but maximum is %v", payHash[:],
|
||||||
timeout-heightNow, l.cfg.MaxOutgoingCltvExpiry)
|
timeout-heightNow, l.cfg.MaxOutgoingCltvExpiry)
|
||||||
|
|
||||||
@ -2344,7 +2344,7 @@ func (l *channelLink) canSendHtlc(policy ForwardingPolicy,
|
|||||||
|
|
||||||
// Check to see if there is enough balance in this channel.
|
// Check to see if there is enough balance in this channel.
|
||||||
if amt > l.Bandwidth() {
|
if amt > l.Bandwidth() {
|
||||||
l.log.Errorf("insufficient bandwidth to route htlc: %v is "+
|
l.log.Warnf("insufficient bandwidth to route htlc: %v is "+
|
||||||
"larger than %v", amt, l.Bandwidth())
|
"larger than %v", amt, l.Bandwidth())
|
||||||
failure := l.createFailureWithUpdate(
|
failure := l.createFailureWithUpdate(
|
||||||
func(upd *lnwire.ChannelUpdate) lnwire.FailureMessage {
|
func(upd *lnwire.ChannelUpdate) lnwire.FailureMessage {
|
||||||
|
@ -109,8 +109,6 @@
|
|||||||
<time> [ERR] HSWC: ChannelLink(<chan>): failing link: unable to synchronize channel states: unable to send chan sync message for ChannelPoint(<chan_point>): write tcp <ip>-><ip>: write: connection reset by peer with error: unable to resume channel, recovery required
|
<time> [ERR] HSWC: ChannelLink(<chan>): failing link: unable to synchronize channel states: unable to send chan sync message for ChannelPoint(<chan_point>): write tcp <ip>-><ip>: write: connection reset by peer with error: unable to resume channel, recovery required
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): failing link: unable to update commitment: link shutting down with error: internal error
|
<time> [ERR] HSWC: ChannelLink(<chan>): failing link: unable to update commitment: link shutting down with error: internal error
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): link failed, exiting htlcManager
|
<time> [ERR] HSWC: ChannelLink(<chan>): link failed, exiting htlcManager
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): outgoing htlc(<hex>) has insufficient fee: expected 575000, got 1075
|
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): outgoing htlc(<hex>) is too small: min_htlc=<amt>, htlc_value=<amt>
|
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): unable to cancel incoming HTLC for circuit-key=(Chan ID=<chan>, HTLC ID=0): HTLC with ID 0 has already been failed
|
<time> [ERR] HSWC: ChannelLink(<chan>): unable to cancel incoming HTLC for circuit-key=(Chan ID=<chan>, HTLC ID=0): HTLC with ID 0 has already been failed
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): unable to decode onion hop iterator: TemporaryChannelFailure
|
<time> [ERR] HSWC: ChannelLink(<chan>): unable to decode onion hop iterator: TemporaryChannelFailure
|
||||||
<time> [ERR] HSWC: ChannelLink(<chan>): unable to update signals
|
<time> [ERR] HSWC: ChannelLink(<chan>): unable to update signals
|
||||||
|
Loading…
Reference in New Issue
Block a user