Commit 1b7f4888 authored by duanjinfei's avatar duanjinfei

broadcast tx arr goroutine

parent f6befab1
......@@ -36,20 +36,22 @@ func startTest() {
log.Errorf("Bath Send Tran error: %s", err)
return
}
go func() {
if err := transaction.InitBroadcastTxGoroutine(cfg); err != nil {
log.Errorf("Init broadcast tx goroutine error: %s", err)
}
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)
if err := transaction.InitBroadcastTxGoroutine(cfg); err != nil {
log.Errorf("Init broadcast tx goroutine error: %s", err)
}
for i := 0; i < 2; i++ {
go func() {
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)
}
}
}
}
}()
}()
}
for {
log.Info("----------------------------------start")
//arr := transaction.SignedTxArr(syncMap, SendTxAccountArr, cfg)
......
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