Skip to content

Commit 6d7104c

Browse files
committed
[Qt] make sure transaction table entry gets updated after bump
1 parent 32325a3 commit 6d7104c

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/qt/transactionrecord.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
246246
status.status = TransactionStatus::Confirmed;
247247
}
248248
}
249-
249+
status.needsUpdate = false;
250250
}
251251

252252
bool TransactionRecord::statusUpdateNeeded()
253253
{
254254
AssertLockHeld(cs_main);
255-
return status.cur_num_blocks != chainActive.Height();
255+
return status.cur_num_blocks != chainActive.Height() || status.needsUpdate;
256256
}
257257

258258
QString TransactionRecord::getTxID() const

src/qt/transactionrecord.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ class TransactionStatus
6161

6262
/** Current number of blocks (to know whether cached status is still valid) */
6363
int cur_num_blocks;
64+
65+
bool needsUpdate;
6466
};
6567

6668
/** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has

src/qt/transactiontablemodel.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ class TransactionTablePriv
168168
case CT_UPDATED:
169169
// Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
170170
// visible transactions.
171+
for (int i = lowerIndex; i < upperIndex; i++) {
172+
TransactionRecord *rec = &cachedWallet[i];
173+
rec->status.needsUpdate = true;
174+
}
171175
break;
172176
}
173177
}

0 commit comments

Comments
 (0)