Skip to content

Commit bbe4618

Browse files
authored
fix: use TxIds for ack count in TxSubmission (#713)
1 parent 75289c3 commit bbe4618

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

protocol/txsubmission/server.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ func (s *Server) RequestTxIds(
108108
if err := s.SendMessage(msg); err != nil {
109109
return nil, err
110110
}
111-
// Reset ack count
112-
s.ackCount = 0
113111
// Wait for result
114112
txIds, ok := <-s.requestTxIdsResultChan
115113
if !ok {
116114
return nil, protocol.ProtocolShuttingDownError
117115
}
116+
// Update ack count for next call
117+
s.ackCount = len(txIds)
118118
return txIds, nil
119119
}
120120

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

0 commit comments

Comments
 (0)