Commit 1b69df3c authored by kingwang's avatar kingwang Committed by vipwzw

all transaction can be send

parent ced3ff40
package para package para
import ( import (
"bytes"
"context" "context"
"sync/atomic" "sync/atomic"
"time" "time"
...@@ -52,7 +51,6 @@ func (mem *Mempool) SetQueueClient(client queue.Client) { ...@@ -52,7 +51,6 @@ func (mem *Mempool) SetQueueClient(client queue.Client) {
switch msg.Ty { switch msg.Ty {
case types.EventTx: case types.EventTx:
mlog.Info("Receive msg from para mempool") mlog.Info("Receive msg from para mempool")
if bytes.HasPrefix(msg.GetData().(*types.Transaction).Execer, types.ParaKey) {
tx := msg.GetData().(*types.Transaction) tx := msg.GetData().(*types.Transaction)
for i := 0; i < retry_times; i++ { for i := 0; i < retry_times; i++ {
reply, err := mem.mainGrpcCli.SendTransaction(context.Background(), tx) reply, err := mem.mainGrpcCli.SendTransaction(context.Background(), tx)
...@@ -66,7 +64,6 @@ func (mem *Mempool) SetQueueClient(client queue.Client) { ...@@ -66,7 +64,6 @@ func (mem *Mempool) SetQueueClient(client queue.Client) {
msg.Reply(client.NewMessage(mem.key, types.EventReply, err)) msg.Reply(client.NewMessage(mem.key, types.EventReply, err))
} }
} }
}
default: default:
msg.Reply(client.NewMessage(mem.key, types.EventReply, types.ErrActionNotSupport)) msg.Reply(client.NewMessage(mem.key, types.EventReply, types.ErrActionNotSupport))
} }
......
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