Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont include dead transactions in check for unconfirmed txs chain #4648

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 7 additions & 2 deletions core/src/main/java/bisq/core/btc/wallet/WalletService.java
Expand Up @@ -632,9 +632,14 @@ public int getLastBlockSeenHeight() {
* @return true when queue is full
*/
public boolean isUnconfirmedTransactionsLimitHit() {
return 20 < getTransactions(false).stream()
// For published delayed payout transactions we do not receive the tx confidence
// so we cannot check if it is confirmed so we ignore it for that check. The check is any arbitrarily
// using a limit of 20, so we don't need to be exact here. Should just reduce the likelihood of issues with
// the too long chains of unconfirmed transactions.
return getTransactions(false).stream()
.filter(tx -> tx.getLockTime() == 0)
.filter(Transaction::isPending)
.count();
.count() > 20;
}

public Set<Transaction> getTransactions(boolean includeDead) {
Expand Down