mirror of
https://github.com/fiatjaf/nak.git
synced 2025-08-31 22:10:47 -04:00
--pow: parallel work.
This commit is contained in:
6
event.go
6
event.go
@@ -269,8 +269,10 @@ example:
|
||||
evt.PubKey, _ = nostr.GetPublicKey(sec)
|
||||
}
|
||||
|
||||
// try to generate work with this difficulty -- essentially forever
|
||||
nip13.Generate(&evt, int(difficulty), time.Hour*24*365)
|
||||
// try to generate work with this difficulty -- runs forever
|
||||
nonceTag, _ := nip13.DoWork(ctx, evt, int(difficulty))
|
||||
evt.Tags = append(evt.Tags, nonceTag)
|
||||
|
||||
mustRehashAndResign = true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user