moontreeapp / moontree

Primary Mono Repo
6 stars 5 forks source link

Incorrect Holdings Quantity #625

Closed Whale-Street closed 2 years ago

Whale-Street commented 2 years ago

Describe The Bug

Incorrect amount after sending... had 50 asset, sent 5, then it showed I had 95, lol. Restarted and it corrected itself to show 45.

To Reproduce

Pick an asset, send subset of quantity, potentially observe the incorrect amount held.

Expected Behavior

Show the correct amount held.

Additional Context

mainnet

Screenshots

Screenshot_20220525-175124

lastmeta commented 2 years ago

tried to duplicate this on testnet (using a brand new wallet), and unable to duplicate.

lastmeta commented 2 years ago

we've seen both too much and too little: 50 - 5 -> 95 35 -5 -> 20 so it seems it is downloading the incorrect unspents, or its a race condition, where it's building a balance from the unspents before they are all downloaded.

most recently, this remained a problem even after restarting the app, which indicates to me that maybe its the result of #627

the weirdest thing about this is that we can't replicate it on testnet, at least recently or reliably

Whale-Street commented 2 years ago

After testing further we discovered this is most likely a race condition with the change, utxos and updating.