Skip to content

Commit

Permalink
(fix) Remove sequence number tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
shibaeff committed Oct 3, 2024
1 parent 7c64b03 commit d89db43
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions client/chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit d89db43

Please sign in to comment.