fix some pubkeys that were strings still.

This commit is contained in:
fiatjaf
2025-04-17 00:54:50 -03:00
parent 0130725321
commit 1c56906506
4 changed files with 7 additions and 11 deletions

View File

@@ -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) {

View File

@@ -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
}