iotaledger / goshimmer

Prototype implementation of IOTA 2.0
https://wiki.iota.org/goshimmer/welcome
Apache License 2.0
389 stars 114 forks source link

Spammer API: TPS parameter not working #57

Closed ghost closed 4 years ago

ghost commented 4 years ago

Currently, calling the spammer with a specific TPS parameter is not working: the spammer keeps sending 1000 TPS even if i call:

curl localhost:8080/spammer?cmd=start&tps=5

It looks that request.Tps is always read as equal to ZERO, even if a tps=20 parameters is sent through the GET request. Probably, the convertion from STRING to INT of the TPS parameter in the GET request is missing (or not working?).

image

I did a test in order to see what happens if i attach a word instead of a number to the TPS parameter: curl localhost:8080/spammer?cmd=start&tps=test

The node start spamming with 1000 TPS.

ghost commented 4 years ago

Wrapping the curl call into single quotes, the spammer correctly receive the TPS parameter: curl 'my-iota-node.com:8080/spammer?cmd=start&tps=10'

image

Wollac commented 4 years ago

:ok_hand: