1
0
Fork 0
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:
araspitzu 2019-03-29 18:14:32 +01:00 committed by GitHub
parent 14da6d3c23
commit 9624383f22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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