[Qt] make sure transaction table entry gets updated after bump
This commit is contained in:
parent
32325a3f58
commit
6d7104c994
3 changed files with 8 additions and 2 deletions
|
@ -246,13 +246,13 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
|
|||
status.status = TransactionStatus::Confirmed;
|
||||
}
|
||||
}
|
||||
|
||||
status.needsUpdate = false;
|
||||
}
|
||||
|
||||
bool TransactionRecord::statusUpdateNeeded()
|
||||
{
|
||||
AssertLockHeld(cs_main);
|
||||
return status.cur_num_blocks != chainActive.Height();
|
||||
return status.cur_num_blocks != chainActive.Height() || status.needsUpdate;
|
||||
}
|
||||
|
||||
QString TransactionRecord::getTxID() const
|
||||
|
|
|
@ -61,6 +61,8 @@ public:
|
|||
|
||||
/** Current number of blocks (to know whether cached status is still valid) */
|
||||
int cur_num_blocks;
|
||||
|
||||
bool needsUpdate;
|
||||
};
|
||||
|
||||
/** UI model for a transaction. A core transaction can be represented by multiple UI transactions if it has
|
||||
|
|
|
@ -168,6 +168,10 @@ public:
|
|||
case CT_UPDATED:
|
||||
// Miscellaneous updates -- nothing to do, status update will take care of this, and is only computed for
|
||||
// visible transactions.
|
||||
for (int i = lowerIndex; i < upperIndex; i++) {
|
||||
TransactionRecord *rec = &cachedWallet[i];
|
||||
rec->status.needsUpdate = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue