-
Notifications
You must be signed in to change notification settings - Fork 373
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
[Splicing] Clone for ChannelContext #3332
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3332 +/- ##
==========================================
+ Coverage 89.25% 90.00% +0.74%
==========================================
Files 130 130
Lines 106959 111140 +4181
Branches 106959 111140 +4181
==========================================
+ Hits 95464 100029 +4565
+ Misses 8706 8343 -363
+ Partials 2789 2768 -21 ☔ View full report in Codecov by Sentry. |
Discussed briefly offline. This may not be needed if we split |
This change request assumes that the whole |
e593e86
to
2aa0496
Compare
Not sure if cloning is the best solution. But, regardless, since the channel signer is a |
There are 4 The only non-cloneable field is the signer. The signer could also be placed under |
Still up for discussion, different approaches being discussed, to get rid of per-field cloning:
|
Cloning of a channel -- more precisely of
ChannelContext
-- is needed for Splicing, this is a preparation (may be needed for dual funding RBF as well)Simple
#[derive(Clone))
is not sufficient, as the channel signer struct cannot be cloned, ultimately due toAtomicUSize
andSecp256k1
(inKeysManager
). So instead, a field-by-field cloning is done, with the a few exceptions.