mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-18 14:54:24 +01:00
fix slice creation.
This commit is contained in:
2
nostr.go
2
nostr.go
@@ -154,7 +154,7 @@ func getLastNotes(ctx context.Context, code string) []*nostr.Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func relaysForPubkey(ctx context.Context, pubkey string, extraRelays ...string) []string {
|
func relaysForPubkey(ctx context.Context, pubkey string, extraRelays ...string) []string {
|
||||||
pubkeyRelays := make([]string, 12)
|
pubkeyRelays := make([]string, 0, 12)
|
||||||
if ok := cache.GetJSON("io:"+pubkey, &pubkeyRelays); !ok {
|
if ok := cache.GetJSON("io:"+pubkey, &pubkeyRelays); !ok {
|
||||||
ctx, cancel := context.WithTimeout(ctx, time.Millisecond*1500)
|
ctx, cancel := context.WithTimeout(ctx, time.Millisecond*1500)
|
||||||
for _, relay := range sdk.FetchRelaysForPubkey(ctx, pool, pubkey, extraRelays...) {
|
for _, relay := range sdk.FetchRelaysForPubkey(ctx, pool, pubkey, extraRelays...) {
|
||||||
|
|||||||
Reference in New Issue
Block a user