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