Merge pull request #8968 from ProofOfKeags/opening-party
[MICRO]: channeldb+lnwallet: add OpeningParty API
This commit is contained in:
2 files changed
+20
No files matched your search
@@ -899,6 +899,18 @@ func (c *OpenChannel) String() string {
|
||||
)
|
||||
}
|
||||
|
||||
// Initiator returns the ChannelParty that originally opened this channel.
|
||||
func (c *OpenChannel) Initiator() lntypes.ChannelParty {
|
||||
c.RLock()
|
||||
defer c.RUnlock()
|
||||
|
||||
if c.IsInitiator {
|
||||
return lntypes.Local
|
||||
}
|
||||
|
||||
return lntypes.Remote
|
||||
}
|
||||
|
||||
// ShortChanID returns the current ShortChannelID of this channel.
|
||||
func (c *OpenChannel) ShortChanID() lnwire.ShortChannelID {
|
||||
c.RLock()
|
||||
|
||||
Reference in new issue
Block a user