mirror of https://github.com/BTCPrivate/lnd.git
lnwallet: add new IsPending method to the channel state machine
The IsPending method will allow callers to determine if a channel has been fully confirmed or not.
This commit is contained in:
parent
7960b5240f
commit
d6dcc4276c
|
@ -5115,3 +5115,12 @@ func (lc *LightningChannel) CommitFeeRate() btcutil.Amount {
|
|||
|
||||
return lc.channelState.LocalCommitment.FeePerKw
|
||||
}
|
||||
|
||||
// IsPending returns true if the channel's funding transaction has been fully
|
||||
// confirmed, and false otherwise.
|
||||
func (lc *LightningChannel) IsPending() bool {
|
||||
lc.RLock()
|
||||
defer lc.RUnlock()
|
||||
|
||||
return lc.channelState.IsPending
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue