Commit 12010def authored by duanjinfei's avatar duanjinfei

change continued send tx

parent 3665d079
......@@ -6,6 +6,7 @@ import (
"ChainGrpcTest/transaction"
"github.com/ethereum/go-ethereum/core/types"
"sync"
"time"
)
var (
......@@ -40,6 +41,7 @@ func startTest() {
for {
select {
case arr := <-tranArrChan:
log.Info("-----into tranArrChan-----")
if err := transaction.BroadcastTxArr(arr, cfg); err != nil {
log.Errorf("Bath Send Tran error: %s", err)
}
......@@ -52,7 +54,7 @@ func startTest() {
log.Info("----------------------------------end")
tranArrChan <- arr
syncMap = updateNonce(syncMap, cfg)
time.Sleep(time.Second * 5)
}
}
}
......@@ -69,7 +71,6 @@ func updateNonce(nonceMap sync.Map, cfg *tool.Config) sync.Map {
if !ok {
return false
}
log.Info("updated addr nonce:", load)
return true
})
return newNonceMap
......
......@@ -64,6 +64,7 @@ func BroadcastTxArr(tranArr []*types.Transaction, cfg *tool.Config) error {
log.Infof("Send tran count: %d", bathHandleSendCount)
log.Infof("Since time: %d ms", time.Since(startTime).Milliseconds())
log.Infof("Send tran total time: %d ms", totalSendTime)
bathHandleSendCount = 0
break
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment