Renames PoW Parser to open space for the PoW creator
This commit is contained in:
@@ -22,7 +22,7 @@ package com.vitorpamplona.quartz.nip13Pow
|
||||
|
||||
import com.vitorpamplona.quartz.nip01Core.core.Event
|
||||
|
||||
fun Event.pow() = PoWRankProcessor.compute(id, tags.commitedPoW())
|
||||
fun Event.pow() = PoWRankParser.compute(id, tags.commitedPoW())
|
||||
|
||||
fun Event.hasPoWTag() = tags.hasPoW()
|
||||
|
||||
@@ -34,7 +34,7 @@ fun Event.hasPoWTag() = tags.hasPoW()
|
||||
fun Event.strongPoWOrNull(min: Int = 20): Int? {
|
||||
val commitment = tags.commitedPoW()
|
||||
if (commitment != null) {
|
||||
val pow = PoWRankProcessor.compute(id, commitment)
|
||||
val pow = PoWRankParser.compute(id, commitment)
|
||||
if (pow >= min) {
|
||||
return pow
|
||||
}
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ package com.vitorpamplona.quartz.nip13Pow
|
||||
|
||||
import com.vitorpamplona.quartz.nip01Core.HexKey
|
||||
|
||||
class PoWRankProcessor {
|
||||
class PoWRankParser {
|
||||
companion object {
|
||||
@JvmStatic
|
||||
fun compute(
|
||||
Reference in New Issue
Block a user