-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: Spammer #2821
base: rlnv2-only
Are you sure you want to change the base?
test: Spammer #2821
Conversation
You can find the image built from this PR at
Built from e3b260a |
You can find the image built from this PR at
Built from e3b260a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not to be merged but lgtm thanks. very useful for testing.
var i: uint64 = 0 | ||
var start = getTime().toUnixFloat() | ||
|
||
while i < conf.rlnRelayUserMessageLimit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe i
not needed?
and here
for i in conf.rlnRelayUserMessageLimit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not how Nim works:-P There is a function I could use to turn the msg limit into iterator, but I am not sure it is worth searching for it:D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah my bad. gues for i in 0..<conf.rlnRelayUserMessageLimit
no big deal tho
apps/wakunode2/spammer.nim
Outdated
error "RLN not configured!" | ||
quit(QuitFailure) | ||
|
||
var gotPeers = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gotPeers not needed?
while true:
if xx:
break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough:) fixed:)
2a3769d
to
ff3f8bb
Compare
You can find the image built from this PR at
Built from 33c52f6 |
@vpavlin - what is the outstanding point of this one? |
Description
This adds a simple async loop which publishes a message in a given interval.
It is based on #2759 and attempts to make minimal changes.
Changes