lightning
lightning copied to clipboard
`funder` cleanups!
I've been dying to clean up some things in funder
that are/were subpar. Here they are!
- We used to not send back original lease data in RBF attempts, which meant if you RBF'd a channel w/ a lease on it, the lease request would rather silently disappear. Oops. Now we attempt to satisfy them on RBFs as well.
- We didn't used to re-use the utxos from the original tx on RBF, now we do.
I kinda think that's it? That might be it.
Seems there is one json scan that doesn't always match the payload:
`openchannel2` payload did not scan Parsing '{openchannel2:{id:%,channel_id:%,their_funding_msat:%,max_htlc_value_in_flight_msat:%,htlc_minimum_msat:%,funding_feerate_per_kw:%,commitment_feerate_per_kw:%,feerate_our_max:%,feerate_our_min:%,to_self_delay:%,max_accepted_htlcs:%,channel_flags:%,locktime:%,channel_max_msat:': object does not have member channel_max_msat: {"openchannel2":{"id":"0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518","channel_id":"252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7","their_funding_msat":16777216000,"dust_limit_msat":546000,"max_htlc_value_in_flight_msat":18446744073709551615,"htlc_minimum_msat":0,"funding_feerate_per_kw":7500,"commitment_feerate_per_kw":7500,"feerate_our_max":150000,"feerate_our_min":1875,"to_self_delay":5,"max_accepted_htlcs":483,"channel_flags":1,"locktime":102}}
The offending field is channel_max_msat
Seems there is one json scan that doesn't always match the payload:
`openchannel2` payload did not scan Parsing '{openchannel2:{id:%,channel_id:%,their_funding_msat:%,max_htlc_value_in_flight_msat:%,htlc_minimum_msat:%,funding_feerate_per_kw:%,commitment_feerate_per_kw:%,feerate_our_max:%,feerate_our_min:%,to_self_delay:%,max_accepted_htlcs:%,channel_flags:%,locktime:%,channel_max_msat:': object does not have member channel_max_msat: {"openchannel2":{"id":"0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518","channel_id":"252d1b0a1e57895e84137f28cf19ab2c35847e284c112fefdecc7afeaa5c1de7","their_funding_msat":16777216000,"dust_limit_msat":546000,"max_htlc_value_in_flight_msat":18446744073709551615,"htlc_minimum_msat":0,"funding_feerate_per_kw":7500,"commitment_feerate_per_kw":7500,"feerate_our_max":150000,"feerate_our_min":1875,"to_self_delay":5,"max_accepted_htlcs":483,"channel_flags":1,"locktime":102}}
The offending field is
channel_max_msat
Oh fun. We don't include channel_max_msat
if wumbo is on because we set it to UINT_MAX
, which fails to mulitply by 1000 to convert to sats when adding it to the openchannel2
JSON.
Added a new commit, https://github.com/ElementsProject/lightning/pull/5650/commits/b6ef966ad411193af36db44b955f9b4f6820fa54, which now uses a non-overflow-ing number for channel_max_msat
!