Skip to content

Commit 71842b5

Browse files
authored
fix: use correct comparison for bounds check in localtxmonitor (#809)
1 parent e410e9d commit 71842b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

protocol/localtxmonitor/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (s *Server) handleNextTx() error {
185185
"role", "server",
186186
"connection_id", s.callbackContext.ConnectionId.String(),
187187
)
188-
if s.mempoolNextTxIdx > len(s.mempoolTxs) {
188+
if s.mempoolNextTxIdx >= len(s.mempoolTxs) {
189189
newMsg := NewMsgReplyNextTx(0, nil)
190190
if err := s.SendMessage(newMsg); err != nil {
191191
return err

0 commit comments

Comments
 (0)