Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data model for freezing UTXOs (#376)
* feat: add address, isFrozen and tag * feat: filter frozen utxos * feat: utxo migration * feat: add postgres for nbxplorer * fix: add migration for optional address and tag * feat: RegisterUTXOs job * feat: add wallet to FMUTXO * feat(FMUTXO.cs): add IsSpent property to determine if UTXO is spent based on channel and withdrawal statuses * feat(FMUTXO.cs): add NBitcoin and NBXplorer dependencies for UTXO model enhancements feat(FMUTXO.cs): implement Equals method for UTXO comparison with NBitcoin types refactor(RegisterUTXOsJob.cs): adjust equality check to use modified Equals method in FMUTXO model for clarity and consistency * feat: consolidate migrations * fix: migration * refactor(ChannelOperationRequestRepositoryTests): add additional null parameter to constructor calls to align with updated constructor signature * Bump deps * Fix problem with new change in nbxplorer when tracking btc addresses * feat: rebuild of the migration * EF Core already does execute the migration in a transaction scope, this was giving a race condition when generating the db (#375) * feat: changes for deps update * Fix AddRangeAsync not using a generic function type making EF Core fail to recognize the entities when saving a list * Fix RegisterUTXOsJob to use WalletId instead of Wallet property * fix: rollback changes * feat(FMUTXO.cs): add Blazorise.Extensions for enhanced functionality refactor(FMUTXO.cs): improve IsSpent property logic to handle null collections feat(FUTXORepository.cs): include Tags in FMUTXOs query to provide more detailed data * fix: remove error and set the creation time and the update time * refactor(FUTXORepository.cs): optimize UTXO retrieval logic to enhance performance and accuracy feat(RegisterUTXOsJob.cs): log information after adding new UTXOs to enhance traceability fix(Constants.cs, launchSettings.json): align REGISTER_UTXOS_CRON schedule across configurations for consistency * fix: rollback the port * fix: remove isSpent * refactor(FUTXORepository): replace GetFromUTXOs with GetByOutpoint for specific UTXO retrieval feat(CoinSelectionService): update UTXO selection logic to handle new and existing UTXOs feat(CoinSelectionService): enhance error handling and logging for UTXO operations feat(Interfaces): update IFMUTXORepository interface to reflect method changes style(CoinSelectionService): add Blazorise dependencies for UI enhancements * fix(docker-compose.yml): change PostgreSQL service port mapping to avoid port conflicts * fix: fix method type * fix: remove unused imports * fix: comments * feat: UTXOTag in another file * fix: set to dbtrie again * feat: explanation of the job * Update src/Services/CoinSelectionService.cs Co-authored-by: Rodrigo <[email protected]> * Update src/Services/CoinSelectionService.cs Co-authored-by: Rodrigo <[email protected]> * feat(RegisterUTXOsJob.cs): skip processing wallets without derivation strategy refactor(RegisterUTXOsJob.cs): improve error logging format for consistency style(RegisterUTXOsJob.cs): change log level from Information to Debug for UTXO processing logs to reduce log verbosity * fix: tags in the relations * fix: add throw * chore: comments * refactor: remove job to add utxos * refactor: remove properties to rollback changes * refactor: remove unused methods * chore(FMUTXO.cs): remove unused using directives to clean up code * style(FUTXORepository.cs): remove extra whitespace for cleaner code format * refactor(Constants.cs): remove REGISTER_UTXOS_CRON constant and its environment variable handling as it is no longer used in the application * style(FMUTXO.cs): remove extra whitespace for cleaner code formatting * refactor(FMUTXO.cs): remove unused NBitcoin and NBXplorer imports to clean up code refactor(FMUTXO.cs): remove redundant Equals method that compares UTXO objects, simplifying the model * refactor: remove logic for FMUTXOs * refactor: remove spaces * refactor: rollback logic changes * style(CoinSelectionService.cs): add missing line break for better code readability * refactor: remove migration * feat: utxotag repository * refactor(UTXOTag.cs): remove FMUTXO navigation properties to decouple UTXOTag from FMUTXO model * feat(IUTXOTagRepository, UTXOTagRepository): add GetTagByKeyAndOutpoint method WHY: Enhance querying capabilities by allowing retrieval of UTXOTag based on both key and outpoint, facilitating more specific data access patterns. * style(UTXOTagRepository.cs): fix indentation for better code readability * refactor(UTXOTag): make Outpoint property non-nullable to enforce data integrity refactor(IUTXOTagRepository): rename GetTagByKeyAndOutpoint to GetByKeyAndOutpoint for consistency feat(IUTXOTagRepository): add GetByKeyValue method to query UTXOTags by key and value * feat: exclude frozen utxos * fix: add repository * feat: migration * refactor(NodeGuardServiceTests.cs): add missing null parameter to constructors for consistency refactor(BitcoinServiceTests.cs): add missing null parameter in CoinSelectionService constructor for completeness * feat: add unique constraint for key outpoint in the utxotag table * test: fix tests and add one more * Update src/Helpers/Constants.cs Co-authored-by: José A.P <[email protected]> --------- Co-authored-by: José A.P <[email protected]> Co-authored-by: Rodrigo <[email protected]>
- Loading branch information