aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zoo/main.go
diff options
context:
space:
mode:
authorbojie <bojie@dexon.org>2019-01-18 19:30:23 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:56 +0800
commit5f47911fd3f9f98c69fc585bce64d27f924c90df (patch)
tree42ba6a106d2058f35276452350a0c4fa38eb2c2e /cmd/zoo/main.go
parente095c638a46b467a1487a6f236ec7dd86555f424 (diff)
downloaddexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar.gz
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar.bz2
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar.lz
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar.xz
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.tar.zst
dexon-5f47911fd3f9f98c69fc585bce64d27f924c90df.zip
travis: add new CI test to test fullnode (#138)
Diffstat (limited to 'cmd/zoo/main.go')
-rw-r--r--cmd/zoo/main.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/cmd/zoo/main.go b/cmd/zoo/main.go
new file mode 100644
index 000000000..195d5737c
--- /dev/null
+++ b/cmd/zoo/main.go
@@ -0,0 +1,32 @@
+package main
+
+import (
+ "flag"
+
+ "github.com/dexon-foundation/dexon/cmd/zoo/monkey"
+)
+
+var key = flag.String("key", "", "private key path")
+var endpoint = flag.String("endpoint", "http://127.0.0.1:8545", "JSON RPC endpoint")
+var n = flag.Int("n", 100, "number of random accounts")
+var gambler = flag.Bool("gambler", false, "make this monkey a gambler")
+var batch = flag.Bool("batch", false, "monkeys will send transaction in batch")
+var sleep = flag.Int("sleep", 500, "time in millisecond that monkeys sleep between each transaction")
+var feeder = flag.Bool("feeder", false, "make this monkey a feeder")
+var timeout = flag.Int("timeout", 0, "execution time limit after start")
+
+func main() {
+ flag.Parse()
+
+ monkey.Init(&monkey.MonkeyConfig{
+ Key: *key,
+ Endpoint: *endpoint,
+ N: *n,
+ Gambler: *gambler,
+ Feeder: *feeder,
+ Batch: *batch,
+ Sleep: *sleep,
+ Timeout: *timeout,
+ })
+ monkey.Exec()
+}