Diff-minimise

This commit is contained in:
Luke Dashjr 2025-02-08 17:03:46 +00:00
parent f637b331aa
commit ac55776817
2 changed files with 24 additions and 17 deletions

View File

@ -1,6 +0,0 @@
GUI changes
------
- Transactions that are confirmed while assume utxo background sync is in progress,
will have a clock icon and a tooltip explaining that historical blocks are still
being verified. (#28616)

View File

@ -175,31 +175,44 @@ void TransactionRecord::updateStatus(const interfaces::WalletTxStatus& wtx, cons
// For generated transactions, determine maturity
if (type == TransactionRecord::Generated) {
if (wtx.blocks_to_maturity > 0) {
if (wtx.blocks_to_maturity > 0)
{
status.status = TransactionStatus::Immature;
if (wtx.is_in_main_chain) {
if (wtx.is_in_main_chain)
{
status.matures_in = wtx.blocks_to_maturity;
} else {
}
else
{
status.status = TransactionStatus::NotAccepted;
}
} else {
}
else
{
status.status = TransactionStatus::Confirmed;
}
} else {
if (status.depth < 0) {
}
else
{
if (status.depth < 0)
{
status.status = TransactionStatus::Conflicted;
}
else if (status.depth == 0) {
else if (status.depth == 0)
{
status.status = TransactionStatus::Unconfirmed;
if (wtx.is_abandoned) {
if (wtx.is_abandoned)
status.status = TransactionStatus::Abandoned;
}
} else if (wtx.is_assumed) {
status.status = TransactionStatus::AssumedConfirmed;
} else if (status.depth < RecommendedNumConfirmations) {
}
else if (status.depth < RecommendedNumConfirmations)
{
status.status = TransactionStatus::Confirming;
} else {
}
else
{
status.status = TransactionStatus::Confirmed;
}
}