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

Additional check when ensuring wallet synchronised between chains #3794

Merged
merged 4 commits into from
Mar 15, 2024

Conversation

tomaszslabon
Copy link
Contributor

@tomaszslabon tomaszslabon commented Mar 13, 2024

#Depends on #3793.
This PR adds an additional check when ensuring the wallet is synchronised between chain.
The new check involves verifying if any UTXO assigned to the wallet comes from the moved funds sweep transaction.
We only checked if the UTXO comes from a deposit sweep transaction, but it is also possible a moved funds sweep could be the first transaction coming from a new wallet.

Additionally, the GetMovedFundsSweepRequest function was updated to follow the same pattern as functions for getting deposit sweep requests or pending redemption requests.

@tomaszslabon tomaszslabon changed the title Additional check when ensuring wallet synchronised between wallets Additional check when ensuring wallet synchronised between chains Mar 13, 2024
@tomaszslabon tomaszslabon self-assigned this Mar 13, 2024
@tomaszslabon tomaszslabon changed the base branch from main to moved-funds-sweep-spv-proof March 13, 2024 17:11
Copy link
Member

@lukasz-zimnoch lukasz-zimnoch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent that you caught the need to make the presented modification! Eagle eye 👁️

Just two nitpick comments and I'm happy to merge!

pkg/maintainer/spv/moved_funds_sweep.go Outdated Show resolved Hide resolved
pkg/tbtc/wallet.go Outdated Show resolved Hide resolved
Base automatically changed from moved-funds-sweep-spv-proof to main March 15, 2024 14:03
@tomaszslabon tomaszslabon marked this pull request as ready for review March 15, 2024 14:05
lukasz-zimnoch
lukasz-zimnoch previously approved these changes Mar 15, 2024
@lukasz-zimnoch lukasz-zimnoch merged commit ee0ed3d into main Mar 15, 2024
29 checks passed
@lukasz-zimnoch lukasz-zimnoch deleted the additional-check-wallet-synced branch March 15, 2024 15:21
@lukasz-zimnoch lukasz-zimnoch added this to the v2.1.0 milestone Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants