Revert "nip13: crazier and more fun and hopefully slightly more performant nonce encoding."

This reverts commit edbbd6df44.
This commit is contained in:
fiatjaf
2024-08-20 17:05:49 -03:00
parent edbbd6df44
commit 2da58356b0
3 changed files with 3 additions and 28 deletions

View File

@@ -80,7 +80,7 @@ func Generate(event *nostr.Event, targetDifficulty int, timeout time.Duration) (
start := time.Now()
for {
nonce++
tag[1] = uintToStringCrazy(nonce)
tag[1] = strconv.FormatUint(nonce, 10)
if Difficulty(event.GetID()) >= targetDifficulty {
return event, nil
}