Skip to content

Commit

Permalink
Merge pull request #65 from bloxbean/fix/tx-submission-fifo-dequeueing-2
Browse files Browse the repository at this point in the history
Fixing removal of TX from FIFO queue
  • Loading branch information
satran004 committed Apr 18, 2024
2 parents 88bd2e9 + a45c1e8 commit a4080ca
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,8 @@ private ReplyTxs getReplyTxs() {
return new ReplyTxs();

ReplyTxs replyTxs = new ReplyTxs();
requestedTxIds.forEach(txId -> removeTxIdAndHash(txId).ifPresent(txSubmissionRequest -> replyTxs.addTx(txSubmissionRequest.getTxnBytes())));
requestedTxIds.forEach(txId -> findTxIdAndHash(txId).ifPresent(txSubmissionRequest -> replyTxs.addTx(txSubmissionRequest.getTxnBytes())));

// Ids of requested TXs don't seem to be acked from server.
// Removing them right away now.
requestedTxIds.forEach(pendingTxIds::remove);
if (log.isDebugEnabled())
log.debug("Txs: {}", replyTxs.getTxns().size());
return replyTxs;
Expand Down Expand Up @@ -161,8 +158,6 @@ private void removeAcknowledgedTxs(int numAcknowledgedTransactions) {
if (txHash != null) {
// remove from map
removeTxIdAndHash(txHash);
// removed from queue
pendingTxIds.remove(txHash);
}
}

Expand Down

0 comments on commit a4080ca

Please sign in to comment.