-
Notifications
You must be signed in to change notification settings - Fork 28
Implement wallet lock/unlock utxos #1896
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements UTXO wallet locking and unlocking functionality to support the SingleAddressStore interface.
- Adds new methods in the SQLStore for locking, querying, and releasing UTXOs.
- Introduces corresponding database migration scripts and updates schema for both SQLite and MySQL.
- Implements test cases for wallet lock/unlock behavior.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
stores/wallet_test.go | Adds testing for wallet lock/unlock functionality. |
stores/wallet.go | Implements LockUTXOs, LockedUTXOs, and ReleaseUTXOs methods. |
stores/sql/sqlite/migrations/main/schema.sql | Adds schema for wallet_locked_outputs in SQLite. |
stores/sql/sqlite/migrations/main/migration_00036_wallet_locked_utxos.sql | Migration script for creating wallet_locked_outputs (SQLite). |
stores/sql/sqlite/main.go | Implements SQLite-specific lock, query, and release functions. |
stores/sql/mysql/migrations/main/schema.sql | Adds schema for wallet_locked_outputs in MySQL. |
stores/sql/mysql/migrations/main/migration_00036_wallet_locked_utxos.sql | Migration script for creating wallet_locked_outputs (MySQL). |
stores/sql/mysql/main.go | Implements MySQL-specific lock, query, and release functions. |
stores/sql/main.go | Provides common SQL functions for wallet locked outputs. |
stores/sql/database.go | Updates the interface to include new UTXO lock/unlock methods. |
internal/sql/migrations.go | Registers the new migration for wallet_locked_utxos. |
.changeset/extend_store_with_utxo_lockunlock_methods_to_implement_the_singleaddressstore_interface.md | Contains changeset summary for new methods. |
...t/extend_store_with_utxo_lockunlock_methods_to_implement_the_singleaddressstore_interface.md
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,9 @@ | |||
CREATE TABLE `wallet_locked_outputs` ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocker to make sure these were manually verified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verified manually, tested on both SQLite and MySQL - decided to change the identifier though 👍
459ae34
to
becf82a
Compare
a83406d
to
841c9ee
Compare
blocked until SiaFoundation/coreutils#245 gets merged and we can fix the coreutils dependency to a version