HomePhabricator

[Cashtab] Bugfix in haveUtxosChanged

Description

[Cashtab] Bugfix in haveUtxosChanged

Summary:
The haveUtxosChanged function always returns true after it was switched to compare utxo from API against previously saved wallet.state utxo set. This means that hydrateUtxos is called every 10s, degrading app performance.

This diff returns to the original way of comparing utxo set.

Additionally, the diff simplifies the function by removing redundant and confusing if/else statements.

Test Plan: npm test

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

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

Details

Provenance
Joey King <joseph.roy.king@gmail.com>Authored on May 12 2021, 20:17
bytesofmanPushed on May 12 2021, 21:53
Reviewer
Restricted Project
Differential Revision
D9516: [Cashtab] Bugfix in haveUtxosChanged
Parents
rABC25996e7e2388: p2p: ensure inv is GenMsgTx before ToGenTxid in inv processing
Branches
Unknown
Tags
Unknown

Event Timeline