Commit 2d879010 authored by duanjinfei's avatar duanjinfei

fix get fromAddr

parent 932ffbff
......@@ -27,7 +27,7 @@ func init() {
func startTest() {
if broadcastTxArr {
SendTxAccountArr = tool.ReadExcelOfStartEnd(startCount, endCount, cfg.StorageAccFileName)
log.Infof("Program start initAccCount:%d tranCount", cfg.Count)
log.Infof("Program start initAccCount:%d tranCount", len(SendTxAccountArr))
cfg.GoRoutineCount = goRoutineCount
cfg.SignCount = txCount / 100
cfg.BatchCount = batchCount
......
......@@ -111,7 +111,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*20)
ctx, cancel := context.WithTimeout(context.Background(), time.Second*30)
defer cancel()
response, err := serviceClient.Nonce(ctx, nonceReq)
if err != nil {
......@@ -236,7 +236,7 @@ func NoSignTxArr(syncMap sync.Map, sendTxAccountArr [][]string, cfg *tool.Config
Data: nil,
}
newtx := types.NewTx(&txData)
txcache.Add(common.HexToHash(fromAddr+string(signCount)).Hex(), fromAddr)
txcache.Add(fromAddr+string(signCount), fromAddr)
signTranArr.TranArr = append(signTranArr.TranArr, newtx)
nonce = big.NewInt(1).Add(nonce, big.NewInt(1))
}
......
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