fix some pubkeys that were strings still.
This commit is contained in:
@@ -153,7 +153,7 @@ func (lh *LMDBHints) PrintScores() {
|
||||
}
|
||||
defer cursor.Close()
|
||||
|
||||
var lastPubkey string
|
||||
var lastPubkey nostr.PubKey
|
||||
i := 0
|
||||
|
||||
for k, v, err := cursor.Get(nil, nil, lmdb.First); err == nil; k, v, err = cursor.Get(nil, nil, lmdb.Next) {
|
||||
|
||||
@@ -2,7 +2,6 @@ package lmdbh
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"encoding/hex"
|
||||
|
||||
"fiatjaf.com/nostr"
|
||||
)
|
||||
@@ -14,8 +13,8 @@ func encodeKey(pubhintkey nostr.PubKey, relay string) []byte {
|
||||
return k
|
||||
}
|
||||
|
||||
func parseKey(k []byte) (pubkey string, relay string) {
|
||||
pubkey = hex.EncodeToString(k[0:32])
|
||||
func parseKey(k []byte) (pubkey nostr.PubKey, relay string) {
|
||||
pubkey = nostr.PubKey(k[0:32])
|
||||
relay = string(k[32:])
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user