parallel parsing
This commit is contained in:
@@ -75,7 +75,7 @@ func main() {
|
||||
<-exitSignal
|
||||
cancel()
|
||||
}()
|
||||
|
||||
shrederClient.EnableClientStats = true
|
||||
// async read from shreder
|
||||
txCh := make(chan shreder.TxSignalBatch, 1000)
|
||||
go func() {
|
||||
@@ -94,8 +94,8 @@ func main() {
|
||||
case txBatch := <-txCh:
|
||||
//jsonData, _ := json.MarshalIndent(txBatch, "", " ")
|
||||
for _, tx := range txBatch {
|
||||
if tx.Label == "dflow" {
|
||||
fmt.Println("===============", tx.TxHash, tx.Event, tx.Token0Address, "token:", tx.Token0Amount)
|
||||
if tx.Label == "okxdexroutev2" {
|
||||
fmt.Println("===============", tx.TxHash, tx.Label, tx.Event, tx.Token0Address, "token:", tx.Token0Amount, "parse time:", tx.ParseEnd.Sub(tx.ParseStart))
|
||||
}
|
||||
}
|
||||
//fmt.Println(txBatch[0].TxHash)
|
||||
|
||||
Reference in New Issue
Block a user