Skip to content

Commit

Permalink
tx burst
Browse files Browse the repository at this point in the history
  • Loading branch information
qpwedev committed Dec 11, 2023
1 parent afb44b9 commit 8ff6583
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,18 @@ func main() {
}

// Repeat sending transactions txAmount times.
for txAmount > 0 && txAmount != 0 {
log.Println("Sending transaction")
if err := sendMessage(w, api, client); err != nil {
log.Println("Error sending messages:", err.Error())
for {
for i := 0; i < 50; i++ {
go func() {
log.Println("Sending transaction")
if err := sendMessage(w, api, client); err != nil {
log.Println("Error sending messages:", err.Error())
}
log.Println("Sent", txAmount, "transactions")
txAmount -= 1
}()
}

log.Println("Sent", txAmount, "transactions")
txAmount -= 1
time.Sleep(4 * time.Second)
}

}
Expand Down

1 comment on commit 8ff6583

@eliasdiek
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qpwedev hey ,I'm looking for someone with your stack to work on our platform ,either as a freelancer or in a full time role . are you up for it ? contact me on telegram @eliasdiek or via email at [email protected]

Please sign in to comment.