calculate proof of work on events

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-04-11 11:32:30 -07:00
parent 1f046ac021
commit e0059388e8
4 changed files with 101 additions and 0 deletions
+1
View File
@@ -25,6 +25,7 @@ enum NostrResponse: Decodable {
print(error)
throw error
}
ev.pow = count_hash_leading_zero_bits(ev.id)
self = .event(sub_id, ev)
return
} else if typ == "NOTICE" {