Skip to content

Commit

Permalink
Merge bitcoin-core/gui#17: doc: Remove outdated comment in Transactio…
Browse files Browse the repository at this point in the history
…nTablePriv

faebb60 doc: Remove outdated comment in TransactionTablePriv (MarcoFalke)

Pull request description:

  Locks are no longer taken upfront, so remove the outdated comment

ACKs for top commit:
  hebasto:
    ACK faebb60, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: cd6df24d49d17e58049ac9b261c5e07c8e85ed1aacb547b13c0e55139339d7fcc3b1f766ea2e27d758ea77deadc01f7e28781be1515323c82b9012cee8fd488b
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Jun 28, 2021
1 parent afa2a6a commit 7f46c0d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,17 +191,12 @@ class TransactionTablePriv

TransactionRecord *index(interfaces::Wallet& wallet, int numBlocks, int idx)
{
if(idx >= 0 && idx < cachedWallet.size())
{
if (idx >= 0 && idx < cachedWallet.size()) {
TransactionRecord *rec = &cachedWallet[idx];

// Get required locks upfront. This avoids the GUI from getting
// stuck if the core is holding the locks for a longer time - for
// example, during a wallet rescan.
//
// If a status update is needed (blocks came in since last check),
// update the status of this transaction from the wallet. Otherwise,
// simply re-use the cached status.
// try to update the status of this transaction from the wallet.
// Otherwise, simply re-use the cached status.
interfaces::WalletTxStatus wtx;
int64_t adjustedTime;
if (rec->statusUpdateNeeded(numBlocks, parent->getChainLockHeight()) && wallet.tryGetTxStatus(rec->hash, wtx, adjustedTime)) {
Expand Down

0 comments on commit 7f46c0d

Please sign in to comment.