Skip to content

Commit e81fb1e

Browse files
refactor: comment out transaction sending logic in tx_pool_latency_analysis and tx_pool_throughput_analysis tasks for future review
1 parent adab290 commit e81fb1e

File tree

2 files changed

+32
-32
lines changed
  • pkg/coordinator/tasks

2 files changed

+32
-32
lines changed

pkg/coordinator/tasks/tx_pool_latency_analysis/task.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,22 +150,22 @@ func (t *Task) Execute(ctx context.Context) error {
150150
}
151151

152152
// Send txes to other clients, for speeding up tx mining
153-
t.logger.Infof("Sending %d transactions to other clients for mining", len(result.Txs))
154-
155-
for _, tx := range result.Txs {
156-
for _, otherClient := range executionClients {
157-
if otherClient.GetName() == client.GetName() {
158-
continue
159-
}
160-
161-
if sendErr := otherClient.GetRPCClient().SendTransaction(ctx, tx); sendErr != nil {
162-
t.logger.Errorf("Failed to send transaction to other client: %v", sendErr)
163-
t.ctx.SetResult(types.TaskResultFailure)
164-
165-
return sendErr
166-
}
167-
}
168-
}
153+
// t.logger.Infof("Sending %d transactions to other clients for mining", len(result.Txs))
154+
155+
// for _, tx := range result.Txs {
156+
// for _, otherClient := range executionClients {
157+
// if otherClient.GetName() == client.GetName() {
158+
// continue
159+
// }
160+
161+
// if sendErr := otherClient.GetRPCClient().SendTransaction(ctx, tx); sendErr != nil {
162+
// t.logger.Errorf("Failed to send transaction to other client: %v", sendErr)
163+
// t.ctx.SetResult(types.TaskResultFailure)
164+
165+
// return sendErr
166+
// }
167+
// }
168+
// }
169169

170170
t.logger.Infof("Total transactions sent: %d", result.TotalTxs)
171171

pkg/coordinator/tasks/tx_pool_throughput_analysis/task.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -147,22 +147,22 @@ func (t *Task) Execute(ctx context.Context) error {
147147
}
148148

149149
// Send txes to other clients, for speeding up tx mining
150-
t.logger.Infof("Sending %d transactions to other clients for mining", len(result.Txs))
151-
152-
for _, tx := range result.Txs {
153-
for _, otherClient := range executionClients {
154-
if otherClient.GetName() == client.GetName() {
155-
continue
156-
}
157-
158-
if sendErr := otherClient.GetRPCClient().SendTransaction(ctx, tx); sendErr != nil {
159-
t.logger.Errorf("Failed to send transaction to other client: %v", sendErr)
160-
t.ctx.SetResult(types.TaskResultFailure)
161-
162-
return sendErr
163-
}
164-
}
165-
}
150+
// t.logger.Infof("Sending %d transactions to other clients for mining", len(result.Txs))
151+
152+
// for _, tx := range result.Txs {
153+
// for _, otherClient := range executionClients {
154+
// if otherClient.GetName() == client.GetName() {
155+
// continue
156+
// }
157+
158+
// if sendErr := otherClient.GetRPCClient().SendTransaction(ctx, tx); sendErr != nil {
159+
// t.logger.Errorf("Failed to send transaction to other client: %v", sendErr)
160+
// t.ctx.SetResult(types.TaskResultFailure)
161+
162+
// return sendErr
163+
// }
164+
// }
165+
// }
166166

167167
t.logger.Infof("Total transactions sent: %d", result.TotalTxs)
168168

0 commit comments

Comments
 (0)