added two more relays, reduced call for default pubkeys

This commit is contained in:
Vishal 2022-12-24 12:06:44 +05:30
parent 05f884e2fb
commit f913f97ed8
4 changed files with 12 additions and 8 deletions

View File

@ -316,8 +316,8 @@ Future<void> main(List<String> arguments) async {
}
// get default users; remove user from default list if user exists in it. because theyv'e already been fetched.
getMultiUserEvents(gListRelayUrls2, gDefaultFollows.difference({userPublicKey}), 4 * limitPerSubscription, getSecondsDaysAgo(limitOthersEvents));
Set<String> usersFetched = gDefaultFollows.union({userPublicKey});
//getMultiUserEvents(gListRelayUrls1, gDefaultFollows.difference({userPublicKey}), 4 * limitPerSubscription, getSecondsDaysAgo(limitOthersEvents));
Set<String> usersFetched = {userPublicKey};
stdout.write('Waiting for user posts to come in.....');
Future.delayed( Duration(milliseconds: gDefaultNumWaitSeconds), () {
@ -335,7 +335,10 @@ Future<void> main(List<String> arguments) async {
// get events from channels of user; gets public as well as encrypted channels
Set<String> userChannels = getUserChannels(initialEvents, userPublicKey);
//printSet(userChannels, "user channels: \n", "\n");
getIdAndMentionEvents(gListRelayUrls2, userChannels, limitPerSubscription, 0, getSecondsDaysAgo(limitOthersEvents), "#e", "ids");
//getIdAndMentionEvents(gListRelayUrls2, userChannels, limitPerSubscription, 0, getSecondsDaysAgo(limitOthersEvents), "#e", "ids");
getKindEvents([40, 41], gListRelayUrls1, limitPerSubscription, getSecondsDaysAgo(limitSelfEvents));
getKindEvents([42], gListRelayUrls1, 3 * limitPerSubscription, getSecondsDaysAgo(limitOthersEvents));
initialEvents.forEach((e) => processKind3Event(e)); // first process the kind 3 event ; basically populate the global structure that holds this info
@ -370,8 +373,8 @@ Future<void> main(List<String> arguments) async {
contacts.retainWhere((element) => i++ > maxContactsFetched); // retain only first 200, whichever they may be
}
getMultiUserEvents(gListRelayUrls1, contacts.union(pTags).difference(usersFetched), 4 * limitPerSubscription, getSecondsDaysAgo(limitOthersEvents));
usersFetched = usersFetched.union(contacts).union(pTags);
getMultiUserEvents(gListRelayUrls1, contacts.union(gDefaultFollows).union(pTags).difference(usersFetched), 4 * limitPerSubscription, getSecondsDaysAgo(limitOthersEvents));
usersFetched = usersFetched.union(gDefaultFollows).union(contacts).union(pTags);
// get meta events of all users fetched
getMultiUserEvents(gListRelayUrls1, usersFetched, 4 * limitPerSubscription, getSecondsDaysAgo(limitSelfEvents*2), {0,3});

View File

@ -588,7 +588,7 @@ Future<void> otherOptionsMenuUi(Store node) async {
//print("Total number of kind-1 posts: ${node.count()}");
print("\nEvent distribution by event kind:\n");
node.printEventInfo();
node.printEventInfo();
print("\nTotal number of all events: ${node.allChildEventsMap.length}");
print("\nTotal events translated for $gNumTranslateDays days: $numEventsTranslated");

View File

@ -58,7 +58,8 @@ Set<String> gListRelayUrls1 = { defaultServerUrl,
"wss://nostr.semisol.dev",
"wss://nostr.coinos.io",
"wss://nostr-relay.digitalmob.ro",
"wss://nostr.drss.io"
"wss://nostr.drss.io",
"wss://nostr.radixrat.com"
};

View File

@ -6,7 +6,7 @@ homepage: https://github.com/vishalxl/nostr_console
#0.2.9
# improved fetching logic
# added more relays
# added more relays