]> git.bitcoin.ninja Git - rust-lightning/commit
Introduce ChannelSignerType.
authorArik Sosman <git@arik.io>
Fri, 21 Jul 2023 19:11:20 +0000 (12:11 -0700)
committerArik Sosman <git@arik.io>
Tue, 22 Aug 2023 21:28:40 +0000 (14:28 -0700)
commitb609bd92495b7a80d437ab5e9ab82a8bdcdd5e09
tree0fb9d2d8eae17fcbfd64b60b55abf776171b7d1a
parentd256a2b329c0493f85b02901d257e1e45d5ef7d1
Introduce ChannelSignerType.

Rather than using a holder_signer of a specific
signer type in Channel and ChannelContext, this
allows us to hold an enum such that depending on
the type of channel, the appropriate signer could
be held in its respective variant.

Doing so required the reparametrization of Channel
from using a Signer to using the SignerProvider
trait. This percolated down to the ChannelManager
and multiple tests.

Now, when accessign various signer methods, there
is a distinction between accessing methods defined
for all signers on ChannelSigner, and accessing
type-specific methods using accessors such as
`as_ecdsa`.
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_tests.rs
lightning/src/sign/mod.rs
lightning/src/sign/type_resolver.rs [new file with mode: 0644]