Skip to content

Commit

Permalink
fix: use TxIds for ack count in TxSubmission (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored Sep 20, 2024
1 parent 75289c3 commit bbe4618
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions protocol/txsubmission/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ func (s *Server) RequestTxIds(
if err := s.SendMessage(msg); err != nil {
return nil, err
}
// Reset ack count
s.ackCount = 0
// Wait for result
txIds, ok := <-s.requestTxIdsResultChan
if !ok {
return nil, protocol.ProtocolShuttingDownError
}
// Update ack count for next call
s.ackCount = len(txIds)
return txIds, nil
}

Expand All @@ -129,8 +129,6 @@ func (s *Server) RequestTxs(txIds []TxId) ([]TxBody, error) {
if !ok {
return nil, protocol.ProtocolShuttingDownError
}
// Set the ack count for the next RequestTxIds request based on the number we got for this one
s.ackCount = len(txs)
return txs, nil
}

Expand Down

0 comments on commit bbe4618

Please sign in to comment.