Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add payCommitTxFees flag to LocalParams #2845

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Mar 29, 2024

The channel initiator traditionnally pays the commit tx fees, but we may want to override that when providing services to wallet users. We thus split the current isInitiator flag into two flags:

  • isChannelOpener
  • payCommitTxFees

We always set payCommitTxFees to the same value as isChannelOpener. Custom feature bits may override that behavior if necessary.

Note that backwards compatibity is preserved since our previous bool8 codec encodes true as 0xff and false as 0x00.

@t-bast t-bast force-pushed the pay-commit-tx-fees-channel-flag branch 2 times, most recently from 96669a8 to 3cb219f Compare March 29, 2024 10:19
The channel initiator traditionnally pays the commit tx fees, but we may
want to override that when providing services to wallet users. We thus
split the current `isInitiator` flag into two flags:

- `isChannelOpener`
- `payCommitTxFees`

We always set `payCommitTxFees` to the same value as `isChannelOpener`.
Custom feature bits may override that behavior if necessary.

Note that backwards compatibity is preserved since our previous `bool8`
codec encodes `true` as `0xff` and `false` as `0x00`.
@t-bast t-bast force-pushed the pay-commit-tx-fees-channel-flag branch from 3cb219f to d3fbd8e Compare March 29, 2024 10:39
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 93.42105% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 86.01%. Comparing base (c8184b3) to head (d3fbd8e).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2845      +/-   ##
==========================================
+ Coverage   85.96%   86.01%   +0.04%     
==========================================
  Files         219      219              
  Lines       18441    18441              
  Branches      762      790      +28     
==========================================
+ Hits        15853    15862       +9     
+ Misses       2588     2579       -9     
Files Coverage Δ
...in/scala/fr/acinq/eclair/channel/ChannelData.scala 100.00% <100.00%> (ø)
.../scala/fr/acinq/eclair/channel/ChannelEvents.scala 100.00% <ø> (ø)
...c/main/scala/fr/acinq/eclair/channel/Helpers.scala 94.53% <100.00%> (ø)
...inq/eclair/channel/fsm/ChannelOpenDualFunded.scala 87.00% <100.00%> (ø)
...q/eclair/channel/fsm/ChannelOpenSingleFunded.scala 93.52% <100.00%> (ø)
...la/fr/acinq/eclair/channel/fsm/ErrorHandlers.scala 83.55% <100.00%> (ø)
...q/eclair/crypto/keymanager/ChannelKeyManager.scala 87.50% <ø> (ø)
...main/scala/fr/acinq/eclair/db/DbEventHandler.scala 93.58% <100.00%> (ø)
...c/main/scala/fr/acinq/eclair/db/pg/PgAuditDb.scala 99.69% <100.00%> (ø)
...cala/fr/acinq/eclair/db/sqlite/SqliteAuditDb.scala 99.67% <100.00%> (ø)
... and 13 more

... and 4 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants