From d89db43e1f47e4aeca6008ecba57f2e7d1d3d3c4 Mon Sep 17 00:00:00 2001 From: Pavel Shibaev Date: Thu, 3 Oct 2024 18:59:51 +0200 Subject: [PATCH] (fix) Remove sequence number tracking --- client/chain/chain.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/client/chain/chain.go b/client/chain/chain.go index e72b4b62..b494b19e 100644 --- a/client/chain/chain.go +++ b/client/chain/chain.go @@ -836,7 +836,6 @@ func (c *chainClient) SyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastT if err != nil || res.TxResponse.Code != 0 { return res, err } - fixedSeq := c.accSeq awaitCtx, cancelFn := context.WithTimeout(context.Background(), defaultBroadcastTimeout) defer cancelFn() @@ -868,10 +867,6 @@ func (c *chainClient) SyncBroadcastSignedTx(txBytes []byte) (*txtypes.BroadcastT t.Stop() return nil, err case <-t.C: - if fixedSeq != c.getAccSeq() { - fmt.Println(fixedSeq, c.getAccSeq()) - return nil, errors.New("Account sequence mismatch during the broadcast") - } resultTx, err := c.ctx.Client.Tx(awaitCtx, txHash, false) if err != nil { if errRes := client.CheckCometError(err, txBytes); errRes != nil { @@ -934,7 +929,6 @@ func (c *chainClient) broadcastTx( if err != nil || res.TxResponse.Code != 0 || !await { return res, err } - fixedSeq := txf.Sequence() awaitCtx, cancelFn := context.WithTimeout(context.Background(), defaultBroadcastTimeout) defer cancelFn() @@ -966,11 +960,6 @@ func (c *chainClient) broadcastTx( t.Stop() return nil, err case <-t.C: - c.syncNonce() - if fixedSeq != c.getAccSeq() { - fmt.Println(fixedSeq, c.getAccSeq()) - return nil, errors.New("Account sequence mismatch during the broadcast") - } resultTx, err := clientCtx.Client.Tx(awaitCtx, txHash, false) if err != nil { if errRes := client.CheckCometError(err, txBytes); errRes != nil {