Skip to content

Commit

Permalink
changed relays. added udpate and 300 ms delay in menu 2,1. improved s…
Browse files Browse the repository at this point in the history
…cripts.
  • Loading branch information
vishalxl committed Sep 29, 2024
1 parent 67c3c99 commit cf3ef9f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
7 changes: 6 additions & 1 deletion lib/console_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1351,10 +1351,13 @@ Future<void> socialMenuUi(Store node) async {
while(socialMenuContinue) {

if( !firstTime) {
//stdout.write("calling paie");
await processAnyIncomingEvents(node); // this takes 300 ms
firstTime = false;
//stdout.write("returned from paie");
}

firstTime = false;

// the main menu
int option = showMenu([
'Your Feed', // 1
Expand All @@ -1374,7 +1377,9 @@ Future<void> socialMenuUi(Store node) async {
case 1:
bool selectorTrees_followActionsNoNotifications (Tree t) => t.treeSelectorUserPostAndLike(getFollows( userPublicKey).union(gDefaultFollows).union({userPublicKey}), enableNotifications: false);
node.printStoreTrees(0, DateTime.now().subtract(Duration(hours:gHoursDefaultPrint)), selectorTrees_followActionsNoNotifications, true);

await processAnyIncomingEvents(node, true);

break;

case 2:
Expand Down
9 changes: 5 additions & 4 deletions lib/settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ int gHoursDefaultPrint = 6; // print latest given hours only
int numFileEvents = 0, numFilePosts = 0, numUserPosts = 0, numFeedPosts = 0, numOtherPosts = 0;


// edited on 17 march 2024
// edited on 29 sept 2024
String defaultServerUrl = "wss://relay.damus.io";
Set<String> gListRelayUrls = { defaultServerUrl,
"wss://nostr-01.bolt.observer",
"wss://nostr.wine",
"wss://relay2.nostrchat.io",
"wss://nostr.swiss-enigma.ch"
"wss://relay.nostr.info",
"wss://nos.lol",
"wss://relay.nostr.band"
};


// well known disposable test private key
const String gDefaultPublicKey = "";
String userPrivateKey = "";
Expand Down
4 changes: 2 additions & 2 deletions scripts/announce.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
# echo '\n' ; for line in `cowsay hi` ; do echo -e "${line}\\\n" ; done

IFS=$'\n'
channel=test99
channel=25e5c
# { echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 --prikey=`openssl rand -hex 32`


# \n\n.____ \n< hi > \n ---- \n \\\n ^__^ \n (oo)_______ \n (__) )/ \n ||----w | \n || || \n
message=""
message=$message'\n' ; for line in `cowsay hi` ; do message=$message"${line} \n" ; done
echo $message
{ echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | ./nostr_console --prikey=`openssl rand -hex 32`
{ echo -e "3\n1\n${channel}\nHello, this is a random test.\nx\nx\nx" ; cat /dev/stdin; } | dart run ../bin/nostr_console.dart --prikey=`openssl rand -hex 32`
13 changes: 8 additions & 5 deletions scripts/gotoChannel.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash

# tested on Linux/Ubuntu
# will go to the channel mentioned in this variable; change it to go to that channel
# arguments passed to this script are passed to the nostr_console
# * tested on Linux/Ubuntu
# * will go to the channel mentioned in this variable; change it to go to that channel
# * arguments passed to this script are passed to the nostr_console

channel=52ca
{ echo -e "3\n1\n${channel}" ; cat /dev/stdin; } | ./nostr_console_ubuntu_x64 $@

#channel=52ca nostr console channel

channel=25e5c # nostr channel
{ echo -e "3\n1\n${channel}" ; cat /dev/stdin; } | dart run ../bin/nostr_console.dart $@

18 changes: 9 additions & 9 deletions scripts/relay_list_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ nostr_relays=(
"wss://nostr.zebedee.cloud"
"wss://nostr.coinos.io"
"wss://nostr-01.bolt.observer"
#"wss://nostr.openchain.fr"

"wss://nostr-relay.wlvs.space"
"wss://nostr-relay-dev.wlvs.space"

"wss://nostr-pub.wellorder.net"
"wss://nos.lol"
"wss://nostr-relay-dev.wlvs.space"
#"wss://nostr.shawnyeager.net"
#"wss://relay.nostr.info"


"wss://nostr.semisol.dev"
"wss://relay.nostr.info"

Expand Down Expand Up @@ -55,8 +55,6 @@ nostr_relays=(
"wss://nostr.onsats.org"
"wss://nostr-relay.digitalmob.ro"

"wss://offchain.pub"

"wss://relay.valireum.net"
"wss://nostr-relay.trustbtc.org"
"wss://relay.stoner.com"
Expand All @@ -73,12 +71,14 @@ nostr_relays=(

"wss://brb.io"

"wss://dummyurl.example.com"

)
"wss://dummyurl.example.com")



# reference
# nostr.info
# https://nostr.watch/relays/find

#"wss://nostr.openchain.fr"
#"wss://nostr.shawnyeager.net"
#"wss://relay.nostr.info"
7 changes: 3 additions & 4 deletions scripts/test_servers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ source $configfile
limit=300
numHours=1

echo -e "Requesting all events in last $numHours hours with a limit of $limit by executing the following command for each:"
#echo -e "Requesting all events in last $numHours hours with a limit of $limit by executing the following command for each:"
sinceSeconds=`date -d "-$numHours hour" +%s` ;

N=2
inLastNDays=`date -d "$N days" +%s`

#N=2
#inLastNDays=`date -d "$N days" +%s`
#echo "Events in last $N days"
#req="[\"REQ\",\"id_mention_#p_nostr.coinos.io\",{\"#p\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"],\"limit\":20000,\"since\":$inLastNDays},{\"authors\":[\"82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2\"]}]"

Expand Down

0 comments on commit cf3ef9f

Please sign in to comment.