Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WalletState.consistent boolean #587

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

pm47
Copy link
Member

@pm47 pm47 commented Jan 26, 2024

In the initial implementation of the wallet, we were asynchronously retrieving the parent transaction of utxos. When a new utxo was detected, there would be a period of time where WalletState would contain the utxo, but not the parent tx, hence the need for the consistent boolean.

But since #411 the Electrum interface has become "synchronous" with the use of suspend functions.

Note that if for some reason we cannot retrieve the transaction from Electrum, then we ignore the utxo, which is what we were doing previously with a walletStateFlow.filter { it.consistent } in Peer.

In the initial implementation of the wallet, we were asynchronously retrieving the parent transaction of utxos. When a new utxo was detected, there would be a period of time where `WalletState` would contain the utxo, but not the parent tx, hence the need for the `consistent` boolean.

But since #411 the Electrum interface has become "synchronous" with the use of `suspend` functions.

Note that if for some reason we cannot retrieve the transaction from Electrum, then we ignore the utxo, which is what we were doing previously with a `walletStateFlow.filter { it.consistent }` in Peer.
@pm47 pm47 requested a review from sstone January 26, 2024 13:35
@pm47 pm47 merged commit 50aadd9 into master Jan 29, 2024
2 checks passed
@pm47 pm47 deleted the remove-wallet-consistent branch January 29, 2024 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants