8000 Implement wallet lock/unlock utxos by peterjan · Pull Request #1896 · SiaFoundation/renterd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

peterjan
Copy link
Member
@peterjan peterjan commented May 27, 2025

blocked until SiaFoundation/coreutils#245 gets merged and we can fix the coreutils dependency to a version

@github-project-automation github-project-automation bot moved this to In Progress in Sia May 27, 2025
@peterjan peterjan self-assigned this May 27, 2025
@peterjan peterjan requested a review from ChrisSchinnerl May 27, 2025 09:18
@peterjan peterjan marked this pull request as ready for review May 27, 2025 09:18
@Copilot Copilot AI review requested due to automatic review settings May 27, 2025 09:18
Copy link
@Copilot Copilot AI left a 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.

@@ -0,0 +1,9 @@
CREATE TABLE `wallet_locked_outputs` (
Copy link
Member

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

Copy link
Member Author

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 👍

@peterjan peterjan force-pushed the pj/wallet-lock-utxos branch 3 times, most recently from 459ae34 to becf82a Compare May 28, 2025 08:37
@peterjan peterjan force-pushed the pj/wallet-lock-utxos branch from a83406d to 841c9ee Compare May 28, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants
0