aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-11-26 10:00:31 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:18 +0800
commitafc6a417210dc43a5a38ece5302de6801785316f (patch)
treebdf34181a628038f935e161433fe1b612a5b3bae /cmd
parent82d138debeac23029d3640ee7bc31c4ed093ff28 (diff)
downloadgo-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar.gz
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar.bz2
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar.lz
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar.xz
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.tar.zst
go-tangerine-afc6a417210dc43a5a38ece5302de6801785316f.zip
core: various changes on tps tuning (#46)
Diffstat (limited to 'cmd')
-rw-r--r--cmd/monkey/monkey.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/monkey/monkey.go b/cmd/monkey/monkey.go
index f55d195a6..b312ea473 100644
--- a/cmd/monkey/monkey.go
+++ b/cmd/monkey/monkey.go
@@ -128,7 +128,6 @@ func (m *Monkey) prepareTx(ctx *transferContext) *types.Transaction {
func (m *Monkey) transfer(ctx *transferContext) {
tx := m.prepareTx(ctx)
- fmt.Println("Sending TX", "fullhash", tx.Hash().String())
err := m.client.SendTransaction(context.Background(), tx)
if err != nil {
panic(err)
@@ -139,7 +138,6 @@ func (m *Monkey) batchTransfer(ctxs []*transferContext) {
txs := make([]*types.Transaction, len(ctxs))
for i, ctx := range ctxs {
txs[i] = m.prepareTx(ctx)
- fmt.Println("Sending TX", "fullhash", txs[i].Hash().String())
}
err := m.client.SendTransactions(context.Background(), txs)
@@ -236,7 +234,6 @@ func (m *Monkey) Crazy() {
fmt.Println("Performing random transfers ...")
nonce := uint64(0)
for {
- fmt.Println("nonce", nonce)
ctxs := make([]*transferContext, len(m.keys))
for i, key := range m.keys {
to := crypto.PubkeyToAddress(m.keys[rand.Int()%len(m.keys)].PublicKey)
@@ -256,6 +253,8 @@ func (m *Monkey) Crazy() {
if *batch {
m.batchTransfer(ctxs)
}
+ fmt.Printf("Sent %d transactions, nonce = %d\n", len(m.keys), nonce)
+
nonce += 1
time.Sleep(time.Duration(*sleep) * time.Millisecond)
}