diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-11-30 19:07:56 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:19 +0800 |
commit | 3088974300d177d9e5324359801f4373c24cc9d9 (patch) | |
tree | 1b1d7d64e044320e38e1be2a38bab886686c265b /cmd/monkey/monkey.go | |
parent | 8cb40bd72ed4b8d3016c22a5edfb8d5779cba4da (diff) | |
download | go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar.gz go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar.bz2 go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar.lz go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar.xz go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.tar.zst go-tangerine-3088974300d177d9e5324359801f4373c24cc9d9.zip |
monkey: increase amount and send random amount (#70)
Diffstat (limited to 'cmd/monkey/monkey.go')
-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, } |