lnwallet: public expose funding keys in channel state machine
This commit modifies the attributes of the LightningChannel struct to publicly expose the funding keys used within the channel for the local and remote party. Exposing these keys publicly will allow callers to use the keys involved to generate authenticated channel advertisements for the routing layer.
This commit is contained in:
parent
b49d2827a2
commit
4790ce96a8
@ -432,6 +432,15 @@ type LightningChannel struct {
|
||||
// counter party has broadcast a prior *revoked* state.
|
||||
ContractBreach chan *BreachRetribution
|
||||
|
||||
// LocalFundingKey is the public key under control by the wallet that
|
||||
// was used for the 2-of-2 funding output which created this channel.
|
||||
LocalFundingKey *btcec.PublicKey
|
||||
|
||||
// RemoteFundingKey is the public key for the remote channel counter
|
||||
// party which used for the 2-of-2 funding output which created this
|
||||
// channel.
|
||||
RemoteFundingKey *btcec.PublicKey
|
||||
|
||||
started int32
|
||||
shutdown int32
|
||||
|
||||
@ -468,6 +477,8 @@ func NewLightningChannel(signer Signer, bio BlockChainIO,
|
||||
ForceCloseSignal: make(chan struct{}),
|
||||
UnilateralCloseSignal: make(chan struct{}),
|
||||
ContractBreach: make(chan *BreachRetribution, 1),
|
||||
LocalFundingKey: state.OurMultiSigKey,
|
||||
RemoteFundingKey: state.TheirMultiSigKey,
|
||||
}
|
||||
|
||||
// Initialize both of our chains the current un-revoked commitment for
|
||||
|
Loading…
Reference in New Issue
Block a user