mirror of
https://github.com/vishalxl/nostr_console.git
synced 2025-06-06 04:59:45 +02:00
fixed nonce tag. sent event to multiple relays.
This commit is contained in:
parent
6eb1587c4a
commit
20f5295e54
@ -55,7 +55,7 @@ Future<void> sendReplyPostLike(Tree node, String replyToId, String replyKind, St
|
|||||||
|
|
||||||
int numShaDone = 0;
|
int numShaDone = 0;
|
||||||
for( numShaDone = 0; numShaDone < 100000000; numShaDone++) {
|
for( numShaDone = 0; numShaDone < 100000000; numShaDone++) {
|
||||||
vanityTag = strTags + ',["nonce","$numShaDone"]';
|
vanityTag = strTags + ',["nonce","$numShaDone","$gDifficulty"]';
|
||||||
id = getShaId(userPublicKey, createdAt, replyKind, vanityTag, content);
|
id = getShaId(userPublicKey, createdAt, replyKind, vanityTag, content);
|
||||||
if( id.substring(0, numBytes) == zeroString) {
|
if( id.substring(0, numBytes) == zeroString) {
|
||||||
break;
|
break;
|
||||||
@ -121,7 +121,7 @@ Future<void> sendEvent(Tree node, Event e) async {
|
|||||||
|
|
||||||
String toSendMessage = '["EVENT",{"id":"$id","pubkey":"$userPublicKey","created_at":$createdAt,"kind":${e.eventData.kind.toString()},"tags":[$strTags],"content":"$content","sig":"$sig"}]';
|
String toSendMessage = '["EVENT",{"id":"$id","pubkey":"$userPublicKey","created_at":$createdAt,"kind":${e.eventData.kind.toString()},"tags":[$strTags],"content":"$content","sig":"$sig"}]';
|
||||||
//print("in send event: calling sendrequiest");
|
//print("in send event: calling sendrequiest");
|
||||||
relays.sendRequest(defaultServerUrl, toSendMessage);
|
sendRequest(gListRelayUrls, toSendMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ class Relays {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if(gDebug > 0) log.info('\nSending request: \n$request\n to $relay\n\n');
|
if(gDebug > 0) log.info('Sending request: \n$request\n to $relay\n\n');
|
||||||
fws?.sink.add(request);
|
fws?.sink.add(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user