Speeding up the loop through local cache.

This commit is contained in:
Vitor Pamplona
2024-02-26 20:51:59 -05:00
parent 8ebad524ff
commit 11ff0736e4
22 changed files with 122 additions and 86 deletions
@@ -33,11 +33,14 @@ class Lud06 {
val url = toLnUrlp(str)
val matcher = LNURLP_PATTERN.matcher(url)
matcher.find()
val domain = matcher.group(2)
val username = matcher.group(3)
if (matcher.find()) {
val domain = matcher.group(2)
val username = matcher.group(3)
"$username@$domain"
"$username@$domain"
} else {
null
}
} catch (t: Throwable) {
t.printStackTrace()
Log.w("Lud06ToLud16", "Fail to convert LUD06 to LUD16", t)
@@ -207,6 +207,8 @@ open class Event(
override fun isExpired() = (expiration() ?: Long.MAX_VALUE) < TimeUtils.now()
override fun isExpirationBefore(time: Long) = (expiration() ?: Long.MAX_VALUE) < time
override fun getTagOfAddressableKind(kind: Int): ATag? {
val kindStr = kind.toString()
val aTag =
@@ -137,5 +137,7 @@ interface EventInterface {
fun isExpired(): Boolean
fun isExpirationBefore(time: Long): Boolean
fun hasZapSplitSetup(): Boolean
}