diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-30 19:07:56 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2018-12-19 20:54:27 +0800 |
commit | 1bf10f4d7b8d7a45ee8de86155c5157ef12cadfb (patch) | |
tree | d5fc6c890fd9303003246cff5cf3aa4eeb0b5e8e | |
parent | 842d05e1b76ea1c358c2a53439eef7ecf1083bed (diff) | |
download | dexon-1bf10f4d7b8d7a45ee8de86155c5157ef12cadfb.tar.gz dexon-1bf10f4d7b8d7a45ee8de86155c5157ef12cadfb.tar.zst dexon-1bf10f4d7b8d7a45ee8de86155c5157ef12cadfb.zip |
monkey: increase amount and send random amount (#70)
-rw-r--r-- | cmd/monkey/monkey.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/monkey/monkey.go b/cmd/monkey/monkey.go index b312ea473..e7e5a53c9 100644 --- a/cmd/monkey/monkey.go +++ b/cmd/monkey/monkey.go @@ -216,7 +216,7 @@ func (m *Monkey) Distribute() { for i, key := range m.keys { address := crypto.PubkeyToAddress(key.PublicKey) amount := new(big.Int) - amount.SetString("1000000000000000000", 10) + amount.SetString("1000000000000000000000", 10) ctxs[i] = &transferContext{ Key: m.source, ToAddress: address, @@ -237,10 +237,12 @@ func (m *Monkey) Crazy() { ctxs := make([]*transferContext, len(m.keys)) for i, key := range m.keys { to := crypto.PubkeyToAddress(m.keys[rand.Int()%len(m.keys)].PublicKey) + amount := new(big.Int) + amount.SetString(fmt.Sprintf("%d000000000000000", rand.Intn(10)+1), 10) ctx := &transferContext{ Key: key, ToAddress: to, - Amount: big.NewInt(1), + Amount: amount, Nonce: nonce, Gas: 21000, } |