mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-22 14:22:39 +01:00
cleaner isSentByLocal
Co-Authored-By: pm47 <pm47@users.noreply.github.com>
This commit is contained in:
parent
14da6d3c23
commit
9624383f22
1 changed files with 4 additions and 1 deletions
|
@ -810,7 +810,10 @@ object Helpers {
|
|||
* @param originChannels
|
||||
* @return
|
||||
*/
|
||||
def isSentByLocal(htlcId: Long, originChannels: Map[Long, Origin]) = (originChannels.get(htlcId) collect { case l: Local => l }).isDefined
|
||||
def isSentByLocal(htlcId: Long, originChannels: Map[Long, Origin]) = originChannels.get(htlcId) match {
|
||||
case Some(Local(_)) => true
|
||||
case _ => false
|
||||
}
|
||||
|
||||
/**
|
||||
* As soon as a local or remote commitment reaches min_depth, we know which htlcs will be settled on-chain (whether
|
||||
|
|
Loading…
Add table
Reference in a new issue