HomePhabricator

gui: Avoid redundant tx status updates

Description

gui: Avoid redundant tx status updates

Summary:

In TransactionTablePriv::index, avoid calling
interfaces::Wallet::tryGetTxStatus if the status is up to date as of the most
recent NotifyBlockTip notification. Store height from the most recent
notification in a new ClientModel::cachedNumBlocks variable in order to check
this.

This avoids floods of IPC traffic from tryGetTxStatus with PR10102 when there
are a lot of transactions. It might also make the GUI a little more efficient
even when there is no IPC.

This is a backport of Core PR17905

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8871

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Jan 11 2021, 16:50
PiRKCommitted on Jan 11 2021, 16:50
abc-botPushed on Jan 11 2021, 16:57
Reviewer
Restricted Project
Differential Revision
D8871: gui: Avoid redundant tx status updates
Parents
rABCfbfd1215922c: [Cashtab] remove duplicate key from test mock
Branches
Unknown
Tags
Unknown