fixed nonce tag. sent event to multiple relays.

This commit is contained in:
Vishal 2022-08-31 04:24:37 +05:30
parent 6eb1587c4a
commit 20f5295e54
2 changed files with 3 additions and 3 deletions

View File

@ -55,7 +55,7 @@ Future<void> sendReplyPostLike(Tree node, String replyToId, String replyKind, St
int numShaDone = 0;
for( numShaDone = 0; numShaDone < 100000000; numShaDone++) {
vanityTag = strTags + ',["nonce","$numShaDone"]';
vanityTag = strTags + ',["nonce","$numShaDone","$gDifficulty"]';
id = getShaId(userPublicKey, createdAt, replyKind, vanityTag, content);
if( id.substring(0, numBytes) == zeroString) {
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"}]';
//print("in send event: calling sendrequiest");
relays.sendRequest(defaultServerUrl, toSendMessage);
sendRequest(gListRelayUrls, toSendMessage);
}

View File

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