ElementsProject / lightning

Core Lightning — Lightning Network implementation focusing on spec compliance and performance
Other
2.85k stars 902 forks source link

Not spending yysat in fees to get an HTLC worth xxxsat where y > x #7589

Closed vincenzopalazzo closed 2 months ago

vincenzopalazzo commented 2 months ago

Issue and Steps to Reproduce

I have a node that got Offered HTLC 218 SENT_ADD_ACK_REVOCATION cltv 857004 hit deadline error so we went onchain with the error

            {
               "timestamp": "2024-08-16T07:51:08.222Z",
               "old_state": "CHANNELD_NORMAL",
               "new_state": "AWAITING_UNILATERAL",
               "cause": "protocol",
               "message": "Offered HTLC 218 SENT_ADD_ACK_REVOCATION cltv 857004 hit deadline"
            },

Now I am looking in my logs that there is the following warning Not spending 1985sat in fees to get an HTLC worth 1204sat!

The two error can be unrelated, but it is possible that there is a bug hidden in some of this warning logs that we are ingoring

getinfo output

   "version": "v24.05",
   "blockheight": 857049,
   "network": "bitcoin",
   "fees_collected_msat": 86357,
   "our_features": {
      "init": "08a0800a8a59a1",
      "node": "88a0800a8a59a1",
      "channel": "",
      "invoice": "02000002024100"
daywalker90 commented 2 months ago

How is not losing more sats an issue? I don't get it.

vincenzopalazzo commented 2 months ago

How is not losing more sats an issue? I don't get it.

You are right, I read the value wrong :)