Commit 9fee0495 authored by duanjinfei's avatar duanjinfei

change continued send tx

parent 1c343e93
......@@ -22,7 +22,7 @@ func init() {
startCmd.PersistentFlags().StringVar(&cpuProfile, "cpuProfile", "cpuProfile.prof", "Statistics cpu profile")
startCmd.PersistentFlags().IntVar(&startCount, "startCount", 0, "read excel start count")
startCmd.PersistentFlags().IntVar(&endCount, "endCount", 100, "read excel end count")
startCmd.PersistentFlags().BoolVar(&broadcastTxArr, "broadcastTxArr", true, "test grpc interface -> broadcastTxArr")
startCmd.PersistentFlags().BoolVar(&broadcastTxArr, "broadcastTxArr", false, "test grpc interface -> broadcastTxArr")
startCmd.PersistentFlags().IntVar(&txCount, "txCount", 1000, "send tran count")
startCmd.PersistentFlags().IntVar(&goRoutineCount, "goRoutineCount", 10, "send tran goRoutine count")
startCmd.PersistentFlags().IntVar(&batchCount, "batchCount", 100, "batch send tran count")
......
......@@ -21,7 +21,7 @@ func init() {
return
}
cfg.StorageAccFileName += ".xlsx"
tranArrChan = make(chan []*types.Transaction, 1000000000)
tranArrChan = make(chan []*types.Transaction, 10000)
}
func startTest() {
......@@ -47,9 +47,12 @@ func startTest() {
}
}()
for {
log.Info("----------------------------------start")
arr := transaction.SignedTxArr(syncMap, SendTxAccountArr, cfg)
log.Info("----------------------------------end")
tranArrChan <- arr
syncMap = updateNonce(syncMap, cfg)
}
}
}
......
......@@ -109,7 +109,7 @@ func InitAccNonce(sendTxAccountArr [][]string, cfg *tool.Config) (error, sync.Ma
nonceReq := &ring.NonceRequest{
Address: (*metatypes.Address)(fromAddr.Bytes()),
}
ctx, cancel := context.WithTimeout(context.Background(), time.Second*10)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*20)
defer cancel()
response, err := serviceClient.Nonce(ctx, nonceReq)
if err != nil {
......
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